Traffic lights with a pedestrian crossing
The classic first machine of every PLC course: a traffic light that runs a cycle of timed steps, gives pedestrians green only while the cars stop, waits for the request button, and switches to flashing yellow at night.
You learn the step chain (CASE with a step number and a timer), the way real machines are programmed. You need IF, the latch and timers: chapters 1–8 of PLC from zero teach them.
Chapters
How the course works
Structured Text (IEC 61131-3), the language used by industrial engineering environments such as TwinCAT 3 and CODESYS. PLC Studio and the Trainer T8 are VisoTrain’s own training tools. TwinCAT is a registered trademark of Beckhoff Automation GmbH. CODESYS is a registered trademark of CODESYS GmbH. VisoTrain is not affiliated with or endorsed by them.
Syllabus
Level: Intermediate · Time: about 3 hours · You need: IF, latches and timers (chapters 1–8 of PLC from zero).
You learn: step chains with CASE, timers between steps, interlocking by design, remembering a short press, flashing signals, safe mode changes.
Chapter 1: The car lights: a step chain
- A traffic light in the real world: Say what a traffic light controller does, and what you will build.
- One step at a time: the step chain: Program a sequence of timed steps with CASE and one timer.
- Lab in PLC Studio: program this part and pass the automatic tests.
Chapter 2: Lights for the pedestrians
- Pedestrians: safety by design: Derive the pedestrian lights from the step, so a conflict is impossible.
- Lab in PLC Studio: program this part and pass the automatic tests.
Chapter 3: The request button
- The request button: remember a short press: Keep the cars green until someone asks, and remember the request.
- Lab in PLC Studio: program this part and pass the automatic tests.
Chapter 4: Night mode: flashing yellow
- Night mode: priorities in a program: Override the cycle with flashing yellow, and come back safely.
- Lab in PLC Studio: program this part and pass the automatic tests.
Frequently asked questions
How is a traffic light programmed on a PLC?
As a step chain: a step number and a timer. CASE runs the outputs of the current step and moves on when its time is up. The course builds it one piece at a time.
Do I need hardware?
No. The crossing is simulated in the browser, and your program is checked automatically.