Up to now we have made things move. This lesson is about making sure they stop, and never do something dangerous. It is the most important lesson in the course.
Interlocks
An interlock prevents two conflicting things from happening together. The classic example is a motor that can run forward or reverse. If both contactors close at the same time, they short-circuit two phases of the supply.
In the program, each direction has an NC contact of the other direction’s output in its rung:
LD X0 ; FWD
OR Y0
ANI X2 ; STOP
ANI Y1 ; interlock: NOT reverse
OUT Y0 ; FORWARD
LD X1 ; REV
OR Y1
ANI X2 ; STOP
ANI Y0 ; interlock: NOT forward
OUT Y1 ; REVERSE
Try pressing FWD, then REV without pressing STOP: nothing happens until you stop first.
Program listing (IL)
LD X0
OR Y0
ANI X2
ANI Y1
OUT Y0
LD X1
OR Y1
ANI X2
ANI Y0
OUT Y1Why you also need a hardware interlock
The software interlock works on the PLC’s bits, but a contactor can weld its contacts closed, or take a few milliseconds to drop out while the other one pulls in. So the forward and reverse contactors are also interlocked electrically (an NC auxiliary contact of each contactor in the other’s coil circuit) and often mechanically (a bar that physically stops both closing). Belt and braces: the PLC prevents the command, the wiring prevents the accident.
Fail-safe design
A fail-safe system goes to its safe state when something breaks. Three habits achieve most of it:
- Stops and trips are normally closed. A broken wire, loose terminal or failed supply reads as “stop”.
- Energise to run, de-energise to stop. The motor runs only while the PLC holds its output on. If the PLC, the output card or the wire fails, the contactor drops out.
- No automatic restart. After a power cut, a trip or an emergency stop, the machine waits for a deliberate start command (lesson 7).
Emergency stops are not PLC inputs
It is tempting to wire the emergency stop button to a PLC input and turn everything off in the program. Do not rely on that. A normal PLC can fail with its outputs on; a program change can break the logic; a forced bit can override it. Safety standards therefore require emergency stop, guard and light-curtain functions to work through safety-rated circuits:
- A safety relay monitors the emergency stop (usually with two channels) and directly removes power from the motor contactors or the drive’s Safe Torque Off input.
- On larger machines a certified safety PLC does the same job with programmable, self-checking safety logic.
- The normal PLC is told the emergency stop is active (through a spare contact of the safety relay) so it can reset sequences, show an alarm and require a reset, but it is not the thing that stops the hazard.
Know the rules where you work. Machine safety is covered by standards such as IEC 60204-1 (electrical equipment of machines), ISO 13849-1 and IEC 62061 (safety-related control systems), plus your country’s regulations. This lesson gives the principles; a real machine needs a risk assessment and a competent person to design and validate the safety circuit.
Permissives and trips
Two more words you will hear on site:
- Permissives are conditions that must be true before something may start: oil pressure healthy, valve open, guard closed. They only matter at the moment of starting.
- Trips stop something that is already running: motor overload, high temperature, low level. They act at any time and usually latch an alarm that must be acknowledged.
Writing them as separate, clearly named internal bits (Pump_Permissive, Pump_Trip) makes the start rung short and the troubleshooting obvious.
Frequently asked questions
Can I use a normal PLC input for an emergency stop?
You can monitor the emergency stop with a PLC input, but the stop itself must be done by a safety-rated circuit such as a safety relay or a safety PLC that removes power directly. Do not rely on a standard PLC program for safety functions.
Why interlock forward and reverse in hardware as well as software?
The software interlock acts on PLC bits only. A welded contactor contact or a slow drop-out can still close both contactors, so electrical and mechanical interlocks on the contactors are also needed.
