Skip to content
Tutorials Center
My learning

Topics

PLC Programming Tutorial

Learn PLC Programming step by step: 37 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is a PLC? Learn what a PLC is, why factories use it instead of a PC or relays, where PLCs are found, and how this course teaches PLC programming with runnable C stand-ins.
  2. 2 PLC Hardware Components Tour the parts of a PLC: CPU, power supply, digital and analog I/O modules, backplane, memory and communication ports, with a runnable C model of module capacity.
  3. 3 The PLC Scan Cycle Understand the PLC scan cycle: input image, program execution, output image, scan time and why rung order matters, with runnable C simulations of a scan.
  4. 4 IEC 61131-3 PLC Languages Meet the five IEC 61131-3 PLC languages (LD, FBD, ST, IL, SFC), the program structure (POU, tasks, resources) and the major PLC brands and software.

Automation Basics

  1. 5 Number Systems and PLC Data Types Learn binary, hexadecimal and BCD, signed integers, BOOL, INT, DINT, REAL and TIME in PLCs, with runnable C stand-ins for bit patterns, overflow and rounding.
  2. 6 Digital and Analog I/O in PLCs Understand PLC digital and analog inputs and outputs, 0-10 V and 4-20 mA signals, raw counts, scaling to engineering units, filtering and wire-break detection.
  3. 7 Sensors and Actuators for PLCs Learn the common sensors and actuators a PLC connects to: proximity and photoelectric sensors, NO and NC contacts, contactors, solenoid valves and motors, with C stand-ins.
  4. 8 PLC Memory, Addressing and Tags Learn how PLC memory is organized, absolute addresses (%I0.0, %Q0.0, %MW10) versus symbolic tags, retentive data, bit and word access, and good naming conventions.

Ladder Logic

  1. 9 Ladder Logic Basics Learn ladder logic from scratch: power rails, rungs, normally open and normally closed contacts, coils, power flow and how a rung is solved, with a runnable C ladder simulator.
  2. 10 AND, OR and NOT Logic in Ladder Build AND, OR, NOT, NAND, NOR and XOR in ladder logic using series and parallel contacts, check them with truth tables and turn them into practical interlocks.
  3. 11 Latching and Seal-In Circuits Learn how PLCs remember: the seal-in (holding) rung, set and reset coils, SR and RS flip-flops, stop priority and power-loss behaviour, with runnable C simulations.
  4. 12 Edge Detection and One-Shot Pulses Learn rising and falling edge detection in PLCs, R_TRIG and F_TRIG blocks, one-shot (OSR) rungs, toggle buttons and the one-scan-pulse rule, with runnable C simulations.
  5. 13 Interlocks and Motor Control in Ladder Build real motor control in ladder logic: permissives, interlocks, forward/reverse starters, hand/off/auto selection, overload handling and alarms, with C simulations.

Function Blocks and Structured Text

  1. 14 Function Blocks Basics Learn PLC functions vs function blocks, instances and their memory, inputs and outputs, Function Block Diagram (FBD), and calling blocks, with runnable C stand-ins.
  2. 15 Structured Text Basics Learn Structured Text, the Pascal-like PLC language: program layout, variable declarations, assignment :=, operators, precedence, type conversion and comments, with C stand-ins.
  3. 16 Structured Text Control Flow Learn Structured Text control flow for PLCs: IF/ELSIF/ELSE, CASE state machines, FOR, WHILE and REPEAT loops, EXIT, arrays and the rule to keep loops short.
  4. 17 User-Defined Function Blocks and Types Write your own PLC function blocks, structures (UDTs), enumerations and arrays: a reusable Motor block with faults and feedback, design rules and testing, with C stand-ins.
  5. 18 PID Control Basics Learn PID control for PLCs: setpoint, process value and output, the P, I and D terms, anti-windup, tuning basics and a runnable C simulation of a heated tank.

