Global variable not valid after (main) program end (V.P.)

The identifier "V.P. ....” permits the definition of self-defined variables which are detected (global) at the current program level and at all other program levels but are not valid after main program end. V.P. variables may be assigned values in REAL format.

V.P.<FREE_DEF>                                                         global variable not program end

<FREE_DEF>

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

Programing Example

prg_example

Global variable not valid after (main) program end (V.P.)

Create the variable V.P.VAR_5 and initialise with the value 20. Then linear interpolation in X direction is carried out with the value of this variable, i.e. 20.

:

#VAR

  V.P.VAR_5

#ENDVAR

:

N10 V.P.VAR_5 = 20

N20 XV.P.VAR_5

:

or

:

#VAR

  V.P.VAR_5 = 20

#ENDVAR

:

N20 XV.P.VAR_5

:

The maximum number of self-defined variables that are not valid after program end is fixed [6]-6-21. At program start, all names and values of V.P. variables are deleted.