< PLC
Logic is integral to the programming of PLCs.
Logic gates
- And gate
- Or gate
- Nor gate
- Nand gate
Programming types
- Ladder logic - simplified representation of electronic schematics
Common PLC functions
Inputs
- I (Inputs) - These bits represent the connection to any external control input device wired to the PLC, including switches, buttons and motion sensors.
Outputs
- O (Output) - Each output bit can only be used as an output once.
Internal bits
Internal bits make possible almost limitless necessary logical constructs to be made.
Latches

Ladder logic symbol
(normally closed)
(normally closed)
Holds an electrical function on. A momentary push-button, output (from a timer or counter) or an internal bit are capable of triggering a latch. Latches have the same reference as the output on the same rung. Ideally, a latch must be foolproof with an emergency stop from an input. Latches represent virtual relays.
Timers
- TON (Timer on) - once powered waits until its preset time to turn on the output.
- TOF (Timer off) - turns on when powered, then turns off when the preset time is reached
- RTF (Retaining timer) - are potentially dangerous as they keep count even if the PLC is reset.
Counters
- CTU (Counter up) - Every time this counter gets continuous power, this counter counts up. Once a function is reached it outputs.
- CTD (Counter down) - Similar to CTU, except this counts down.
Sequencers
Sequencers are capable of using internal (binary) logic bits to shortcut repetitive ladder logic.
See also
- Design and implementation of PLC systems
- Topic:Automation engineering
This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.