TExcelTAD
Home › Control Systems & Automation › Interlocks, Safety PLCs, SCADA and Industrial Networks

Interlocks, Safety PLCs, SCADA and Industrial Networks

The tank program of the previous lesson stops the pump when it runs dry. That protects the pump. It does not protect a person who reaches into a mixer, and it should not be trusted to stop a pressure vessel from bursting: an ordinary PLC program can have bugs, a CPU can hang with an output stuck on, and the next programmer can delete the rung. Industrial automation therefore separates three jobs: control (the PLC programs and loops of this course), protection of equipment and process (interlocks, often in the same PLC), and protection of people and the environment (safety functions in dedicated, certified safety systems). Around them sit the SCADA and HMI systems that let operators see and command the plant, and the industrial networks that connect it all. This lesson is a map of those layers. Everything here involving machinery, mains power or hazardous processes is concept only: such systems are designed, validated and maintained by qualified engineers under the standards named below.

Interlocks and permissives

Term Meaning Example
permissive a condition that must be true before an action may start the pump may start only if the suction valve is open
interlock a condition that stops or blocks an action while it is unsafe the heater is off whenever the flow switch reports no flow
trip a protective shutdown on an abnormal value, latched until reset the heater trips at 90 ∘C90\,^\circ\text{C} and stays off until an operator resets it

Good interlocks are fail-safe (loss of a signal or of power leads to the safe state, so normally-closed contacts and de-energise-to-trip outputs), latched where a restart could surprise someone, and independent of the control function they protect: an overtemperature trip should use its own sensor, not the one the temperature controller already relies on, or a single failed sensor defeats both.

Functional safety and safety PLCs (concepts)

A safety function is a specific protective action ("when the guard door opens, stop the spindle within 0.5 s"). Functional-safety standards turn the required risk reduction into a measurable integrity target:

Standard (editions current in November 2026) Scope Integrity measure
IEC 61508:2010 (edition 2; edition 3 in preparation) generic electrical/electronic/programmable safety systems SIL 1–4
IEC 61511-1:2016 + A1:2017 process industry (safety instrumented systems) SIL 1–4
ISO 13849-1:2023 safety-related parts of machine control systems PL a–e
IEC 62061:2021 machinery, electrical control systems SIL 1–3
IEC 60204-1:2016 + A1:2021 electrical equipment of machines: stop categories 0 (immediate power removal), 1 (controlled stop, then power removed) and 2 (controlled stop, power kept); an emergency stop must be category 0 or 1 —

For a safety function used rarely ("low demand"), the integrity is judged by the average probability of failure on demand, PFDavg\text{PFD}_\text{avg}. In the simplified IEC 61508 formulas, a single channel (1oo1) whose dangerous undetected failures occur at rate λDU\lambda_{DU} and are found by a proof test every T1T_1 has

PFDavg,1oo1≈λDU T12,PFDavg,1oo2≈(λDUT1)23+β λDUT12\text{PFD}_\text{avg,1oo1} \approx \frac{\lambda_{DU}\,T_1}{2}, \qquad \text{PFD}_\text{avg,1oo2} \approx \frac{(\lambda_{DU} T_1)^2}{3} + \beta\,\frac{\lambda_{DU} T_1}{2}

for a redundant pair where either channel can trip (1oo2), with β\beta the fraction of failures that hit both channels at once (common cause). The SIL bands for low demand are SIL 1: 10−210^{-2} to 10−110^{-1}, SIL 2: 10−310^{-3} to 10−210^{-2}, SIL 3: 10−410^{-4} to 10−310^{-3}, SIL 4: 10−510^{-5} to 10−410^{-4}.

Worked example. Given: a pressure transmitter with λDU=5×10−7 h−1\lambda_{DU} = 5 \times 10^{-7}\ \text{h}^{-1}, proof-tested yearly (T1=8760 hT_1 = 8760\ \text{h}). Find: PFDavg\text{PFD}_\text{avg} and the SIL band for one transmitter, and for two in 1oo2 with β=10 %\beta = 10\,\%. Solve: λDUT1=4.38×10−3\lambda_{DU}T_1 = 4.38 \times 10^{-3}; 1oo1: 2.19×10−32.19 \times 10^{-3}, SIL 2 band. 1oo2: (4.38×10−3)2/3+0.1×2.19×10−3=6.4×10−6+2.19×10−4=2.25×10−4(4.38 \times 10^{-3})^2/3 + 0.1 \times 2.19 \times 10^{-3} = 6.4 \times 10^{-6} + 2.19 \times 10^{-4} = 2.25 \times 10^{-4}, SIL 3 band: the common-cause term dominates. Check:

python · try it yourself
import math

