Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start the motor in forward direction when the forward button is pressed.
PLC Programming
IF Forward_Button = 1 THEN Motor_Forward := [1] END_IF
Attempts:
3 left
💡 Hint
Common Mistakes
Using FALSE or 0 which do not start the motor.
Using numeric 1 instead of TRUE in some PLC languages.
✗ Incorrect
Setting Motor_Forward to TRUE starts the motor in forward direction when the forward button is pressed.
2fill in blank
mediumComplete the code to stop the motor when the stop button is pressed.
PLC Programming
IF Stop_Button = 1 THEN Motor_Forward := [1]; Motor_Reverse := [1] END_IF
Attempts:
3 left
💡 Hint
Common Mistakes
Setting outputs to TRUE which keeps the motor running.
Using numeric 1 instead of FALSE to stop.
✗ Incorrect
Setting both Motor_Forward and Motor_Reverse to FALSE stops the motor when the stop button is pressed.
3fill in blank
hardFix the error in the interlock logic to prevent both forward and reverse from being ON at the same time.
PLC Programming
IF Forward_Button = 1 AND Motor_Reverse = [1] THEN Motor_Forward := TRUE END_IF
Attempts:
3 left
💡 Hint
Common Mistakes
Checking if Motor_Reverse is TRUE which allows both directions ON.
Using numeric 1 instead of FALSE.
✗ Incorrect
The interlock requires Motor_Reverse to be FALSE before Motor_Forward can be TRUE, preventing both directions ON simultaneously.
4fill in blank
hardFill both blanks to complete the interlock logic preventing simultaneous forward and reverse motor operation.
PLC Programming
IF Forward_Button = 1 AND Motor_Reverse = [1] THEN Motor_Forward := TRUE END_IF IF Reverse_Button = 1 AND Motor_Forward = [2] THEN Motor_Reverse := TRUE END_IF
Attempts:
3 left
💡 Hint
Common Mistakes
Using TRUE or 1 which allows both directions ON.
Mixing numeric and boolean values inconsistently.
✗ Incorrect
Both conditions check that the opposite motor direction is OFF (FALSE) before turning ON the requested direction, ensuring interlock.
5fill in blank
hardFill all three blanks to complete the full forward-reverse motor control with interlock and stop logic.
PLC Programming
IF Stop_Button = 1 THEN Motor_Forward := [1]; Motor_Reverse := [1] END_IF IF Forward_Button = 1 AND Motor_Reverse = [2] THEN Motor_Forward := TRUE END_IF IF Reverse_Button = 1 AND Motor_Forward = [3] THEN Motor_Reverse := TRUE END_IF
Attempts:
3 left
💡 Hint
Common Mistakes
Using TRUE or 1 to stop motor outputs.
Allowing both directions ON simultaneously.
✗ Incorrect
Stop sets both directions OFF (FALSE). Forward and Reverse start only if opposite direction is OFF (FALSE), ensuring safe interlock.
