Herunterladen Inhalt Inhalt Diese Seite drucken

Float Values - ECOLAB Versatronic Modbus Beschreibung

Mehrkanalmessgerät
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

Modbus protocol description
3.6.2

Float values

The Versatronic operates using the IEEE 754 standard format for floating-point values
(32-bit), but with the difference that bytes 1 and 2 are interchanged with bytes 3 and 4.
Answer (values in Modbus float format):
Single float format (32-bit) acc. to Standard IEEE 754
SEEEEEEE
byte 1
S - Sign bit
E - Exponent (two's complement)
M - 23-bit normalized mantissa
Modbus floating-point format
Single-Float-Format (32 Bit) nach Standard IEEE 754
Modbus address x
MMMMMMMM
byte 3
Example
In this example, the value "IN 7 limit alarm 1" is to be extracted at address 0x10C9 of the
device. The value here is to be 550.0 (0x44098000 in the IEEE 754 format).
Data request:
01
Slave
Response (values in Modbus floating-point format):
01
Slave
After being transmitted from the device, the bytes for the floating-point value must be
interchanged accordingly. Many compilers (for example, Microsoft® Visual C++) store the
floating-point values in the following sequence:
Floating-point value
Adress x
MMMMMMMM
byte 4
NOTICE!
The sequence of the bytes depends on how floating-point values are saved
in the application concerned. It may be necessary for the bytes to be
interchanged in the interface program accordingly.
417102397 Rev. 1-10.2019
EMMMMMMM
byte 2
MMMMMMMM
byte 4
03
10 C9
Function
address 1st word
03
04
Function
Bytes read
Adress x+1
MMMMMMMM
byte 3
MMMMMMMM
byte 3
Modbus address x+1
SEEEEEEE
byte 1
00 02
Number of words
80 00
44 09
Floating-point value
Adress x+2
EMMMMMMM
byte 2
22
MMMMMMMM
byte 4
EMMMMMMM
byte 2
10 F5
CRC
20 F5
CRC
Adress x+3
SEEEEEEE
byte 1

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis