Modbus DIY

Your First Modbus Read: From USB Adapter to a Working Register

You can read your first Modbus register yourself — no expensive gear, no electrician needed, because this is low-voltage data reading, not mains panel wiring. Here's an honest, practical guide to your first win.

Godīgs skatījums bez pārdošanas spiedienaReāli protokola faktiCTA uz veikalu, ne uz obligātu pasūtījumu
A / B
120Ω
USB adapteris
How the first read happens

How the first read happens

01

Get an adapter and software

Plug a cheap USB-RS485 adapter into your computer and install free Modbus master software — it becomes your 'master' on the bus.

02

Wire A/B to the device

Connect the A and B wires to the device's data terminals. This is a low-voltage connection — don't confuse it with 230V panel wiring, which needs a licensed electrician.

03

Match baud rate and parity

Check the device's own documentation for the correct baud rate (often 9600 or 19200 bit/s), parity, and address — these settings must match exactly in your software.

04

Read your first register

Send an FC03 request to the device's address and watch the first successful holding register value appear on screen — that's your 'it works!' moment.

What's worth knowing before you start

What's worth knowing before you start

FC03

Read Holding Registers

The most common function for a DIY beginner's first successful read — this is where your practical Modbus experience begins.

RTU or TCP?

Modbus RTU sends binary frames over RS-485 (or sometimes RS-232) with a CRC-16 checksum; Modbus TCP wraps the same message in Ethernet/TCP on port 502. A USB adapter puts you in the RTU world.

One speed for every device

Baud rate (1200–115200 bit/s, typically 9600 or 19200), parity, and stop bits must match on EVERY device sharing a bus segment — otherwise communication simply won't start.

The address and the '40001' trap

Every device on the bus needs a unique address (1–247). The classic register-numbering convention starts at 40001, but the actual protocol address is 0-based — this is the classic off-by-one mistake.

Holding or input register?

Both are 16-bit numeric values, but holding registers (FC03) can be read AND written, while input registers (FC04) are read-only. Check which type your device uses.

No built-in security

Modbus was never designed with authentication or encryption — any device on the bus can send a valid command. Keep that in mind when planning network segmentation.

Options

What you'll need

A short list — no big spend, no professional equipment required.

  • USB-to-RS-485 adapter
  • A computer with free Modbus master software
  • The device's documentation (baud rate, parity, register map)
  • An RS-485 cable for the A/B connection
  • A Modbus RTU-compatible device (meter, sensor, or controller)
FAQ

Frequently asked questions

What is a USB-RS485 adapter and why do I need one?

It converts your computer's USB signal into an RS-485 differential signal, letting your PC act as the Modbus master on the bus and talk to devices.

How do I find the correct baud rate and parity?

Always check the device's own documentation — common defaults are 9600 or 19200 bit/s. Every device on the same bus segment must use identical settings.

What's the difference between a holding and an input register?

Both hold 16-bit numeric values, but holding registers (FC03) can be read and written, while input registers (FC04) are read-only. The device documentation tells you which one it uses.

Is this dangerous — do I need an electrician?

No — this guide covers only low-voltage data reading over RS-485, not 230V panel wiring. Mains electrical work always needs a licensed electrician; connecting a data bus is a separate, safer task.

Why does my first read fail even though the wiring looks right?

The usual culprits are mismatched baud/parity, a wrong device address, or register-numbering confusion (40001 vs. the 0-based protocol address). If you suspect a physical wiring, polarity, or termination fault, see our separate RS-485 wiring and fault-diagnostics guide.

Ready to try it yourself?

Browse USB-RS485 adapters and other DIY gear in our shop — start cheap, learn hands-on, no pressure to buy.

Request a survey
Related guides

Related guides

Loading...
Back to top