def sil_band(pfd):
    for sil, low in ((4, 1e-5), (3, 1e-4), (2, 1e-3), (1, 1e-2)):
        if low <= pfd < 10 * low:
            return f"SIL {sil} band"
    return "below the SIL 4 band" if pfd < 1e-5 else "above the SIL 1 band"

lam, T1 = 5e-7, 8760.0                        # dangerous undetected failures per hour, proof-test interval
for beta in (0.0, 0.02, 0.10):
    p1 = lam * T1 / 2
    p2 = (lam * T1) ** 2 / 3 + beta * lam * T1 / 2
    print(f"beta = {beta:4.2f}: 1oo1 PFDavg {p1:.2e} ({sil_band(p1)}), 1oo2 PFDavg {p2:.2e} ({sil_band(p2)})")
for months in (3, 12, 36):
    p = lam * months * 730.0 / 2
    print(f"1oo1, proof test every {months:2d} months: PFDavg {p:.2e} ({sil_band(p)})")
beta = 0.00: 1oo1 PFDavg 2.19e-03 (SIL 2 band), 1oo2 PFDavg 6.39e-06 (below the SIL 4 band)
beta = 0.02: 1oo1 PFDavg 2.19e-03 (SIL 2 band), 1oo2 PFDavg 5.02e-05 (SIL 4 band)
beta = 0.10: 1oo1 PFDavg 2.19e-03 (SIL 2 band), 1oo2 PFDavg 2.25e-04 (SIL 3 band)
1oo1, proof test every  3 months: PFDavg 5.48e-04 (SIL 3 band)
1oo1, proof test every 12 months: PFDavg 2.19e-03 (SIL 2 band)
1oo1, proof test every 36 months: PFDavg 6.57e-03 (SIL 2 band)

The numbers show the levers: redundancy helps only as far as common causes allow (without common cause the pair would even fall below the SIL 4 band, which no real pair achieves), and testing more often lowers the PFD in proportion. A single transmitter tested every 3 months lands in the SIL 3 band by PFD alone, but the architectural rules of the standards normally do not allow a single channel to claim that much. A real SIL claim also needs hardware-fault-tolerance and systematic-capability requirements, a safety lifecycle, and certified components; the formula is only one piece.

A safety PLC is built for these functions: two or more processors that compare each other's results, self-tests of inputs and outputs (pulsed test signals detect stuck or shorted wires), certified function blocks (emergency stop, two-hand control, guard monitoring, muting) and a protected program that is validated and locked. It stops to a defined safe state when its diagnostics find a fault. Emergency-stop circuits, safety relays and safety PLCs are never improvised on a hobby bench.

SCADA and HMI

A plant is usually described in layers (the ISA-95 / "automation pyramid" view): level 0 sensors and actuators, level 1 PLCs and drives, level 2 supervisory control (SCADA, HMI, historians), level 3 manufacturing operations (batches, recipes, maintenance), level 4 business systems. SCADA (supervisory control and data acquisition) collects data from many controllers, shows it on HMI screens, logs it in a historian, manages alarms and sends setpoints and commands down. It does not replace the PLC's real-time control: if the SCADA link fails, the loops keep running.

Two SCADA disciplines matter to control engineers:

  • Alarm management (ISA-18.2, EEMUA 191): an alarm must require an operator action. Hundreds of standing or chattering alarms hide the one that matters; alarm deadbands and on-delays, the same ideas as hysteresis and TON, stop chattering.
  • Security (the IEC 62443 series): control networks were built for reliability, not attackers. Segment them from office networks, allow only the needed protocols, and never expose a PLC or HMI to the internet; the same principles appear in Network Segmentation for IoT.

Industrial networks

Network Layer and use
4–20 mA, HART analog signal, with HART adding digital data on top
Modbus RTU (RS-485) and Modbus TCP simple master/slave register access; everywhere, no built-in security
PROFIBUS, PROFINET fieldbus and Industrial Ethernet maintained by PROFIBUS & PROFINET International (PI), strongly backed by Siemens; cyclic I/O, isochronous options
EtherNet/IP, EtherCAT Industrial Ethernet; EtherCAT processes frames on the fly for sub-millisecond cycles in motion control
CAN, CANopen robust multi-master bus from vehicles, used in machines and drives
IO-Link point-to-point digital link to smart sensors and actuators
OPC UA vendor-neutral information model and secure client/server or pub/sub from field to cloud

Modbus is the easiest to see inside. A "read holding registers" request (function 3) asks a device for 16-bit registers; RTU frames end with a CRC-16. A 32-bit float occupies two registers, and devices disagree about the word order, the classic commissioning bug:

python · try it yourself
import struct

def crc16_modbus(frame: bytes) -> int:
    crc = 0xFFFF
    for byte in frame:
        crc ^= byte
        for _ in range(8):
            crc = (crc >> 1) ^ 0xA001 if crc & 1 else crc >> 1
    return crc

