Global cross-channel variable (V.I.)
The purpose of a “V.I.” identifier is to define user-generated names for variables that can be used cross-channel. These variables are of the REAL64 type which is fixed.
Properties:
- Variables must be declared in a #VAR / #ENDVAR block. Initialisation can also take place within the block.
- A declaration without an assigned value (initialisation) can be executed any number of times. Even if the variable is already declared.
- A declaration with an assigned value is only permissible if the variable does not exist yet.
- The NC command #DELETE V.I.Name deletes the variable "V.I.Name" regardless of which channel the variable was created from and when.
- The NC command #DELETE ALL [V.I] deletes all declared V.I. variables regardless of which channel the variable was created from and when.
- The read, write or delete access to an unknown variable which may have been deleted is acknowledged by the error message ID 20392.
![]() | A CNC reset in the channel does not delete the V.I. variable. |
Condition:
The P-CHAN-00521 parameter must make sufficient memory space available. At the same time, the parameter P-CHAN-00522 must define the maximum number of V.I. variables.
The parameter P-CHAN-00525 can be used to define which channel is responsible for handling the V.I. variables of a channel; see parameterisation example. If this parameter is not set, the first channel is responsible for this. The entered channel is responsible for all requests, such as definitions, value changes and deletion of V.I. variables.
Programming Example
Declaration, access and deletion of V.I. variables
Example for parameterising a V.I. server
Example
The initial situation is a 2-channel system where the second channel is responsible as the server for V.I. variables.
Parameterising channel 1:
Parameterising channel 2:
