Command protocol
Leuze electronic
DCR 55
64
Section
Bytes (or Range) Number of
Bytes
Description
Source Address
0x40000000 –
0x4FFFFFFF
4
Represents the address of the host computer.
This value can be any value within the range
specified and can be arbitrarily chosen.
This value is written as a 4-byte big endian
value.
Protocol Type
0x01
1
Indicates the type of protocol to use when
communicating. This value is always 0x01.
Flags
0x00
Single byte representing a bit field. For send-
ing a command, this value is always 0x00.
Payload Protocol
0x02
1
Value indicating the type of packet. This
value is always 0x02 when sending a com-
mand.
Acknowledgement Num-
ber
0x0000
2
Represents the acknowledgement number.
For a command packet, this value is always
0x0000.
This value is written as a 2-byte big endian
value.
Transaction Number
0x0000 – 0x7FFF 2
Represents a transaction number for a com-
mand. This value is tracked by the host de-
vice and is sent to the device as a new com-
mand. The host device increments the trans-
action number by 1.
Typically, this value starts at 0x0000 when
the device is first powered.
This value is written as a 2-byte big endian
value.
Request ID
0x8000 – 0xFFFF 2
Represents a unique request ID for this com-
mand packet. It is used in the resulting ac-
knowledgement packet. Typically, this value
is the transaction 0x8000.
Payload
N
Data payload that contains the ASCII com-
mand that the host device wants to send to
the device.
CRC16
0x0000 – 0xFFFF 2
Represents a CRC16 (using the CCITT zero
algorithm) value calculated on the bytes after
the packet length.
• Destination Address
• Source Address
• Protocol Type
• Flags
• Payload Protocol
• Acknowledgement Number
• Transaction Number
• Request ID
• Payload