VT10OnChVar
V = Variables
T = Control functions
The VT10OnChVar function checks the value of a variable and set a flag if the value changes.
IMPLEMENTATION
VT10OnChVar (var01, changed)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | SYSTEM / INPUT / OUTPUT | var01 | F/L | Variable to check |
OUT | GLOBAL | changed | F | Change execute flag |
Example
In the example, if the 'pippo' variable change its value output is activated the 'ofUscita' output.
VT10OnChVar (pippo, changed)
IF changed changed = 0 SETOUT ofUscita ENDIF
Note
-
To be effective, the function should be placed at a point of the application that runs on every logical round.
-
The flag that signals the change must be reset externally to the function.