en:software:qview:qview_6:qcl_library:ir10edgtminp

This translation is older than the original page and might be outdated. See what has changed.

IR10EdgTmInp

I = Input

R = Reading functions

The IR10EdgTmInp 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 off state (value 0) at the active state (value 1);
  • the function sets the flag on the falling edge whenever the digital input transitions from the active state (value 1) at the off state (value 0);
  • flags that pertain to both sides are reset automatically by the function after a settable time (timeReset).

IR10EdgTmInp (Input, FronteUp, FronteDw, timeReset)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
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
IN CONST SYSTEM timeReset L Waiting time before reset capture flag fronts (msec)

Example

In the example the “ofUscita” output is set on the rising edge of the input “Input” and it's reset on the falling edge of the same entrance.

IR10EdgTmInp (Input, FronteUp, FronteDw, timeReset)

IF FronteUp
        SETOUT ofUscita
ENDIF
IF FronteDw
        RESOUT ofUscita
ENDIF

Note

  • In order to be effective, the function should be placed at a point of the application that runs on every logical round.
  • Front capture flags remain in the State for the 'timeReset' time, then the function automatically resets them.
  • Last modified: 2019/08/29 17:01