Fareed Mohmed← Project library

Engineering · PLC · Project 2 of 15 · Motor control · Level 2

Forward / reverse with interlock

Two contactors swap two phases to reverse a motor. The program must never let both close together.

▶ Run it in the simulator

Virtual machine for Forward / reverse with interlock: buttons, lamps and the process it controls
Learning model only. This page teaches the program logic. A real machine needs a proper control panel with an isolator, fuses, motor protection and a hard-wired emergency stop. Mains and motor wiring is for qualified electricians. A PLC output never drives a motor directly.

You will learn

Interlocking: each rung contains the other output as a normally closed contact (!KM_R). If both contactors closed at once they would short two phases together. Good panels also add a mechanical interlock on the contactors, because software alone is not enough.

How it works

  • Press FORWARD. KM1 closes and the motor turns one way.
  • While it runs press REVERSE. Nothing happens, because KM_F blocks the reverse rung.
  • Press STOP, then REVERSE. Now the motor spins the other way.

In real life

Hoists, gates, rolling shutters and machine tool tables all use forward and reverse contactors with an interlock.

Inputs, outputs and addresses

The same signals on seven PLC brands. Inputs and outputs are numbered in order; check your own hardware and software, because addresses depend on the model and module position.

NameWhat it isTypeSiemens
S7-1200
Allen-Bradley
CompactLogix
Mitsubishi
iQ-F FX5U
Delta
DVP / AS
Omron
CP2E
Schneider
M241
Inovance
H5U
FWDFORWARD push-buttonInput%I0.0Local:1:I.Data.0X0X00.00%IX0.0X0
REVREVERSE push-buttonInput%I0.1Local:1:I.Data.1X1X10.01%IX0.1X1
STOPSTOP push-button (N.C.)Input%I0.2Local:1:I.Data.2X2X20.02%IX0.2X2
OLOverload contact (N.C.)Input%I0.3Local:1:I.Data.3X3X30.03%IX0.3X3
KM_FForward contactorOutput%Q0.0Local:2:O.Data.0Y0Y0100.00%QX0.0Y0
KM_RReverse contactorOutput%Q0.1Local:2:O.Data.1Y1Y1100.01%QX0.1Y1

Ladder diagram (shown for Siemens, live state)

Green wires carry power in the moment captured below. Switch the brand and the language in the simulator.

Rung 1 Forward, blocked while reverse is onFWD%I0.0KM_F%Q0.0STOP%I0.2OL%I0.3KM_R%Q0.1KM_F%Q0.0Rung 2 Reverse, blocked while forward is onREV%I0.1KM_R%Q0.1STOP%I0.2OL%I0.3KM_F%Q0.0KM_R%Q0.1

Structured text, Siemens SCL

(* Siemens S7-1200, CPU 1214C DC/DC/DC - TIA Portal - SCL *)
(* Rung 1: Forward, blocked while reverse is on *)
"KM_F" := ("FWD" OR "KM_F") AND "STOP" AND "OL" AND NOT "KM_R";
(* Rung 2: Reverse, blocked while forward is on *)
"KM_R" := ("REV" OR "KM_R") AND "STOP" AND "OL" AND NOT "KM_F";

Structured text, Allen-Bradley

(* Allen-Bradley CompactLogix 5069 (L306ER) - Studio 5000 Logix Designer - Structured Text *)
(* Rung 1: Forward, blocked while reverse is on *)
KM_F := (FWD OR KM_F) AND STOP AND OL AND NOT KM_R;
(* Rung 2: Reverse, blocked while forward is on *)
KM_R := (REV OR KM_R) AND STOP AND OL AND NOT KM_F;

Try this

Parts to buy

The links open a search on each store, so you see what is in stock today. Check the model, voltage and price before you order.

#ItemBuy / compare
1PLC with 4 inputs and 2 outputsAmazon.in · IndiaMART · Robu.in
22 contactors with mechanical interlock blockAmazon.in · IndiaMART · Robu.in
3Overload relayAmazon.in · IndiaMART · Robu.in
43 push-buttonsAmazon.in · IndiaMART · Robu.in
← 1. Motor start / stop (seal-in)All projects3. Star-delta starter →

This is a learning tool. It teaches the logic, not the exact keystrokes of each vendor’s software. Check the manual of your own PLC.