CM4 Four-Point Continuous Monitor
CM4 Technical Manual
E-5
E.2 Protocol Packet Definition
E.2.1 Packet Format
Two similar protocols are supported by CM4 software. The original
protocol with a minimum packet length of five bytes is included for
compatibility with previous software. Additionally, a new protocol with a
minimum packet length of six bytes is included for greater robustness.
Examples of packets using both protocols are included at the end of
this chapter.
The format of packets using original version 1 protocol is as follows:
start
code
receiver
address length command
data
checksum
The format of packets using the new version 2 protocol is similar:
start
code
receiver
address
transmitter
address
length command data checksum
Start Code
Size: 1 byte. Always 0x40
Receiver Address
Size: 1 byte
For responses from slave to master, this is always 0.
For inquiries from master to slave, this must match the slave’s
address as set with menu function 3.3.1.
Transmitter Address
Size: 1 byte
For inquiries from master to slave, this is always 0.
For responses from slave to master, this will match the slave’s
address as set with menu function 3.3.1.
Length
Size: 1 byte
The length of the total packet from start code to checksum.
Command
Size: 1 byte
This is 0x28 to 0x69 as defined in the remainder of this book.
Data
Size: 0-250 byte(s)
This section varies according to the command chosen and is
often empty.
Checksum
Size: 1 byte
The two’s complement of the sum of all the previous bytes in
the packet. This makes the sum of the entire packet a multiple
of 0x100.
珠海司福斯特科技有限公司
www.safedtech.com