Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
en:software:qview:qview_6:qcl_library:ir10edgeinp [2017/01/20 11:54] – qem103 | en:software:qview:qview_6:qcl_library:ir10edgeinp [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== IR10EdgeInp ====== | ||
+ | **I = **//Input// | ||
+ | |||
+ | **R = **//Reading functions// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | The IR10EdgeInp function __detects the rising edge of a digital input__. | ||
+ | |||
+ | In particular: | ||
+ | |||
+ | *the function sets the flag on the rising edge whenever the digital input transitions from the incative (value 0) to active state (value 1); | ||
+ | *the function sets the flag on the falling edge whenever the digital input transitions from the active (value 1) to inactive (value 0). | ||
+ | |||
+ | |||
+ | ===== IMPLEMENTATION ===== | ||
+ | |||
+ | |||
+ | **IR10EdgeInp (Input, FronteUp, FronteDn)** | ||
+ | |||
+ | Parameters | ||
+ | ^IN/ | ||
+ | | IN | INPUT SYSTEM | ||
+ | | OUT | GLOBAL | ||
+ | | OUT | GLOBAL | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | |||
+ | ** **In the example the " | ||
+ | |||
+ | |||
+ | |||
+ | **IR10EdgeInp ( Input, FronteUp, FronteDn)** | ||
+ | <code QCL> | ||
+ | IF FronteUp | ||
+ | FronteUp = 0 | ||
+ | SETOUT ofUscita | ||
+ | ENDIF | ||
+ | IF FronteDw | ||
+ | FronteDw = 0 | ||
+ | RESOUT ofUscita | ||
+ | ENDIF | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Note === | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | * The function should be placed at a point of the application that runs on every round makes sense in order to be effective. | ||
+ | * Front capture flags once set remain in the State to set until it is reset outside the function. |