External Plug-in Modules

PLUGINS class modules (also discussed in AppMod.src Root File for a Standard Application) are modules that are dynamically added to a tag or other module at runtime. These modules may be replaced by application-specific code, and allow new methods to be added to standard code without requiring its modification. There are two methods to allow the use of plug-in modules. The manner in which these methods are handled are similar to the way the external tag drawing methods are handled.

The first method is to specify a variable class in the host module (i.e. the destination module where the plug-in is to be added) called PLUGINS.

[ (PLUGINS) 

    Shared ConfigFolder = "AnalogInConfig"; 

Host modules must be either tag or service modules. The value of any variable in VTS that has the same name as these plug-in class variables is added to the host module. If the host module's PLUGIN class variable has a default value, it will be used to specify the name of the module or variable in VTS that gets assigned to the host's variable. The host's PLUGINS class variables must be Shared variables.

The second method is to create PLUGINS class variables in the plug-ins modules that specify the host module to which the plug-in module is to be added.

[ (PLUGINS) 

    Shared AnalogInput = "AnalogIn"; 

If these variables have a default value, the default value is used as the name that is added to the host module. Variables in the plug-in module must be shared.