bg

MODBUS Tester Online: Read, Write and Decode RTU Frames

This free tester talks MODBUS RTU or ASCII to a device through a USB-to-RS485 or RS232 adapter, straight from your browser. It reads and writes registers and coils, shows every request and answer byte by byte, and explains in plain words why a device does not answer. It runs in Chrome, Edge and Opera, needs no installation, and nothing it sends or receives leaves your computer.

The tester needs JavaScript. Please enable it and reload the page.

1. Connect

Not sure about the slave ID or the baud rate? Find the device with the online MODBUS scanner.

2. Read

Addresses are
3. Write a register or a coil

The address follows the "Addresses are" setting of Read; 32-bit and 64-bit values use the byte order chosen in the values table.

4. Send a raw frame
Traffic

How to test a MODBUS device

  1. Connect the adapter to the device (A to A, B to B and GND to GND on RS485), click Choose a COM port and pick the adapter in the list your browser shows.
  2. Set the port the way the device is set: baud rate, parity, stop bits and slave ID from its display or manual. Most devices use RTU. If you do not know the settings, the online MODBUS scanner finds the slave ID.
  3. Read a few registers. Function 03, address 0 or the first register from the manual, count 1 to 10. A green result means that wiring, port settings and slave ID are right.
  4. Make the values readable. The tester recognises 32-bit and 64-bit floats and integers, text, and a BCD-coded current date or time on its own, in any byte and word order, and marks those rows auto. A value that would come out absurdly large or small is not taken as that type; a register that no type fits is marked ? and shown as a plain 16-bit number. Change any type by hand, and your choice is kept. Set a scale such as 0.1 for a value sent in tenths; ABCD shows two registers in all four byte orders.
  5. Write only what you understand. A write can start a drive or change a set point. Preview shows the exact frame, and nothing is sent until you press Send write.
  6. Check the link. The reliability test sends the same request up to 100 times and counts timeouts, checksum errors and exceptions.
  7. Copy the report for a colleague or a support request.

Every request and answer appears in the traffic log with a caption under each group of bytes: slave ID, function, address, count, each register with its value, and the checksum. Point at a group to see the details. To decode frames you already have, from a log file or a device manual, paste them into the MODBUS CRC calculator and frame parser.

40001 or 0: MODBUS addresses

On the wire, MODBUS sends an offset that starts at 0. Many manuals print register numbers instead: holding registers from 40001, input registers from 30001, coils from 00001 and discrete inputs from 10001. Some count from 1 without a prefix. The same register therefore has two names:

In the manualFunctionOffset sent
4000103 Read holding registers0
4010803 Read holding registers107
3000104 Read input registers0
0000101 Read coils0
1000102 Read discrete inputs0
register 1 (counted from 1)03 or 040
offset 107 or 0x006B03 or 04107

Choose under Addresses are which kind of number you type. The line under the form shows what will be sent, and the request bytes. If the device answers with exception 02 (illegal data address), the address is usually off by one.

Byte and word order

A 32-bit integer or float takes two registers, and devices do not agree on which register holds the high half, or even on the byte order inside a register. The value 230.5, as a 32-bit float 0x43668000, can arrive in four ways:

OrderFirst registerSecond register
ABCD (big-endian)43668000
CDAB (word swap)80004366
BADC (byte swap)66430080
DCBA (little-endian)00806643

With type detection on, the tester tries all four orders after every read and keeps the one in which the values make sense, taking the size of the answer into account: 4 bytes are most likely one 32-bit value, 8 bytes one 64-bit value or two 32-bit ones. To check a pair by hand, press ABCD next to the register.

When the device does not answer

The tester showsWhat it meansWhat to do
No answerThe device did not recognise the request.Check the slave ID, baud rate and parity; swap RS485 A and B; connect GND; fit 120 ohm terminators on long lines; check that MODBUS is enabled on the device.
Exception 01The function is not supported.Try 04 instead of 03, or the other way round.
Exception 02No register at this address.Correct the address by one (40001 is offset 0), or read fewer registers.
Exception 03A value in the request is not accepted.Read fewer registers at a time, or write a value in range.
Checksum errorBytes were changed on the way.Settings close to but not equal to the device's, noise, missing ground, or two devices with the same ID.
Not a frameThe bytes are not MODBUS.Wrong baud rate or parity, ASCII instead of RTU, or another master on the bus.
Only the echoThe adapter repeats what it sends, and the device stayed silent.The same checks as for "No answer".
CRC swapped (in the traffic log)The device sends the two CRC bytes high byte first, which is not standard MODBUS. The tester accepts it.If such a device does not answer, set CRC to swapped: it probably expects the same order in requests.

More causes are on the COM port errors and garbled serial data pages. To check the adapter and cable on their own, use the Serial Port Tester.

Registers of a known device

If your device is one of the more than 450 meters, inverters and controllers in our MODBUS register maps, its page lists every register with its offset, type and units, and reads the values online. To test your own master software instead of a device, use the online MODBUS slave emulator.

Offline tools for longer jobs

A browser tester is for checks. For work that runs longer or goes deeper, use a Windows program:

Frequently asked questions

Does the tester send my data anywhere?

No. The tester runs in your browser and talks to the device through your own COM port; no frame or value leaves your computer. The page only records which buttons are used, without any data.

What do I need to connect a MODBUS device?

Chrome, Edge or Opera on a desktop computer and a serial connection to the device: a USB-to-RS485 adapter for RS485 devices, a USB-to-RS232 adapter or a built-in COM port for RS232 devices. Firefox, Safari and mobile browsers do not support the Web Serial API.

Why does my MODBUS device not answer?

Almost always a wrong slave ID, baud rate or parity, or RS485 wiring: A and B swapped, no signal ground, no terminators on a long line. An exception response is different: it proves that wiring and settings are right and only the request is wrong, most often the address by one.

Should I type 40001 or 0 as the address?

Both work. On the wire MODBUS sends an offset that starts at 0; many manuals number holding registers from 40001 instead. Choose which kind of number you type, and the tester shows the offset and function it sends.

Why does a float value look wrong?

A 32-bit value spans two registers, and devices differ in which register comes first and in byte order. The tester detects the order on its own; to check by hand, show the two registers in all four orders (ABCD, CDAB, BADC, DCBA) and use the one that gives a sensible number.

Can it test MODBUS TCP or poll a device continuously?

No. A web page cannot open network connections to devices, and the tester is meant for checks, not for logging. Advanced TCP/IP Data Logger reads MODBUS TCP, and Advanced Serial Data Logger polls RTU devices around the clock.