Vai al contenuto

Creating a New Global Variable

  • In order to create a new global variable select a Global variables group from the project tree then choose the appropriate voice from the menu Project>New Object>New variable (see Paragraph 5.7.4).
  • GF_ProjectVX code will show you a dialog box where you must enter the name of the variable (remember that some characters, such as ‘?’, ‘.’, ‘/’, and so on, cannot be used: the variable name must be a valid IEC 61131-3 identifier).
  • Specify the type of the variable either by typing it or by selecting it from the list that GF_ProjectVX code displays when you click on the Browse button.
Creating a New Global Variable-image_0 Creating a New Global Variable-image_0If you want to declare an array, you must specify its size. Creating a New Global Variable-image_0
  • You may optionally assign the initial value to the variable or to the single elements of the array.
Creating a New Global Variable-image_0If you create a new mapped variable, you are required to specify the address of the variable during its definition. In order to do so, you may do one of the following actions:
  • Click on the button to open the editor of the address, then enter the desired value.
Creating a New Global Variable-image_0 Creating a New Global Variable-image_0
  • Select from the list that GF_ProjectVX code shows you the memory area you want to use: the tool automatically calculates the address of the first free memory location of that area.