Note
Procedures can be used in actions in Global Script and Graphics Designer.
In order to use a global tag defined in Global Script in an action in Graphics Designer, observe
the following:
In order that access can be made to the tag, it is necessary to call in the procedure in which
the tag is defined.
In order to use a global tag in picture-independent actions in Global Script, observe the
following:
In order that access can be made to the tag, at least one procedure in the module containing
the tag must be called in at least one global action.
Procedure - Action Restrictions
Global procedures valid for the entire project can only be created in Global Script. Graphics
Designer
can only be used to create picture-specific procedures and call in global procedures
in actions. Picture-specific procedures in Graphics Designer are defined in the declaration area
of an action.
A procedure is not executed without an action.
File Name and Procedure Name
The procedure name is entered in the first line of the procedure code. The procedure is
displayed in the navigation window and called in actions under this name. Procedures do not
have a file name of their own but are stored in a module.
Module names are assigned in the editor's navigation window. Use the "Save As" command
to save a module under another name in the project directory.
Since procedures in Global Script are valid for the entire project, procedure names must always
be unique. Module names can be used more than once within a project, e.g. in different
subdirectories or stored separately in the standard and project directories.
Displaying Procedures and Modules
If you save a module that contains at least one syntactically incorrect procedure, this will
be displayed in the navigation window with this adjacent symbol.
NOTICE
If a module contains a syntactically incorrect procedure, the module can no longer be loaded.
Procedures can no longer be called from the module.
If you save a module that contains only syntactically incorrect procedures, this will be
displayed in the navigation window with this adjacent symbol.
VBS for Creating Procedures and Actions
1.9 Creating and Editing Procedures
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
41