Declaring a Gobal Variable

Step Action
1

In an open XG5000 Project, open the Global/Direct Variables file in the Project window.

2

Choose the Variable Kind for the global variable.

3

Enter a variable name in the Variable column. This example has the variable name “GlobalTest1”.

4

Choose a Type for the global variable.

5

An Address can be entered if this global variable accesses a direct variable address. This example shows the variable accessing direct variable Address “%MX0”.

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-1