DS2 Ethernet
Instruction Manual
28
7.
AREAscan
TM
DS2 SERIES
– COMMUNICATION PROTOCOL
7.1. Packet description
As mentioned, the communication protocol requires the presence of a
client
unit and of a
master
unit.
The communication type is Ethernet.
The exchange of information is made in the
request-reply mode
: the client sends a data frame to the
master that replies sending another data frame to the client.
7.1.1 Binary data packet structure
A binary data packet is composed of a group of bytes placed in a well-defined sequence, that
identifies it univocally. It presents a
heading
,
body
and an
end.
The heading and the end have a fixed length while the body has a variable length.
Packet start
Length
Type
Data
Packet end
Checksum
Packet beginning:
1 byte, STX ASCII code (‘0x02’)
Length:
1 byte, length in bytes of the
Type
field plus the
Data
field
Type:
1 byte, code identifying the packet type ( ‘A’, ‘B’, ‘C’ ASCII code, etc.)
Data:
variable number of bytes (from 0 to 254) that form the packet information
Packet end:
1 byte, ETX ASCII code(‘0x03’)
Checksum:
1 byte, complement to one of the
Length
,
Type
and
Data
field bytes sum.
7.1.2. Short protocol binary data packet structure
There is a binary data packet with reduced protocol composed by one byte. This format is reserved
to trasmission of numeric type value only (for example one measure).
Data
Data: 1 byte with binary data packet
7.1.3. ASCII data packet structure
An ASCII data packet is composed of:
Packet start
Type
Data
Packet end
Packet beginning:
1 byte, ‘*’ ASCII code (0x2A)
Type:
1 byte, code identifying the packet type ( ‘A’, ‘B’, ‘C’ ASCII code, etc.)
Data:
variable number of ‘0’-‘9’ ‘A’-‘Z’ ASCII codes (from 0 to 254) that form the
packet information
Packet end:
1 byte, CR ASCII code (0x0D)
Heading
Body
End
Body
Heading
Body
End