PLC Hex to Float Converter

Convert Floating Point to Hex (IEEE 754) and solve Modbus Endianness issues.

e.g., 123.45
⇅
e.g., 42F6E666
0000 0000 0000 0000 0000 0000 0000 0000

Modbus Byte Order (Endianness) Helper

If your PLC reads a strange value, try the formats below. "CDAB" is common for Modbus.

ABCD (Big Endian)
00 00 00 00
0.0
Standard / Motorola
DCBA (Little Endian)
00 00 00 00
0.0
Intel / PC
CDAB (Word Swap)
00 00 00 00
0.0
Modbus / Honeywell
BADC (Byte Swap)
00 00 00 00
0.0
Rare

What is IEEE 754 Floating Point?

PLCs store real numbers (like temperature 24.5°C) using the IEEE 754 Standard. This format fits a decimal number into 32 bits (2 words) of data. When transmitting this data via Modbus TCP or RTU, the raw binary data is often displayed as a Hexadecimal string (e.g., 0x41C40000).

Solving Modbus "Byte Swap" Issues

The #1 problem in industrial communication is Endianness (Byte Order). Different manufacturers store the 4 bytes of a floating-point number in different orders.

  • ABCD (Big Endian): Used by Motorola processors and network protocols.
  • CDAB (Word Swap): Extremely common in Modbus. If your value looks completely wrong (e.g., reading huge numbers instead of 100.0), try swapping the words.
  • DCBA (Little Endian): Used by Intel/AMD processors and some PC-based controls.

Conversion Examples

Float Value Hex Representation (ABCD) Binary
1.0 3F800000 0011 1111 1000 ...
123.45 42F6E666 0100 0010 1111 ...
-10.5 C1280000 1100 0001 0010 ...