Command protocol
Leuze electronic
DCR 55
65
9.1.2
Device acknowledgement
Upon receipt of a command, the device immediately sends an acknowledgement.
Tab. 9.2:
Acknowledgement packet format
Section
Bytes (or Range) Number of
Bytes
Description
Start of Frame
0x01
0x43
0x54
3
Three bytes that indicate the beginning of a
message
Packet Version
0x31
1
Indicates the version number for the packet
format. This value is always 0x31.
Packet Length
0xFFFF
2
For an acknowledgement packet, this value is
always 15.
Destination Address
0x40000000 –
0x4FFFFFFF
4
Represents the address of the host computer.
This value is written as a 4-byte big endian
value.
Source Address
0x00000000 –
0x0FFFFFFE
4
Represents the address of the device that
you are attempting to communicate with.
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
0x00
1
Value indicating the type of packet. This
value is always 0x00 when sending an ac-
knowledgement.
Acknowledgement Num-
ber
0x0000 – 0xFFFF 2
Represents the acknowledgement number.
This value is written as a 2-byte big endian
value.
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
NOTICE
The destination address and the source address now have the source address and destination
address values from the previous command packet.
Ä
If a broadcast address is set in the destination address, it is replaced with the address of the
device in the corresponding acknowledgement packet.
Ä
You must use this address in any following sequences. Without using it, the device will not
respond.