The Tag Variables Section
The tag variables section follows the parameters and is enclosed in square brackets [ ].
This section declares (and in some cases, initializes) local variables, constants, and modules related to the tag. The following is a list of items commonly declared:
- Required variables, such as Root and Value
- Other local variables such as RawValue, RawTS, DisplayAddress, and SitePoint
- Module declarations such as Refresh, NewData and Alarms
- Plugins declarations such as the module for the configuration folder and the common (pop-up menu) module.
- Graphics declarations for VTScada widgets that will be available to this tag.
- Group membership declarations such as "Numeric" and "Loggers".
- Constant declarations including parameter constant definitions, help ID values, and NumTagFiles.
The module, Configuration, is a legacy module. While never used in modern tags, it will still be recognized if present. If you name one of your modules "Configuration", VTScada will attempt to use it as a configuration panel and not as you intended.
Follow the instructions in Tag Configuration Folders and do not name any module within your tag "Configuration".
[
Constant DrawLabel;
Constant NumTagFiles = 16;
Constant #IS_CONTAINER = True { Show these tags in tag browser tree };
Constant #CAN_EDIT_TYPE = True { Can be edited by tag type editing tools };
{ The next block of constants defines the offset into the parameter list,
starting from 0, for each of the parameters }
Constant #Name = 0;
Constant #Area = 1;
Constant #Description = 2;
Constant #HelpKey = 3;
Constant #Property1 = 4;
Constant #Property2 = 5;
Constant #Property1_Comment = "";
Constant #Property2_Comment = "";
[ (GROUPS)
Shared Container { We are a container tag };
]
{ List of draw methods for this tag type }
[ (GRAPHICS)
Shared DrawAlarmList;
Shared AlarmPriorityIndicatorBox;
Shared AlarmPriorityIndicator;
Shared DrawHDV;
Shared AlarmList = "LSAlarmList";
Shared SiteDetails = "LSSiteDetails";
Shared GenericSiteDraw;
Shared StationDraw = "LSStationDraw";
Shared TagListDM;
]
Root { This variable must be defined and must contain
the instance of this module as its value };
CustomMapIconName { The name of the custom icon to use on a map };
LatitudeValue { Evaluated location of this site };
LongitudeValue { Evaluated location of this site };
ConnectorColorValue { Evaluated color of this connector };
Refresh Module { Subroutine which will be called by the
tag parameter configuration tools to
notify this tag when on-line changes to the
parameters are made. };
Value { Return value for the tag - Invalid };
]