en:software:qview:qview_6:qcl_library:vt10onchtvar

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

VT10OnChTVar

V = Variables

T = Control functions

The VT10OnChTVar functiomn checks the value of a variable and set a flag if the value changes.
The flag is reset automatically after an adjustable time.

VT10OnChVar (var01, changed)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN SYSTEM /
INPUT /
OUTPUT
var01 F/L Variable to check
OUT GLOBAL changed F Change flag execute
IN SYSTEM time01 L Waiting time before reset flag to change value (msec)

Example

In the example, if the variable 'pippo' changes its value and is activated the 'ofUscita' output.

slTimeRes = 10
VT10OnChVar (pippo, changed, slTimeRes)**
IF changed
	SETOUT ofUscita
ENDIF

Note

  • To be effective, the function should be placed at a point of the application that runs on every round.
  • The flag that signals the change is reset automatically from the function once the set time has passed.
  • Last modified: 2019/08/29 17:01