Define variable
This function "define variable" in the ScriptWizard enables declaring new variables, which can be used in the ScriptWizard.
Structure
The following paragraphs list all fields and options of the function "define variable" and explain how to use them.
Variable name
In this text field you can enter the name for a new variable, which is used for accessing it. (e.g. "MyVariable").
-
Only 0-9, a-z, A-Z and "_" (underscore / underline) can be used
-
Each variable name must be unique and can only be use for one single variable
When defining the name of a variable the following 2 restrictions need to be taken into account::
Variable type
In this drop-down list all variable types available in WinCC OA are listed. Select a type in the list to define the type of a variable for example: string, int, bool, float, dyn_string, etc.
Depending on which type you select the variable can store different values. For more information please refer to data type.
Initial value
The initial value is the variable's value directly after definition.
When defining the initial value the variable type must be taken into account. For more information about the variable type please refer to data type.
Help
For more information about the function "define variable" please refer to the WinCC OA 3.11 online help by clicking on the push button "Help".
Apply
Click on the push button "Apply" and the new variable is declared. This defined variable is then applied to the current function.
Cancel
Click on the push button "Cancel" and new variable is rejected. A new function can be then selected.