PLC Control and Security in Modbus Environments

Last update: December 1th 2026
  • The Modbus protocol operates using a master-slave architecture, deploying in RTU, ASCII and TCP/IP variants to connect industrial devices.
  • Data management is performed through specific function codes that access coils and memory registers, requiring precise mapping between relative and absolute addresses.
  • The lack of native security in Modbus requires the implementation of validation proxies and external control channels to authorize operations and protect critical infrastructure.

Close-up of industrial remote I/O modules on a DIN rail, featuring RS-485 communication status lights and professional wiring, essential for Modbus RTU networks.

If you work in industrial automation, you'll know that dealing with Modbus-era PLCs is a bit like working with a classic: it's reliable, everyone knows how it works, but it lacks modern safety features . This protocol, which originated back in the seventies, has become the universal standard precisely because it's so simple and open, although that same simplicity is what leaves us open to quite a few problems if it's not managed carefully.

The purpose of this article is to provide you with a comprehensive guide to mastering the control of these devices, from the most basic wiring and logging to advanced security implementations such as validation proxies. Whether you're dealing with Siemens, Schneider, or Allen-Bradley, we'll break down how to make everything work together seamlessly without creating chaos in your plant.

Fundamentals of the Modbus ecosystem

Detailed view of industrial automation wiring with terminal blocks and pneumatic valves, illustrating the physical interface between a PLC and field devices.

To get started, it's important to understand that Modbus operates on a master-slave architecture . Simply put, the master takes the lead: it initiates the request, while the slave, remaining silent, only responds when contacted via its unique address. In the world of Ethernet, the concepts shift slightly to client and server , where the client (usually the PLC) initiates the TCP connection, typically via port 502, to exchange data with the server.

The protocol is primarily deployed in three variants. There's Modbus RTU , which is the binary and fastest version for RS-485 or RS-232 serial connections. On the other hand, Modbus ASCII is slower because it uses human-readable characters, which is great for debugging errors by eye. Finally, Modbus TCP/IP wraps the data in Ethernet packets, allowing for much greater scalability and the use of industrial switches to connect multiple nodes.

  Business Backup: A Complete Guide to Backups for Businesses

Memory mapping and function codes

Imagine the slave as a cabinet full of numbered drawers; the master simply says which drawer to open. These drawers are the registers, and they are divided into four main types. Coils are read/write bits for digital outputs, while Discrete Inputs are read-only for digital inputs. For more complex data, we have Input Registers (read-only, typical of analog sensors) and Holding Registers , which are the crown jewel because they allow reading and writing 16-bit values.

  • FC 01 and 02: They are used to read the states of coils and discrete inputs.
  • FC 03 and 04: They are used to extract data from retention and entry records.
  • FC 05 and 06: They allow you to force a single coil or write to a single register.
  • FC 15 and 16: These are the tools for performing mass writing of multiple coils or records.

One detail that often causes headaches is the relative versus absolute address . While in the documentation you see that a register is 40001, in low-level code (like in C) you might need to request register 0. This offset of 1 is a peculiarity of the protocol that you must keep in mind to avoid reading the wrong data.

Practical integration into leading PLCs

Professional industrial automation system with Siemens HMI touchscreens and integrated PLC wiring, showing the complete control ecosystem.

Each manufacturer has its own way of doing things. In Siemens S7 , for example, it's common to use the MB_COMM_LOAD and MB_MASTER blocks, requiring specific modules like the CM1241 for the serial component. Schneider Modicon , the creators of Modbus, on the other hand, integrate these functions natively into Unity Pro or EcoStruxure, facilitating variable reading through READ_VAR blocks.

If you're working with Allen-Bradley ControlLogix , things change because they typically rely on Added Instructions (AOI) to manage Modbus TCP. Regardless of the brand, the key to success is precisely matching the parameters : the baud rate, parity, and stop bits must be identical at both ends, or communication simply won't occur.

  Safety testing laboratory: types, tests and applications

The challenge of complex and floating data

Since Modbus registers are strictly 16 bits, handling a floating-point number (which requires 32 bits) is a major headache. The solution is to combine two contiguous registers . The problem is that there's no standard for byte order. Some manufacturers use ABCD, others CDAB, or even BADC, forcing engineers to experiment or consult dense manuals to reconstruct the actual value on the master.

Securing Control: Security and Proxies

Industrial control hardware featuring a signal stack light and pneumatic actuators, representing the physical outputs managed by a PLC.

This is where things get serious. Modbus was born in an era before industrial cyberattacks, so it lacks authentication and encryption. Any device that uses the protocol can, in theory, stop a pump or open a valve. To address this, control channels like Redoubt/1 are being implemented , acting as a gatekeeper for the PLC, analyzing each operation before allowing it to proceed.

The most robust strategy is to install a validation proxy between the SCADA system and the PLC. This system does not alter the network topology but applies a default denial policy : only strictly authorized operations reach the controller. Additionally, measures such as dual-key operation can be implemented , where critical actions require signatures from two different keys, or a dead man's timer that brings the plant to a safe state if the supervisor stops sending live signals.

To prevent security from becoming an availability issue, the ideal solution is to use high-availability pairs . This allows you to decide whether the system should fail in open mode (to avoid losing historian data) or closed mode (to prevent unauthorized writes), always maintaining an emergency or "break-glass" path so that operators can regain manual control in extreme situations.

  TikTok without Watermark: Effective Tricks and Methods

Modern management of Modbus PLCs requires a balance between the simplicity of the original protocol and the implementation of external security layers, ensuring that the wiring is correct and that the data flow is strictly monitored by proxies and formal validations to prevent sabotage or operational errors.

FAQ

What is the main difference between Modbus RTU and Modbus TCP?

Modbus RTU uses binary transmission over serial interfaces such as RS-485, while Modbus TCP encapsulates data in Ethernet packets to allow faster and more scalable communications.

How are floating-point numbers handled in Modbus?

Since the registers are 16 bits, two contiguous registers are used to store a 32-bit value, requiring the master to reconstruct the data according to the manufacturer's byte order.

What is relative addressing in Modbus and why is it confusing?

It is the address that is sent in the data frame starting from zero, which creates an offset of one with respect to the absolute address indicated in the manuals.

Why is a security proxy necessary to control Modbus PLCs?

The original protocol does not include authentication or encryption, so a proxy is essential to ensure that only authorized users execute specific commands.

What happens if there is a configuration error in serial communication?

If the baud rate, parity, or stop bits do not exactly match between the master and slave, timeout errors will occur and no data will be exchanged.

What does the dual control system for critical outputs consist of?

It is a security measure where a sensitive operation requires the validation of two different digital keys before the proxy allows the instruction to reach the PLC.

TecnoDigital

TecnoDigital

Passionate about technology and software development, I delve into the world of systems and computing with the aim of fostering innovation and solving complex challenges.