Companion course · 19 chapters · 4 parts
Understanding Modbus
A practical guide to the protocol, one byte at a time. This course follows the book Understanding Modbus by Charles Vance chapter by chapter: every concept gets an animated figure showing the frames on the wire, a tool to try it yourself, and a short check.
Start Chapter 1 →Part I · Foundations
The mental model: what Modbus is, the four data tables, and the conversation between client and server.
What Modbus Is and Why It Still Matters
A protocol, not a wire. Clients, servers, and the three transports.
Chapter 2The Modbus Data Model
Four tables, two questions, and the 40001 addressing trap.
Chapter 3The Request–Response Cycle
Data, exception, or silence, and the polling loop.
Part II · The Protocol in Detail
The exact bytes: the frame, the three transports, the function codes, and the error vocabulary.
The Modbus Frame
PDU and ADU, big-endian order, and size limits.
Chapter 5Modbus RTU
RS-485, serial settings, framing by silence, and the CRC.
Chapter 6Modbus ASCII
Bytes as text, colon and CR/LF delimiters, and the LRC.
Chapter 7Modbus TCP/IP
The MBAP header, transaction IDs, and gateways.
Chapter 8Function Codes in Depth
The eight that matter, byte by byte.
Chapter 9Exceptions and Diagnostics
Every exception code, loopback tests, and diagnostic counters.
Part III · Hands-On with a Microcomputer
Real traffic from Python and pymodbus on a Raspberry Pi or any Linux machine, ending with a monitoring-and-control project.
Setting Up Your Microcomputer
Linux, Python, a virtual environment, and a practice server.
Chapter 11Your First Modbus TCP Client
Connect, read, check, scale, close.
Chapter 12Building a Modbus Server
Data blocks, contexts, and a device that comes alive.
Chapter 13Modbus RTU over RS-485
A USB adapter, the serial client, and a two-adapter test rig.
Chapter 14Reading and Writing Real-World Data
Signed values, scaling, 32-bit numbers, floats, and word order.
Chapter 15A Monitoring and Control Project
A pump-station monitor that closes the loop. Run it in your browser.
Part IV · Doing It Well
The craft around the protocol: troubleshooting, performance, security, and where Modbus fits.
Troubleshooting Modbus
Start from the reply, fault signatures, and isolate-simplify-expand.
Chapter 17Performance, Polling, and Scaling
Where the time goes, batching, tiering, and slow devices.
Chapter 18Security Considerations
What Modbus can't protect, and defense in depth.
Chapter 19Modbus in the Real World
PLCs, SCADA, gateways, and the protocol landscape.
Appendices A–EQuick Reference
Function codes, exception codes, pymodbus, wiring, and a glossary.
Who this is for
Technicians, apprentices, and engineers who want to understand what is actually on the wire, and then prove it by running real Modbus traffic. Parts I and II need no programming. Part III uses short Python programs; a little comfort with the command line helps.
Your progress is saved in this browser. Pass a chapter's check (70% or better) to mark it complete.