Tag Configuration Folders

Every tag instance will require a user-configured name, area and description at a minimum. Typically, a range of other parameters will also exist.

In a Context-derived type, the configuration panel for these parameters is simply a list:

Default configuration panel for a Context-derived type

If there are more parameters than space in the default dialog, a scroll bar will be added. Every parameter is configured as a text field even if a set of radio buttons, a check box, a spin box or a color selector might be more appropriate.

You might prefer to give your developers a configuration panel that more closely resembles one from a native VTScada type:

Configuration panel for an Alarm Priority type.

VTScada provides the basic structure for the configuration panel and the necessary code behind it. You need only build upon that by creating a module that lays out the data input fields for each tab and ensure that those are linked to properties within your tag.

The code for the configuration panel is typically stored in file named for the tag and with the letters "Cnf" added to signify "configuration": CustomTypeCnf.SRC. There are two ways to declare that file, but note that in both cases, the assigned name must be "ConfigFolder".

1. For those who are modifying the source of a user-defined type, it is advisable to declare the configuration module within the user-defined type's variables section:

ConfigFolder Module "CustomTypeCnf.SRC";

2. For VTScada tags, the configuration file is typically declared in two places for purposes of flexibility: First, in your application by adding a line to the [PLUGINS] class of your AppRoot.SRC file where you will assign a variable name for the module. Second, within the tag's source code file, using that variable name instead of directly referencing the configuration file.

For example, in the AppRoot.src file of the application, add the following to the [PLUGINS] class:

[ (PLUGINS)Custom Filtering of the Sites List and Map
    CustomConfig       Module "CustomTypeCnf.SRC";
]

In the file CustomType.SRC, add the following to the Variables declaration section of the module.

[ (PLUGINS)
    Shared  ConfigFolder  =  "CustomConfig";

These two declarations provide VTScada with everything it needs to find your tag's configuration folder. In the next few topics, you will see the code for a sample configuration folder.