Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between the two types of Floating point functions in the Modbus RTU X Driver?

Issue

What is the Intel Floating point number as used in the Modbus X Driver?

Environment

Modbus RTU X Driver

Cause

It is not clear how the two special floating point function codes vary.

Resolution

There are two different floating point data formats (248 & 245) these are both standard 32 bit floating point numbers but the data bits stored in memory (or read over the protocol) differently.

The 32 bits of Function 248 are stored as one string of bits, bit 0 through to bit 31.

For the 245 format the upper and lower words are swapped around, so it stores the data as bits 15 to 0, then bits 31 to bit 16. This format is called Intel format as it is the way Intel microprocessors handle floating point data.

Here is a link to information on floating point numbers FYI: https://en.wikipedia.org/wiki/Floating-point_arithmetic

These 2 formats can also be called Big Endian (Function 248), or Little Endian (Function 245). Little Endian is also known as the Intel format.
Information on Endianness can be found at: https://en.wikipedia.org/wiki/Endianness

Tags (3)
Labels (1)
No ratings
Version history
Revision #:
2 of 2
Last update:
‎2018-09-11 03:24 PM
Updated by:
 
Contributors