en:software:qview:qview_6:qcl_library:ir10edgeinp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:software:qview:qview_6:qcl_library:ir10edgeinp [2017/01/20 11:29] – [Esempio] qem103en: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/OUT^VARIABLE TYPE^EXAMPLE NAME^DIM^^
 +|  IN  |  INPUT SYSTEM  |  Input  |  F  |Digital input or variable you want to "capture" the front|
 +|  OUT  |  GLOBAL  |  FronteUp  |  F  |Flag on the rising edge|
 +|  OUT  |  GLOBAL  |  FronteDn  |  F  |Flag on the falling edge|
 +
 +=== Example ===
 +
 +
 +** **In the example the "ofUscita" output is set on the rising edge of the input "Input" It is reset on the falling edge of the same input.
 +
 +
 +
 +**IR10EdgeInp ( Input, FronteUp, FronteDn)**
 +<code QCL>
 +IF FronteUp
 +    FronteUp = 0
 +    SETOUT ofUscita
 +ENDIF
 +IF FronteDw
 +    FronteDw = 0
 +    RESOUT ofUscita
 +ENDIF
 +</code>
 +
 +
 +=== 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.