Download User Guide - Tri-M Technologies Inc.
Transcript
4.3 Binary Protocol – RS232 Interface 4.3.1 Datagram Structure Transport Layer for RS-232 communication: ByteCount (UInt16) Packet Frame (1 - 4092 UInt8) Frame ID (UInt8) CRC-16 (UInt16) Payload (1 - 4091 UInt8) Note: 1. ByteCount is the total number of bytes in the packet including the CRC-16 2. CRC-16 is calculated starting from the ByteCount to the last byte of the Packet Frame (see included C function at end of document). 3. ByteCount and CRC-16 are always transmitted in BIG ENDIAN. 4.3.2 Parameter Formats Floating Point The floating-point based parameters are in the IEEE standard format, ANSI/IEEE Std 754-1985. 64-Bit (double precision floating point) Shown below is the 64-bit float format in big endian, in little endian bytes are in reverse order in 4 byte groups (ie: big endian:ABCDEFGH little endian: DCBA HGFE). 63 62 S 52 51 Exponent 0 Mantissa S (Exponent-1023) The value (v) is determined as (if and only if 0 < Exponent < 2047): v = (-1) * 2 PNI Sensor Corporation TCM3 & TCM5 User Manual – Sept 2012 * 1.Mantissa Doc #1007537 r12 Page 29