PLC Simulator
Learning hub

PLC Programming: Learn to Program PLCs in Your Browser

PLC programming is writing the control logic that a programmable logic controller runs to operate machines and processes, most often in ladder logic or Structured Text. Every scan, the program reads inputs such as buttons and sensors, makes decisions, and switches outputs such as motors, valves and lights.

Practice with 170 source-catalogued practice records, from traffic lights to PID temperature control, robot handshakes, and CIP sequences, across 9 learning dialects. No install or license key, and no hardware is needed to start.

Real plc programming for beginners footage

See this exact skill in the working simulator.

Watch the real browser product respond to the task on this page, then try the same practical workflow yourself. No slides, concept mockups, install, or credit card.

Try this in the browser
PLC Programming for Beginners — A Practical Learning Path

See the whole learning progression

From a field signal to a commissioned control system

PLC programming makes sense when the code stays connected to the machine. These six views show the progression from I/O and scan behavior to language choice, increasing system complexity and supervised hardware practice.

PLC training bench showing a controller, digital I O modules, terminal blocks, pushbuttons, sensors, motor and programming laptop
01Start with the complete signal path: a field device changes an input, the CPU evaluates logic, and an output module drives an actuator.
Four-stage PLC scan cycle training bench showing read inputs, execute ladder logic, write outputs and repeat
02Use the scan-cycle model to explain when input values are sampled, when logic executes and when physical outputs change.
Beginner building a first ladder logic contact and coil program beside an illuminated PLC training lamp
03A first program should produce an obvious physical result: one contact controls one coil and the learner can explain why it energizes.
Controls engineer comparing ladder logic and Structured Text for the same tank process on one screen
04Compare languages against the same machine behavior so the choice is about clarity and control requirements, not syntax alone.
Progressive PLC learning path with motor, conveyor, process tank and commissioning training stations
05Progress from discrete cause and effect to timers, interlocks, sequencing, analog control and fault diagnosis in deliberate steps.
PLC learner moving from a browser simulator exercise to supervised electrical panel commissioning with a multimeter
06Simulation builds repeatable logic and diagnosis skill; supervised hardware practice adds wiring, measurement, safety and commissioning judgment.
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 reads sensors and drives motors, valves, and conveyors in a factory, water treatment plant, or process line. If you have ever pressed a crosswalk button and watched the light cycle, tested 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 internalize 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.

Planning range, not a promise. A focused learner may need roughly 15–20 hands-on hours to establish the basic contact, coil, timer, counter and latch model. Interlocks, sequences, analog control and troubleshooting require substantially more deliberate practice, while safe hardware commissioning requires supervised physical work.

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.
Industrial PLC programming

How engineers program PLCs on a real project.

Writing rungs is only one step. Industrial PLC programming follows a repeatable workflow, and every step is something you can rehearse before you touch a live machine.

  1. 1. Read the functional description

    Start from what the machine must do: normal sequence, stop conditions, interlocks, alarms and what happens after a fault or power loss. Ambiguity here becomes bugs later.

  2. 2. Build the I/O list and tag names

    Map every pushbutton, sensor, contactor and valve to an input or output address and give it a meaningful tag name, such as StartPB or Conveyor1_Run.

  3. 3. Write the logic

    Program the behavior in ladder logic, Structured Text or function blocks, usually organized into routines for modes, sequences, outputs and alarms.

  4. 4. Test offline or in simulation

    Force inputs, step through normal, boundary and fault cases, and confirm each output does what the description says before any hardware moves.

  5. 5. Download and commission

    Download to the controller, check every I/O point against the wiring, then prove the sequence on the machine under a supervised commissioning procedure.

  6. 6. Monitor, troubleshoot and maintain

    Most PLC work after startup is reading live logic to find why a machine stopped. Clear, well-commented code is what makes that fast.

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. Guided scenarios give you an I/O list, a written objective, and an objective 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. A free account currently includes 32 source-tagged free-tier practice records; access can vary with account state and staged rollout.

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

    Once ladder feels natural, learn Structured Text for the math-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.
Languages

PLC programming languages (IEC 61131-3).

The IEC 61131-3 standard defines the languages most controllers use. Vendors rename instructions and add their own libraries, but the language model transfers between brands. Learn ladder logic first, then Structured Text.

LanguageTypeBest for
Ladder Diagram (LD)GraphicalDiscrete on/off control, interlocks and anything maintenance technicians must read at the machine.
Structured Text (ST)TextMath, data handling, loops, recipes and complex decisions that would take many rungs.
Function Block Diagram (FBD)GraphicalAnalog signal chains, PID loops and reusable blocks wired together like a signal-flow diagram.
Sequential Function Chart (SFC)GraphicalOrganizing step-by-step sequences such as batch phases or machine cycles into steps and transitions.
Instruction List (IL)Text (legacy)Reading older programs only. IL was deprecated in the 2013 edition of IEC 61131-3 and removed in the 2025 edition.
PLC coding

What PLC code looks like.

Here is the same motor start/stop program written two ways. A momentary Start button starts the motor, the motor's own bit holds it on (the seal-in), and Stop or an overload trip turns it off.

Ladder logic (text form)
|--[ Start ]--+--[/ Stop ]--[/ Overload ]--( Motor )--|
|             |
|--[ Motor ]--+
Structured Text (IEC 61131-3)
Motor := (Start OR Motor)
         AND NOT Stop
         AND NOT Overload;

