unitSetDefinitions
The unitSetDefinitions element defines one or more collections of units that can be referenced from a data group element elsewhere within a device template file. Unit sets expand the number of possible unit types that can be supported by a single data group element, which means that a single device template file can accommodate many field devices using different unit types. The unitSetDefinitions element contains unitSet elements only if more than one unit set is required. For a simpler, less powerful way to define units, see the units attribute.
This element is:
- Case sensitive
- Not required in a CygNet device template file
- If used, used 1 time per CygNet device template file
To learn about how this element relates to other elements in a CygNet device template file, see Device Template File Hierarchy.
See also PNT Engineering Units.
Example
|
<!-- The following example shows a data group (RtuConfig) with a specialized cfgUnitSets data group category and a unitSetDefinitions element. The first data group element InUnits uses the unitSetNameValue attribute to specify which unit set to use for this named set, input. The second data group element SPTypUnits uses the unitSetName attribute to identify the name of the unit set associated with the data group element, input. It is used in conjunction with the unitsCatValue attribute for devices that have multiple, named configurable unit sets. In this example the unitsCatValue attribute selects which units to use for the unitCategory identified by this attribute, staticPresIn. --> <dataGroups> < RtuConfig niceName=" RTU Config" dgCat="cfgUnitSets" canSend="true"> <dgElements> <InUnits desc="Input Units" regDef="2:0" unitSetNameValue="input" /> <SPTypUnits desc="SP Sensor Type Units" regDef="3:0" unitsCatValue="staticPresIn" unitSetName="input"/> <OutUnits desc="Output Units" regDef="4:0" unitSetNameValue="output" /> <BaseTemp desc="Base Temperature" regDef="4:2" unitSetName="output" unitsCat="temp"/> <BaseSP desc="Base Static Pressure" regDef="4:3" unitSetName="output" unitsCat="staticPresOut"/> </dgElements> </RtuConfig > </dataGroups> ... <unitSetDefinitions> <unitSet value="0" desc="Imperial"> <unitCategory unitsCat="staticPresIn"> <unitVal value="0" units="psi"/> <unitVal value="1" units="psig"/> </unitCategory> <unitCategory unitsCat="staticPresOut" units="psi"/> <unitCategory unitsCat="energy" units="BTU"/> <unitCategory unitsCat="mass" units="lb"/> <unitCategory unitsCat="temp" units="F"/> </unitSet> <unitSet value="1" desc="Metric"> <unitCategory unitsCat="staticPresIn"> <unitVal value="0" units="kPa"/> <unitVal value="1" units="kPa g"/> </unitCategory> <unitCategory unitsCat="staticPresOut" units="kPa"/> <unitCategory unitsCat="energy" units="GJ"/> <unitCategory unitsCat="mass" units="kg"/> <unitCategory unitsCat="temp" units="C"/> </unitSet> </unitSetDefinitions> |
Attributes
The following table lists and describes attributes generally applicable to this element. However, not all of the attributes listed here are applicable to all EIEs. Additionally, some attributes are required for use in every device template file of a certain EIE, but others may be used on a case-by-case or device-by-device basis, depending on your specific needs. All attributes in templates are case sensitive; but the case sensitivity of attribute values is based on context.
Note: Occasionally, device template files for different EIEs use attributes of the same name that do different things. Efforts are made in this document to highlight cases where an attribute by one name does different things in different EIEs.
| Attribute | Description |
|---|---|
|
N/A |
None apply at this time. |


