Instruction to send a rule into execution on the variation edge of a digital input that can generate interrupts. The rule must be written in an appropriate file beginning with the metacommand $RULE_INP. This rule has higher priority than the synchronous rules, consequently the code written in it must be the bare minimum!
Syntax |
int_inp (i32 numInp, stru_int struct [, i32 riseE=1] [, i32 fallE=0]) |
---|---|
numInp |
Number of the input on which to observe the change |
struct |
Structure of type stru_int that contains the related information (optional, if omitted disables the function) |
riseE |
Variation on the rising edge (optional, default 1) |
fallE |
Variation on the falling edge (optional, default 0) |
Validity |
Rule, Task |
Note |
Instruction must be called only once. If the instruction is called without the supporting data structure, it is disabled |
Example of use:
Creation of the asynchronous rule (task2.r3): |