Global, valid (main) program global (V.S.)

The code "V.S. ....” permits the definition of self-defined variables which retain the same names and the last values assigned at all program levels and all following (main) HC programs. After RESET, these variables also remain valid. The values of the variables can only be changed by overwriting. The variables themselves can only be deleted by #DELETE or a controller restart. V.S. variables may be assigned values in REAL format.

V.S.<FREE_DEF>                                                         global variable valid after program end


whereby FREE_DEF is a name chosen arbitrarily. It may consist of any number of characters (excluding blank characters, tabulators, comments, comparison operators, mathematical operators, square brackets).

Programing Example


Global, valid (main) program global (V.S.)

Creating and initialising the array variable V.S.VAR[5]. Then linear interpolation in X direction is carried out with the variable V.S.VAR[4], i.e. 20.



V.S.VAR[5] = [5,10,10,15,20]



N20 XV.S.VAR[4]


The maximum number of self-defined global variables is fixed [6]-6.22.