PLC Simulator
Learning hub

Learn PLC Programming — Free Browser-Based Scenarios.

40 structured scenarios from traffic lights to PID temperature control, robot handshakes, and CIP sequences. IEC 61131-3, Allen-Bradley, and Siemens dialects. No install, no license key, no lab hardware.

Overview

Who learns PLC programming, and why.

PLC programming is the craft of writing controller logic that runs on a programmable logic controller — the industrial computer that drives motors, valves, conveyors, and sensors in a factory, water treatment plant, or process line. If you have ever pressed a crosswalk button and watched the light cycle, debated a garage-door safety beam, or stood next to a bottling line, you have interacted with a PLC.

People come to PLC programming from three main directions. Electrical and mechatronics students pick it up as part of their degree and need practice beyond what the textbook and a two-hour lab session provide. Software engineers move into controls and automation roles and need to internalise a scan-based, I/O-driven programming model that is nothing like the web stack. Plant technicians already familiar with wiring relays step up to the logic side when their employer replaces hardwired panels with PLCs.

All three groups want the same thing: enough reps on real-feeling scenarios to develop intuition. That is what this page, and the ten scenarios linked below, set out to provide.

Time estimate. Expect 15–20 hours to get competent on the fundamentals (first four scenarios). Another 40–60 hours to be comfortable with interlocks, sequencers, and closed-loop control. These are evening-practice numbers — a month or two, not a semester.

How a PLC is built — CPU, power supply, and digital and analog I/O modules connecting field sensors and actuatorsA modular PLC rack on a backplane: power supply, CPU processor, input module, output module and a communications module side by side.PLC RACKbackplane busPSUPowerCPUProcessorDIInputDOOutputNETComms
The hardware you are learning to program: a CPU running your logic, connected to inputs (buttons, sensors) and outputs (motors, valves) through I/O modules.
The path

How to learn PLC programming, in order.

Courses (RealPars, PLC Academy, Udemy) and YouTube playlists are good for theory. The piece they cannot give you is reps — writing logic, running it, watching it fail a test, and fixing it. This page is built around that loop. Here is the sequence that works.

  1. Step 1 — Learn the model, not the buttons

    Before any rung, understand the scan cycle and the I/O image table: a PLC reads inputs, runs your program top-to-bottom, then writes outputs, forever. Almost every beginner confusion (“why did my coil flicker?”) comes from not having this model. Five minutes on the diagrams below saves hours later.

  2. Step 2 — Learn ladder logic first

    Start with ladder logic — normally-open and normally-closed contacts, output coils, series (AND) and parallel (OR) branches. It is the most-used PLC language and it maps directly onto relay schematics, so it is the fastest to read. Write a one-rung program that turns a lamp on with a button. That is your first real PLC program.

  3. Step 3 — Add the four building blocks

    Layer on seal-in latching (hold a motor running off a momentary button), timers (TON / TOF / TP), counters (CTU / CTD), and edge detection (R_TRIG / F_TRIG). These four cover the large majority of real industrial logic. The Fundamentals section below explains each with a diagram.

  4. Step 4 — Build on auto-graded scenarios

    Move into the scenario library. Each scenario gives you an I/O list, a written objective, and a hidden test suite. You write the ladder, hit Run, and the grader tells you exactly which requirement failed. That feedback loop — not watching a video — is where the skill actually forms. The first four scenarios are free.

  5. Step 5 — Branch into Structured Text and a vendor

    Once ladder feels natural, learn Structured Text for the maths-heavy and looping logic that ladder makes awkward, and pick a target vendor — Allen-Bradley (Studio 5000) or Siemens (TIA Portal). The IEC 61131-3 standard means the concepts transfer; only the addressing and tooling change. When you are ready for a credential, see the structured course and certification guide.

