IB0147 Rev. 08 LEFM 200 Modbus User Manual
Section 5 Page 40 December 2010
TX message: 02 04 00 26 00 02 90 33
02 (hex) = Slave ID 2
04 (hex) = Function Code 4, Input Registers
00 26 (hex) = 00 (hex) * 256 + 25 (hex) = 0 (dec) * 256 + 38 (dec) = 38 (dec) = Starting Address
38
00 02 (hex) = 00 (hex) * 256 + 02 (hex) = 0 (dec) * 256 + 2 (dec) = 2 (dec) = Request 2
Registers/Words
90 33 (hex) = CRC16 checksum
Rx message: 02 04 04 43 98 F3 A2 99 A6
02 (hex) = Slave ID 2
04 (hex) = Function Code 4, Input Registers, no error code
04 (hex) = 4 bytes to follow
43 (hex) = High byte ; 01000011 (bin)
98 (hex) = High-Mid byte; 10011000 (bin)
F3 (hex) = Low-Mid byte; 11110011 (bin)
A2 (hex) = Low byte; 10100010 (bin)
99 A6 (hex) = CRC16 checksum
To Calculate the Floating Point Value:
1. Representation: Word/Register X, Word/Register X+1
Representation: High byte High-Mid byte, Low-Mid byte Low byte
From above: 4398 F3A2 = (hex) 43 98 F3 A2 = (bin) 01000011 10011000 11110011 10100010
2. Separate into sign bit, exponent portion and mantissa. The first (from left to right) bit
represents the sign, the next 8 bits represent the exponent, and the remaining 23 bits represent the
mantissa.
(bin) 0 1000011 1 0011000 11110011 10100010
3. Sign bit
The sign bit specifies a negative value for sign bit = 1 and positive value for sign bit = 0
0 = sign bit
4. Exponent portion
The exponent is found by taking the decimal equivalent to the 8 bit exponent portion unbiased
(subtract) by 127.