Challenge - 5 Problems
Flashing Light Timer Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediateOutput of a simple ON-OFF timer logic
Given the following PLC timer logic snippet, what will be the output state of the light after 5 seconds if the input is ON continuously?
Timer TON with preset 3 seconds, input IN is ON from start, output Q controls the light.
Timer TON with preset 3 seconds, input IN is ON from start, output Q controls the light.
PLC Programming
Timer1(IN:=TRUE, PT:=T#3S);
Light := Timer1.Q;Attempts:
2 left
💡 Hint
Think about how TON timer output Q behaves after preset time when input is ON.
✗ Incorrect
The TON timer output Q becomes TRUE after the preset time (3 seconds) if input IN remains TRUE. Since input is ON continuously, after 5 seconds Q is TRUE, so Light is ON.
🧠 Conceptual
intermediateUnderstanding timer types for flashing light
Which timer type is best suited to create a flashing light that turns ON and OFF repeatedly at fixed intervals in a PLC?
Attempts:
2 left
💡 Hint
Consider which timer automatically resets and produces a pulse output.
✗ Incorrect
The TP (Pulse timer) produces a fixed pulse duration output each time it is triggered, making it ideal for flashing lights that need to turn ON and OFF repeatedly.
🔧 Debug
advancedIdentify the error in flashing light timer logic
This PLC code is intended to flash a light ON for 2 seconds and OFF for 2 seconds repeatedly. What is the main error?
Code:
TimerOn(IN:=Start, PT:=T#2S);
TimerOff(IN:=TimerOn.Q, PT:=T#2S);
Light := TimerOn.Q AND NOT TimerOff.Q;
Code:
TimerOn(IN:=Start, PT:=T#2S);
TimerOff(IN:=TimerOn.Q, PT:=T#2S);
Light := TimerOn.Q AND NOT TimerOff.Q;
Attempts:
2 left
💡 Hint
Check how the Start input affects the timers and if it resets the cycle.
✗ Incorrect
Since Start input remains ON, TimerOn runs once and stays ON, TimerOff input depends on TimerOn.Q which stays ON, so TimerOff never resets. The cycle does not repeat, so light does not flash.
🚀 Application
advancedCreate a flashing light with adjustable ON and OFF times
You want to create a flashing light in a PLC where ON time and OFF time can be set independently using two timers. Which logic below correctly implements this behavior?
Attempts:
2 left
💡 Hint
Think about how to alternate timers to create ON and OFF periods.
✗ Incorrect
Option A correctly uses two TON timers that trigger each other alternately to create independent ON and OFF times. Light is ON when TimerOn.Q is TRUE and TimerOff.Q is FALSE, producing the flashing effect.
📝 Syntax
expertIdentify the syntax error in PLC timer code
Which option contains a syntax error in this PLC timer code snippet intended to flash a light every 1 second?
Code snippet:
Timer1: TON(IN:=Light, PT:=T#1S);
Light := NOT Timer1.Q;
Code snippet:
Timer1: TON(IN:=Light, PT:=T#1S);
Light := NOT Timer1.Q;
Attempts:
2 left
💡 Hint
Check the syntax for timer declaration and assignment in PLC structured text.
✗ Incorrect
Option A is missing the assignment operator ':=' or declaration syntax, causing a syntax error. Correct syntax requires either declaration with ':' or assignment with ':='.
