FS-8700-01 Modbus RTU/ASCIIFS-8700-01_Modbus_RTU Driver Manual
Page 15 of 22
FieldServer Technologies
1991 Tarob Court Milpitas, California 95035 USA
Web
: www.fieldserver.com
Tel
: (408) 262 2299
Fax
: (408) 262 2269
Toll Free
: (888) 509 1970
Appendix A.1.2.
Transferring 32 bit values with two registers
If a Modbus Server sends two consecutive registers to the FieldServer representing either a floating point value or
a 32 bit integer value, the FieldServer can combine and decode these registers back into their original format. To
do this, the user must read the registers into an integer data array, and then use the Moves function to move the
data to a floating point or 32 bit integer data array. The “function” field in the move must be populated with the
correct move function required. Details of the available function fields are listed in the FieldServer configuration
manual along with a more detailed explanation of moves. Note that functions also exist to split a floating point
value into two integers using the reverse operation.
A diagrammatic representation of this process is depicted below:
The example below shows how a floating point value is retrieved from two Modbus registers that were placed in
an integer data array.
Example
Data_Arrays
Data_Array_Name , Data_Format , Data_Array_Length
DA1
, Int16
, 20
DA2
, Float
, 10
Moves
Function
, Source_Data_Array , Source_Offset , Target_Data_Array , Target_Offset
2.i16-1.float-sw , DA1
, 0
, DA2
, 6
This Move will cause two integers at offsets 0 and 1 in the integer Data Array DA1 to be copied to offset 6 in the
Float Data Array DA2. In the process of copying the values, the integers will be combined and treated as an IEEE 32
bit floating point number.
Modbus Device
Two 16 bit
integers polled:
e.g: 40001,
length 2
Together, they
combine to
form a 32 bit
IEEE Floating
point number.
Source Data
Array
-------------------------
Offset 0: 40001
-------------------------
Offset 1: 40002
-------------------------
Float Data Array
-------------------------
Offset 40: Float
value
-------------------------
Modbus Poll
Special
Move
Unreadable
content
Sensible data