12.3.1.2.3
Variable types
8027168/1MNR/2024-10-25 | SICK
Subject to change without notice
Table 14 : Example: ASCII telegram
ASCII <STX>
sMN{SPC}SetAccessMode{SPC}03{SPC}F4724744
Hex
02
73 4D 4E
20
46 34 37 32 34 37 34 34
Start Data
This is again an example telegram for setting the user level "Authorized Client". As only
fixed hexadecimal parameter values are needed, the option to use parameter values in
decimal code with special indicator cannot be applied here:
•
Framing = <STX> = telegram start = 02 (Hex)
•
Data:
–
sMN = start of Sopas command (and blank) = 73 4D 4E 20 (Hex)
–
SetAccessMode = the actual command for setting the user level (and blank)
= 53 65 74 41 63 63 65 73 73 4D 6F 64 65 20 (Hex)
–
03 = fixed Hex value meaning user level "Authorized Client" (and blank) = 30
33 20 (Hex)
–
F4 72 47 44 = fixed Hex value, serving as password for the selected user
level "Authorized Client" = 46 34 37 32 34 37 34 34 (Hex)
•
Framing = <ETX> = telegram stop = 03 (Hex)
Variable type
Length (byte)
Bool_1
1
Uint_8
1
Int_8
1
Uint_16
2
Int_16
2
Uint_32
4
Int_32
4
Enum_8
1
Enum_16
2
String
Context-depend‐
ent
FlexString
array of visible
characters with
preceeding cur‐
rent length
(UInt lenght)
(array of 8 bit)
Real
4
Data length is always given in Bytes!
Struct
A structure is a sequence of further types. These types can be of a Basic‐
Type, Structs again or an Array.
Array
An Array is a repetition of a type. The length of the array is defined with
each Array. The types can be of a BasicType, a Struct or an Array again (n-
dimensional).
53 65 74 41 63 63 65 73 73 4D 6F 64 65
Value range
0 or 1
0 ... 255
-128 ... +127
0 ... 65,535
-32,768 ... +32,767
0 ... 4,294,967,295
-2,147,483,648 ... +2,147,483,647
Certain values defined in a list of
Choices (0 ... 255)
Certain values defined in a list of
Choices (0 ... 65535)
Strings are not terminated in zeroes
See description of String and FlexArray
Float according to
IEEE754 (see
www.h-schmidt.net/
FloatConverter/IEEE754de.html)
N O T I C E D ' I N S T R U C T I O N | LMS4000
12
ANNEXE
<ETX>
20
30 33
20
03
Stop
Sign
No
No
Yes
No
Yes
No
Yes
No
No
Yes
71