Back to all lessons

Lesson 12

Two-Direction Interlock

Prevent two mutually exclusive movement commands from turning on together.

PLC/FBDpracticaluniversityengineerANDNOT

1. Two-Direction Interlocking

An interlock prevents opposite commands from being active simultaneously. For example, a mechanism may move up or down, but must not receive both commands together.

Not allowed: Move_Up = TRUE and Move_Down = TRUE
Allowed:     Move_Up = TRUE, Move_Down = FALSE
Allowed:     Move_Up = FALSE, Move_Down = TRUE
Allowed:     Both FALSE; mechanism stopped

2. Applications

Typical pairs are up/down, forward/reverse, door open/close, clockwise/counterclockwise, cylinder extend/retract, and platform raise/lower.

Interlocking prevents contradictory commands and makes the program's response predictable.

3. Example Signals

SignalTypePurpose
Up_ButtonInputMove up request
Down_ButtonInputMove down request
Safety_OKInputOperating permissive
Move_UpOutputMove up command
Move_DownOutputMove down command

Safety_OK = TRUE means movement is permitted in this learning example.

4. Mutual Interlock Rule

Up requires Up_Button and no Down_Button. Down requires Down_Button and no Up_Button. Both also require Safety_OK:

Move_Up   = Up_Button   AND NOT Down_Button AND Safety_OK
Move_Down = Down_Button AND NOT Up_Button   AND Safety_OK

Pressing both buttons keeps both outputs FALSE.

5. FBD Diagram

Up direction:

[Down_Button] → [NOT] ──┐
[Up_Button] ────────────┼── [AND] → [Move_Up]
[Safety_OK] ────────────┘

Down direction:

[Up_Button] → [NOT] ────┐
[Down_Button] ──────────┼── [AND] → [Move_Down]
[Safety_OK] ────────────┘

Each direction checks that the opposite request is absent.

6. State Table

Up_ButtonDown_ButtonSafety_OKMove_UpMove_Down
FALSEFALSETRUEFALSEFALSE
TRUEFALSETRUETRUEFALSE
FALSETRUETRUEFALSETRUE
TRUETRUETRUEFALSEFALSE
TRUEFALSEFALSEFALSEFALSE
FALSETRUEFALSEFALSEFALSE

The fourth row is the conflict case: both requests are active, so neither output is active.

7. A Priority Variant

Some programs give one direction priority or force a stop when both are requested. For initial learning, the straightforward rule is to disable both outputs during a conflict.

8. Real Equipment

Software interlocks are usually supplemented by hardware interlocks. Forward/reverse contactors may have electrical and mechanical interlocking.

The simulator demonstrates how to form the logical commands so both do not become TRUE together.

9. Extending the Diagram

Add limit switches and further permissives:

Move_Up = Up_Button AND NOT Down_Button AND Safety_OK AND NOT Top_Limit
Move_Down = Down_Button AND NOT Up_Button AND Safety_OK AND NOT Bottom_Limit

Top_Limit blocks upward movement at the top position; Bottom_Limit blocks downward movement at the bottom.

10. Simulator Practice

Open the example and start the simulation.

  • 1. Set Safety_OK = TRUE.
  • 2. Set Up_Button TRUE and check Move_Up TRUE, Move_Down FALSE.
  • 3. Release Up_Button, then activate Down_Button; check the opposite result.
  • 4. Activate both buttons; check both outputs FALSE.
  • 5. Set Safety_OK FALSE; verify that neither direction is permitted.

11. Key Points

A two-direction interlock prevents opposite outputs from being active at the same time. Use it for mutually exclusive commands such as up/down, forward/reverse, and open/close.

12. Next Lesson

Continue with the next lesson, Conveyor Logic, combining buttons, permissives, and fault inhibits.

Practice block

Open the related example in the editor, run the simulation, and repeat the exercise from the article. The JSON is also available as a direct download.