Topology > I/O Devices > Import Variable Tags from an External Data Source > TagGen XML Template | Topology

TagGen XML Template

The TagGen template is an XML file that uses proprietary tags and attributes to specify the fields of input and output databases, and define filters and transformation rules that create tags from existing database fields.

The basic structure of the XML file is as follows:

<?xml version="1.0"?>
<template>
<param name="parameter">
</param>
<input name="variable" file="variable.dbf">
</input>
<output name="trend" file="trend.dbf" filter="">
</output>
</template>

This outline template specifies no parameters, takes input from the variable.dbf database and outputs the results to the trend.dbf database. The <template> tag is the root tag of the template document and need to be present.

Within the <template> tag are three sections:

Curly braces are usually used for substitutions to replace pre-defined texts with tag properties. To use curly brace characters as normal characters, use double curly braces which will be exceptionally converted to singular ones to express curly braces. Round brackets are not regarded as special characters when used in tags other than <calculator> tag.

Example

<output name="digalm" file="digalm.dbf" filter=" ( '{variable.alarminfo1}=VJA' OR '{variable.alarminfo2}=VJA' ) AND '{variable.type}=DIGITAL'" desc="Generate digital alarm tags from input digital variable tags">
	<field name="tag">{variable.name}_ALARM</field>
	<field name="name">{variable.name}_ALARM</field>
	<field name="var_a" key="true">{variable.name}</field>
	<field name="taggenlink" load="true">{parameter.IODevice}</field>
	<field name="comment">{{Testing1}}</field>
</output>

Proprietary tags used in the template are described in XML template tags. See Sample XML Templates for more comprehensive examples.

Published June 2018