Modes
62
MA 258
i
Leuze electronic
11.1.1
Reading slave data in Collective mode (gateway -> PLC)
If the Leuze device transmits data to the fieldbus gateway, the data is stored temporarily in
a buffer. The PLC is signaled via the "DEX" bit that data is ready for retrieval in the memory.
Data is not automatically transmitted.
If no further user data is present in the MA 258
i
("DEX" bit = "0"), the "R-ACK" bit must be
toggled once as read confirmation to release data transmission for the next read cycle.
If the buffer still contains more data ("DEX bit = 1), the next remaining user data present in
the buffer is transmitted by toggling the "R-ACK" control bit. This process is to be repeated
until the "DEX" bit returns to "0"; all data has then been removed from the buffer. "R-ACK"
must be toggled here again once more as a terminating read confirmation in order to release
data transmission for the next read cycle.
Used status and control bits:
• DLC
• BLR
• DEX
• R-ACK
11.1.2
Writing slave data in Collective mode (PLC -> gateway)
Writing in blocks
The data sent by the master to the slave is first collected in a "transmit buffer" by setting
the "CTB" bit (
C
opy to
t
ransmit
b
uffer). Please observe that data provided is transmitted
directly by toggling the bit.
The data is then sent in the order received from the buffer to the connected Leuze device
via the serial interface with the command: "SFB" (
S
end data
f
rom transmit
b
uffer). Please
don't forget the suitable data frame!
Afterward, the buffer is again empty and can be written with new data.
Notice!
With this function, it is possible to temporarily store longer data strings in the gateway inde-
pendent of how many bytes the used fieldbus can transmit at once. With this function, longer
PT sequences or RFID write sequences, for example, can be transmitted, since the con-
nected devices can, in this way, receive their commands (e.g., PT or W) in a continuous string.
The respective frame (STX CR LF) is needed to differentiate between the individual tele-
grams.
Used status and control bits:
• CTB
• SFB
• W-ACK
If PLC data is provided and transferred without a state change of the CTB bit, it goes directly
to the RS 232 interface with the set telegram data length. Incomplete (incl. data frame) or
faulty telegrams can cause error messages in the connected device!