15
Sensors for your success
www.wenglor.com
Sensors for your success
www.wenglor.com
EN
Frame Layout for Data Transmission
Transmitting Partner
Characters (ASCII)
Receiving Partner
Frame Segment
Start character
/ (ASCII 47)
=>
Connect
Frame header
Length information
2 Byte
=>
Connect
Frame header
Command bytes
2 Byte
=>
Frame header
1
st
data byte
2 Byte
=>
Data information
User data
2
nd
data byte
2 Byte
=>
User data
..
..
=>
Data information
User data
n
th
data byte
..
=>
Data information
User data
BCC
2 Byte
=>
Frame end
Stop bit
. (ASCII 46)
=>
Disconnect
Frame end
Table 7
Connect (frame header):
In order to establish a connection with the communications partner, the Sensor transmits the start bit: “/” (ASCII 47),
followed by length information and a command byte for the data bytes.
Transmitting Data (user data):
After establishing a connection, user data are transmitted.
Disconnect (frame end):
If the NAK character is transmitted during data transfer, the wenglor
®
Sensor disconnects and establishes a new
connection. After all data have been transmitted, the wenglor
®
Sensor transmits the checksum BCC and finally
the stop bit: “.” (ASCII 46).
Data Format:
The data format for length information, user data and the checksum is always hexadecimal. The following range
of ASCII characters may occur:
“0” (ASCII 48) – “9” (ASCII 57)
“A” (ASCII 65) – “F” (ASCII 70)
Example:
Data to be transmitted: decimal 123
Decimal
Hexadecimal
123d
=
7Bh
= > Transmitted character string
“7” (ASCII 55)
“B” (ASCII 66)