Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start a timer when the input is true.
PLC Programming
IF input_signal THEN timer[1] := TRUE;Attempts:
3 left
💡 Hint
Common Mistakes
Using the 'DN' bit which indicates timer done, not start.
Using 'Q' which is the output bit, not the start bit.
✗ Incorrect
The 'EN' (enable) bit starts the timer when set to TRUE.
2fill in blank
mediumComplete the code to reset the timer when the reset button is pressed.
PLC Programming
IF reset_button THEN timer[1] := FALSE;Attempts:
3 left
💡 Hint
Common Mistakes
Trying to reset the 'DN' bit which is read-only.
Resetting the output 'Q' instead of the enable bit.
✗ Incorrect
Resetting the timer is done by disabling the enable bit 'EN'.
3fill in blank
hardFix the error in the timer done condition check.
PLC Programming
IF timer[1] THEN start_motor := TRUE;Attempts:
3 left
💡 Hint
Common Mistakes
Using 'EN' which only shows if timer is enabled.
Using 'TT' which shows if timer is timing, not done.
✗ Incorrect
The 'DN' bit indicates the timer has finished counting.
4fill in blank
hardFill both blanks to create a timer that runs for 5 seconds and triggers output.
PLC Programming
timer.PRE := [1]; IF timer[2] THEN output_signal := TRUE;
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'EN' instead of 'DN' to check timer completion.
Setting preset to wrong value like 5 instead of 5000.
✗ Incorrect
Set preset to 5000 ms (5 seconds) and check done bit 'DN' to trigger output.
5fill in blank
hardFill all three blanks to create a timer that starts on input, resets on reset, and triggers output when done.
PLC Programming
timer[1] := input_signal; IF reset_signal THEN timer[2] := FALSE; IF timer[3] THEN alarm := TRUE;
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'TT' instead of 'DN' to check timer done.
Resetting wrong bit instead of 'EN'.
✗ Incorrect
Enable timer with input, reset by disabling enable with reset, check done bit 'DN' for alarm.
