1

I'm working in a SCADA system with Modbus protocol. It offers me these data types and I don't know what's the difference between them. Could anyone please clarify?

Ionut
  • 724
  • 2
  • 9
  • 25

1 Answers1

0

Float32 or sometimes Float32BE is the default representation of a float value by using big endian. For a float with 32 bits (which is typically encoded by using the IEEE 754 standard) we need 4 bytes which leads to the following memory layout:
Byte 1, Byte 2, Byte 3, Byte 4 or ABCD (to use a more common and readable example with 4 different characters).

Float32LE stands for little endian and is represented in the following memory layout:
Byte 4, Byte 3, Byte 2, Byte 1 or DCBA

Float32MLE stands for mid-little-endian and is represented in the following memory layout:
Byte 3, Byte 4, Byte 1, Byte 2 or CDAB

To complete the list of possibilities you can also find something called
Float32MBE which is mid-big-endian and represented in the following memory layout:
Byte 2, Byte 1, Byte 3, Byte 4 or BACD

Markus Safar
  • 6,324
  • 5
  • 28
  • 44