Pr 5220 instrument manual fieldbus interface – Rice Lake PR5220 Ethernet Transmitter User Manual

Page 135

Advertising
background image

PR 5220 Instrument Manual

Fieldbus Interface

Sartorius

EN-135

Write Window (Input Area)
Data transmission from the master to the slave (PR 5220) is in this window.
The first four bytes are used only for writing a data value.
The register number is in byte 5.
Bytes 6 and 7 contain bits in direct access independent of the
write data.
The command is executed after a 0-1 transition of the
corresponding bit.

Byte 0

Write data: MSB

Byte 1

"

Byte 2

"

Byte 3

Write data: LSB

Byte 4

Read_Value _Select

Byte 5

Write_Value _Select

Byte 6

Direct control bits

Byte 7

Direct control bits

Read Window (Output Area)
Data transmission from the slave (PR 5220) to the master is in this window.
The first four bytes are used for reading a data value.


The register number of data is mirrored in byte 4 by the write
window, when data is available.

Bytes 5, 6 and 7 contain status bits independent of the read
data.

Byte 0

Read data: MSB

Byte 1

"

Byte 2

"

Byte 3

Read data: LSB

Byte 4

Read_Value _Selected

Byte 5

General system bits:

- Write_Active
- power_fail
- analog error..

.

Byte 6

Status bits

Byte 7

Status bits

Reading and Writing Data
The number of data exceeds the size of the read/write window by far. For this reason, data is addressed with

Write_Value_Select a

nd

Read_Value_Select.

To do this, the first six bytes of the write window and the first

five bytes of the read window are required. These can be used by the master to write data in PR 5220: e.g., a
limit value is set to 100kg. The master can also read out weight values or other data from the PR 5220. For this
purpose, the write and the read window are always required. Safe data exchange is ensured by a write and a
read procedure.
For reading status bits, and for writing direct control bits, however, no procedure is required. The general
system bits and the status bits are always provided and need not be requested. The direct control bits are also
available continuously.
Procedure for reading data:
1.

Writing the register number as

Read_Value_Select

in b

yte 4

of the

write window (e.g. net weight).

2.

Waiting, until the

Read_Value_Selected

in b

yte 4

of the

read window is equal to the

Read_Value_Select

in b

yte 4

of the write window.

3.

Now the value is available in bytes 0 to 3.

Procedure for writing data:
1.

Waiting, until

Write_Active = 0

in the read window (ready to receive new data).

2.

Writing the value in

bytes 0 to 3

.

3.

Writing the register number in byte 5 (Write_Value_Select).

4.

Waiting, until

Write_Active = 1

(acknowledges data reception)

5.

Writing 0 in b

yte 5

(Write_Value_Select) -> Write_Active

goes to 0.

Advertising