Configuring a Script Tag

Script tags are one of the standard tag types built into VTS. The script tag type attaches VTS scripting code to another tag (such as any basic I/O tag (analog input, analog output, digital input and digital output), or to a function tag).

The scripting code to be attached to the basic I/O tag or function tag is contained in a module. This module may be used to set the script tag's value as a function of the variables in the tag with which the script tag is associated.

The properties for the script tag type are:

Name The Name property of the script tag is used as a unique identifier for the tag.

Area The Area property for the script tag is used to identify an area that can be used to group tags according to your needs.

 The Area property can be set in the tag properties folder using the Area drop-down list to select existing user-defined areas, or can be set to a new area by typing the area in the Area drop-down list.

Description The Description property for the script tag type is used in tool tips, as well as in the Tag Browser to help you identify each tag.

Help Search Key The Help Search Key property for the script tag is text that can be used to access help topics in the application's help system (see Custom Help Systems).

In Tag Scope The In Tag Scope property for the script tag is the name of the tag within which the scripting code will run.

Launched Module The Launched Module property for the script tag is the name of the module that will be launched within the associated I/O or function tag as identified in the "In Tag Scope" property. This module will be passed two parameters:

 The object value of the tag in which it has been launched; and

 The object value of this module itself.

 The module should be defined in the AppMod.src application file with no special class. Please refer to AppMod.src Root File for a Standard Application for information on AppMod.src.

The tag properties folder for the script tag type is provided by a VTS module called "ScriptConfig". This module can be replaced by redefining it as a Plug-in module in your application (see External Plug-in Modules). The properties menu assumes that each tab in your replacement configuration folder contains the same general information.

The "ScriptCommon" module provides the common routines for the script tag type. This module may also be replaced by a new Plug-in module (see External Plug-in Modules).