Creating a new simple variable |
First steps -> Variables -> Variables -> Creating a new simple variable |
Show all Hide all |
Variable new
.The dialog for creating variables opens now.
With these settings, you would create a single
variable. For creating multiple variables of the same type, some
changes in the Array
Settings
are necessary.
Finish
.The variables now are added to the variable list in the detail view of the project manager. All properties of our datatype Temperature sensor are pre-defined in the variables. The properties of the selected variable can be checked and changed in the properties window.
As we changed the array dimensions, not only one but four variables have been created. With our settings, these variables automatically get their addresses, i.e. we only have to define a start offset. zenon calculates the remaining addresses automatically.
Variables
.Temp
.This results in the following addresses:
Temp[1,1] |
Offset 11 |
Temp[1.2] |
Offset 13 |
Temp[2.1] |
Offset 15 |
Temp[2.2] |
Offset 17 |
The property last used offset accordingly reads: 18/7 (Offset 18 / Bit 7).
The variable list in the detail view of the project manager now should have the following entries.
Info |
Always use logical names for the process variables in order to keep a better overview. |