49
Installation and Operation Manual
X-DPT-Profibus-Interface-eng
PN 541-C-068-AAG
November, 2008
Appendix B IEEE 754 Floating Point Format
Our products uses in most cases floating points as input and output parameters.
These floating points are defined as IEEE 754 32-bit single precision types.
This means that each parameter of a floating point type uses four hexadecimal
bytes. These four bytes represents the sign, the exponent and the mantissa.
•
A sign bit is used so that both positive and negative numbers could be
represented
•
An exponent is used to create a large range of values
•
A mantissa is used to get an acceptable resolution of the values
Because the exponent value can differ, the logical place of the decimal point, will
float. Hence the name floating point. Don’ worry about these hexadecimal repre-
sentation of the floating points. You never should translate this hexadecimal
values manual into more readable values. This is done inside your PLC or other
destination device. You should only declare variables from type REAL or SHORT
in your software, that’s all.
But when you do some tracing stuff on profibus for some reason, you will see the
raw hexadecimal bytes in the messages on the bus. That’s hard to translate,
see for example this picture below:
Number 1 indicates a raw bustrace. You’ll find in this example at setpoint posi-
tion the hexadecimal codes ’42 0c 00 00’on the bus. Number 2 shows that the
setpoint for our device at that moment was, 35.0 decimal. We can verify this
hexadecimal codes with a special converter program, called ieee754 Float <>
HEX Converter. This program can be arranged by your sales representative or
taken from our website.