Page 36
Serial Interface RS422
optoNCDT 1402
Data Protocol ILD14018.2
Setup of the Commands 8.2.1
The commands for the sensor are transmitted in full duplex mode. Each instruction has a head, the ID, the
command, the quantity and data if required (parameter, if quantity > 0).
The head contains 4 bytes to identify a connection towards the sensor. The ID consists of 2 bytes, the com-
mand and quantity) consists of 1 byte. The complete string (without parameter) has a length of 8 bytes. The
quantity is a equivalent of the subsequent bytes.
Each complete command is returned by the sensor. The answer contains the 2 ID bytes (equivalent to the
transmitted ID), the modified command byte, the quantity and response informations. The modified com-
mand byte = command OR masked with 0x80
hex
if the command was transmitted successful. If an error hap-
pens the modified command byte = command OR masked with 0xC0
hex
. In the case of an error the quantity
is 1 and contains the error code.
Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8 Byte 9
Head ID Command Quantity Parameter
Set-up of a command in the transmitterFig. 17:
Byte 1 Byte 2 Byte 3 Byte 4 Byte 5
ID Command OR masked with 0x80 hex Quantity Parameter
Set-up of a command in the receiver, error-free transmittedFig. 18:
Byte 1 Byte 2 Byte 3 Byte 4 Byte 5
ID Command OR masked with 0xC0 hex Quantity = 1 Error code
Set-up of a command in the receiver, faulty transmissionFig. 19: