Motor Reversing with Interlock
Reversing a motor electrically requires two contactors (forward and reverse) that must NEVER energise simultaneously — doing so creates a phase-to-phase short and destroys the starter. This example shows the canonical software interlock pattern.
I/O list
| Tag | Type | Description |
|---|---|---|
| PB_Fwd | DI | Forward push-button |
| PB_Rev | DI | Reverse push-button |
| PB_Stop | DI | Stop push-button (NC, TRUE = not pressed) |
| OL_Trip | DI | Motor overload contact (NC, TRUE = healthy) |
| M_Fwd | DO | Forward contactor coil |
| M_Rev | DO | Reverse contactor coil |
Structured Text code
PROGRAM main
VAR
(* No additional internal vars needed *)
END_VAR
(* Forward: started by PB_Fwd, sealed in by M_Fwd, broken by Stop, OL trip, or M_Rev energised *)
M_Fwd := (PB_Fwd OR M_Fwd) AND PB_Stop AND OL_Trip AND NOT M_Rev AND NOT PB_Rev;
(* Reverse: mirror image *)
M_Rev := (PB_Rev OR M_Rev) AND PB_Stop AND OL_Trip AND NOT M_Fwd AND NOT PB_Fwd;How it works
Seal-in: the first parenthesis (PB_Fwd OR M_Fwd) means the forward contactor stays energised after the button is released, until something breaks the rung.
Software interlock: NOT M_Rev in the forward rung guarantees the forward contactor cannot energise while reverse is on. Mirror logic in the reverse rung.
Stop button is NC: PB_Stop is normally-closed wired. TRUE means NOT pressed. Pressing the stop button drops PB_Stop to FALSE, breaking both rungs.
OL_Trip is NC: TRUE means the motor overload is healthy (not tripped). Tripped overload drops OL_Trip to FALSE, stopping the motor.
Critical: software interlock alone is NOT sufficient for safety. Always pair with electrical interlock (auxiliary contacts) and mechanical interlock (lever between contactors) for safety-rated reversing applications.