Glossary · R_TRIG
What is 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.
It is needed because the program runs every scan: write IF LSH THEN Count := Count + 1; END_IF and the counter increments every scan the switch stays closed, hundreds of times. The edge makes the event count once.
F_TRIG is its falling-edge twin. Siemens SCL calls it R_TRIG too; Rockwell uses ONS or a contact edge instruction.
Related terms
- Function block (FB)
- A unit with inputs, outputs and internal memory that persists between scans, used by declaring an instance of it.
- Scan cycle
- The loop a PLC repeats thousands of times a minute: read the inputs, run the program top to bottom, write the outputs.
- One-shot
- Logic that performs an action once when an event happens, instead of every scan the condition stays true.