Read the rung left to right: power flows through Start or the Motor holding contact, then through the normally closed Stop and Overload contacts, to the Motor coil. The Structured Text line is the same Boolean expression. Here Stop is true while the button is pressed; on real panels Stop buttons are usually wired normally closed, so the logic examines the healthy input as closed instead. Instruction names change by brand — Allen-Bradley writes these contacts as XIC and XIO — so the PLC codes reference maps the common mnemonics, and the PLC instruction list explains each one with a runnable example.

Tools

PLC programming software.

On the job you program PLCs in the manufacturer's software for that controller family. The concepts carry over; the menus, addressing and instruction names do not.

  • Studio 5000 Logix Designer

    Rockwell Automation (Allen-Bradley)

    ControlLogix and CompactLogix controllers; tag-based ladder logic with mnemonics such as XIC, XIO and OTE.

  • TIA Portal (STEP 7)

    Siemens

    S7-1200 and S7-1500 controllers; LAD, FBD, SCL (Structured Text) and GRAPH (sequences).

  • CODESYS

    CODESYS Group

    IEC 61131-3 development environment used by many hardware makers; a free download for learning.

  • GX Works

    Mitsubishi Electric

    MELSEC controllers; ladder logic with device addresses such as X, Y and M.

Vendor tools usually need a license and a Windows PC. This simulator is a browser-based practice environment for the logic, not a replacement for vendor software. See the free PLC programming software guide and the PLC software download guide when you are ready to install a vendor environment.

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. Internalizing 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 energizes 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 energize the coil.

Latching (set / reset)

Most coils are non-retentive — they de-energize 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 energized 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.
Start without an account

Run your first PLC rung.

The guided first program uses one contact and one coil: flip a switch and watch the output light energize. It demonstrates the edit, run and observe loop without asking for an account or pretending to be a full vendor runtime.

After that first rung, create a free account to use the source-tagged free-tier scenarios in the full editor, save progress and run their automated checks. Catalog access depends on account state, tier, entitlement and staged rollout.

Run it now at /try with no signup or credit card.

Animated preview: a timer-driven traffic-light sequence stepping through its phases while the scan counter climbs. The Traffic Light scenario asks you to write this logic yourself.
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 make logic iteration faster and safer. You can rerun sequences and fault states without risking a physical actuator, then take a more deliberate program into a supervised hardware lab. It complements rather than replaces electrical safety training and real commissioning practice.

Once the scenarios start to feel easy, add supervised practice on an appropriate training controller, protected low-voltage I/O and field devices, following the manufacturer documentation and your site safety procedures. A vendor or controls credential can document formal study, but employers will still judge troubleshooting, safety and practical reasoning.

Realistic timeline

How long does it take to learn PLC programming?

A rough planning range for contacts, coils, timers, counters and latching is 15–20 focused hands-on hours, but prior electrical knowledge, practice quality and the target role can move that number substantially. Interlocks, sequencing, analog control and troubleshooting require additional deliberate practice. Available practice records are auto-graded against scripted test cases, so every hour of practice includes feedback a video course cannot give.

When you need depth alongside the reps, the same platform includes written guides, wiring and fault-finding practice, and interactive sensor learning materials built on IEC 61131-3 languages. The payoff is measurable: O*NET (U.S. Department of Labor) reports 2025 median wages of $63,190 for electricians and $64,520 for industrial machinery mechanics, with roughly 81,000 and 45,700 projected US job openings a year respectively through 2034. Those occupations are broader than PLC programming, so treat the data as labor-market context rather than a salary or placement promise.

“Reading about seal-in rungs is like reading about swimming. Write the rung, watch the grader fail it on a timing edge, fix it — that ten-minute loop teaches more than any chapter, and it is the only reason this simulator exists.”
— Paul, builder of this simulator
Questions

Frequently asked.

PLC programming is writing the control logic that a programmable logic controller runs to operate a machine or process. The program reads inputs such as pushbuttons and sensors, applies logic, timers and counters, and switches outputs such as motors and valves on every scan. Most PLCs are programmed in ladder logic or Structured Text, the IEC 61131-3 languages.

Ready to start?

Build and run the guided Switch & Light program without an account, then save your progress and continue through the free learning path.

Related: PLC simulator · ladder logic simulator · all scenarios · PLC programming course · PLC training · certification guide · what is a PLC · PLC codes · ladder logic examples.

Competency and practice field guide

Learn PLC programming: practice plan

Direct answer

The learner can write and test a small program, explain each signal boundary and diagnose a changed case.

Written for new learners seeking a practical sequence from electrical state and Boolean logic to machine programs.

System map / 02

NODE 01observable

Scope

A staged roadmap from I/O and scan cycle to sequence and diagnostics.

NODE 02observable

Signal path

Concept lessons connected to runnable programs and machine outcomes.

NODE 03observable

Baseline practice

Start-stop, interlock, timer, counter and sequence exercises.

NODE 04observable

Edge cases

Simultaneous inputs, limits, reset and power-return behavior.

NODE 05observable

Fault practice

One hidden logic or process-feedback fault.

NODE 06observable

Transfer to the job

A portfolio and target-platform practice plan.