12
ANNEXE
12.3.1.2.2
ASCII telegram (CoLa A)
70
N O T I C E D ' I N S T R U C T I O N | LMS4000
The data length defines the size of the data part (command part) by indicating the
number of digit pairs in the third part. The size of the data length itself is 4 bytes, which
means that the data part might have a maximum of 16
(bytes).
The data part comprises the actual command with letters and characters converted
to Hex (according to the ASCII chart) and the parameters of either decimal numbers
converted to Hex or fixed Hex values with a specific, intrinsic meaning (no conversion).
There is always a space (20) between the command and the parameters, but not
between the different parameter values.
The checksum finally serves to verify that the telegram has been transferred correctly.
The length of the checksum is 1 byte, CRC8. It is calculated with XOR.
Table 13 : Example: Binary telegram
02 02 02
00 00 00
73 4D 4E
02
17
F4 72 47 44
Header
Length
Data
This is an example telegram for setting the user level "Authorized Client":
•
Header = 02 02 02 02
•
Length = 23 bytes (17h)
•
Data:
–
73 4D 4E 20 = sMN = start of Sopas command (and space)
–
53 65 74 41 63 63 65 73 73 4D 6F 64 65 20 = Set Access Mode = the
actual command for setting the user level (and space)
–
03 = fixed Hex value meaning user level "Authorized Client"
–
F4 72 47 44 = fixed Hex value, serving as password for the selected user
level "Authorized Client"
•
Checksum = B3 from XOR calculation
The ASCII telegram is an alternative to the binary telegram, suitable especially to
parametrize the sensor. However, due to the variable string length of ASCII telegrams,
the Binary telegram is still recommended when using scanners with a PLC.
The ASCII telegram has the advantage that commands can be written in plaintext. The
string consists only of two parts: the framing and the data part.
The framing indicates with <STX> and <ETX> the start and stop of each telegram.
The data part comprises the actual command with letters and characters (plaintext),
parameter values either in decimal (special indicator required) or in hexadecimal
(example: a frequency of 25 Hz = +2500 (decimal) = 09C4 (Hex)) and fixed hexadeci‐
mal values with a specific, intrinsic meaning.
NOTE
Leading zeros are deleted in ASCII. Therefore a space is always required between all
command parts and parameter parts.
As further alternative within CoLa A, depending on the preferences of the user, all
values can be written directly in Hex. This means however a 1:1 conversion of all letters
and characters including numbers and fixed hexadecimal values via the ASCII chart.
NOTE
The device will confirm parameter values always in hexadecimal code, regardless of the
code sent.
= 4,294,967,295 digit pairs
8
20
53 65 74 41 63 63 65 73 73 4D 6F 64 65
20
03
B3
CS
8027168/1MNR/2024-10-25 | SICK
Subject to change without notice