C700 | C720 Series Operating Manual
26
The request frame and response frame are illustrated below in two registers that write the values 0x000A and 0x0102
to the start address of 2.
Request Frame
(hexidecimal)
Response Frame
(hexidecimal)
Number Systems
0x10
Function code
0x10
Function code
0x00
Register Value (High Bytes) (108)
0x00
Start address (high byte)
0x01
Register Value (Low Bytes)(108)
0x01
Start address (low byte)
0x00
Register Value (High Bytes) (109)
0x00
Number of Read Registers (High Bytes)
0x02
Register Value (Low Bytes) (109)
0x02
Number of Read Registers (Low Bytes)
0x04
Register Value (High Bytes)(110)
0x00
Number of bytes
0x00
Register value (high byte)
0x0A
Register value (low byte)
0x01
Register value (high byte)
0x02
Register value (low byte)
Figure 13: Examples of writing multiple register request and response frames
Data Format
Overview
Floating Point
Definition : Floating point, conforming to IEEE 754 (single precision)
Description
Symbol
Index
Mantissa
SUM
Bit
3
30…23
22…0
22…0
Index Deviation
127
Figure 14: floating point single-precision definition (4 bytes, 2 MODBUS registers)
Example:
Compile decimal 17.625 to binary
Step 1:
Converting 17.625 in decimal form to a floating-point number in binary form, first finding the binary representation of the integer
part 17 Decimal= 16 + 1 = 1×24 + 0×23 + 0×22 + 0×21 + 1×20
The binary representation of integer part 17 is 10001B then the binary representation of decimal part is obtained 0.625= 0.5 + 0.125 = 1×2-1 +
0×2-2 + 1×2-3
The binary representation of decimal part 0.625 is 0.101B.
So the binary floating point number of 17.625 in decimal form is 10001.101B
Step 2:
Shift to find the exponent.
Move 10001.101B to the left until there is only one decimal point, resulting in 1.0001101B, and 10001.101B = 1.0001101 B× 24 . So the exponential
part is 4, plus 127, it becomes 131, and its binary representation is 10000011B.
Step 3:
Calculate the tail number
After removing 1 before the decimal point of 1.0001101B, the final number is 0001101B (because before the decimal point must be 1, so IEEE
stipulates that only the decimal point behind can be recorded). For the important explanation of 23-bit mantissa, the first (i.e. hidden bit) is
not compiled.
Hidden bits are bits on the left side of the separator, which are usually set to 1 and suppressed.
Step 4:
Symbol bit definition
The sign bit of positive number is 0, and the sign bit of negative number is 1, so the sign bit of 17.625 is 0.
Step 5:
Convert to floating point number
1 bit 8 bit index + 23-bit mantissa 0 10000011 00011010000000000000000B
(the hexadecimal system is shown as 0 x418d0000)