User's Manual

CHAPTER 3
Advanced Functions
46
Type 37
SIZE 31 (including the type byte).
FORMAT struct tlg_type37 {
BYTE RF_LevelIn;
BYTE RF_LevelOut;
BYTE DigiByte;
WORD PulseCounter0;
WORD PulseCounter1;
WORD PulseCounter2;
WORD PulseCounter3;
BYTE BatteryLevel;
BYTE Analog[18];
};
DESCRIPTION The analog values are 12 bits and must be converted accordingly,
depending on the sensor connected, while the pulse counters are
16-bit values. Only the RF and battery levels are 8-bit values.
Analog[18] is an array of 18 unsigned bytes that is the result of
packing the twelve 12-bit values. These are the values returned by
the internal A/D converter from the respective I/O connectors.
Note: The integers (16-bit values) are sent using the big endian
convention, that is, first the most significant byte and then
the least significant byte.
The packing mechanism is shown in Figure 8.
Figure 8. Type 37 Frame Compression
Note: Only Analog1 to Analog12 are packed; the 16-bit Pulse
Counters are not.
Twelve 16-bit values
8-bit packed values
Analog1 Analog2
Analog3
Analog4
12 bits 12 bits 12 bits 12 bits
Byte 0 Byte 1 Byte 2 Byte 3 Byte 6Byte 5Byte 4 Byte 16 Byte 17
etc....
0
00
0