Timers, Counters and Sequences

  1. 19 PLC Timers - TON, TOF and TP Learn how PLC timers work: on-delay (TON), off-delay (TOF), pulse (TP) and retentive timers, with timing diagrams, Structured Text and a runnable C simulation.
  2. 20 PLC Counters - CTU, CTD and CTUD Learn PLC counters: count-up (CTU), count-down (CTD) and up-down (CTUD) blocks, reset and load pins, edge triggering, plus runnable C stand-ins that model them.
  3. 21 PLC Edge Detection and One-Shots Learn how PLCs detect rising and falling edges with R_TRIG, F_TRIG and one-shot contacts, why they matter for buttons and counters, with runnable C models.
  4. 22 PLC Sequences and State Machines Learn to program machine sequences in a PLC with state machines: step variables, transitions, actions, SFC concepts, and a runnable C model of a two-cylinder cycle.

HMI and SCADA

  1. 23 HMI Basics and Screen Design for PLCs Learn what an HMI is, how it talks to a PLC through tags, how to design clear operator screens with colors and navigation, and model tag scaling in runnable C.
  2. 24 SCADA Architecture, Tags and Polling Understand SCADA systems: servers, clients, drivers, tag databases, polling versus subscription, historians and redundancy, with a runnable C polling model.
  3. 25 Alarms, Trends and Data Logging in Automation Learn alarm design for PLC and SCADA systems: limits, deadband, on-delay, acknowledgement, priorities, trends and logging, with runnable C models of an alarm state machine.

Communication Protocols

  1. 26 Fieldbus and Industrial Networks Overview A map of industrial communication for PLCs: serial buses, fieldbuses, industrial Ethernet, the automation pyramid, determinism, topologies and a runnable C frame and CRC model.
  2. 27 Modbus RTU and Modbus TCP for PLCs Learn Modbus: coils and registers, function codes, RTU and TCP frame formats, exceptions and addressing pitfalls, with runnable C code that builds and parses frames.
  3. 28 OPC UA and MQTT for PLC Data Learn how OPC UA and MQTT move PLC data to SCADA, MES and the cloud: nodes, browsing, subscriptions, topics, QoS, retained messages, with runnable C models.
  4. 29 PROFINET, EtherNet/IP and I/O Mapping Learn industrial Ethernet for PLCs: PROFINET, EtherNet/IP and EtherCAT, cyclic I/O exchange, device addressing and I/O mapping, with runnable C models of process images and bit packing.

Safety and Troubleshooting

  1. 30 PLC Safety Fundamentals - E-Stop, SIL and Safe Design Learn machine safety basics for PLC engineers: risk assessment, emergency stop, interlocks, safety PLCs, SIL and PL, fail-safe design and a runnable C model of a two-channel monitor.
  2. 31 PLC Fault Handling, Watchdogs and Safe States Learn to design PLC fault handling: fault latching, reset logic, step timeouts, sensor plausibility, the scan watchdog, startup states and a fault log, with runnable C stand-ins.
  3. 32 PLC Troubleshooting Methods and Diagnostics Learn a systematic way to troubleshoot PLC systems: power, I/O, wiring, online monitoring, forcing, diagnostics buffers, network checks and common faults, with runnable C stand-ins.
  4. 33 PLC Commissioning and Good Programming Practice Learn how to commission and maintain PLC programs: scan cycle pitfalls, structure, naming, scaling, testing with simulation, FAT and SAT, version control, with runnable C stand-ins.

Projects and Practice

  1. 34 PLC Project - Traffic Light Controller Build a traffic light controller in PLC style: requirements, I/O list, state machine, timers, pedestrian button, night mode and fault flashing, with a runnable C simulation.
  2. 35 PLC Project - Tank Level Control with Pumps and Alarms Build a tank level controller: analog scaling, hysteresis on/off control, duty/standby pump alternation, dry-run protection, alarms and a PID idea, with runnable C simulation.
  3. 36 PLC Project - Conveyor Sorting Line with Shift Register Build a conveyor sorting line: part detection, size classification, tracking parts with a shift register, diverter timing, counters, jam detection and a runnable C simulation.
  4. 37 PLC Programming Practice Exercises and Review Practice PLC logic with graded exercises on timers, counters, edges, state machines, scaling and alarms. Each exercise has a runnable C model and hints for your own PLC code.