4000

Modbus Implementation

 

 

9.6Floating-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.1Floating-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.2The 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:

Host Request

 

 

 

 

 

 

Address

Function

Start Reg

Start Reg

# of Reg

# of Reg

Error

 

 

Code

H

L

H

L

Check

 

 

 

 

 

 

 

 

 

01

03

00

66

00

02

XX

 

 

 

 

 

 

 

 

 

ATT Response

 

 

 

 

 

 

Address

Function

Byte

Data

Data

Data

Data

Error

 

code

Count

MSB

LSB

MSB

LSB

Check

 

 

 

 

 

 

 

 

01

03

04

42

C8

00

00

XX

 

 

 

 

 

 

 

 

9.6.3Floating 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.

51

Page 61
Image 61
Varec 4000 manual Floating-Point Registers, Floating-Point Data, Two 16-bit Registers Format, Floating Point Data