# We Should Pay More Attention to PLCs

Until this year, I didn’t pay much attention to Programmable Logic Controllers (PLCs). During Christoph Roser’s van full of nerds tour of Industry 4.0 in Germany last July, I heard about PLCs everywhere and even visited the Siemens plant in Amberg that produces 31% of the world’s PLCs. It was a wake-up call.

Programmable Logic Controllers, or PLCs, are the most common form of computer controls in automotive, oil and gas, power production, steel making, chemicals, and many other industries.

Robots hog visitors’ attention and media coverage because they move. The entire world produces ~100,000 industrial robots per year. PLCs are less conspicuous. They are dull boxes with nothing visibly entering or leaving but worldwide production for PLCs and PLC peripherals is ~50,000,000 units/year. By comparison, worldwide production quantities for cars and laptop computers are respectively ~75,000,000 and ~140,000,000 units/year.

As product categories, industrial robots date back to 1961; PLCs to 1969. Neither one is new but, if one deserves the title of automation workhorse, it’s the ubiquitous PLC, not the robot. A 2019 PLC is still a bulky, dull box. It’s unlike the robots in that you can’t tell what it does from watching it.

## A Visit to Siemens Amberg

Siemens makes the bulk of its PLCs and peripherals in Amberg. This is a short video of Angela Merkel’s visit to the same plant in 2015, in German with English subtitles:

Statista credits Siemens with 31% of the PLC market worldwide. We were told that the plant ships 60,000 units/day. If it works 250 days/year, that’s 15M units/year and, if Siemens has a 31% share of market, then worldwide production is 48.4M units/year.

According to the same, publicly available stats, the PLC industry sales in 2019 are estimated at $8.5B. It works out to an average price/unit of$175, which is consistent with the price lists of PLC suppliers.

## What’s a PLC?

A PLC is a computer used to control machinery but not all computers used for this purpose are PLCs, so we need to understand what makes a PLC different from the microcontrollers in our dishwashers and kitchen stoves, the CNCs in machine tools, or the general-purpose computers that drive semiconductor equipment, 3D printers or other cyber-physical systems.

PLC suppliers put forward two unique characteristics:

1. The PLC hardware is rugged enough for environments where it may be subject to vibrations, shocks, heat, oil mist, and other aggressions.
2. Input or output signals to PLCs are not limited to 5V DC. Like the relay panels from the 1960s that they replaced, PLCs can interact with the world in 120V or 240V AC at 10 Amps.

## What Does a PLC do?

The original purpose was to turn switches and valves on and off, either as part of a process based on times or counters or in response to events like a machine overheating or a loss of pressure.

You can program a PLC to tell a bridge crane to dunk a basket of parts into a chemical tank for 10 minutes, then lift it out and dunk it into a rinse tank for 12 minutes, then move it the next tank, etc. Each tank would have its own thermostat but, if the thermostat failed, it would send an alarm to the PLC.

Over 50 years, as PLCs became more and more powerful computers, more roles were piled on, like, in the above example, feedback control on each tank. On the other side, they have also been fitted with Human Interfaces (HMI), encroaching into the domain of Supervisory Control And Data Acquisition (SCADA) systems. The latest HMIs are tablets that are no longer physically tethered to the PLC. Pictures of the individual devices and their network configurations are available from suppliers like Siemens, Allen-Bradley, or ABB.

## What Kind of Software Do PLCs Run?

As products, today’s PLCs also have features that are legacies of their origins at GM’s Hydramatic division in 1968, specifically the use of a method called ladder logic for programming the PLCs, and proprietary operating systems.

To make their Modicon 084 acceptable to technicians working with relays, the designers made it programmable with a ladder logic that emulated relays. Today, ladder logic remains the dominant method for programming PLCs even though alternatives are available:

• FBD — Function Block Diagram
• SCL — Structured Control Language, based on PASCAL
• ST or STX — Another programming language based on PASCAL
• Graph — Flowchart-based language.
• General-purpose high-level languages — C, C++, Visual Basic

But they have yet to displace ladder logic.

### Proprietary Operating Systems

Another historical legacy is that most PLCs run proprietary operating systems (OS). On a day-to-day basis, it does not affect PLC programmers, as they develop on simulators running on Windows, and download finished programs to the PLCs.

It does, however, burden each supplier with the full cost of updating their OS. In April, 2019, Siemens announced that some of its low-end PLCs were now running under a customized version of Linux. Their product note specifically mentions the time required and the costs of having a proprietary operating system.

## What is PLC Hardware?

PLC hardware evolved from one box to a network of devices connected to a CPU, including decenter peripherals interacting with sensors and actuators, and Human-Machine Interfaces (HMI) panels interacting with people. In some cases, you have software PLCs, where the physical CPU is replaced with a software process running on a PC.

## Where are PLCs in the Factory’s Technology Stack?

