Base Template Functional Summary

The following information describes each base template object and recommendations for use.

$AnalogDevice Template

The $AnalogDevice Template object provides supervisory control capabilities for instruments or equipment that have a key continuous variable. It contains numerous features to model more complex analog inputs and control loops. Any analog value that requires I/O scaling or alarming must be derived from this base template.

The General tab of the Object Editor includes a field for setting the type of analog device. The Analog option type enables configuring a Process Variable (PV) input source and (optionally) a different output destination.

The PV can be scaled, multiple alarm points defined, and history collected for the PV. The Analog regulator option type allows for a PV input (no separate output), a setpoint, an optional different setpoint feedback address, setpoint high and low limits, and optional control tracking. It also supports scaling, alarms, and history.

When the analog device is configured as an Analog regulator, many aspects of a PID loop can be defined. It is necessary to add User-Defined Attributes to access specific loop control parameters, such as controller gain, integral time constant, etc. 

$DiscreteDevice Template

The $DiscreteDevice Template object provides supervisory control capabilities for instruments or equipment that have two or more discrete states. 

Use the $DiscreteDevice template for creating objects that monitor multiple discrete inputs and map them to a state table. A simple example is two discrete values representing an Open limit switch and a Close limit switch. Four options exist for the open and close options, and could be represented by the states Open, Closed, In Transition, and Fault.

The Process Variable (PV) attribute of the discrete device is a string representing the state. This can also be read as an enumerated integer value. The object supports up to five distinct states based on one- to four inputs. Up to six discrete outputs are available from the template. 

The Passive state is provided to represent the state when the field device is not energized. For example, a valve that fails to the closed state when it loses power would have a passive state of Closed. A valve that requires power to command it to open and to close may only use the two active states and not have a passive state.

Alarms can be generated for either of the two active states or the fault state. The object also includes the option to record statistics, such as the duration of the various states, and to alarm on the duration.

$FieldReference Template

The $FieldReference Template object provides simple I/O capabilities for an external data source, including field instruments, for a variety of datatypes.

The $FieldReference template is the parent for $Boolean, $Double, $Float, $Integer, and $String templates. These templates provide a mechanism to read and/or write to single I/O points in the field and to collect history on the process variable.

The $FieldReference template does not provide scaling or alarm limits. Use the $AnalogDevice template for scaling I/O and setting alarm limits. The field reference templates are basically the same as adding a user-defined attribute and using the extensions to add input, output, or history.

$Switch Template

The $Switch Template object provides simple I/O capabilities for a single, two-state discrete signal.

The $Switch template provides slightly more functionality than the $Boolean template, but less than the $DiscreteDevice template. The $Switch template provides two text states for a single I/O point (with an optional different output address). The value can be stored in history and either state (On or Off) can be alarmed whereas an alarm extension only alarms on the TRUE state.

$UserDefined Template

The UserDefined object provides an empty starting point for creating custom built objects that include UDAs, Scripts, Extensions, or Contained objects. 

The UserDefined ApplicationObject enables the user to define the following Analog and Digital inputs:

Analog Inputs:

  • Scale raw values
  • Define Deadband
  • Define alarm levels
  • Define deviation alarms
  • Define Bad PV alarms
  • Define Rate of change alarms
  • Define primary and secondary engineering units
  • Generate events on value change
  • Provide statistics

Discrete Inputs

  • Assign On/Off Messages as labels.
  • Define alarm states as On or Off condition
  • Invert input value
  • Provide statistics

Comments

Author: Pete OConnell
Last Updated: 17 May 2021
Last Edited By: Pete OConnell
Viewed 333 times.

Share this Article