R_TRIG is a function block in the CODESYS Standard library that detects a rising edge of a boolean signal. A declared instance is called with the boolean signal to be checked connected to the CLK input. The Q output is TRUE when a rising edge is detected.
| Language | iec 61131 3 |
|---|---|
| Code | R TRIG |
| Syntax | RTRIGInst(CLK := VarBOOL1); |
| Dialect | CODESYS |
| Name | Data type | Description |
|---|---|---|
| CLK | BOOL | Input: boolean signal to be checked |
| Q | BOOL | Output: TRUE: rising edge detected |