Lesson 62 of 78 · PLC Architecture & Sequences
Ladder Logic, Interlocks & State Sequences
Good PLC logic tells a state story. Separate commands, permissives, interlocks, proof, modes, alarms, and safety functions.
Start logic that is reviewable
A conveyor run request might require automatic mode, cell ready, downstream available, drive ready, guards/safety ready, no jam, and no active trip. The output command should be followed by running feedback within a timeout. If proof is absent, remove the command when appropriate and raise a specific fault.
Avoid a single opaque Ready bit with no provenance. Build intermediate tags that answer an operator’s question: Downstream_NotReady, Drive_NotReady, Jam_Detected.
State model
For an index-and-clamp station:
- Idle: wait for part and start conditions.
- Indexing: command conveyor; require position proof before timeout.
- Clamping: command clamp; verify closed and pressure.
- Processing: command tool; monitor completion and process limits.
- Unclamping: retract and verify.
- Complete: transfer permission and cycle count.
- Faulted: de-energize or hold per risk assessment; announce cause and recovery steps.
Each transition has trigger, guard, actions, timeout, and failure destination. Manual mode should not bypass safety; it changes operational authority and may use reduced, hold-to-run, or step behavior defined by the application.
Alarm quality
An alarm should name condition, consequence, likely checks, and reset criteria. Prevent floods by suppressing dependent symptoms when a root cause is known. Log first-out cause and timestamps. Reset should clear a latched indication only after the underlying condition is healthy; it should not automatically restart motion.
Safety separation
OSHA describes industrial robot safety through risk assessment, safeguards, modes, procedures, training, and validated functions 1. Application PLC logic can request a stop but must not be mistaken for the safety-related implementation unless designed and validated for that function.
Sequence review
Write pseudocode, ladder, or SFC for the station above. Add sensor stuck-on, stuck-off, part removed midcycle, pressure loss, downstream blocked, power cycle, and manual recovery. Peer-review whether every waiting state ends in completion or a bounded fault.
Source trail
References
- 1OSHA Technical Manual, Section IV, Chapter 4 - Industrial Robot Systems and Industrial Robot System Safety. Occupational Safety and Health Administration. 2021. verifiedRobot-system components, lifecycle hazards, risk assessment, safeguards, collaborative modes, training, evaluation, and applicable U.S. requirements. Cited at: safety considerations.
Further reading
- IEC 61131-3:2025 - Programmable Controllers, Part 3: Programming Languages. International Electrotechnical Commission. 2025. verifiedCurrent syntax and semantics for structured text, ladder diagram, function block diagram, and sequential function chart organization.
Check your understanding
- What is a permissive?
- A condition that must be true before an action may start
- Proof an action completed
- A material property
- An accounting cost
Permissives authorize start; interlocks prevent or stop incompatible or hazardous conditions.
- Why should transitions include timeouts?
- A commanded action may never complete and needs a defined fault path
- Timeouts increase motor torque
- Sensors are instant
- Sequences never stall
Timeouts convert silent waiting into diagnosable failure handling.