Creating and using a global-object
How to create a global-object:
Select a folder in the project in which you want to create the global-object.
In menu File or from the context menu of the folder, select New and the command Global-Object.
In the dialog, enter a name under File Name.
If possible, do not enter invalid characters (e.g. umlauts, blanks, the character –, numbers at the start) because the file name is automatically used as global-object-name and this name must be a valid →IEC-identifier. But if you need such invalid characters in the file name, delete or replace the invalid characters in Global-Object-Name before you click Finish.
It is possible to change the global-object-name at any time later.Afterwards click Finish.
Result::The global-object (with icon ) is displayed in the views with projects and resources.
The global-object is opened in the →graphical editor.
Create or edit the content, e.g. the →global variables. Details: See"Actions within the global-variables-editor".
In order to use the global variables within the application, insert the INCLUDE_GLOBALS directive within the ST-object (in the ST-program) or in the PLC-object (in the resource or configuration). See "Declaration of global variables in global-object and its usage in ST" for the required directive.