Bird
Raised Fist0
PLC Programmingscripting~10 mins

Forward-reverse motor control with interlock in PLC Programming - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - Forward-reverse motor control with interlock
Start
↓
Check Forward Command
Yes↓
Is Reverse Motor OFF?
No→Stop Forward
|Yes↓
Start Forward Motor
↓
Check Reverse Command
Yes↓
Is Forward Motor OFF?
No→Stop Reverse
|Yes↓
Start Reverse Motor
↓
No Command or Both OFF
↓
Stop Both Motors
↓
End
The control checks forward and reverse commands, ensuring only one motor runs at a time by interlocking them.
Execution Sample
PLC Programming
IF Forward_Command AND NOT Reverse_Motor THEN
  Forward_Motor := TRUE;
  Reverse_Motor := FALSE;
ELSIF Reverse_Command AND NOT Forward_Motor THEN
  Reverse_Motor := TRUE;
  Forward_Motor := FALSE;
ELSE
  Forward_Motor := FALSE;
  Reverse_Motor := FALSE;
END_IF;
This PLC code runs the forward motor if commanded and reverse motor is off, runs reverse motor if commanded and forward motor is off, otherwise stops both.
Execution Table
StepForward_CommandReverse_CommandForward_MotorReverse_MotorCondition EvaluatedAction Taken
1TRUEFALSEFALSEFALSEForward_Command AND NOT Reverse_Motor = TRUE AND NOT FALSE = TRUEStart Forward Motor, Stop Reverse Motor
2TRUETRUETRUEFALSEForward_Command AND NOT Reverse_Motor = TRUE AND NOT FALSE = TRUEKeep Forward Motor ON, Reverse Motor OFF (Reverse command ignored due to interlock)
3FALSETRUETRUEFALSEForward_Command AND NOT Reverse_Motor = FALSE, Reverse_Command AND NOT Forward_Motor = TRUE AND NOT TRUE = FALSEStop Both Motors (No valid command with interlock)
4FALSETRUEFALSEFALSEForward_Command AND NOT Reverse_Motor = FALSE, Reverse_Command AND NOT Forward_Motor = TRUE AND NOT FALSE = TRUEStart Reverse Motor, Stop Forward Motor
5FALSEFALSEFALSETRUENo command activeStop Both Motors
6TRUEFALSEFALSEFALSEForward_Command AND NOT Reverse_Motor = TRUE AND NOT FALSE = TRUEStart Forward Motor, Stop Reverse Motor
💡 Execution stops after processing all input command states.
Variable Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4After Step 5After Step 6
Forward_MotorFALSETRUETRUEFALSEFALSEFALSETRUE
Reverse_MotorFALSEFALSEFALSEFALSETRUEFALSEFALSE
Key Moments - 2 Insights
Why does the reverse motor not start when both forward and reverse commands are TRUE at step 2?
Because the interlock condition checks if the other motor is OFF before starting. At step 2, Forward_Motor is already ON, so Reverse_Motor cannot start, preventing both motors running simultaneously.
What happens when no command is active at step 5?
Both motors are stopped to ensure safety and no unintended motor operation, as shown by Forward_Motor and Reverse_Motor being FALSE.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table at step 4. What is the state of Forward_Motor and Reverse_Motor?
AForward_Motor = FALSE, Reverse_Motor = TRUE
BForward_Motor = TRUE, Reverse_Motor = FALSE
CForward_Motor = TRUE, Reverse_Motor = TRUE
DForward_Motor = FALSE, Reverse_Motor = FALSE
💡 Hint
Check the 'Forward_Motor' and 'Reverse_Motor' columns in row for step 4.
At which step does the interlock prevent the reverse motor from starting despite the reverse command being TRUE?
AStep 1
BStep 2
CStep 3
DStep 5
💡 Hint
Look at the 'Condition Evaluated' and 'Action Taken' columns at step 2.
If Forward_Command is FALSE and Reverse_Command is FALSE, what will be the motor states?
ABoth motors ON
BForward motor ON, reverse motor OFF
CBoth motors OFF
DReverse motor ON, forward motor OFF
💡 Hint
Refer to step 5 in the execution table and variable_tracker.
Concept Snapshot
Forward-reverse motor control uses commands to run motors in one direction at a time.
Interlock logic prevents both motors from running simultaneously.
If forward command is active and reverse motor is off, forward motor runs.
If reverse command is active and forward motor is off, reverse motor runs.
If no commands or conflict, both motors stop for safety.
Full Transcript
This example shows how a PLC program controls a motor to run forward or reverse but never both at once. The program checks if the forward command is active and the reverse motor is off before starting the forward motor. Similarly, it checks if the reverse command is active and the forward motor is off before starting the reverse motor. If both commands are active or none, it stops both motors. This interlock prevents damage by ensuring only one motor runs at a time. The execution table traces different input commands and shows motor states changing step-by-step. The variable tracker records motor states after each step. Key moments clarify why the interlock blocks simultaneous motor running and what happens when no commands are active. The quiz tests understanding of motor states and interlock behavior at specific steps.

Practice

(1/5)
1. What is the main purpose of using an interlock in forward-reverse motor control?
easy
A. To increase the motor speed beyond its rated capacity
B. To prevent the motor from running forward and reverse at the same time
C. To allow the motor to run in both directions simultaneously
D. To reduce the power consumption of the motor

