Template Management

Overview

You can manage templates from the Template drop down in the Type edit panel.

What's Stored in a Template

Each template stores a number of details about a type that are unique from other templates in the type. Specifically, the template stores:

  • Substitutions - are unique per template.
  • Include/Exclude variable - at the template level, you can choose which variables to include or exclude when an instance is created from that template.
  • Variable property changes - All property changes you make in template mode, for example the IO address or alarm limits, are stored in the template. They can be different if you create a new template.
  • Contained Type template specification - for each template, you can specify the template to use when creating an instance from that template for each of your Contained type aliases.

Variables

All property changes you make in template mode, for example the IO address or alarm limits, are stored in the template. They can be different if you create a new template.

Substitutions

Substitutions provide a mechanism to create placeholders in the variable property definitions through the templates. When the variable property value needs to vary between object instances, substitutions can help define a placeholder and provide unique values for each instance. For example, if the I/O address of a variable is defined in the variable template , providing I/O address of a particular tag would bring the same value across all instances. Instead, if we use a substitution in parts of or the full I/O address value, this value can be replaced differently for different instances.

A substitution can be defined and managed as part of a template definition. To use substitutions in template variable properties, use the substitution name surrounded by curly braces within a property. A numeric type property needs to have the full value substituted whereas a string value can have a part substituted or multiple substitutions can be used. Substitutions cannot currently be used for enumerated properties.

For example, a description property for a variable can be defined with substitutions as "This is the serial number \{Asset_Number} of this \{Asset_Name}" where Asset_Number and Asset_Name are substitutions and their values are provided per object instance.
Note: Formulas are not currently supported within substitution strings used in the Model.

Contained Types

Contained types help define asset containment and provide a hierarchy relationship that can be used to make a multi-level instance as well as utilize this hierarchy during the model consumption in the iFIX picture definitions.

Contained types refer to other existing type definitions and are organized under a parent type. For example, an asset type definition for a pump can contain a shaft type, this can be accomplished by creating a type definition for pump and shaft separately and in the pump type definition, the contained types tab provides options to add a new containment by providing an alias name and selecting the shaft type from the drop-down.

Aliasing

When including contained types under a parent type, you must specify an alias name for that contained type. When the parent type is instantiated, the aliased contained types will be automatically created as instances with the alias name under the Parent instance. Aliasing enables differentiating multiple containments of the same type. You can have more than one alias contained under a parent type and the contained types can also contain other types making up a hierarchy. For example, a pump could contain two bearing units, one for inboard and one for outboard. The bearing type can be added as contained type to the pump with alias names Bearing_Inboard and Bearing_Outboard.