03Level 2
Reversing motor with electrical interlock
Two contactors run the motor in one direction or the other. An interlock prevents both from closing at once, which would cause a short circuit.
Open in the simulator
The simulator is designed for computers (screens 1024 px or wider).
Virtual plant
Direction: Stopped. Speed: 0 %
Shown at rest. In the simulator the plant moves according to your program's outputs.
Inputs and outputs
| Address | Name | Description |
|---|---|---|
| I0.0 | FORWARD | Forward push button (NO) |
| I0.1 | REVERSE | Reverse push button (NO) |
| I0.2 | STOP | Stop push button (NC: 1 at rest) |
| I0.3 | OVERLOAD | Overload relay NC contact (driven by the plant: 0 = tripped) |
| Q0.0 | KM_FORWARD | Forward contactor |
| Q0.1 | KM_REVERSE | Reverse contactor |
Program
Ladder diagram (LD)
Rung 1 — Forward with seal-in, interlocked with the reverse contactor.
Rung 2 — Reverse with seal-in, interlocked with the forward contactor.
Function block diagram (FBD)
Network 1 — Forward with seal-in, interlocked with the reverse contactor.
Network 2 — Reverse with seal-in, interlocked with the forward contactor.
Structured text (ST)
(* Reversing motor with electrical interlock — converted from Ladder *)
(* Rung 1: Forward with seal-in, interlocked with the reverse contactor. *)
KM_FORWARD := (FORWARD OR KM_FORWARD) AND STOP AND OVERLOAD AND NOT KM_REVERSE;
(* Rung 2: Reverse with seal-in, interlocked with the forward contactor. *)
KM_REVERSE := (REVERSE OR KM_REVERSE) AND STOP AND OVERLOAD AND NOT KM_FORWARD;Instruction list (IL)
(* Reversing motor with electrical interlock — converted from Ladder *) (* Rung 1: Forward with seal-in, interlocked with the reverse contactor. *) LD FORWARD OR KM_FORWARD AND STOP AND OVERLOAD ANDN KM_REVERSE ST KM_FORWARD (* Rung 2: Reverse with seal-in, interlocked with the forward contactor. *) LD REVERSE OR KM_REVERSE AND STOP AND OVERLOAD ANDN KM_FORWARD ST KM_REVERSE
Step by step
- 1Press ▶ Run (F5) and press FORWARD: contactor KM_FORWARD seals itself in and the motor runs forward.
- 2While the motor runs, press REVERSE: nothing happens. The NC contact of KM_FORWARD in rung 2 blocks reverse. That is the electrical interlock.
- 3Press STOP, wait for the motor to stop and then press REVERSE: it now runs the other way.
- 4Try removing the NC contact of KM_REVERSE from rung 1 and press both buttons: the plant shows the short circuit the interlock prevented. In a real panel the interlock is also wired with the contactors' auxiliary contacts.