beautypg.com

Appendix a. useful features – modbus rtu, Appendix a.1. managing floating points with modbus, Appendix a.1.1 – FieldServer FS-8700-08 User Manual

Page 15: Transferring non-integer values with one register

background image

FS-8700-01 Modbus RTU/ASCIIFS-8700-01_Modbus_RTU.doc Driver Manual

Page 15 of 21

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 email: [email protected]

Appendix A. Useful Features – Modbus RTU

Appendix A.1. Managing Floating points with Modbus

Modbus as a standard does not support floating point formats. Many vendors have written higher level communications software to use two 16 bit registers
to represent floating point or 32 bit integers. This requires conversion software on both ends of the communication channel. The FieldServer supports this
function and also provides other options to resolve this issue.

Appendix A.1.1.

Transferring non-integer values with one register

It is possible to represent values higher than 32767 using one register in one of two ways:

Declare data arrays as type Uint16 (Unsigned integer). This will give you a range from 0 to 65535.

Use the scaling function on the FieldServer, which will allow you to set up any range, with 16 bit resolution.

The following example shows how scaling can be achieved on the Server side of the configuration. Note that scaling can also be done on the Client side to
scale down a value that was scaled up by a Modbus vendor. Further information regarding scaling can be found in the FieldServer Configuration manual.

Example :

Map_Descriptors

Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Address , Length , Data_Array_Low_Scale , Data_Array_High_Scale , Node_Low_Scale , Node_High_Scale
SMD_AI1

, DA_AI_01

, 0

, Passive , MBP_Srv_11 , 30001 , 200

, 0

, 100

, 0

, 10000

SMD_AO1

, DA_AO_01

, 0

, Passive , MBP_Srv_11 , 40001 , 200

, 0

, 100

, 0

, 10000


This example multiplies the values in the data array by 100 (10000 on Node_High_Scale is 100X larger than 100 on Data_Array_High_Scale). This is most
commonly used when the user wants to introduce values after the decimal point. For example, a value of 75.6 will be sent as 7560, which can then be rescaled
by the Modbus master.

This manual is related to the following products: