Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start the retentive timer when the input is true.
PLC Programming
IF input_signal THEN
RTO_Timer.EN := [1];
END_IFAttempts:
3 left
💡 Hint
Common Mistakes
Setting EN to FALSE stops the timer.
Using RESET or DONE as enable values is incorrect.
✗ Incorrect
The retentive timer enable (EN) must be set to TRUE to start timing when the input signal is active.
2fill in blank
mediumComplete the code to reset the retentive timer when the reset button is pressed.
PLC Programming
IF reset_button THEN
RTO_Timer.ACC := [1];
END_IFAttempts:
3 left
💡 Hint
Common Mistakes
Setting ACC to PRE (preset) does not reset the timer.
Changing EN or DN does not reset the accumulated time.
✗ Incorrect
To reset the accumulated time of the retentive timer, set ACC (accumulated value) to 0.
3fill in blank
hardFix the error in the code to correctly check if the retentive timer is done.
PLC Programming
IF RTO_Timer.[1] THEN
output_signal := TRUE;
END_IFAttempts:
3 left
💡 Hint
Common Mistakes
Checking ACC instead of DN causes errors.
Using EN or PRE does not indicate timer completion.
✗ Incorrect
The DN (done) bit indicates when the retentive timer has reached its preset time.
4fill in blank
hardFill both blanks to create a retentive timer that starts when start_button is pressed and resets when reset_button is pressed.
PLC Programming
RTO_Timer.EN := [1]; IF reset_button THEN RTO_Timer.ACC := [2]; END_IF
Attempts:
3 left
💡 Hint
Common Mistakes
Using TRUE or FALSE directly instead of the start button for enable.
Resetting ACC to TRUE or FALSE instead of zero.
✗ Incorrect
The timer enable is controlled by the start button, and the accumulated time resets to zero when reset_button is pressed.
5fill in blank
hardFill all three blanks to create a retentive timer that increments when input_signal is true, resets on reset_signal, and sets done_flag when timer is done.
PLC Programming
RTO_Timer.EN := [1]; IF reset_signal THEN RTO_Timer.ACC := [2]; END_IF IF RTO_Timer.[3] THEN done_flag := TRUE; END_IF
Attempts:
3 left
💡 Hint
Common Mistakes
Using FALSE instead of input_signal for enable.
Resetting ACC to FALSE instead of zero.
Checking EN or ACC instead of DN for done_flag.
✗ Incorrect
The timer enables when input_signal is true, resets ACC to zero on reset_signal, and sets done_flag when DN (done) bit is true.
