PLC BASICS

What Is PLC Programming? A Complete Beginner's Guide

What a PLC is, how the scan cycle works, the five IEC 61131-3 languages, a first start/stop program, and a free step-by-step route to learning it in a simulator.

By EDWartens engineering team 20 March 2026 Updated 5 October 2026 9 min
What Is PLC Programming? A Complete Beginner's Guide

PLC programming is writing the logic that a programmable logic controller (PLC) runs to control a machine or process. The PLC reads its sensors, works through your program, and switches motors, valves and lamps, many times a second. Most programs are written in ladder logic or another IEC 61131-3 language, and you can learn it free in a simulator.

“PLC Introduction.PLC Basics.Components of PLC. ModularPLC. Modules,Input Output.Backplane Animation.” by Instrumentation Academy, 9 min. Played from the creator's own YouTube channel; the video belongs to them.

In this short lesson by Instrumentation Academy, the parts of a modular PLC are introduced: the backplane, the modules, and the inputs and outputs. It sits in the free Industrial Instrumentation course, in a module that follows a signal from the field device to the operator's screen. Watch it first, then read on for what those parts do when a program runs.

What is PLC programming, and what is a PLC?

A PLC is an industrial computer built for one job: running a control program reliably, for years, in a panel next to a machine. It tolerates heat, vibration and electrical noise that would upset an office PC, and it runs the same program in the same way every time.

A typical PLC has:

  • A power supply, usually 24 V DC.
  • A CPU, which stores and runs the program.
  • Digital inputs for push buttons, limit switches and proximity sensors.
  • Digital outputs for contactor coils, solenoid valves and indicator lamps (contactor vs relay explains which device switches which load).
  • Analog inputs and outputs for 4-20 mA and 0-10 V signals from transmitters and to valves or drives.
  • Communication ports for Ethernet networks such as PROFINET, EtherNet/IP or Modbus TCP, which link it to HMIs, drives and other PLCs.

A compact PLC has all of this in one housing. A modular PLC has a CPU with separate I/O modules on a rack or rail, so you can add exactly the inputs and outputs a machine needs.

PLCs replaced panels full of relays and timers. A change that once meant rewiring now means editing a program, and the PLC can tell you which input is missing when a machine stops.

How a PLC runs a program: the scan cycle

The single most useful idea for a beginner is the scan cycle. A PLC does not react to each input the moment it changes. It works in a loop:

One PLC scan cycle
One PLC scan cycle

Two consequences follow. First, the program always works on a snapshot of the inputs taken at the start of the scan, which keeps the logic consistent. Second, a signal shorter than one scan can be missed, which is why fast counting uses dedicated high-speed counter inputs. Scan times are usually measured in milliseconds, and a watchdog stops the CPU if a scan takes far too long, for example because of an endless loop.

The five IEC 61131-3 languages

The international standard IEC 61131-3 defines the programming languages that most PLCs support. Its fourth edition was published in May 2025, and the vendor association PLCopen publishes a readable overview of the standard. Each vendor uses its own names (Siemens calls ladder LAD and structured text SCL, for example), but the ideas are the same.

The IEC 61131-3 languages
The IEC 61131-3 languages
  • Ladder Diagram looks like an electrical drawing: contacts on the left, a coil on the right. It is the language maintenance technicians read, so it dominates machine code.
  • Function Block Diagram wires blocks together and suits analog signal processing and PID control.
  • Structured Text is a text language with IF, CASE and FOR statements. It is much shorter than ladder for maths, loops and handling arrays.
  • Sequential Function Chart organises a program into steps and transitions, which fits machines that move through a fixed sequence.
  • Instruction List was marked deprecated in the 2013 edition, and the 2025 edition no longer lists it among the languages it specifies. You will only meet it in older programs.

A first program: start/stop with a seal-in

Nearly every course starts with the same rung, because it contains most of the ideas you need:

  1. A normally open Start push button and a normally closed Stop push button are wired to two inputs.
  2. The rung examines Start, in parallel with a contact from the Motor output itself.
  3. In series with that, it examines Stop, which is closed in its normal state.
  4. When Start is pressed, the Motor output turns on, and its own contact holds (seals in) the rung after Start is released.
  5. Pressing Stop breaks the rung and the motor drops out.

Because Stop is wired normally closed, a broken wire stops the motor instead of leaving it unstoppable. That habit, making the safe state the one a fault produces, runs through all good PLC code. Our start/stop seal-in walkthrough goes through it rung by rung. After that, most learners move on to timers (TON, TOF and TP explained), counters, comparisons and analog scaling.

