Most PLC books teach one brand. Then you meet a plant that runs two, and half of what you learned stops transferring.This book fixes that by teaching the standard first - IEC 61131-3, the languages every modern controller implements - and then writing the same working logic in both major dialects, side by side, with the divergences named honestly rather than smoothed over.You build a real production line as you go:• The controller itself - the scan, the process image, tasks and scan time - and the three environments you can follow along in.• All four working languages on one job: Structured Text, Ladder, Function Block Diagram, and Sequential Function Chart, each taught on the same capper cycle so you can see exactly what each notation is good for, and choose on purpose instead of by habit.• Data types, variables, scope and memory in three dialects - including the naming rule that makes a controller tag survive its trip out to SCADA.• A reusable device library (valve, motor, analog input, alarms), a program architecture with real task budgets, and the PackML state model in code.• The actual line: the Filler with analog scaling and closed-loop dosing, the Capper and a CIP sequence, and the Rockwell-side pack island with the fill-to-pack handshake.• The professional practice nobody teaches: HMI-facing tags and alarms, simulation, testing, commissioning, documentation, archiving - and exactly where your logic stops and the safety system starts.Every hands-on section runs in the **free CODESYS lab**, so you can follow the whole book without buying a licence - with the Siemens TIA Portal and Rockwell Studio 5000 equivalents shown alongside. Ladder is drawn as real rungs, not screenshots. Every chapter ends with review questions (answers in the back), and a capstone assembles the entire line program end to end.Written by a controls engineer who works in both worlds, for the engineer who wants code a stranger can still maintain at 3 a.m.Part of The Modern PLC Series: one plant, four layers. This is the logic - the code that generates the data. The wires that carry it are in *Industrial Network Protocols in Practice*, the model that gives it meaning in *Industrial OPC UA in Practice*, and the defense of the whole site in *Industrial Cybersecurity in Practice*.