Solution

  1. Step 1: Understand interlock function

    An interlock is a safety feature that prevents conflicting commands from activating simultaneously.
  2. Step 2: Apply to motor control

    In forward-reverse motor control, the interlock stops both forward and reverse commands from running at the same time to protect the motor.
  3. Final Answer:

    To prevent the motor from running forward and reverse at the same time -> Option B
  4. Quick Check:

    Interlock prevents simultaneous directions = A [OK]
Hint: Interlock means 'no two directions at once' [OK]
Common Mistakes:
  • Thinking interlock increases speed
  • Believing motor can run both ways simultaneously
  • Confusing interlock with power saving
2. Which of the following is the correct ladder logic condition to implement an interlock for forward and reverse motor control?
easy
A. Forward = StartF AND NOT Reverse
B. Forward = StartF OR Reverse
C. Forward = StartF AND Reverse
D. Forward = NOT StartF AND Reverse

Solution

  1. Step 1: Understand interlock logic

    The forward command should only activate if the forward start is pressed and the reverse is NOT active.
  2. Step 2: Match logic to options

    Forward = StartF AND NOT Reverse uses AND with NOT Reverse, which correctly prevents forward and reverse running together.
  3. Final Answer:

    Forward = StartF AND NOT Reverse -> Option A
  4. Quick Check:

    Forward requires StartF and no Reverse = D [OK]
Hint: Use AND with NOT for interlock conditions [OK]
Common Mistakes:
  • Using OR instead of AND
  • Missing NOT to block reverse
  • Allowing both directions simultaneously
3. Given the following PLC code snippet for motor control:
Forward = StartF AND NOT Reverse
Reverse = StartR AND NOT Forward

What will be the state of Forward and Reverse if both StartF and StartR are pressed at the same time?
medium
A. Forward = True, Reverse = False
B. Forward = False, Reverse = True
C. Forward = False, Reverse = False
D. Forward = True, Reverse = True

Solution

  1. Step 1: Analyze Forward condition

    Forward = StartF AND NOT Reverse. Since StartR is pressed, Reverse may be True, so NOT Reverse is False, Forward is False.
  2. Step 2: Analyze Reverse condition

    Reverse = StartR AND NOT Forward. Forward is False (from step 1), so NOT Forward is True, but Reverse depends on StartR AND True = True. However, this creates a conflict because Forward depends on Reverse and vice versa.
  3. Step 3: Resolve conflict

    Because both depend on each other's negation, neither can be True simultaneously. Both will remain False to avoid conflict.
  4. Final Answer:

    Forward = False, Reverse = False -> Option C
  5. Quick Check:

    Both pressed blocks both directions = C [OK]
Hint: Both starts pressed disables both directions [OK]
Common Mistakes:
  • Assuming both directions run simultaneously
  • Ignoring mutual exclusion logic
  • Forgetting NOT conditions
4. Identify the error in this forward-reverse motor control logic:
Forward = StartF OR NOT Reverse
Reverse = StartR OR NOT Forward
medium
A. Using OR instead of AND causes both directions to run simultaneously
B. Missing NOT operator before StartF and StartR
C. Correct logic with no errors
D. Reverse should depend only on StartF

Solution

  1. Step 1: Analyze use of OR operator

    Using OR means Forward can be True if StartF is True or Reverse is False, which can allow both Forward and Reverse to be True simultaneously.
  2. Step 2: Understand interlock requirement

    Interlock requires AND with NOT to prevent simultaneous activation, so OR breaks this rule.
  3. Final Answer:

    Using OR instead of AND causes both directions to run simultaneously -> Option A
  4. Quick Check:

    OR allows both directions = A [OK]
Hint: Interlock needs AND NOT, not OR [OK]
Common Mistakes:
  • Confusing OR with AND
  • Ignoring interlock logic
  • Assuming logic is correct without testing
5. You want to design a forward-reverse motor control with interlock using a PLC. Which of the following ladder logic snippets correctly implements the interlock to prevent simultaneous forward and reverse commands?
hard
A. Forward = StartF OR Reverse Reverse = StartR OR Forward
B. Forward = StartF AND StartR Reverse = StartR AND StartF
C. Forward = StartF AND Reverse Reverse = StartR AND Forward
D. Forward = StartF AND NOT Reverse Reverse = StartR AND NOT Forward

Solution

  1. Step 1: Understand interlock logic requirements

    Interlock requires that Forward only runs if Reverse is NOT running, and vice versa, to avoid damage.
  2. Step 2: Evaluate each option

    Forward = StartF AND NOT Reverse Reverse = StartR AND NOT Forward uses AND with NOT conditions correctly to prevent simultaneous activation. The other options allow both directions or require both starts simultaneously, which is incorrect.
  3. Final Answer:

    Forward = StartF AND NOT Reverse Reverse = StartR AND NOT Forward -> Option D
  4. Quick Check:

    AND with NOT ensures interlock = B [OK]
Hint: Use AND NOT for safe forward-reverse control [OK]
Common Mistakes:
  • Using OR instead of AND
  • Allowing both directions at once
  • Requiring both start buttons pressed
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard