
Leuze electronic GmbH + Co. KG
MA 238
i
43
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" (Send data from transmit buffer). Please don't forget the suitable data
frame!
Afterward, the buffer is again empty and can be written with new data.
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!
Examples for the activation of a Leuze device
In the data part (starting at byte 2) of the telegram to the gateway, a "+" (ASCII) is sent for activation.
This means that the hex value "2B" (corresponds to a "+") is to be entered in control or output byte 2. To
deactivate the reading gate, a "2D" (hex) must be used instead (corresponds to a "-" ASCII).
NOTE
With this function, it is possible to temporarily store longer data strings in the gateway indepen
-
dent 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 connected
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 telegrams.
7
6
5
4
3
2
1
0
ND
Address 4 Address 3 Address 2 Address 1 Address 0 Broadcast Command
mode
Control byte 0
CTB
SFB
R-ACK
Control byte 1
Data byte 1
Data
Data byte 2
…
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
0
Output byte 0
0
0
0
0
0
0
0
0
Output byte 1
0
0
0
0
0
0
B
2
Output byte 2
0
0
0
0
0
0
0
0
Output byte 3