Page 48
Serial Interface RS422
optoNCDT 22xx
Command Reply, Communication without Error
7.2.1
No start word is transmitted, if the sensor replies to a command. The 1st word then is the sensor identifier.
The second word is the command with set MSB (Bit 31 = 1, corresponding an OR operation of the com-
mand with 0x8000) and the new package length, if there was no error during communication. With longer
answers (for example GET_INFO) the package length is larger according to the quantity of data words to be
transmitted. A firm 32 bitword 0x20200D0A forms the conclusion of the answer. The conclusion word is not a
data word.
Example:
Sensor reply (without error) to the AVGn command.
31
24 23
16 15
8 7
0
hex
Contents
“I“
“L“
“D“
“1“
0x494C4431
Identifier ID (“ILD1“)
0xA0
0x75
0x00
0x02
0xA0750002
0x2075 OR 0x8000
(MSB = 1)
Package
length (2)
0x20
0x20
0x0D
0x0A
0x20200D0A
Conclusion word
Command Reply, Communication with Error
7.2.2
If the sensor detects an error during the execution of a command, the second highest bit (bit 30) of the com-
mand is also set (the command is OR operated with 0xC000). Additionally a command error code is trans-
ferred as data word, see Fig. 29. The resulting package length amounts to now 3 data words. The reply is
finished with a 32 bit word 0x20200D0A (2 blank char CR + LF).
Error Code X Description
1
Command unknown
2
Incorrrect parameter value
3
Invalid parameter
4
Time out
5
Command failed
6
Warning for averaging type and averaging number
1
Command error codes
Fig. 28