Hacker Public Radio

HPR4758: Programmable Logic Controls - Episode 6

Hacker Public Radio

Summary

The latest discussion focuses on programmable logic controllers (PLCs) and their networking capabilities, specifically examining the Modbus protocol. The episode is part of an eight-part series that builds on previous discussions about input/output modules and machine safety systems. It categorizes PLC networks into three types: PLC to I/O, PLC to PLC, and PLC to PC, emphasizing the complexity and variety of networking protocols in industrial automation, which often prioritize vendor interests over user benefits.

The episode traces the evolution of networking in industrial settings, starting from basic point-to-point serial links to more complex multi-drop serial networks and the eventual adoption of Ethernet technology. It highlights the significance of protocols like RS-232, RS-422, and RS-485, which facilitated communication between PLCs and various devices. The discussion also touches on proprietary protocols developed by different manufacturers, illustrating the fragmented nature of the industrial automation market.

A detailed exploration of Modbus reveals its origins and variants, including Modbus RTU, Modbus ASCII, and Modbus TCP. Modbus is noted for its open standard, allowing widespread implementation and adaptation across different devices. The episode concludes with a summary of Modbus's data model and message formats, underscoring its role as a fundamental protocol in industrial control systems. Future discussions will shift focus to the integration of personal computers in industrial applications.

Show Notes

This show has been flagged as Clean by the host.

01 Introduction

This is the sixth episode in an 8 part series.

02

In the previous episode we looked at I/O modules, what they are, how they work, and the purpose that they serve in the system.

We also discussed machine safety systems and also claims made by certain people about cyber security and industrial safety.

In this episode we will look at PLC networking, together with a detailed look at one network protocol, Modbus.

03 Types of Networks

PLC networks fall into three broad categories, based on the purpose of the network.

These categories are

• PLC to IO

• PLC to PLC

• and PLC to PC or Personal computer.

There is a great deal of overlap between these, so don't expect them to fall into nice discrete pigeonholes.

04 A Multiplicity of Protocols

Logically, you would think that the advantages of interoperability would be so great that there would be just a few networking protocols and everyone would use them.

The reality is the opposite.

There is such a multitude of protocols that I won't attempt to list them all.

Industrial automation is a market that is firmly in the control of the vendors, not the customers, and the vendors value customer lock in over user benefits.

05

What I will focus on instead is the technological development over time so you can understand how we ended up where we are today.

I will illustrate this with a few protocols from a few vendors before going into detail on one specific family of networks.

06 Basic Point to Point Serial

The first and most basic networks were simple point to point serial links.

You may argue that a point to point link is not a network, but in this case it is the start of networking with PLC, and one of the most important industrial network protocols today is a direct descendent of one of the early point to point protocols.

07

These point to point links initially addressed two main issues.

One was that once computers were being used to run the software needed to program PLCs, some means of downloading the program to the PLC and to debug the PLC program was needed, and this took place over a point to point serial link.

08

The other was that there were various microprocessor driven instruments and devices where it was desirable to allow the PLC to communicate with them in order to obtain readings, adjust set points, and otherwise exchange data.

A serial link was the obvious means of implementing this.

The physical and electrical media were generally RS-232, RS-422, or serial current loop.

09 RS-232

RS-232 should be familiar to most listeners.

The notable characteristic of RS-232 is that the data and control signals were referenced to ground, or "single ended" as this is also known.

While this was simple, it placed limitations on length of cabling and it was somewhat problematic when the PLC and the other device were connected to different power sources and did not have a common ground.

10 RS-422

RS-422 differs from RS-232 in that the signals are differential rather than referenced to a common ground.

Signal lines come as pairs, and it is the difference in voltage within the pair rather than compared to ground which defines the zeros and ones.

This allows for higher data rates, up to 10 mbps at very short distances, and much longer cable runs, up to 1,200 metres, at the cost of lower data rates.

11

RS-422 also allowed for multiple receivers to be connected to the same wires, although only one driver was permitted.

This allowed for multiple devices to "listen" on the same set of wires, although only one node could "talk".

12 Serial Current Loop or TTY

Some PLCs, particularly Siemens, used a serial current loop instead of RS-232 or RS-422.

This is known as a TTY interface, as it originated with teletypes.

You may be familiar with the term TTY being used to describe terminal windows in unix like operating systems.

13

This is due to early computers adopting off the shelf teletype equipmen

More from Hacker Public Radio

Oct 27, 2026

This show has been flagged as Clean by the host.

Oct 26, 2026

This show has been flagged as Explicit by the host.

Oct 23, 2026

This show has been flagged as Explicit by the host.

Oct 22, 2026

This show has been flagged as Clean by the host.

Oct 21, 2026

This show has been flagged as Clean by the host.

See all episodes →