OFFLINE TOOL / PLC CONVERTER V1.4
AUTOMATION / 027OFFLINE

PLC data converter

Registers to values and back for INT16 to INT64, FLOAT32, FLOAT64, BCD and strings in every byte and word order (ABCD, CDAB, BADC, DCBA), with bit fields, the IEEE 754 breakdown and a batch mode. It only converts numbers you type or paste; it does not connect to any device.

Convert
Input and display (all parts)

No device connection. The tool only converts numbers you type or paste (for example from a Modbus poll tool or a PLC watch table); it never reads or writes a device. Registers are 16-bit words; bytes A, B, C … are the value's bytes from the most significant one, and the order lists them as they arrive.

Registers

Decimal (16840, −1), hex (0x41C8, 41C8h, 16#41C8) or binary (0b…); a longer hex number is split into registers as written (0x41C80000). An address before “:” or “=” is skipped (40001: 16840). More registers than one value needs give several values.

Try

Runs in this browser. Data is not uploaded or stored.

Value in every order

—Value in the chosen order
—Registers
—Values

    The tool does not pick an order for you: compare with one value you know (a setpoint, a temperature on the display). Notes only mark values that are seldom real readings: NaN, infinity, subnormal, negative zero, |x| ≥ 1e9 or below 1e-6, invalid BCD digits.

    Value

    Numbers with a decimal point or comma, an exponent (1.5e-3), NaN or Infinity. Integers must fit the type. A bit pattern can be typed as 0x… or 0b… (0x41C80000 for FLOAT32, 0xFFFF for INT16 = −1). Text uses the encoding above; it is padded to the register count with NUL bytes or spaces.

    Runs in this browser. Data is not uploaded or stored.

    Registers in every order

    —Registers in the chosen order
    —Registers (decimal)
    —Stored value

      Bits

      One field per line, columns separated by “;” or tabs (from Excel). Bit 0 is the least significant bit of the value. Types: flag (1 bit), unsigned, signed (two’s complement), enum with names as 0=Off, 1=Manual. Length defaults to 1 bit. A first line with names (Name;Start…) is skipped.

      Runs in this browser. Data is not uploaded or stored.

      Bits of the value

      —Value (hex)
      —Unsigned
      —Signed
      —Bits set

        Tick a bit to set it (the registers follow). Under each bit number: register.bit

        Register sets

        CSV, TSV or TXT up to 20 MB, opened or dropped on the field; read in this browser only. Excel: copy the cells and paste them.

        Cells are split at tabs, “;” or “,” (else at spaces). A first line without registers is a header. Use “Always the first column” when the label is a number (a row number, a time in seconds). A line with several values’ worth of registers gives several values.

        Runs in this browser. Data is not uploaded or stored.

        Batch results

        —Lines
        —Values
        —Lines with errors
        —Smallest
        —Largest

          How the registers are converted

          PLCs and field devices exchange numbers as 16-bit registers. A 32-bit or 64-bit value, a float or a text spans several registers, and devices disagree on the order of the words and of the bytes inside them. The converter shows every order side by side, so the right one can be recognised from a value you know. It does not connect to any device.

          Byte and word orders

          Data types

          Exact floats

          Bits and bit fields

          Worked examples (the tool’s examples)

          1. Registers 0x41C8 0x0000 as FLOAT32, ABCD: bits 0 10000011 10010000…0, so sign +, exponent 131 − 127 = 4, significand 1.5625, value 1.5625 × 2⁴ = 25. In CDAB the same registers are 0x000041C8, the subnormal 2.3598e-41; a device that sends 0x0000 0x41C8 uses CDAB.
          2. INT32 −123456 is 2³² − 123456 = 4294843840 = 0xFFFE1DC0: registers 65534 7616 in ABCD, 7616 65534 in CDAB.
          3. 0.1 as FLOAT32 is 0x3DCCCCCD (registers 0x3DCC 0xCCCD in ABCD), exactly 0.100000001490116119384765625: the rounding error is +1.490116119384765625e-9. As FLOAT64 it is 0x3FB999999999999A, exactly 0.1000000000000000055511151231257827021181583404541015625.
          4. BCD16 0x1234 = 1234 (read with swapped bytes, BA, it is 3412); 0x12F4 is not BCD: digit 3 is F.
          5. STRING “FactoKit” in Latin-1: F = 0x46, a = 0x61 …, so the registers are 0x4661 0x6374 0x6F4B 0x6974 in order AB.
          6. The status word 0x00FB 0x9623 (ABCD, an illustrative example): bits 0 and 1 set (Ready, Running), bit 3 clear (no Fault), bits 4–6 = 010 = 2 (Mode Auto), bits 8–15 = 0x96 = 150 (Speed step), bits 16–23 = 0xFB = −5 as a signed 8-bit field (Temperature offset).
          7. The batch example decodes seven FLOAT32 tags sent low word first (CDAB): TT-101 25, TT-102 25.4 (stored 25.3999996185302734375), LT-401 NaN with a note, TT-103 −20.6.

          Common mistakes

          Input and files

          Questions

          Why do I get 2.3598e-41 instead of 25 from my two registers?
          The registers are read in the wrong word order. 25.0 as a FLOAT32 is 0x41C80000: a device that sends the high word first gives 0x41C8 0x0000 (ABCD), one that sends the low word first gives 0x0000 0x41C8 (CDAB). Read in the other order the same registers become a tiny subnormal number or a large one. The table shows every order at once; pick the one that gives a value you know.
          Which byte order does Modbus use?
          The Modbus protocol sends each 16-bit register with its high byte first (big-endian). It does not say how a 32-bit or 64-bit value is split over several registers, so devices differ: high word first (ABCD) and low word first (CDAB) are the most common, byte-swapped orders occur too. The device manual should say; otherwise compare with a known value.
          Why is 0.1 stored as 0.100000001490116…?
          A FLOAT32 has 24 significant bits, and 0.1 has no finite binary expansion, so the nearest FLOAT32 is stored: 0x3DCCCCCD, exactly 0.100000001490116119384765625. The tool shows the exact stored value and the rounding error. A FLOAT64 is closer (0.1000000000000000055511151231257827…) but still not exact.
          What does a NaN or an infinity in a register mean?
          They are valid IEEE 754 bit patterns: all exponent bits set. Devices use NaN for a missing or failed measurement, and a wrong word order can produce one by accident. The tool marks NaN (quiet or signalling, with its payload), infinity, subnormal numbers and very large or very small values as notes; it never decides which order is right.
          Does the converter connect to my PLC?
          No. It only converts the numbers you type or paste, for example from a Modbus poll tool, a PLC watch table or a log file. Nothing is sent anywhere and no device is read or written; the offline file works without a network.