5 data formats, Data formats – YSI IQ SensorNet MIQ/A-MOD Module User Manual

Page 32

Advertising
background image

Data transmission

MIQ/(A-)MOD

32

ba76021e01

01/2012

4.5

Data formats

The sensor data in the sensor data block (see section 4.4) are available
in the Float 32, INT16 and INT8 data formats.

Float 32

The data for the main and secondary measured values are transmitted
in the IEE-754 standard 32-bit floating point format.

MSB = Most significant bit, LSB = Least significant bit

If not all of the bits of the exponent are 0, the value is calculated
according to:

If all of the bits of the exponent are 0, the value is calculated according
to:

A value is 0 if all the bits of both the exponent as well as the mantissa
are 0.

Note
If the measured value is equal to 0, check the measured value status.
If the measured value status is not equal to 1, an error has occurred
and the measured value is invalid.

Note
The Modbus protocol does not define how the bytes of 32-Bit-IEEE-754
floating point numbers should be ordered.

Apart from the byte order described in the bit representation, another
order of the bytes is also possible.
Opposite to the order described, the two lower bytes have been
exchanged with the two upper bytes in this order (b4 b3 b2 b1 - b2 b1
b4 b3).

Bit representation

Byte

Bit

4

31 - 24

S = sign (bit 31)
E = Exponent (Bit 30-23)
M = mantissa (bits 22-0)

3

23 - 16

2

15 - 08

1

07 - 00

MSB*

LSB*

S E E E E E E E

E M M M M M M M

M M M M M M M M

M M M M M M M M

)

2

...

2

2

2

1

(

2

1

23

0

3

20

2

21

1

22

127

+

+

+

+

+

=

b

b

b

b

E

S

M

M

M

M

V

)

2

...

2

2

2

(

2

1

23

0

3

20

2

21

1

22

126

+

+

+

+

=

b

b

b

b

S

M

M

M

M

V

Advertising