Programming Techniques
Common ways of combining instructions, step by step.
- Seal-inA coil holds itself on through its own contact until Stop breaks the rung.
- InterlockEach output blocks the other, so only one can be on.
- Latch and resetAn alarm latches on and resets only after its cause has cleared.
- Fail-safe stopA Stop input that is on while healthy, so a broken wire also stops.
- Act once per pressAn ONS turns a held input into one scan of power.
- Debounce an inputA TON passes an input on only after it has stayed on for a set time.
- FlasherTwo TONs take turns, so an output blinks on and off.
- Delay on and delay offA TON waits before starting; a TOF keeps running after stopping.
- Batch counterA CTU counts to a preset, then a RES starts the next batch.
- Up/down countingA CTU and a CTD on one counter tag track parts inside.
- First-scan setupSystem_Scan_First runs setup rungs once after the PLC starts.
- Step sequence in ladderA step number with EQU and MOV, and when to use an SFC instead.
- Alternating pumpsA toggle bit swaps the lead pump each time demand ends.
- Rung order mattersA rung above the one that writes a tag sees it one scan late.
- Scale and compareSCALE an analog input and compare it with a deadband.