VC10Copy
V = Variables
C = Calculation functions
The VC10Copy function copies the content of one variable to another one based on a variable that sets its direction.
IMPLEMENTATION
VC10Copy (dir, val01, val02)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | CONST/GLOBAL | dir | F/L | Copy direction variable |
IN/OUT | SYSTEM/GLOBAL | vala | F/B/W/L/S | First variable |
IN/OUT | SYSTEM/GLOBAL | valb | F/B/W/L/S | Second variable |
Direction table
dir = 1 | vala → valb |
dir = 0 | valb → vala |
Example
Copy variable A to variable B
IF gfCopy gfCopy = 0 vala = 1000 valb = 5000 dir = 1 VC10Copy (dir,vala, valb) ENDIF
Example
Copy variable B to variable A
IF gfCopy gfCopy = 0 vala = 1000 valb = 5000 dir = 0 VC10Copy (dir,vala, valb) ENDIF
Note
-
This function is usually used, for example, to temporarily copy a value to a supporting variable and then compare it at the end of an operation.