Note that emergency stops are not handled by ordinary PLC logic. They are wired through safety relays or a safety PLC designed for the purpose.

Which PLC brand should you learn first?

Siemens, Rockwell Automation (Allen-Bradley), Mitsubishi Electric, Omron, Schneider Electric, ABB, Beckhoff and many CODESYS-based brands all make PLCs. Which one is common depends on the country and the industry, so the practical answer is to read five job adverts for the role you want, in the region you want to work, and count which brand they name.

The good news is that the concepts transfer. Once you have written a seal-in rung, a timer and an analog scaling routine on one platform, the second platform is mostly new menus and new names. If you have no preference, start with Siemens TIA Portal or the Allen-Bradley Micro800, and see our guide to Mitsubishi, Omron, Delta and other brands if your local plants run those.

Do you need hardware?

No. You can learn the whole of the logic in simulation:

  • Siemens S7-PLCSIM simulates S7-1200 and S7-1500 CPUs inside TIA Portal.
  • Connected Components Workbench (CCW) Standard Edition is a free download from Rockwell Automation and includes a demo version of the Micro800 Simulator.
  • CODESYS runs a soft PLC on your PC, and its IEC 61131-3 editors are shared by many brands. See CODESYS for free.

Our free PLC simulators comparison sets out what each one can and cannot do. Hardware becomes useful later, for wiring practice and for the feel of commissioning a real machine.

How to learn PLC programming, step by step

  1. Electrical basics: 24 V DC, sensors, sinking and sourcing inputs (see NPN vs PNP sensors), relay and contactor outputs.
  2. One platform: install it, create a project and run an empty program in the simulator.
  3. Bit logic: contacts, coils, set and reset, edge detection, the seal-in rung.
  4. Timers and counters, used to build real interlocks.
  5. Analog signals: scale a 4-20 mA input to engineering units and compare it to limits.
  6. Structure: move repeated logic into function blocks instead of one long routine.
  7. An operator screen: link an HMI to your tags.
  8. A small project you can demonstrate, such as a conveyor or a tank fill sequence.

At an hour or two a day, most people get through this in about six weeks. How long it takes to learn PLC programming has a week-by-week plan.

What PLC programmers do at work

Job titles vary: controls engineer, automation engineer, PLC programmer, commissioning engineer, automation technician. The work is broadly the same. You write and modify programs, test them against the machine, commission new equipment on site, and find faults when a line stops. Much of a working day is reading other people's code, which is why clear structure and comments matter so much.

Learn PLC programming free on EDWartens

EDWartens runs a full catalogue of complete free courses, and the PLC ones all run in vendor trial or free software with simulators. Good first choices:

Each course has video lessons from independent YouTube creators, credited on the course page, plus written notes, a practice task per module and one final assessment: 15 questions from the whole course, 60% to pass, three attempts, then a 24-hour wait and a fresh paper. You need a free account so your progress is saved. No card, no trial. The free PLC training page lists every PLC course.

The only paid item is the optional EDWartens Certificate of Completion. For these beginner courses it is a small one-off fee, US$8.99. It carries a unique code and QR code that anyone can check at edwartens.com/verification. It is not a Siemens, Rockwell or CODESYS certification, and it is not a university or government qualification.

Take the free course

Questions

Is PLC programming hard to learn?

The basics are not. If you can follow a simple electrical circuit you can read a ladder rung within a day or two. The harder part is structuring larger programs and finding faults on a running machine, which comes with practice on projects.

Which PLC programming language should I learn first?

Ladder logic. It is the language you will meet most often on machines, every major brand supports it, and it is the easiest to troubleshoot online. Add Structured Text once you are comfortable with timers, counters and analog scaling.

Can I learn PLC programming without a PLC?

Yes. Siemens S7-PLCSIM, the Micro800 Simulator in Rockwell's Connected Components Workbench and the CODESYS soft PLC all run your program on a PC. Buy hardware later, once you know which platform you want to work on.

Do I need an electrical background?

It helps but it is not required. You need to understand 24 V DC signals, how sensors and push buttons are wired to inputs, and the difference between sinking and sourcing. Good beginner courses teach these before the first program.

Is there a free PLC course with a certificate?

Yes. EDWartens runs complete free PLC courses in simulation, with an optional paid EDWartens Certificate of Completion after you pass the final assessment. It is not a vendor certification.

Sources

Written by the EDWartens engineering team for general education. Product names are trademarks of their owners; mentioning them does not imply endorsement. Prices and terms of other providers were checked on the date shown and can change.