Instruction that allows a rule to be sent to execution at the set frequency. The rule must be written in an appropriate file beginning with the metacommand $RULE_TIME. This rule has higher priority than the synchronous rules consequently the code written in it must be the minimum necessary!
Syntax |
int_timer (i32 freq, stru_int struct) |
---|---|
freq |
Execution frequency of the asynchronous timed rule [16 - 5000 Hz] |
struct |
Structure of type stru_int containing related information (optional, if omitted disables function) |
Validity |
Rule, Task |
Note |
Instruction must be called only once. Instruction must be called again to change the frequency. If the instruction is called with frequency value 0 or without the supporting data structure is disabled |
Example usage: In the file mytask.r3 :
In the main program:
|