def rtu(pdu: bytes) -> bytes:
    return pdu + struct.pack("<H", crc16_modbus(pdu))      # CRC is sent low byte first

request = rtu(bytes([0x01, 0x03]) + struct.pack(">HH", 0x0000, 2))   # slave 1, read 2 registers from 0
print("request :", request.hex(" ").upper())

value = 25.5                                               # temperature in the device
regs = struct.unpack(">HH", struct.pack(">f", value))      # two 16-bit registers, big-endian words
response = rtu(bytes([0x01, 0x03, 0x04]) + struct.pack(">HH", *regs))
print("response:", response.hex(" ").upper())
print("CRC check of the whole response (0 means good):", crc16_modbus(response))

hi_first = struct.unpack(">f", struct.pack(">HH", regs[0], regs[1]))[0]
lo_first = struct.unpack(">f", struct.pack(">HH", regs[1], regs[0]))[0]
print(f"decoded with high word first: {hi_first:g}; with the words swapped: {lo_first:.4g}")
request : 01 03 00 00 00 02 C4 0B
response: 01 03 04 41 CC 00 00 2E 30
CRC check of the whole response (0 means good): 0
decoded with high word first: 25.5; with the words swapped: 2.36e-41

A wrong word order gives a plausible-looking but absurd number, not an error: always check one known value during commissioning.

Guided lab: interlock and trip on the bench heater

Hand calculation. The heater block (rise 4 K/W4\ \text{K/W} of power, 14.4 W14.4\ \text{W} maximum) could reach 25+57.6=82.6 ∘C25 + 57.6 = 82.6\,^\circ\text{C} at full power in a 25 ∘C25\,^\circ\text{C} room. A trip at 70 ∘C70\,^\circ\text{C} therefore matters only on a fault (a stuck MOSFET, a software bug), which is exactly what a trip is for.

Simulation. Extend the scan-cycle program of IEC 61131-3 Languages with a latched trip: Trip := Trip OR (Temp_Trip > 70.0); IF Reset AND Temp_Trip < 60.0 THEN Trip := FALSE; END_IF;, and a heater output Heater := Heater_Cmd AND NOT Trip.

What you would measure. Use a second, independent sensor (for example a bimetal thermal cut-out rated 70 ∘C70\,^\circ\text{C} in series with the MOSFET gate drive or the heater supply, plus a second temperature sensor read by the microcontroller). Force the controller output to 100 % and log both: the software trip should act within a few seconds of 70 ∘C70\,^\circ\text{C} (sensor lag), and the cut-out within a few kelvin of its rating (typical tolerance ±5 K\pm 5\ \text{K}; check its data sheet).

Hazards and safe setup. 12 V12\ \text{V} current-limited supply; the block gets hot enough to burn, so mount it on stand-offs and do not touch it during the test; stay with the experiment; disconnect power if anything smells or discolours. This is an equipment-protection exercise, not a certified safety function.

Pitfalls

  • Implementing a safety function in the ordinary control program "because the PLC is reliable".
  • Sharing one sensor between control and protection: one failure defeats both.
  • Auto-resetting trips: a machine must not restart by itself.
  • Ignoring common cause in redundancy: two identical sensors in the same pocket fail together.
  • Exposing PLCs or HMIs directly to the internet.

Practice

  1. A 1oo1 safety function has λDU=2×10−6 h−1\lambda_{DU} = 2 \times 10^{-6}\ \text{h}^{-1} and a proof test every 6 months (4380 h4380\ \text{h}). Give PFDavg\text{PFD}_\text{avg} and its SIL band.
  2. Two registers read from a Modbus device are 0x0000 and 0x41CC. What value do they hold if the device sends the low word first?
Answer
  1. 2×10−6×4380/2=4.38×10−32 \times 10^{-6} \times 4380/2 = 4.38 \times 10^{-3}: SIL 2 band.
  2. The float is 0x41CC0000 =25.5= 25.5.

Test yourself

A condition that must be true before a pump may start is a

  1. trip
  2. permissive
  3. alarm
  4. setpoint

For a 1oo1 safety function, halving the proof-test interval

  1. doubles PFDavg\text{PFD}_\text{avg}
  2. halves PFDavg\text{PFD}_\text{avg}
  3. does not change it
  4. moves it two SIL bands

If the SCADA server fails, a well-designed plant

  1. stops all loops
  2. keeps controlling in the PLCs; operators lose the overview
  3. switches every valve open
  4. loses its setpoints immediately

A Modbus float reads as a tiny or huge nonsense value. The most likely cause is

  1. a CRC error
  2. swapped word order
  3. the wrong baud rate
  4. a broken 4–20 mA loop