A safety-critical conveyor motor control system implemented in OpenPLC Editor using IEC 61131-3 Ladder Diagram (LD), incorporating hardwired E-stop priority, latched fault state management, and mandatory manual reset before restart
This project implements a single-direction conveyor motor control system using
IEC 61131-3 Ladder Diagram logic, designed around real industrial safety requirements.
The system provides standard Start/Stop operator control with a seal-in holding circuit,
overlaid with a highest-priority Emergency Stop path that latches a fault state on
activation. Recovery from an E-stop condition requires deliberate operator intervention
via a dedicated RESET_PB input — preventing any form of automatic restart
and ensuring the conveyor only returns to service under confirmed, safe conditions.
Motor feedback monitoring is also included to support future fault detection expansion.
Industrial conveyor systems are subject to strict safety control requirements. A conveyor must respond to an Emergency Stop event with immediate, unconditional motor de-energization — regardless of the state of any other input or active command. Critically, the system must not permit automatic restart once the emergency condition is cleared. Uncontrolled re-energization of a conveyor following an E-stop presents a direct personnel hazard and violates standard industrial safety practice. The control logic must therefore enforce a deliberate, operator-initiated reset sequence as a mandatory precondition for any subsequent motor start command, ensuring full operator awareness and accountability before the system is returned to operation.
ESTOP_LATCH internal memory bit on activation and forces immediate motor output de-energizationESTOP_LATCH fault state and restoring start capabilityRESET_PB assertion
The Emergency Stop fault latch was implemented as an internal coil that is set
on the rising edge of ESTOP and held in the energized state regardless
of the E-stop input returning to its deasserted state. A normally closed contact
driven by ESTOP_LATCH is placed in series with the motor output rung,
ensuring the conveyor remains inhibited until the operator explicitly asserts
RESET_PB to unlatch the fault condition. The seal-in holding circuit
on the motor rung maintains the run state across Start button release under normal
operation, while remaining subordinate to both the Stop and E-stop paths in the
rung evaluation order.
VAR_INPUT
START_PB : BOOL := FALSE;
STOP_PB : BOOL := TRUE;
ESTOP : BOOL := FALSE;
RESET_PB : BOOL := FALSE;
MOTOR_FEEDBACK : BOOL := FALSE;
END_VAR
VAR_OUTPUT
CONVEYOR_MOTOR : BOOL := FALSE;
END_VAR
VAR
ESTOP_LATCH : BOOL := FALSE;
END_VAR
System verification was conducted using the OpenPLC online simulator with manual input forcing to drive the system through all defined operating states and validate correct rung evaluation, latch behavior, and output response under both normal and fault conditions.
START_PB energized CONVEYOR_MOTOR output coil and confirmed correct seal-in rung activation via the parallel holding contactSTART_PB with seal-in active verified that the motor output remained energized across scan cycles without requiring continued button depressionSTOP_PB (NC contact opened) confirmed immediate motor de-energization and correct seal-in circuit interruption under normal stop conditionsESTOP TRUE confirmed immediate motor output de-energization and correct ESTOP_LATCH bit set within the same scan cycleESTOP while ESTOP_LATCH remained set verified that the motor output stayed inhibited and could not be re-energized via START_PB — confirming correct latch persistenceRESET_PB cleared ESTOP_LATCH and restored motor start capability, confirming the reset rung evaluates correctly and does not inadvertently re-energize the motor output on reset alone
The primary challenge was implementing correct latch persistence behavior:
ensuring that ESTOP_LATCH remained set after the Emergency Stop
input returned to its deasserted state, and that the motor output rung
correctly evaluated the latched condition as an inhibit across all subsequent
scan cycles. Early iterations required careful attention to rung evaluation
order to avoid race conditions between the latch set rung and the motor output
rung within the same scan.
A secondary consideration was correctly distinguishing the behavioral and wiring differences between a standard Stop input (NC contact, fail-safe) and the E-stop path — and understanding why these two mechanisms must remain architecturally separate rather than merged into a single de-energization rung. This distinction is foundational to industrial safety control design and directly informed the latch-based approach used here.