What is a PLC ?


Logic Control of Industrial Automation

In academic Engineering, "control" implies analog or high-rate digital control of dynamical systems having continuous valued states.

There are many times when an industrial machine requires "control" in which the inputs and outputs are on/off signals. In other words, the states are modelled as binary valued variables. Although the underlying systems may have dynamics, these are ignored by the controller and often a performance penalty can be payed in exchange for "simple" control.

Everyday examples of these systems are machines like dishwashers, clothes washers and dryers, and elevators. In these systems, the outputs tend to be 240v ac power signals to motors, solenoids, and indicator lights, and the inputs are DC or AC signals from user interface switches, motion limit switches, binary liquid level sensors, etc. Another major function in these types of controlers is timing.

Relays and Ladder Logic

In the "old days" (i.e. before the 1980's) these types of controllers were implemented with relays.

Relays are a technology from the early days of electricity in which an electromagnet activates an electrical switch. When current flows in the coil, electrical contacts are pulled together or apart making (or breaking) a circuit. Relays are electrically, thermally, and mechanically rugged, easy to design with, cheap, and capable of controlling very large currents in their output contacts.

Relays can be thought of as logic gates. For example, if two normally open relays are wired in series, and one end of the resulting ouput circuit is attached to a voltage source, then the two coils form the inputs of a AND gate: only if current is flowing in BOTH input coils will current flow in the output circuit. A typical application in a washing machine might be to implement the rule that

	if (state = wash) AND (door = close) AGITATE 

A collection of these boolean rules can be represented by a diagram in which each output circuit is drawn horizontally between vertical "power rails".

The shape of these diagrams invariably led to the name "Ladder Diagrams" and "Ladder Logic" to describe them. The term "Relay Ladder Logic" (RLL) describes this logic notation. By including interconnections between the horizontal rungs, it is possible to create latches ("flip-flops") and implement state transitions. Although LL "state machines" get quite complex and are typically not designed with the convenience of finite state machine theory, they have become widely used and supported by technical workers. Because the logic was implemented in physical wiring, it was difficult to change as new functions were required.

PLC's enter the scene

When microprocessors came on the scene in the late 70's it was realised that they could provide the hardware basis for a more flexible form of industrial logic control and the PLC was born.

PLC Hardware

PLC hardware is essentially a microcomputer, but one which meets hardware requirements unique to industrial control:

PLC Software

PLCs are designed to replace relatively simple controllers but add flexibility and savings in installed cost. In typical applications, the cost of the control system must be a small part of the total cost of the system and hiring an extra person to write software is unaffordable. Thus, PLCs must be programmable by mechanical engineers or technicians who often have little or no Computer Science education and programming experience.

The core of PLC programming software is a real-time kernel which interprets RLL diagrams. The kernel runs an endless loop which performs the following functions:

This cycle is completed in a minimum time (say 2 ms) with additional time depending on the complexity of the RLL program. This simple software architecture has several advantages.

Future of PLCs

Although PLCs were a very powerful technology compared to the relay panels they replaced, they are now being compared to computers and the limitations cited above are causing big changes in the PLC marketplace.

A related trend is "Supervisory Control and Data Acquisition" (SCADA). This product category consists of software running on a PC and connected to multiple PLCs in the plant. The software (market leader: "Wonderware") creates nice graphics, user interface buttons, and status indicators, as well as logging operating data.

Industrial strength PCs with hardened power supplies and cases are popular, but are more expensive that regular PCs and micro PLCs. As the economy has become more "information driven", managers are willing to invest more in software and programmer time for industrial control.

The future will bring PC based programmable controllers with flexible and open software, combined with the rugged hardware and low cost of the PLC.


Disclaimer