DAVID HERRES: PLCs explained
Programmable logic controllers dominate global manufacturing, and electricians who understand them will never want for work. David Herres explains.
By the mid-1960s, General Motors was manufacturing vehicles efficiently and in great numbers due to assembly line automation.
Yet with new product lines being introduced each year, it was necessary to shut down and retool.
ADVERTISEMENT
The obsolete relay-based controllers had to be reconfigured, which involved pulling wire and soldering new terminations. This was time consuming and costly.
In 1968, GM accepted a proposal by Bedford Associates that would eliminate the bottleneck. The new technology, programmable logic controllers (PLCs), was designed to replace soldering irons and hand tools with central processing units (CPUs) and keyboards.
On a large factory floor there may be many PLCs in floor-to-ceiling enclosures with alpha-numeric readouts and touch pads. They allow workers to start or stop the line and easily adjust speeds and other parameters.
Since their introduction, PLCs have gained functionality, robustness and reliability. When it comes to motor and actuator automation, they dominate global manufacturing.
The main application is vehicle manufacturing, but the user-friendly interface has taken PLCs into mining, oil refining, pharmaceutical and food production, avionics and spacecraft, amusement parks and more.
For this reason, PLC design, installation and upkeep are great opportunities for the maintenance electrician. Large facilities may employ technicians to oversee system installations and changes, but most manufacturers cannot justify full-time personnel.
An experienced electrician with networking and computer skills can quickly gain the necessary expertise for installing and maintaining such systems, as PLCs are easy to understand and work on.
Let’s look at the component sub-systems and see how they go together.
First, there is the power supply from the entrance panel or distribution box. It is usually 240V, consisting of fairly modest conductors protected by a low-level over-current device.
Power for PLCs has nothing to do with power for motors or actuators – even sensors are usually powered separately so as not to jeopardise the CPU.
Power to the control panel, as in most industrial areas, should be in a metal raceway with a disconnect in sight.
If there is power at driven equipment that does not seem to be receiving a control signal, go back to the CPU. It should be easy to tell whether it is receiving power by checking LED indicators on the display panel. If there is no power, check whether the over-current device has tripped out.
It is unlikely that branch-circuit conductors will develop a fault, but the relatively light control cabling, often travelling some distance to the load, may have been damaged.
All of this is simple troubleshooting, and not much different to dealing with house wiring.
PLCs have input slots and output slots – spaces into which modules may be inserted.
Input devices, connected to their respective modules, include switches (automatic units such as float switches, or manual for human operation) and all sorts of sensors.
Output modules include motors, solenoids, electromagnetic or solid-state relays, valves, magnetic starters and light or sound instruments for indicating operational status.
What makes PLCs user-friendly is that input and output circuits are displayed, indeed created, by a ladder diagram on a computer screen.
PLC technicians make frequent use of a laptop with a durable case that is impervious to dirt and moisture. This laptop can be taken to PLCs on the factory floor and connected via simple USB cord to display, edit and install new programming.
Using software from the PLC manufacturer, the laptop (or cable-connected remote desktop) displays a ladder diagram showing all the information required for reading, altering or installing programming.
Using the mouse, you can populate the ladder diagram with inputs and outputs that can be installed in the PLC and made operational once you are satisfied with the set-up.
The ladder diagram – which is extremely simple – is not a wiring schematic but a power-flow diagram. Accordingly, a two-wire circuit is represented by a single line.
This kind of diagram was used for depicting relationships in mechanical relay industrial controls. It survived the PLC revolution and is still the main way of programming, despite the availability of higher-level languages.
The purpose of PLC programming, as represented in the ladder diagram, is to determine the voltage state (high or low if digital, variable if analogue) of each output module in response to corresponding voltage states at the input modules.
There is some variation between PLC brands, but the basics apply to all of them.
Typically, the front panel has a terminal block with two columns of screw connections: inputs on the left and outputs on the right.
Beside each terminal is an LED indicating whether the pole is energised. At the top are additional screw terminals, labelled L1 and L2, for incoming power, and at the bottom are common and source terminals. Between them is a port for the computer connection.
The PLC is put into programming mode, a computer is connected and a program installed or changed. Then the computer is disconnected, the PLC is put into operating mode, and the assembly line is ready to roll.
Multiple programs can be saved to the computer for installation on other PLCs – or copied to disc, emailed to colleagues, etc.
Ladder diagrams resemble actual ladders in part because PLC operation is sequential. The layout may be horizontal, but the usual configuration is two long vertical rails with horizontal ‘rungs’ in between.
Each rung represents one logical step. In electro-mechanical relays, the steps were simultaneous. However, PLC steps are sequential, albeit in the millisecond range.
The ladder logic programs of various PLC manufacturers are generally not compatible, but once one of them is learned the others are quite accessible.
Above all, ladder logic is based on rule-language, and the rungs are rules. The PLC continuously scans the ladder from top to bottom, thereby constantly checking and verifying the assembly line or industrial process.
Due to the simplicity and intuitive nature of the ladder diagram, installation or troubleshooting of set-ups is quite easy.
As mentioned, the left rail represents inputs and the right rail represents outputs. A rung will be true if a logical path through it exists or false if one doesn’t. When the output is energised, a signal goes to the motor or other actuator, and the process advances.
The main ladder logic functions are AND, OR, and exclusive OR (XOR). These functions are performed by way of digital electronics and logic gates. A logic gate is a circuit, so its output can be energised (ON) or not energised (OFF). The gates consists of transistors and resistors that provide the relevant bias.
Ladder circuits consist of normally open and normally closed contacts. If two contacts are connected in series, you have an example of AND logic. Both contacts must be closed, simultaneously, to make a true output.
Similarly, connecting the contacts in parallel creates OR logic. If one or the other of the contacts is closed, the output will be true.
An XOR circuit involves two inputs. It consists of this logical configuration: (A AND not B) OR (not A AND B).
The output of one rung can be connected to the input of another rung, greatly extending PLC functionality.
Each element in a PLC program, as depicted in the ladder diagram, has a numerical address, typically consisting of four digits, such as 0600 or 1000. The most generic example would be the two rails connected by a single rung, with a switch on the left and a light bulb on the right.
PLCs from different manufacturers vary in some details, but most of the software systems are characterised by an END command.
The continuously scanning PLC first looks at inputs to determine which, if any, are ON. Then the PLC executes the program. It begins at the top of the ladder and goes to the bottom, then updates the output status and begins another scan. All of this takes place in a few milliseconds.
PLCs can be small units, or ‘bricks’, with few inputs and outputs. They fit in the palm of your hand and cost about $200. At the other end of the scale are PLCs requiring floor to ceiling enclosures. Spread throughout the factory, they represent a lot of capital but can control generations of production machinery.
In designing a project, decide on a manufacturer and stick with it, at least for a while.
Scan time is of the essence for many applications. It’s best to start with excess input-output capability, as machinery is likely to be added later. Moreover, having spare input and output slots ensures continued operation in the even of malfunction.
The best way to enter the field is to become familiar with the hardware and software of a particular manufacturer. Vendors offer extensive information on underlying theory, mechanical details, programming methods and operation.
Some manufacturers, notably Allen-Bradley, provide certification for technicians. Siemens offers a range of technical support, from free online courses to onsite presentations.
Allen-Bradley is a subdivision of Rockwell Automation, which has an extensive online library. For each PLC model there’s a free PDF user manual – a valuable resource.
The user manual for Allen-Bradley’s Enhanced and Ethernet PLC-5 Programmable Controllers is an example of the information available online, and it provides an interesting portrait of the sort of machinery we are dealing with.
The manual starts by explaining how, via a key switch, the PLC is put into ‘run’ or ‘program’ mode.
In run mode it is impossible to create or delete a program file, create or delete data files, edit online or change the mode of operation through the programming software. These operations must be done in program mode, which can only be selected by means of the key switch, so this is a security feature.
The manual contains a list of programming features. Besides ladder logic, an item of interest is the sub-routine whereby recurring sections of program logic may be stored and accessed from multiple program files. Repetitive logic is programmed once only, so valuable memory is saved.
The manual shows how to configure an input-output channel remote from the controller, and this feature is valuable on a large factory floor.
Chapter 2 provides a list and table for selecting input-output modules and operator control interfaces.
Chapter 3, Placing System Hardware, contains sections on determining the proper environment, protecting the controller, avoiding electrostatic damage, laying out the cable raceway, laying out the back panel spacing and grounding the system.
If you are setting up a new PLC system or evaluating an existing installation, this information will prove useful.
Chapter 4, Addressing I/O and Controller Memory, contains detailed information on the internal cyber-architecture of the system. The basic concept is that each input and output (connected to the CPU by modules that slide into slots on the main chassis) has a virtual existence in the PLC memory.
The parts of memory that house I/O addresses are the input image table and the output image table. One of the objectives in setting up the connections to field devices is to make efficient use of the I/O image tables.
Some electricians find all of this fascinating; others are content to work in services and branch circuits.
If one of the former, you will find the subject of PLCs reasonably accessible. With a little experience it will come naturally, and you will never lack work anywhere in the world.
Numerous websites offer free PLC tutorials and the more expensive disc-based courses with certification. An excellent online resource is www.plcs.net.
-
ADVERTISEMENT
-
ADVERTISEMENT