LED Blinking in OpenPLC: Output Interlocking and Ladder Logic Tutorial for Beginners (Updated September 2026) (Updated September 2026)
Getting an LED to blink in OpenPLC looks like a beginner exercise. It is — but here is what most students miss: it also teaches one of the most important principles in all of industrial PLC programming. Output interlocking — using the same output address for both a coil and a contact to create a self-toggling condition — is the same logic that drives relay latching, motor interlock circuits, and safety shutdown sequences in real factories. AURIC, the Aurangabad Industrial and Research City, represents ₹71,343 crore in investment creating 62,405 manufacturing jobs in Maharashtra, most of which need automation-literate engineers. This tutorial walks through exactly what ABC Trainings' trainer demonstrates in their OpenPLC video: from writing the ladder logic to running the simulation and controlling the LED with true and false input conditions.
- OpenPLC LED blink uses output interlocking: assign the same address to both a coil and a normally-closed contact in the same rung to create a self-toggling circuit
- Steps: write ladder logic in OpenPLC → compile → start simulation → toggle input to true → observe blink
- For continuous ON: keep input condition true without releasing — the LED stays on rather than blinking
- For blink effect: trigger input true then release — LED toggles on each PLC scan cycle until input resets
- OpenPLC is free, runs on PC and Raspberry Pi — ideal for learning standard IEC 61131-3 ladder logic before real hardware
What is output interlocking and how does it make an LED blink in OpenPLC?
Output interlocking in OpenPLC means assigning the same address — for example Q0.0 — to both a coil (which turns the output ON) and a normally-closed contact of that same address in the same rung. Here is what happens in the PLC scan cycle: the coil energizes on the first scan, which immediately opens the normally-closed contact, which de-energizes the coil on the next scan, which closes the contact again, which re-energizes the coil again — and so on. This alternating toggle on each scan cycle creates the visible blink. The ABC Trainings trainer demonstrates this exactly: input interlocking used the same address on both sides of the rung to create the continuous toggle condition.

Setting up your OpenPLC ladder logic program for LED blinking
To build the LED blink program in OpenPLC, open the OpenPLC Editor and create a new project with a Program Organization Unit (POU) set to Ladder Diagram (LD) language. In the first rung, place a normally-closed contact and connect it to a coil — assign the same variable or address tag to both. This is the self-interlocking rung that produces the toggle. Add a second rung with your trigger input (for example %I0.0 as a normally-open contact) wired to a second coil that starts the sequence. Assign your output tag to %Q0.0 or an equivalent mapped to your physical or simulated output. Save the project before compiling.
Compiling the program and starting simulation in OpenPLC
After writing the ladder logic, click Compile Program in the OpenPLC Editor. The compiler checks all tag assignments, rung connections, and POU references — it will flag any undefined variables or wiring errors before you run the simulation. Once compilation succeeds with zero errors, switch to the OpenPLC Runtime and start the simulation. The runtime executes the PLC scan cycle on your PC. In the debug or monitoring view, you will see all variables in real time — %I0.0 will show 0 (false) and %Q0.0 will show 0 (false) until you interact with the input. The LED indicator stays off at this point.

