V2.01
25359_EDEBDA0279-2320-1_EN
52
Example 1: -12.5 decimal = 0xC1480000 hex
M: 24 bit-mantissa
E: Exponent with oset of 127
S: Sign for mantissa (S=1 neg.; S=0 pos.)
Address +0 +1 +2 +3
Format SEEEEEEE EMMMMMMM MMMMMMMM MMMMMMMM
Binary 1 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Hex C1 48 00 00
The byte sequence is dened as follows:
The byte with the “S sign bit” is transmitted over the bus as the rst byte.
The sequence of the oat bytes of the bus can be reversed, if necessary, using the device
parameter0xD02C (see table1).
The register value0xD02C in this case means:
with 1 -> sign bit S in 1
st
byte (sequence as dened)
with 0 -> sign bit S in 4
th
byte (sequence reversed)
The following information can be derived from this:
The sign bit is 1 => negative mantissa
The value of the exponent amounts to 10000010 bin or 130 dec.
This results in an exponent value of: 130 - 127 = 3
The mantissa has the following value: 10010000000000000000000
The decimal point can be found at the left end of the mantissa, preceded by a 1. This
position does not appear in the hexadecimal numeric notation. If you add 1 and set the
decimal point at the beginning of the mantissa, the following value is obtained:
1.10010000000000000000000
Now, the mantissa needs to be adjusted to the exponent. A negative exponent shifts the
decimal point to the left, a positive exponent shifts it to the right. Since the exponent is 3,
this is represented as: 1100.10000000000000000000
The number obtained corresponds to the binary oating-point number.
Binary digits to the left of the decimal point result in values > 1. In this example, 1100 bin
results in the number12 dec. {(1x23)+ (1x22)+ (0x21)+ (0x20)}
Binary digits to the right of the decimal point result in values < 1. In this example, .100.......
bin results in the number0.5 dec. {(1x2-1)+ (0x2-2)+ (0x2-3)+ (0x2-4)}
By adding the individual values, 12.5 is obtained. As the sign bit was set, it is a negative
value, -12.5. The hexadecimal number0xC1480000 thus corresponds to -12.5.
Data point description for the Modbus protocol