Instruction that allows a rule to be repeatedly sent to execution every "period" imposed. The rule must be written in an appropriate file beginning with the metacommand $RULE_PERIODIC. This rule has lower priority than synchronous rules and, as a result, the period may fluctuate (gitter).
Syntax |
rule_periodic (i32 period, stru_int struct) |
---|---|
period |
Time interval between two successive executions [1 -:- 1,000,000 ms] |
struct |
Structure of type stru_int containing related information (optional) |
Validity |
Rule, Task |
Note |
Instruction must be called only once. Instruction must be called again to change the period. If the instruction is called with period value 0 it is disabled |
You want to create a task that switches the state of a digital output every 5 minutes: In the file mytask.r3: In the task:
|