Data & protocol tools
Data &Protocol.
Five converters and references for Modbus addressing, data type decoding, ASCII framing, hex and bit operations, and protocol comparisons. Everything runs in your browser, nothing is uploaded, and every result exports to CSV.
Tatva Logix / Engineering Tools
Modbus Address Converter
Convert between conventional register numbers, 0-based protocol addresses and vendor addressing, with the matching function codes and a worked RTU request frame.
The Modbus specification numbers the data model from 1 while the protocol frame carries a 0-based address. The offset of one between them is the most common cause of a reading landing one register out.
Protocol address
-
All representations
Function codes
Request frame - Modbus RTU
Equivalent in other conventions
Reference conversions for engineering use. Confirm addressing, byte order and data types against the device manual before commissioning.
Tatva Logix / Engineering Tools
Data Type Converter
Decode raw register words into every IEC 61131-3 data type, compare all four byte and word orders, and encode a value back into registers.
One to four 16-bit words, as read from the device. Spaces optional.
Encode a value
Writes the encoded words back into the field above, using the selected order.
REAL / FLOAT32
-
Interpretations
Byte order variants: REAL
Word 1 bit map
Guide: big endian, little endian and word order
Modbus defines the order of bytes inside one 16-bit register: the high byte always goes on the wire first. It says nothing about how a 32-bit value is spread across two registers, which is why the same float reads differently on two devices. The four arrangements below are the ones you will meet.
Reference value: 0x12345678, bytes labelled A B C D
| Order | First register | Second register | Also called | Where you see it |
|---|---|---|---|---|
| ABCD | 0x1234 | 0x5678 | Big endian, high word first | Siemens S7, most IEC devices, the Modbus specification default |
| CDAB | 0x5678 | 0x1234 | Word swap, byte order kept | Very common on Modbus power meters, drives and gateways |
| BADC | 0x3412 | 0x7856 | Byte swap inside each word | Rare. Usually a driver or gateway configured wrongly |
| DCBA | 0x7856 | 0x3412 | Little endian, full reversal | A raw x86 or ARM memory image published without reordering |
Worked example: the float 1.0
IEEE 754 single precision
1.0 = 0x3F800000
ABCD gives registers 3F80 0000. CDAB gives 0000 3F80. If a device reports 1.0 as 4.6 × 10-41 or as 0, the word order is swapped.
Fast field test
Write 1.0, then read back
Write a known value such as 1.0 or 100.0 and step through the four orders until it reads back correctly. Confirm with a second value that is not symmetric, for example 1234.5678.
Terminology trap
endian ≠ word order
Some manuals call CDAB "little endian" although the bytes inside each word are still big endian. Read the register map, not the label.
32-bit integers behave the same
DINT 305419896 = 0x12345678
Word order applies to every multi-register type: DINT, UDINT, REAL, LREAL and 64-bit counters. A 64-bit value has four registers to order, so verify it separately.
Strings are different again
"AB" → 0x4142
Character pairs are usually packed high byte first, but plenty of devices swap them. Read one register of a known text field to settle it.
Within one register
MSB always first on the wire
Modbus RTU and TCP both transmit the high byte of a register first. Bit 0 is the least significant bit of the low byte.
Reference conversions for engineering use. Confirm addressing, byte order and data types against the device manual before commissioning.
Tatva Logix / Engineering Tools
ASCII Converter
Convert between text and hexadecimal, decimal, binary or octal, with control-code names preserved and serial checksums calculated.
Type in either box. Non-printable bytes appear as their control-code name in the text box.
Length
-
Frame analysis
Control codes - serial and barcode framing
Reference conversions for engineering use. Confirm addressing, byte order and data types against the device manual before commissioning.
Tatva Logix / Engineering Tools
Hex Converter
Hexadecimal, decimal, octal and binary across 8 to 64-bit words, with signed interpretation, endian swap, bitwise operations and a clickable bit map.
Bitwise operation
Bit map - click a bit to toggle
Hexadecimal
-
All bases
Interpretation
Reference conversions for engineering use. Confirm addressing, byte order and data types against the device manual before commissioning.
Tatva Logix / Engineering Tools
Protocol Reference for Programmers
Ten industrial protocols at the level you need while writing the code: what is actually on the wire, the codes the device will hand back, how it appears inside the PLC, and the failures that cost a shift to find.
-
On the wire
Codes you will meet
In the PLC
Commissioning and faults
The detail that costs a shift
All ten protocols compared
Determinism here means whether the protocol guarantees when a packet arrives, not whether it is fast. A polled bus with a 2 ms cycle is more predictable than a 100 Mbit link with no scheduling.
Bus health: the checks that apply to every one of them
Prove the physical layer first
Measure, do not assume
Termination resistance across an idle bus, 24 V at the far device under load, shield bonded at the intended points. Two thirds of protocol faults are cable, connector or ground.
Halve the network
Bisect, do not stare
Disconnect half the nodes. If the fault clears, it is in the half you removed. Two more splits finds one device in a line of thirty.
Read the diagnostic, not the LED
Codes name the channel
Every protocol here reports a numeric reason. Pull it into a DB or a tag and show it on the HMI. Maintenance then reports a channel, not a colour.
Cycle time is a design input
Slower is a valid answer
A bus set to the fastest the tool allows runs at the edge of its margin for the next ten years. Set the cycle from what the machine needs and keep the headroom.
Separate the networks
Control is not IT
Real-time traffic on the office VLAN survives commissioning and fails during a backup window. Separate the segments or set priorities deliberately.
Write the interface down
One table, both sides
Register or tag, data type, engineering unit, scaling, valid range, update rate, byte order. Argue about the document before commissioning, not about the values during it.
Field notes for engineering use. Frame layouts and codes are abbreviated for reference: check the current specification and the device manual before writing a driver or issuing a design.