When you walk through a factory floor, the only part of its automation technology that you see is its edge layer — that is, the systems that engage directly with process equipment and materials, and production operators.

Beyond the edge, you have machines, tools, fixtures, reaction vessels, etc., transforming materials; inside, you have software interacting with other software systems and communicating with humans.

Robots and PLCs are both at the edge. Robots are more visible than PLCs but there are many more PLCs than robots in factories. The edge layer is the foundation of the factory’s operational technology. Human countermeasures can mitigate the effect of dysfunction in upper layers but dysfunction at the edge directly results in lost production and quality losses.

## What is the Future of PLCs?

PLCs are more pervasive in industry today than any other component of Industry 4.0. They have been around for 5 decades, have legacy features  that are long in the tooth, and blurry boundaries with SCADA systems. They may evolve in many different ways over the next 5 years. All I can do with my limited information is point out some of the directions I believe they may take.

### About Arduinos and Raspberry Pis

Unlike PLCs, microcontrollers are not sold as enclosed boxes ready to be mounted on machines and plugged in. Microcontroller Units (MCUs) are computers on single chips for control applications sold by semiconductor manufacturers like Intel or Cypress. Consumers see them as boards when technicians come to replace them in dishwashers or stoves.

The Arduino platform originated 15 years ago in Italy as a means of letting students, hobbyists, makers, and researchers use microcontrollers in their projects. The hardware is sold as boards and the software used to develop programs for them on laptops or desktops is free.

Functionally, PLCs and Arduinos sound alike: they are programmable, take input from sensors and apply output to actuators. A PLC costs hundreds of dollars; Arduino hardware, tens. PLCs are rugged, shop-floor proof boxes that can directly output 240V signals. Arduino boards are sold naked, and you can get enclosures separately. Their output is a 5V signal.

Above PLCs, you usually have Supervisory Control And Data Acquisition (SCADA) systems, although PLC suppliers have been encroaching into the SCADA space from below and ERP suppliers from above.

In the same spirit as Arduinos, you can use Raspberry Pi computers for SCADA. A top-of-the-line Raspberry Pi goes for ~\$150. It’s the size of a pack of cigarettes and comes without a keyboard, mouse, or screen. It has 1GB of RAM and runs the raspbian version of Linux.
Raspberry Pis are from the UK.

### PLCs versus Arduinos in Research

In the robotics lab at Karlsruhe University of Applied Science, we saw a project to teach students to use PLCs and interface these PLCs with SAP systems. At UC Berkeley’s flow lab, on the other hand, Prof. Simo Mäkiharju uses Arduino microcontrollers for his experimental equipment. Likewise, at UC Santa Cruz’s robotics lab, Prof. Mircea Teodorescu’s team uses Arduinos and no PLCs. In the aerospace industry, I have also met R&D engineers who use multiple Arduinos in their experiments and Raspberry Pi computers to supervise them.

### Fusion of PLCs with Arduinos in Operations

Automation professionals at Bosch say that Arduinos are great for fast prototyping but unfit for volume production. This prompted me to search for counterexamples.

On LinkedIn, the first comment to my blog post about Pick-to-Light was by Miguel Padilla from QTI Sensing Solutions, reporting that engineers had built their own Pick-to-Light system with Arduinos.

Cityblooms is another example. They make control systems for agriculture. Their Cityblooms Comanders have Arduino controllers and are on a LoRa network. Cityblooms has a small installed base but it’s real and they have installed some of the units outdoors, meaning that the controls must withstand the California weather. They have embedded Arduinos in the product but not in the process of making it.

Industry professionals object to Arduinos as not rugged and unable to handle high-voltage, high-power input/output. The key advantage of Arduinos is that they are easy enough to program for middle-schoolers to use in science projects. Therefore, all it takes to make them fit for industrial use is to run this software on appropriate hardware.

There already are suppliers claiming to do this. Industrial Shields in Spain, markets Arduino-based PLCs, with SCADA on Raspberry Pis, and Conelcom GmbH in Austria offers a “100% Arduino compatible” line of PLCs called Controllino. Both claim major manufacturers as customers.

### The future

The technicians who configured transfer lines with relays retired long ago, and manufacturers no longer need to win them over.  On the other hand, they need to recruit and retain software engineers trained in more modern methods and tools. In 2018, GE ran the following ad for this purpose:

It did not succeed. Freshly minted college grads prefer to work for Google or other leading software companies than for manufacturing companies. To them, an antique like ladder logic is a motivation suppressant.

PLCs are unlikely to be disrupted out of existence the way FAX technology was replaced by email, because they directly meet functional needs that will not go away. Some PLCs may turn from physical boxes mounted on machines to processes on servers connected to the machine through the Internet of Things (IoT) but these processes will still be called “PLCs.” On the other hand, the application development environment of PLCs is likely to change in the direction of what today’s students are learning.