Challenge - 5 Problems
Traffic Light Automation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediateTraffic Light Sequence Timing Output
Given the following PLC ladder logic snippet controlling a traffic light sequence, what is the total time (in seconds) the green light stays on during one full cycle?
PLC Programming
(* Ladder logic timing for green light *) Timer T1: preset = T#30s Timer T2: preset = T#5s (* Green light ON during T1 only *)
Attempts:
2 left
💡 Hint
Focus on the timer preset that controls the green light ON duration.
✗ Incorrect
The green light is ON only during Timer T1 which is set to 30 seconds. Timer T2 is for a different light phase.
🧠 Conceptual
intermediateUnderstanding Traffic Light State Transitions
In a PLC program controlling a traffic light, which of the following best describes the role of a state machine?
Attempts:
2 left
💡 Hint
Think about how the traffic lights change from green to yellow to red.
✗ Incorrect
A state machine defines and controls the order of traffic light phases by transitioning through states.
🔧 Debug
advancedIdentify the Error in Traffic Light Sequence Code
This PLC structured text code snippet is intended to cycle traffic lights: Green -> Yellow -> Red -> Green. What error causes the red light to never turn ON?
code:
IF Green THEN
Yellow := FALSE;
Red := FALSE;
TimerGreen(IN:=TRUE, PT:=T#30s);
IF TimerGreen.Q THEN
Green := FALSE;
Yellow := TRUE;
END_IF;
ELSIF Yellow THEN
TimerYellow(IN:=TRUE, PT:=T#5s);
IF TimerYellow.Q THEN
Yellow := FALSE;
Green := TRUE;
END_IF;
END_IF;
Attempts:
2 left
💡 Hint
Check where the red light variable is assigned TRUE.
✗ Incorrect
The code never assigns TRUE to Red, so it never turns ON.
🚀 Application
advancedDesigning a Pedestrian Crossing Signal in PLC
You want to add a pedestrian crossing button to the traffic light PLC program. When pressed, it should extend the red light duration by 10 seconds. Which approach correctly implements this?
Attempts:
2 left
💡 Hint
Think about how to increase red light duration dynamically.
✗ Incorrect
Extending the red light timer preset when the button is pressed delays the green light, allowing safe pedestrian crossing.
📝 Syntax
expertCorrect Syntax for Traffic Light Control in Structured Text
Which of the following PLC structured text snippets correctly sets the traffic light states so that only one light is ON at a time in the sequence Green -> Yellow -> Red?
Attempts:
2 left
💡 Hint
Check the correct syntax for CASE and assignment operators in structured text.
✗ Incorrect
Option C uses correct CASE syntax and assignment operator ':='; others have syntax errors like wrong operators or keywords.
