Command protocol
Leuze electronic
DCR 50
67
Section
Bytes (or Range) Number of
Bytes
Description
Flags
0x00
Payload Protocol
0x02
1
Acknowledgement Num-
ber
0x0000
2
Transaction Number
0x0001
2
Request ID
0x8000
2
Following the convention, we add 0x8000 to
the transaction number.
Payload
10
The bytes represent the ASCII command
SYC128PEN1
.
CRC16
0x4501
2
Upon reception of the command, the device sends an acknowledgement.
Tab. 9.8:
Device acknowledgement for example 2
Section
Bytes (or Range) Number of
Bytes
Description
Start of Frame
0x01
0x43
0x54
3
Packet Version
0x31
1
Packet Length
0x000F
2
Destination Address
0x40000000
4
Source Address
0x01234567
4
The device returns its unique address.
Protocol Type
0x01
1
Flags
0x01
Payload Protocol
0x00
1
Acknowledgement Num-
ber
0x0001
2
CRC16
0xFD38
2
After the acknowledgement, the device sends a response packet to the initial command packet.
Tab. 9.9:
Response packet for example 2
Section
Bytes (or Range) Number of
Bytes
Description
Start of Frame
0x01
0x43
0x54
3
Packet Version
0x31
1
Packet Length
0x003A
2
19 + 39 = 58 = 0x003A
Destination Address
0x40000000
4
Source Address
0x01234567
4
Protocol Type
0x01
1
Flags
0x00
Payload Protocol
0x02
1