18 Jan What is PLC Programming and Automation?
Figure 1 A Typical Modular PLC for Large-Scale Applications; This is the Allen-Bradley ControlLogix Series
What in the World is PLC Programming, and Why is it Important?
PLC programming is the act of creating internal logic for a programmable logic controller (PLC). PLCs are typically programmed in a “language” proprietary to the controller; accurately described as a translation from spoken word (“If condition 1 is true and condition 3 is false, turn on output 12”) to something the controller can interpret and execute (“If I1.0 = 1 and I1.2 = 0 then O12.0 = 1”).
The most common language used is Ladder Logic (which reads similarly to electrical drawings). Other common programming languages used include:
- Structured Text – similar to traditional command-based computer programming; used in the previous example
- SFC (Sequential Flow Chart) – very similar to a traditional flowchart
- Instruction List
- Function Block Diagram
PLC programming is extremely valuable to modern industry for its ability to minimize the monotony of simplistic work tasks, to simplify wiring and reduce material costs (wire is very expensive!), and to create dynamic, complex routines that outdated methods such as mechanical relay-based control simply cannot handle, and especially cannot handle in a cost-effective manner. The PLC enables cost-effective solutions to even the smallest and largest of manufacturers seeking solutions to complex assembly, process control, testing and manufacturing applications.
What is the PLC?
The PLC can be accurately described as a specialized computer. It differs from a typical home or office computer, however, in that, while it cannot handle anywhere near the same diversity of tasks, it does handle the tasks it CAN do at an exceptionally fast speed. Due to the high-speed process of many automated applications, it is absolutely essential that a PLC processor not get bogged down or slowed in the way a traditional computer can. But a fast processor alone will not complete automation tasks as required – the PLC’s ability to handle thousands of I/Os (inputs, outputs and input-outputs) with a single processor is what really defines the product as the “brain” of any automated system.
How Does a PLC Work?
Figure 2 Typical CPU Operating Cycle
A PLC’s most important components are its CPU, its I/O modules, and its rack and power supply. The CPU is the brain of the PLC; it handles the mathematical heavy lifting required to run an automated system at an extreme speed. The I/O modules connect the field inputs (the sensory feedback to the machine) and the outputs (the devices to produce mechanical motion and other actions) to the rack. The rack connects the processor and the I/O modules to pass data between the two; the power supply supplies the energy to do this. As per the diagram above, each scan cycle sees the PLC do internal diagnostic checks, check the inputs, execute the program logic, then update output bits accordingly.
What is the Scan Time of a PLC and How Does This Impact Manufacturing in Canada?
The scan time of a PLC is around one thousandth of a second; the processor scans the logic of the controller one thousand times per second, or every 0.001 seconds. This speed is absolutely essential for real-time process control, and for the high-speed applications of modern manufacturers and producers around the world and across Canada, from Ontario and Quebec’s automotive sector to Alberta and Saskatchewan’s petrochemicals industry; from metal stamping in the American heartland to textile production in modern India. PLC-based automation helps manufacturers across Canada keep a competitive edge in an ambitious, technological world.
What Product is a PLC Used to Replace?
Figure 3 Automation of the Past – Relay-Based Control
Have you ever worked with a large, automated machine installed in the 1980s or earlier? These machines typically came installed with multiple large electrical panels containing hundreds or thousands of mechanical relays. In a sense, a PLC can be considered a box containing tens of thousands of digital relays – though of course, they can handle tasks much more complex than binary logic as well.
Instead of meticulously installing, wiring and maintaining relays prone to mechanical wear, a single PLC can replace all of this. The benefits of doing so are incredible in terms of cost (less money spent on relays, wire, floor space, etc.) and maintenance (a PLC can be swapped out with relative ease compared to tracing a dead relay).
The History of PLC Programming
The framework for modern programming had been established long before the first PLCs – while now archaic and inefficient, relay-based control was designed on the same fundamental concepts of sequential control as the PLC is today. The archetype for the modern PLC was created in 1968, in response to a commission from GM to find an electronics-based solution to replace their existing relay-based control systems. The successful bid came from a company known as Bedford Associates, who created the Modicon (Modular Digital Controller). The Modicon brand still exists today, presently produced by France’s Schneider Electric. More contemporary PLCs have adopted the languages of programming we use today, per the IEC 61131/3 control systems programming standard.
Figure 4 Modicon Engineers Posing With One of the First PLC Prototypes
Who Invented the PLC?
Ostensibly, the PLC was invented by Bedford Associates – later branching off into a company called Modicon to handle its PLC business – under the leadership of founder Dick Morley. While Morley did spearhead the concept and is credited as lead engineer, he is quoted as saying, “[The Modicon] was really invented by 50 people, each of whom invented half of it!”
The collaborative nature of the PLC’s inception carries into modern automation today – creating automated machines is an immensely collaborative process that usually carries multiple programmers on a single project, but those programmers would be at standstill without the efforts of tradespeople building the machine, engineers and designers designing the machine, management controlling timelines and salespeople obtaining the contract to produce the machine in the first place. All involved must work together on their separate agendas to produce a cohesive whole.