Operation with pni binary protocol, Datagram structure, Table 7-1: uart configuration – PNI SeaTRAX User Manual

Page 40: Figure 7-1: datagram structure, On 7, 7operation with pni binary protocol, 1 datagram structure

Advertising
background image

PNI Sensor Corporation

DOC#1018154 r02

SeaTRAX User Manual

Page 35

7

Operation with PNI Binary Protocol

The SeaTRAX utilizes a binary communication protocol, where the communication parameters

should be configured as follows:

Table 7-1: Port Configuration

Parameter

Value

Number of Data Bits

8

Start Bits

1

Stop Bits

1

Parity

none

7.1

Datagram Structure

The data structure is shown below:

ByteCount

(UInt16)

Packet Frame

(1 - 4092 UInt8)

CRC-16
(UInt16)

Payload

(1 - 4091 UInt8)

Frame

ID

(UInt8)

Figure 7-1: Datagram Structure

The ByteCount is the total number of bytes in the packet including the CRC-16 (checksum).

CRC-16 is calculated starting from the ByteCount to the last byte of the Packet Frame. The

ByteCount and CRC-16 are always transmitted in big Endian. Two examples follow.

Example: The complete packet for the kGetModInfo command, which has no payload is:

Example: Below is a complete sample packet to start a 2D Calibration (kStartCal):

00 09

Frame ID

0A

ByteCount

00 00

CalOption

CalOption

(2D Calibration)

00 14

5C F9

Checksum

00 05

Frame ID

01

ByteCount

EF D4

Checksum

Advertising