Part I · Chapter 1
What Modbus Is and Why It Still Matters
Modbus is a messaging protocol: a small, strict set of rules for how one device asks another for data, and how the second device answers. It tries to do very little, and that is exactly why it works so well.
By the end of this chapter you can
- Explain why Modbus is a protocol and not a cable, and name its three transports.
- Describe the client and server roles, and why a server never speaks first.
- Say where Modbus sits in an automation system and why it has lasted since 1979.
Strip away every detail and Modbus is just this: a question with a known shape and an answer with a known shape. It doesn't care whether a number is a tank level, a motor speed, or the state of a light. It only defines how the question and the answer travel. Because it does so little, it is easy to implement, easy to debug, and very hard to break in confusing ways.
Modicon created Modbus in 1979. Modicon had invented the programmable logic controller (PLC) a few years earlier and needed a simple way for its controllers to talk to the input and output hardware around them over a serial line. Crucially, it published the protocol openly. Any manufacturer could implement it without a license fee or permission, and thousands did. Today an independent organization maintains Modbus, and it is still free to use.
A protocol, not a wire
Get this straight first: Modbus is a protocol, not a kind of cable or connector. The same Modbus messages can run down a two-wire serial line at a few thousand bits per second, or cross a corporate Ethernet network alongside web traffic and email. The rules of the conversation (who speaks first, how a request is shaped, how an answer is recognized) stay the same whatever road the message takes.
That separation is why you'll hear several names containing the word Modbus. Modbus RTU and Modbus ASCII are the protocol running over serial lines; Modbus TCP is the protocol running over Ethernet. They are dialects of one language. This course treats them that way: one protocol, first as an idea, then in each of its common forms.
Client and server, the old way and the new
Every Modbus exchange has two roles. The device that starts a request is the client; the device that responds is the server. For most of the protocol's history these were called master and slave, and you'll still meet those words in equipment manuals, datasheets, and a lot of working code. This course uses client and server, and reminds you of the old terms where it helps.
The most important fact about classic Modbus follows from these roles: a server never speaks unless spoken to. It doesn't volunteer data, interrupt, or start a conversation. It waits for a request and then replies. The client runs the whole exchange: to get data from ten devices, it asks each in turn, one question at a time. This one-sided, polled behavior explains almost everything about how Modbus acts and how to troubleshoot it.
On a serial network there is normally exactly one client and up to a few dozen servers sharing one pair of wires. Because only the client may start a conversation, devices never talk over each other. The client picks one server by its unit address, waits for that server's reply, then moves on. On a TCP network the picture loosens a little (several clients can each open their own connection to a server), but within any one connection the same disciplined question-and-answer pattern holds.
Where you will meet Modbus
Modbus began on factory floors, linking PLCs to remote I/O racks, and that's still a core use. Since then it has spread almost everywhere: power meters report energy over it, variable-frequency drives take speed commands with it, building-automation systems read temperature and humidity sensors through it, and solar inverters, battery systems, and EV chargers expose their status on it. Water and wastewater plants run on it, and even inexpensive hobbyist sensors now ship with Modbus interfaces.
A handy picture is the classic automation hierarchy, often drawn as a pyramid. Field devices (sensors, meters, actuators) touch the physical world at the bottom. Controllers (PLCs and remote terminal units) make decisions in the middle. The supervisory layer (SCADA and HMI software) sits on top, where people watch and direct the process. Modbus is the connective tissue across the lower and middle layers, and gateways often carry its data upward.
The practical lesson: wherever you work in industrial or embedded systems, some device near you probably exposes its data over Modbus. That makes the skill unusually portable. The techniques you'll practice against a simulated device on your desk will let you read a real energy meter, command a real drive, or pull data from a controller made by a company you've never heard of.
The three transports at a glance
The protocol is one language, but you'll meet it in three common forms. Each gets its own chapter in Part II. The differences are all about how a message's bytes are framed and carried, not about what the message says.
| Transport | Carried over | Framing |
|---|---|---|
| Modbus RTU | Serial (RS-485 / RS-232) | Compact binary with a CRC; a frame ends on a timing gap |
| Modbus ASCII | Serial (RS-485 / RS-232) | Readable text with an LRC; starts with :, ends on CR LF |
| Modbus TCP | Ethernet (TCP/IP) | Binary with a short header; no checksum |
RTU is the most common serial form: each message is a tight string of binary bytes protected by a checksum, and it's what most industrial serial devices speak today. ASCII is an older serial form that encodes the same information as readable text; it's slower and rarer, but it still appears on legacy equipment and is easy to read on screen while learning. TCP wraps the protocol for Ethernet, drops the serial checksum because the network already delivers data intact, and adds a short header so a device can keep several requests straight at once.
The heart of each message is the same. The part that says what to do (read these registers, write that coil) doesn't change from one transport to the next. Only the wrapping changes: the address and checksum on a serial frame, or the header on a TCP packet. Once you see that the inner message is constant, switching transports stops being intimidating. You aren't learning three protocols; you're learning one protocol with three envelopes.
Try it: one request, three envelopes
Why it has lasted
Newer, richer industrial protocols exist, and some do things Modbus can't. So why hasn't a 1979 design faded? Several reasons reinforce each other:
- Open and free: no commercial barrier to adopting it.
- Simple: a small device with a modest processor can implement all of it, and an engineer can understand the whole protocol in an afternoon.
- Well documented and stable: code written decades ago still works.
- Already everywhere: every new device that speaks Modbus instantly works with the enormous installed base. That network effect sustains itself.
Modbus also knows its limits. It doesn't try to be a security protocol, a real-time control bus, or a self-describing data format. It does one job. When a system needs more, engineers layer other tools on top of it or beside it rather than replacing it. The result is a universal baseline: not always the most capable choice, but very often the one that simply works and that everything else can talk to.
How this course is built
LearnSCADA follows the chapters of Understanding Modbus in order, moving from idea to practice in four parts:
| Part | Chapters | What you'll do |
|---|---|---|
| I · Foundations | 1–3 | Finish the mental model: the data model (coils and registers) in Chapter 2, then the request–response cycle in Chapter 3. |
| II · The Protocol in Detail | 4–9 | Take the protocol apart: the frame, the RTU, ASCII, and TCP transports one by one, the function codes, and exceptions. |
| III · Hands-On | 10–15 | Build with a microcomputer such as a Raspberry Pi: a client, then a server, then the same over an RS-485 line, ending in a small monitoring-and-control project. |
| IV · Doing It Well | 16–19 | The working engineer's concerns: troubleshooting, performance and polling, security, and fitting Modbus into PLC and SCADA systems. |
A Quick Reference page collects the book's appendix material (function codes, exception codes, and wiring guides) for when you need to look something up. Each chapter ends with a short check; pass it and the chapter is marked complete in the sidebar.
With the wide-angle view in place, the natural next question is: when a client asks a server for data, exactly what kind of data is it, and how is it organized? That's the Modbus data model, and it is refreshingly small.
Check your understanding
1. Which device starts every exchange in classic Modbus?
A server never speaks unless spoken to. The client polls each server in turn, one question at a time.
2. Modbus RTU, ASCII, and TCP differ mainly in…
One protocol, three envelopes. The function code and its data are identical; only the wrapper changes.
3. Which transport carries no checksum of its own?
TCP/IP already delivers data intact, so Modbus TCP drops the CRC and adds a short header instead.
4. Which is not one of the reasons Modbus has lasted?
Modbus deliberately doesn't try to be a security protocol. It lasts because it's open, simple, stable, and everywhere (Chapter 18 covers security).