LOGO

PLC Programming: A Beginner's Guide

September 14, 2011
PLC Programming: A Beginner's Guide

The Distinction Between General Computing and Manufacturing Automation

Within the manufacturing sector, a clear distinction exists between standard computer applications and the implementation of computer automation.

A comprehensive understanding of computers doesn't equate to mastery of automation techniques. True automation potential is unlocked through the utilization of Programmable Logic Controllers (PLCs).

Understanding Programmable Logic Controllers (PLCs)

A PLC fundamentally functions as a specialized computer, equipped with a central processing unit. However, its architecture is specifically designed for seamless interaction with external systems.

Information is gathered from the physical environment via inputs. These include digital and analog sensors, relays, and a variety of other devices.

Conversely, the PLC influences the physical world through outputs, controlling components like motors, valves, conveyor systems, and actuators.

The PLC as the Core of Automated Systems

The PLC itself serves as the central control element, the core of the automated process. It processes data and executes commands.

PLC programming enables decision-making based on real-time input from sensors and other sources.

These decisions are then translated into actions via outputs, occurring within fractions of a second. This rapid response time effectively creates automated, robotic functionality.

Essentially, PLCs represent a form of industrial robotics, capable of precise and efficient control.

The Origins of Computer Automation Programming

Prior to the introduction of computer systems, all manufacturing machinery relied on manual control. This meant operators directly managed devices by physically pressing buttons. For instance, an operator would activate a button to initiate conveyor belt movement, positioning a bottle beneath a filling spout. Subsequently, another button would open a valve to fill the bottle, followed by reactivation of the conveyor belt.

This initial phase of automation served to replace – and, in many instances, preserve – human labor.

Evolution from Manual Control Systems

The development of PLC programming stemmed directly from the wiring configurations of these earlier "manual" control systems. Often, these systems incorporated a degree of intelligence within the electrical wiring to ensure machine safety.

Electrical schematics commonly depicted input push buttons and output contact relays, visually represented as shown below.

world-plc-programming-2.jpg

These components are contact relays; a "normally open" relay closes the electrical circuit upon activation, while a "normally closed" relay opens it. Relays could be triggered by various inputs, such as pushbuttons or limit switches.

Output Signals and Electrical Coils

On the output side of the wiring, electricians utilized a specific signal to denote an output coil, which could activate a motor or other equipment.

world-plc-programming-3.jpg

The emergence of computer processors, alongside sophisticated sensor technologies like infrared proximity and level sensors, led to the automation of processes previously requiring human decision-making. This transition was facilitated by computer automation programming within Programmable Logic Controllers (PLCs).

PLCs vs. General-Purpose Computers

What distinguishes a PLC from a standard computer? PLCs are engineered for rapid cycling and swift interaction with external devices. Examining the initial image of an Allen-Bradley PLC system reveals that the leftmost module constitutes the actual computer.

The remaining portion of the "rack" comprises modules designed to interface with input sensors and control output devices.

The Birth of Ladder Logic

As these systems began to supplant those traditionally wired and maintained by electricians, the control "language" needed to be accessible to them. This necessity gave rise to ladder logic.

Computer Automated Programming and Ladder Logic

Currently, Programmable Logic Controllers (PLCs) predominantly employ different iterations of ladder logic for their operation. This programming language visually resembles traditional electrical diagrams, utilizing familiar electrical symbols.

However, these symbols are arranged within the processor as a sequential "program" responsible for governing all functions. It’s a unique approach to control.

world-plc-programming-4.jpg

While appearing as an electrical schematic, these elements are symbolic representations of specific functions. Input relays monitor real-world sensors, while output symbols activate or deactivate physical devices.

Intermediate boxes signify mathematical operations or other computational "functions," mirroring those found in conventional computer software. This allows for complex control schemes.

The program is structured on "rungs," which are scanned almost concurrently. This differs significantly from traditional computer programming, where code is executed line by line.

Adjusting to a programming paradigm where operations occur simultaneously can require a shift in thinking for those accustomed to sequential scripting.

However, this rapid scan time is essential when considering the swift response required by automated systems reacting to real-time changes.

world-plc-programming-5.jpg

In today’s high-tech manufacturing landscape, where high volume and precision are paramount, these fast, programmable computers are central to maintaining a competitive edge. They are vital for efficiency.

Process automation necessitates a thorough understanding of both the process itself and the machinery involved. It also demands a programmer’s mindset to instruct the PLC on replicating tasks previously performed manually.

Furthermore, utilizing a computer for these tasks enables immediate data collection, testing, and measurement. This information can then be readily accessed through databases or web-based interfaces.

Have you had the opportunity to work with automated systems controlled by PLCs? If you are a PLC programmer, we invite you to share your insights and experiences with this technology in the comments below.

Image credit: Sistemart, Elmschrat, Nuno Nogueira

#PLC programming#programmable logic controllers#industrial automation#PLC#automation#industrial programming