Controlling the LED: what happens when you set the input to true vs false
To trigger the blink, force %I0.0 to true (value 1) in the OpenPLC debug window. On the first scan cycle, the trigger input energizes the coil through the second rung. The interlocking rung then begins its toggle on subsequent scans. You will see %Q0.0 alternating between 0 and 1 on each scan — and the LED indicator on screen blinks accordingly. The blink rate depends on the PLC scan interval, typically 50–100 milliseconds in OpenPLC simulation, which is fast enough to see visually but slow enough to observe in the debug log. When you force %I0.0 back to false (0), the circuit resets and the LED stops.
Continuous ON vs blinking: how keeping input true changes the LED behavior
The trainer makes an important distinction in the video: if you keep the input %I0.0 set to true continuously without releasing it, the LED stays ON — it does not blink. This is because the sustained input keeps the energize path active independently of the interlocking toggle. The blink only occurs in the window between the initial trigger and the reset of the input. In real industrial PLC applications, this distinction between a momentary signal (pulse trigger) and a sustained signal (hold command) is fundamental to safe machine design — machines behave very differently depending on whether a start button gives a pulse or stays pressed.
Self-holding circuits in PLC: the real-world application behind this exercise
The self-holding circuit is one of the most important concepts in industrial ladder logic. In a real factory, a motor start circuit works like this: pressing START energizes the motor contactor coil, which also closes a seal-in contact (a normally-open contact of the same coil) that keeps the motor running even after the START button is released. The LED blink exercise is a simplified version of the same principle, showing the toggle variant rather than the latch variant. A motor start circuit uses a normally-open output contact for latching (persistent ON); the LED blink uses a normally-closed output contact for toggling. Both patterns appear in virtually every industrial machine control panel in Maharashtra's manufacturing zones — Bajaj Auto Waluj (Plot G-137), Endurance MIDC (Plot E-92), Hyosung Chakan, Toyota Kirloskar in AURIC.
Why OpenPLC is the right first step before real PLC hardware
OpenPLC is free, open-source PLC software that implements the IEC 61131-3 standard — the same international standard used by Siemens, Allen-Bradley, Mitsubishi, and Omron. For students in Maharashtra who want to learn PLC programming without access to expensive hardware labs, OpenPLC simulation covers all core concepts: contacts, coils, timers, counters, interlocking, and self-holding circuits. The simulation scan cycle behavior closely matches real hardware, so skills built in OpenPLC transfer directly when you later train on a physical Siemens S7-1200 or Allen-Bradley MicroLogix. With AURIC representing ₹71,343 crore in investment and 62,405 jobs being created in Sambhajinagar — most in automotive and manufacturing automation — the demand for PLC-capable engineers in Maharashtra is genuine and growing.
| Platform | OpenPLC | Siemens TIA Portal | Allen-Bradley Studio 5000 |
|---|---|---|---|
| Cost for students | Free | Paid (trial available) | Paid |
| Simulation (no hardware) | Yes — full PC simulation | Yes — PLCSIM | Yes — Logix Emulate |
| Common in Maharashtra | Colleges and training labs | Skoda VW, Siemens India, BARC, Army | Pharma, food processing, Bajaj platforms |
| Best use | First step — concept learning | Professional — direct career application | Professional — US-origin plant standard |
| Transition from OpenPLC | — | 2–4 weeks to working proficiency | 2–4 weeks to working proficiency |
Next steps: from OpenPLC simulation to Siemens TIA Portal or Allen-Bradley
After mastering OpenPLC simulation, the next platform depends on your target employer. For Siemens-based plants — Skoda VW Shendra (Plot A-1/1), Siemens India Pune, BARC, Indian Army — Siemens TIA Portal is the professional tool. For Rockwell Automation environments common in pharma and food processing, Allen-Bradley Studio 5000 is the standard. For Japanese-origin automotive plants like Toyota Kirloskar in AURIC, Mitsubishi GX Works applies. For Schneider Electric environments (common in power distribution and water treatment), EcoStruxure Machine Expert applies. OpenPLC teaches the ladder logic fundamentals that transfer to all of these — once you understand contacts, coils, timers, and interlocking conceptually, any professional platform becomes learnable in 2–4 weeks of hands-on practice. ABC Trainings' Industry 4.0 with AI and Industrial Automation course follows this progression — call 7039169629 for details.
ABC Trainings' Industry 4.0 with AI and Industrial Automation course — which includes OpenPLC, Siemens TIA Portal, SCADA, and hands-on practical modules on real PLC hardware — is eligible for the CMKPY scheme (Mukhyamantri Yuva Karya Prashikshan Yojana). Maharashtra students aged 18–35 can receive ₹6,000–₹10,000 per month from the government during training. PMKVY 4.0 has trained 2.1 crore students nationally and covers automation and industrial training. Call 7039169629 to check your CMKPY eligibility and start registration before your training begins.Get the Industrial Automation Brochure + Fees + Batch Dates on WhatsApp
Free 1:1 counselling. Placement track record. CMYKPY/PMKVY eligibility check.
💬 Get Brochure on WhatsApp📞 Call 7039169629About the author: Rahul Patil. 12 yrs experience training engineers across Maharashtra.
Visit Our Centers
- Wagholi (Pune): 1st Floor, Laxmi Datta Arcade, Pune-Ahilyanagar Highway. Call 7039169629
- Hadapsar (Pune HQ): 1st Floor, Shree Tower, opp. Vaibhav Theater, Magarpatta. Call 7039169629
- Cidco (Chh. Sambhajinagar): Kalpana Plaza, opp. Eiffel Tower, N-1 Cidco. Call 7039169629
- Osmanpura (Chh. Sambhajinagar): S.S.C Board to Peer Bazar Road, near Jama Masjid. Call 7039169629
- Sangli: Shubham Emphoria, 1st Floor, Above US Polo Assn., Sangli-Miraj Rd, Vishrambag. Weekend batches available. Call 7039169629
FAQs
How do I blink an LED in OpenPLC?
To blink an LED in OpenPLC, create a ladder logic rung using output interlocking: assign the same address (such as Q0.0) to both a coil and a normally-closed contact in the same rung. Add a second rung with a trigger input (I0.0) connected to a coil. Compile the program, start simulation, then toggle I0.0 to true. The output will alternate between on and off on each scan cycle, producing the blink. To stop the blink, set I0.0 back to false. To keep the LED continuously on, keep I0.0 true without releasing it.
What is output interlocking in PLC ladder logic?
Output interlocking in PLC ladder logic means using a coil output address as a contact in the same rung or circuit, so the coil's own energised state affects its own drive condition. A normally-closed output contact creates a toggle — the basis of the LED blink exercise. A normally-open output contact creates a latch — the basis of the motor start self-holding circuit. Both are fundamental patterns in industrial machine control and appear in virtually every control panel in Maharashtra's manufacturing sector.
Is OpenPLC good for beginners learning PLC programming?
Yes — OpenPLC is one of the best starting platforms for PLC beginners. It is free, requires no hardware, implements IEC 61131-3 standard ladder logic, and behaves very similarly to real PLCs in simulation mode. All core concepts — contacts, coils, timers, counters, interlocking, and self-holding circuits — can be learned and practised on OpenPLC before you need to touch physical hardware. ABC Trainings' PLC training module begins with OpenPLC simulation before moving to real Siemens hardware.
Which is better for learning PLC — OpenPLC simulation or real Siemens or Allen-Bradley hardware?
OpenPLC simulation is the correct starting point for conceptual learning — it teaches ladder logic, interlocking, timers, counters, and scan cycle behavior without any hardware cost. Real hardware (Siemens S7-1200, Allen-Bradley MicroLogix) adds the experience of physical I/O wiring, real sensor input signals, and industrial communication protocols that no simulation can fully replicate. The professional learning path is: OpenPLC simulation for fundamentals (month 1–2), Siemens TIA Portal in simulation (month 2–3), real hardware practical (month 3–4). ABC Trainings' Industry 4.0 course follows exactly this progression. Call 7039169629 for current batch details.



