Data Type Mapping; Float Definition - Siemens SITRANS F Modbus RTU RS 485 Operating Instructions Manual

Communication modules
Hide thumbs Also See for SITRANS F Modbus RTU RS 485:
Table of Contents

Advertisement

B.7

Data type mapping

Some standard datatypes are defined in the SITRANS F protocol. Most of these datatypes are not
present in the MODBUS® RTU protocol as it defines 'Registers' and 'Coils' for all variables. A
register in this context is always 16 bit long. This will prove restrictive for the parameters found
in Siemens Flow products and therefore a number of approaches have been adopted to
overcome this restriction.
Table B-11
Data type mapping
Datatype
Byte
Word
float32
float64
String
B.8

Float definition

Stuffing of multi-byte numbers into multiple MODBUS RTU registers differs among MODBUS
devises.
"Big Endian" and "Little Endian" describe the order or sequence in which multi-byte data is stored
in memory. This device uses a 'Big-Endian' representation for addresses and data items. This
Modbus RTU RS 485
Operating Instructions, 03/2021, A5E00753974-AB
Modbus RTU implementation
Data organized as 8-bit unsigned integers. The parameters are read using function code
03hex 'Read multiple registers'. Parameters are written using function code 10hex 'Write
multiple registers'. 'uint8' type of data is accessed through a single register, where the data is
found in the lower byte of the register. Datavalue can be 0 – 255 with no sign bit.
Data organized as 16-bit unsigned integers. The parameters are read using function code 03
hex 'Read multiple registers'. Parameters are written using function code 10 hex 'Write mul‐
tiple registers'. 'uint16' type of data is accessed through a single register. Datavalue can be 0
– 65536 with no sign bit.
Data organized as 32-bit signed floats (IEEE format). The parameters are read using function
code 03 hex 'Read multiple registers'. Parameters are written using function code 10 hex
'Write multiple registers'. 'float32' type of data is accessed through two registers. Datavalues
are coded in IEEE floating point format.
Data organized as 64-bit signed floats (IEEE format). The parameters are read using function
code 03 hex 'Read multiple registers'. Parameters are written using function code 10 hex
'Write multiple registers'. 'float64' type of data is accessed through four registers. Datavalues
are coded in IEEE floating point format.
Consecutive pairs of 8-bit ASCII characters stored one pair per 16-bit register. Strings are read
using function code 03 hex "Read multiple registers'. Strings are written using function code
10 hex 'Write multiple registers'. 'string' type of data must be read or written as a series of 1
to 25 consecutive registers, depending on the number of characters specified for the string.
The max. string length is therefore 50 chars (incl. delimiter).
Strings are terminated by a zero-delimiter.
Appendix
B.8 Float definition
71

Advertisement

Table of Contents
loading

Table of Contents