beautypg.com

Modbus protocol description and set-up – KROHNE ALTOSONIC V12 EN User Manual

Page 123

background image

MODBUS PROTOCOL DESCRIPTION AND SET-UP

10

123

ALTOSONIC V12

www.krohne.com

04/2013 - 4002643502 - MA ALTOSONIC V12 R02 en

10.6.3 Single precision floating point (32 bit), transmit sequence

Single precision floating-point numbers are stored in 32-bit registers, represented using the
IEEE 754 encoding. In IEEE 754-2008 the 32-bit base 2 format is officially referred to as binary32

binary32

binary32

binary32.

It was called single in IEEE 754-1985.

The IEEE 754 standard specifies a binary32 as having:

• Sign bit: 1 bit
• Exponent width: 8 bits
• Significant (also known as mantissa) precision: 24 (23 explicitly stored)

The true significant (mantissa) includes an implicit leading bit with value 1 unless the exponent
is stored with all zeros. Thus only 23 bits of the significand (mantissa) appear in the memory
format but the total precision is 24 bits (equivalent to log10(224) ≈ 7.225 decimal digits). The bits
are laid out as follow:

The single precision binary floating-point exponent is encoded using an offset binary
representation, with the zero offset being 127; also known as exponent bias in the IEEE 754
standard.

Example

The float number 4.125977 will give the IEEE 754 representation.

Example IEEE

A positive sign.

A biased exponent of 129 (81 hexadecimal) is exponent 2.

Mantissa = 4 + 1/8 + 1/1024. Note that the first bit is not stored!

Floats could be transmitted in two ways. The transmit order in both modes:

Sign + (Biased)
Exponent

Exponent + Mantissa 3
(high)

Mantissa 2

Mantissa 1 (low)

SEEE EEEE

E MMM MMMM

MMMM MMMM

MMMM MMMM

Sign

Exponent

Mantissa

0

1000 0001

(1) 000 0100 0000

1000 0000 0000

IEEE 754

(1)

40

h

(2)

84

h

(3)

08

h

(4)

00

h

Normal

mode

(1)

40

h

(2)

84

h

(3)

08

h

(4)

00

h

Reversed

mode

(3)

08

h

(4)

00

h

(1)

40

h

(2)

84

h