Glossary
What is One-shot?
Logic that performs an action once when an event happens, instead of every scan the condition stays true.
Built with an R_TRIG edge detector, or by comparing the current state with a copy held from the previous scan. Used to increment a counter, send a message, log an event or start a step.
Forgetting the one-shot is the most common PLC programming mistake, and the symptoms are a counter jumping by hundreds or duplicate messages filling the event log.
Related terms
- Rising edge detection (R_TRIG)
- A block whose output Q gives a one-scan pulse at the moment input CLK goes from false to true.
- Scan cycle
- The loop a PLC repeats thousands of times a minute: read the inputs, run the program top to bottom, write the outputs.