Varec 4000 Network Card User Manual


 
51
4000 Modbus Implementation
9.6 Floating-Point Registers
Although not part of the Modbus protocol specification, floating point numbers have been implemented using the IEEE
754 standard. Floating point numbers reduce the complexity required in scaling integer values and provide a means
to transmit numbers used by the ATT that are not easily scaled (such as the scaling factors themselves).
9.6.1 Floating-Point Data
The ATT is capable of using a two 16-bit registers format and a one 32-bit register format. Examples and descriptions
of both formats follow.
Note! Although this type of data does not require scaling, it is important that the measurement unit selected in the ATT be
the same as that expected by the host. In addition, where possible, data is available in both integer and floating-point
formats.
9.6.2 The Two 16-bit Registers Format
Function code 03 or 04 is used to read floating-point registers in this format. Function code 16 is used to write
floating-point registers in this format. An example of reading the temperature, register 102 ( 0066 Hex), in floating-
point format from the ATT is shown as follows:
9.6.3 Floating Point Data
Hexadecimal representation: 42 C8 00 00
Decimal equivalent: 100.00
Floating-point registers that are defined as reserved have zero (0) as their only legal value. A write command to a
reserved floating-point register is ignored.
Host Request
Address Function
Code
Start Reg
H
Start Reg
L
# of Reg
H
# of Reg
L
Error
Check
01 03 00 66 00 02 XX
ATT Response
Address Function
code
Byte
Count
Data
MSB
Data
LSB
Data
MSB
Data
LSB
Error
Check
01 03 04 42 C8 00 00 XX