Declaring a Local Variable
Step | Action |
---|---|
1 |
In an open XG5000 Project, open the Local Variables file in the desired program or task. This example shows a program called "new".
|
2 |
Choose the Variable Kind for the local variable.
|
3 |
Enter a variable name in the Variable column. This example has the variable name “LocalTest1”.
|
4 |
Choose a Type for the local variable.
|
5 |
An Address can be entered if this local variable accesses a direct variable address. This example shows the variable accessing direct variable Address “%MX1”.
|
6 |
An Initial Value can be given to the variable. This is the value of the variable on first scan of the CPU. This example shows an initial value of FALSE.
|
7 |
If the variable value is to be retained on power cycle of the CPU, check the Retain box.
|
8 |
The EIP/OPC UA column can be ignored for the XMC.
|
9 |
Add a Comment to describe the variable.
|
LM109-2