PLC Fiddle is a free online PLC simulator, and its traffic light example is a ladder logic program that cycles three outputs (red, yellow, green) through a timed sequence, typically using timers and counter instructions to mimic a real intersection. It is not a physical device; it is a virtual training exercise that runs in your browser and is widely used by students and technicians to practice PLC programming without hardware.
What Is PLC Fiddle and Why Does It Have a Traffic Light?
PLC Fiddle (plcfiddle.com) is a browser-based PLC simulator created to let beginners write and test ladder logic without buying a physical PLC. The traffic light is one of its built-in demo programs because it is a classic automation problem: it requires sequential state changes, timed delays, and a repeating cycle—all core PLC concepts. The demo shows a small intersection with three lights per direction, and the ladder logic behind it toggles them in the correct order.
How the Traffic Light Ladder Logic Works
In the PLC Fiddle traffic light example, the program uses a set of timers (TON, or timer-on-delay) and a counter to step through states. A typical sequence for one direction is:
- Red on for 10 seconds
- Green on for 8 seconds
- Yellow on for 2 seconds
- Back to red
The ladder logic might look like this (simplified):
- A free-running timer (T0) runs continuously, resetting itself.
- Based on T0’s accumulated time, compare instructions (GEQ, LEQ) decide which output is on.
- For example, if T0.ACC < 10000 (ms), red is on; if between 10000 and 18000, green is on; if between 18000 and 20000, yellow is on.
In PLC Fiddle, you can open the demo and see the exact rungs. The simulator uses a simplified instruction set, but the logic is transferable to real PLCs from Allen-Bradley, Siemens, or others.
How to Run the Traffic Light Demo in PLC Fiddle
To see it in action:
- Go to plcfiddle.com in your browser.
- Click on the “Examples” or “Demo” link (usually in the menu).
- Select “Traffic Light” from the list.
- Press the “Run” button (play icon) to start the simulation.
- Watch the virtual lights change in the output panel.
You can also edit the timers to change the light durations and see the effect immediately, which is great for learning.
Choosing a PLC Simulator for Traffic Light Practice
PLC Fiddle is not the only option. If you want to practice traffic light logic, consider these alternatives:
- PLC Fiddle – free, browser-based, no installation, good for beginners.
- LogixPro – paid software that simulates Allen-Bradley PLCs and includes a traffic light simulation with realistic I/O.
- Factory I/O – a 3D industrial simulator that can connect to real PLCs or virtual ones; has a traffic light scene.
- Real PLC hardware – e.g., a MicroLogix or Click PLC with a physical traffic light module; most realistic but costs money.
For pure learning, PLC Fiddle is the easiest because it requires no setup.
Common Problems When Programming Traffic Lights
Beginners often hit these issues:
- Timers not resetting – if a timer’s done bit is used to reset it, but the rung is scanned incorrectly, the sequence can freeze.
- Overlapping outputs – two lights on at once because comparison ranges overlap.
- Initial state – the program may start with all lights off; you need a first-scan bit to set the initial red.
- Simulator quirks – PLC Fiddle’s scan time can affect timing; use milliseconds carefully.
A good practice is to draw a state diagram before writing code, then implement each state as a separate rung.
PLC Fiddle vs. Real PLC Programming
PLC Fiddle uses a simplified instruction set (e.g., basic contacts, coils, timers, counters). Real PLCs have much more: analog I/O, PID, communication, safety functions. However, the logic for a traffic light is identical—timers and counters are universal. The main difference is that real PLCs require you to assign physical I/O addresses, while PLC Fiddle uses virtual ones. So, skills learned on PLC Fiddle transfer, but you will need to learn vendor-specific software (like Studio 5000 or TIA Portal) for real jobs.
Costs and Safety Considerations
PLC Fiddle is completely free, which makes it ideal for students. Real traffic light training kits cost anywhere from $100 to $500, plus a PLC. When working with real traffic lights, safety is critical: always use proper voltage (usually 24V DC or 120V AC) and follow electrical codes. Never touch live wires; use a lockout/tagout procedure when servicing. In simulation, there is no risk, but you should still learn safe practices for the real world.
Frequently Asked Questions
Is PLC Fiddle free to use?
Yes, PLC Fiddle is a free web-based tool. You can create, edit, and run ladder logic programs without paying anything or installing software.
Can I use PLC Fiddle to learn real PLC programming?
Yes, for basic concepts like timers, counters, and logic. However, real PLCs have more instructions and require vendor-specific software. Start with PLC Fiddle to understand the logic, then move to a free trial of a real PLC environment.
What does the traffic light demo teach?
It teaches sequential logic, timer usage, and how to create a repeating cycle. These skills apply to many automation tasks like conveyor control, batch processing, and elevator control.
How do I change the light timing in PLC Fiddle?
Open the traffic light example, find the timer instructions (TON) in the ladder logic, and change the preset value (in milliseconds). For example, set red to 10000 for 10 seconds. Then run the simulation to see the change.
Does PLC Fiddle support multiple traffic lights (e.g., for a crossroad)?
Yes, you can add more outputs and timers to control multiple sets of lights. The built-in demo may only show one direction, but you can expand it.
Related
- Jurong East Printing Shop: Where to Print in Singapore
- Standard Deviation in Excel: STDEV.S and STDEV.P
- US Trade Balance by Month: Data & Trends
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Text Upside Down: What Works and What Doesn’tIn Excel for Microsoft 365 on Windows, you cannot rotate text inside a worksheet cell a full 180…
- How to Embed a Clipchamp Video in PowerPoint: StepsTo embed a Clipchamp video in PowerPoint, export your finished project as an MP4, then insert that file…
- Excel NOW Format: Show the Current Date and Time CorrectlyIn Excel, enter =NOW() in a cell to return the current date and time; then format that cell…
- Select Non-Empty Cells in Excel: Methods That WorkTo select every non-empty cell in a chosen range—including both typed entries and formulas—in Excel for Microsoft 365…
- What Is enum in Java? Definition & UsageIn Java, an enum (short for enumeration) is a special data type that defines a fixed set of…
- Excel Text Hover: How to Show Notes and Tooltips on CellsExcel does not have a general setting that turns any cell’s text into a hover tooltip. In Excel…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.