Beginners assume their program reads the live wires. It doesn't. At the start of every scan the CPU takes a photograph of all inputs — the process image — and your code reads the photo, not reality. Understand that one fact and a whole class of "impossible" bugs disappears.
Three things below: a real push-button (the wire), the CPU's process image (a photo it refreshes once per scan), and the lamp your logic drives (%Q0.0 := %I0.0). Press ⏸ Pause scan, then hammer the button — notice the photo and the lamp don't move. They only catch up when you ⏭ Step the scan and a new photo is taken.
💡 This is why a 5-millisecond button blip can be missed entirely: if the wire goes high and low again between two photos, the CPU never sees it. It's also why your logic is stable — every rung in one scan reads the same consistent snapshot, even if the real input flickers mid-scan.
Every tag sits in a memory area, and the letter tells you which. You'll mostly use three. Tap each to see what it's for — and notice the pattern: %, area letter, optional size letter (X bit, B byte, W word, D dword), then byte.bit.
Old PLC code was a wall of %I0.0, %M10.2 — you had to remember what each address meant. Modern TIA practice is to give every tag a name in the PLC tag table and write logic against the name. The address still exists underneath, but you stop hand-managing it.
%Q0.2 := %I0.0 AND NOT %I0.1; // what are 0.0 and 0.1 again? // move a wire → hunt every address
"Conveyor" := "StartPB" AND NOT "StopPB"; // reads like a sentence // re-map a tag once, code is untouched
The PLC tag table is the single place that maps a name like "StartPB" to an address like %I0.0. Change the wiring? Edit one row. Every rung that used the name just keeps working.
A sensor pulses TRUE for about 2 ms. Your scan time is 6 ms. Your code sometimes never reacts to the pulse. Why?