Devices > Remote Devices > Device Template Files > Elements and Attributes > unitCategory

unitCategory

The unitCategory element defines a group of units, usually when more than one similar unit type is available. It can contain child unitVal elements, which define different unit types when more than one is available for a given unit category.

This element is:

To learn about how this element relates to other elements in a CygNet device template file, see Template File Hierarchy.

See also PNT Engineering Units.

Example

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

scaleFactor

scaleFactor defines a constant multiplier. Multiplication is powered by some other mechanism, like the reference operation opScaleFactor or the cvtF conversion method Scale.

scaleFactor cannot be used in the same element as scaleFactorId. It also cannot be used in the same element as any two-point scaling attribute, like scaleLoRaw.

Value:
  • Must be an integer or floating point number.

units

units defines the unit type by which a value is identified in the DDS. The unit type assigned to a value in the DDS affects how the value is treated if the value is processed as a CygNet point in the PNT. For example, a value in the DDS using units="feet" is converted to meters in the PNT if the primary unit for the corresponding point is m (meter).

If a units attribute is used in a basic reference method, it might perform a conversion on the source value. Make sure that the source value and the destination value are the same or complementary.

If a units attribute is used in an advanced reference method, it might override desired units. Use the opUnitConversion reference operator and its supporting attributes srcUnits and destUnits.

Value:
  • Any valid unit type. See PNT Engineering Units.
  • If used to convert a unit type from a source data group element to a different destination unit type, the unit types must be complementary. For example, seconds to minutes or hours.

unitsCat

unitsCat identifies the name of a category of units associated with the data group element. It is used for devices that have configurable units.

For example, unitsCat="energy" means that the units for this data group element are defined by the energy category.

Value:
  • A string that matches a unit category defined in the unitSetDefinitions section of the template file.
Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.