The five IEC 61131-3 PLC programming languages — Ladder Diagram, Structured Text, Function Block, Instruction List, and Sequential Function ChartThe five IEC 61131-3 PLC programming languages as chips: Ladder Diagram, Function Block Diagram, Structured Text, Instruction List and Sequential Function Chart.IEC 61131-3 — five languagesLDLadder DiagramFBDFunction BlockSTStructured TextILInstruction ListSFCSequential Func. Chart
The international standard. Learn ladder first, then Structured Text; the rest you can pick up by need.
Learn Structured Text (ST) — a Pascal-like IEC 61131-3 language with IF, CASE, and loops for the logic ladder makes awkwardA small Structured Text code block in an editor: an IF/THEN condition, a TON timer call and assignments, showing text-based PLC programming.main.st — Structured Text1IF Start AND NOT Stop THEN2 Run := TRUE;3END_IF;4DelayTmr(IN := Run, PT := T#5s);5Lamp := DelayTmr.Q;
Structured Text reads like code. Reach for it once a sequence gets too tangled to draw as rungs.
Fundamentals

The PLC programming fundamentals you need first.

Before scenario one, make sure these concepts click. Skip any you already know.

The scan cycle

A PLC runs a three-phase loop: read all inputs into an image table, execute the user program top-to-bottom, then write the output image back to physical outputs. Every rung you write is evaluated once per scan. Scan time is typically 1–50 ms on industrial hardware. Internalising the scan model explains why coil order matters, why a rung can fire twice in one cycle, and why edge-detection exists.

Learn the PLC scan cycle — read inputs, execute the ladder program top-to-bottom, then write outputs, repeating every scanThe repeating PLC scan cycle: read inputs, execute the ladder logic, update outputs, then housekeeping, looping continuously.1Read Inputs2Execute Logic3Update Outputs4HousekeepingSCANCYCLE
The loop that runs forever while the PLC is powered. Your whole program is evaluated once per scan.

Rungs, contacts, and coils

Ladder logic draws a "rung" across two power rails. Left to right, you place contacts (inputs) and end with a coil (output). A normally-open contact (XIC in AB, --] [-- in standard notation) passes power when its tag is true. A normally-closed contact (XIO, --]/[--) passes when its tag is false. The coil at the end energises when power flows all the way across.

Learn ladder logic symbols — normally-open and normally-closed contacts, output coils, and timer and counter blocksThe core ladder logic symbols side by side: XIC examine-if-closed, XIO examine-if-open, OTE output energize, OTL output latch and OTU output unlatch.XICIfXIOIfOTEEnergizeLOTLLatchUOTUUnlatch
The vocabulary of ladder logic. Learn to read these four symbols and you can read most rungs.
Read a ladder rung left to right — input contacts in series and parallel feeding an output coil across the power railsA basic ladder logic rung between two power rails: an examine-if-closed contact (XIC) in series driving an output coil (OTE).L1L2] [StartXIC I:0/0LampOTE O:0/0
A single rung is a Boolean expression: power must flow from the left rail to the right to energise the coil.

Latching (set / reset)

Most coils are non-retentive — they de-energise the instant the rung conditions fail. Latching solves the problem that most push-buttons are momentary. A SET / OTL coil turns the bit on and leaves it on; a RESET / OTU coil turns it off. The canonical three-wire motor seal-in rung uses a latch to keep a contactor energised after you release the START button.

Learn the seal-in (latching) rung — a START contact in parallel with the output's own contact holds a motor running after the button is releasedA seal-in latch rung: a Start contact in parallel with a Hold contact, in series with a normally-closed Stop contact, driving an output coil.StartHold (seal)StopMotor
The most-reused rung in PLC programming: the output seals itself in around a momentary START, with STOP and overload breaking the seal.

Timers

The TON (on-delay timer) starts counting when its input goes true and sets its .Q output when the accumulator reaches the preset. TOF (off-delay) does the opposite. TP (pulse) produces a fixed-duration output pulse on a rising edge. Every scenario on this site uses timers; the Traffic Light scenario is essentially a timer-driven state machine.

Learn the TON on-delay timer — the input enables timing, the accumulator climbs to the preset, then the done bit turns onA TON on-delay timer: the accumulated time bar ramps up toward the preset value, and the done (DN) bit turns on when the accumulator reaches preset.TONPRE 5000ACCACC ramps to PREPREDNdone bit
Timing diagram for a TON. The done (.Q) bit waits for the preset, then follows the input until it drops.

Counters

CTU (count up) increments on rising edges, fires its .Q when the accumulator reaches the preset, and resets on command. CTD counts down. CTUD does both. Counters show up in conveyor-sort logic, batch counts, and anywhere you need to track discrete events.

Learn the CTU count-up counter — each rising edge increments the accumulator, and the done bit fires when it reaches the presetA CTU count-up counter: each input pulse increments the accumulator toward the preset, and the done (DN) bit turns on when count reaches preset.count pulsesCTUPRE 5ACC 3ACCcount toward presetDNdone bit
A CTU counts discrete events — parts off a conveyor, cycles complete — and trips its done bit at the preset.

Edge detection

R_TRIG fires for exactly one scan on a false-to-true transition; F_TRIG fires on true-to-false. Edge detection is how you make a rung respond to a push-button event rather than to the button being continuously held. Most beginner bugs in ladder logic are solved by adding an edge-detect block where you meant one.

The IO table

Every physical input and output is mapped to an address. In Allen-Bradley: I:0/0, O:0/0. In Siemens: %I0.0, %Q0.0. In IEC 61131-3: you declare a tagged variable at an address (START_PB AT %I0.0 : BOOL;). Every scenario on this site ships with its IO list printed in the scenario brief; your first job is to map it mentally before you write a rung.

Learn PLC digital I/O addressing — field switches and sensors map to input addresses, output addresses drive lamps, motors, and valvesA digital input pushbutton wired to a PLC input card, and a PLC output card driving a lamp, with a sinking versus sourcing hint.I/O CARDINPUTOUTPUTPushbuttonI:0/0LampO:0/0sinking (NPN) vs sourcing (PNP)
Every rung references addresses like these. Mapping the I/O list to physical devices is step zero of every scenario.
Scenario one

Your first scenario: Traffic Light.

The Traffic Light is the cleanest beginner scenario on the site. You get a four-way intersection with north-south and east-west lamp outputs, a pedestrian walk button input, and a requirement to cycle through green, yellow, red with an all-red safety phase between transitions. The test harness checks sequencing, timing windows, and that no two opposing greens ever activate simultaneously.

Mechanically it reduces to three timers in a chain and a small state machine. You will write it, fail a test on a timing edge, realise the all-red phase needs a dedicated state, rewrite, and pass. That failure-and-fix loop is the actual learning; the scenario exists to make it happen in 15 minutes instead of a two-hour lab session.

You can load the scenario without an account at /scenarios/traffic-light to read the brief. Signing up unlocks the editor and the run button.

Honest caveat

Beyond our simulator.

We will say this clearly: a simulator is not a replacement for real hardware experience. You will eventually want time on an actual controller — wiring inputs, dealing with sinking-vs-sourcing DC, watching a contactor physically pull in, debugging an analog sensor with a multimeter. The logic half of PLC programming transfers cleanly from simulator to hardware; the wiring and commissioning half does not.

What this simulator does is get you through the logic half faster. You can iterate on a sequence a hundred times in the time it takes to wire one real panel. You can safely make the mistakes that would blow a fuse or damage an actuator in hardware. You can also practice on ten different machine archetypes in a weekend, which no reasonable hardware lab budget allows.

Once the scenarios start to feel easy, pair the simulator with: a cheap used PLC (a MicroLogix 1100 or a S7-1200 on eBay), a couple of limit switches and an LED bar, and a vendor certification you are prepping for. That combination — simulator for logic reps, hardware for commissioning reps, certification for the formal credential — is what gets people hired.

Questions

Frequently asked.

With focused practice, most people get competent with the fundamentals (contacts, coils, timers, counters, latching, basic sequencers) in 15–20 hours. Fluency on real industrial scenarios — interlocks, PID, fault handling — is another 40–60 hours. You can reach entry-level interview readiness in a month of consistent evening practice.

Ready to start?

Scenario one takes about 15 minutes. Sign up free and write your first working ladder rung before your coffee goes cold.

Related: PLC simulator · ladder logic simulator · all scenarios · PLC programming course · PLC training · certification guide.