Unit templates
- Last UpdatedAug 15, 2023
- 3 minute read
- PI System
- RtReports 5.0
- Visualization
You define which unit batches or primary referenced elements (AF) to include in a report in the Unit Template Edit window. These unit batches are represented in the data journal as UnitBatchJournal objects.
A unit template can be added by right-clicking on a batch template object in the data template tree and selecting Insert > Unit Template. You can edit the unit template by right-clicking the unit template node and clicking Property.
Layout
The Layout tab specifies the name of the units or primary referenced elements to include in a unit template. The most common way to specify which PI Units to include is by name.
-
Name
The PI Unit name of the PI Unit Batch or primary referenced elements (AF) objects to include in the unit template.
The default value is *, which returns all unit batches within the PI Batch.
Value types for the Name field
Pattern Match
Example
Values Returned
Exact name match
TRAREACTOR
Returns all unit batches with name TRAREACTOR (the match is not case-sensitive.)
Single-character wildcard match (?)
TRAREACTOR?
Returns unit batches TRAREACTOR1, TRAREACTOR2, TRAREACTOR3, but not TRAREACTOR123.
Multi-character wildcard search (*)
TRA*
Returns all unit batches with names beginning with TRA.
Report parameter substitution (square brackets)
[LocParam]REACTOR
At runtime, RtReports will substitute the parameter value for report parameter LocParam into the Name field. If the value of LocParam is defined as PHL, RtReports will return unit batches with a name of PHLREACTOR.
-
Procedure Name
The procedure name for unit batches. If no value is entered, all unit batches currently in the collection are returned.
All pattern matching that can be applied to the Name field can also be applied to the Procedure Name field.
-
Description
The description for the template shown in the data journal.
-
Display Name
The display name for the template shown in the data journal.
UnitClass
The UnitClass tab specifies the class and version of the PI Unit Batches to include in the batch context report template. Values can be entered manually, or you can click the magnifying glass button to select a unit class from the collection defined on the RtReports server.
Unit classes allow you to group similar equipment and create reports based on the type of unit rather than a specific unit. To create a unit class and populate it with units, click Tools > Unit Class Editor.
Note: If you select Use Unit Class, the specifications in the Layout and Spanning tabs are not used.
-
Use Unit Class
The check box that enables the Class and Version fields.
-
Class
The name of the unit class.
-
Version
The version of the unit class.
Spanning
The Spanning tab defines a time span across units or primary references elements (AF), and filters the unit collection defined on the Layout tab. You can choose a unit batch to use for the span start time, then choose another unit batch to use for the span end time.
-
Span Start
Defines the starting point of the span. For example, start at the start or end time of the first unit batch.
-
Span End
Defines the ending point of the span. For example, end at the start or end time of the last unit batch.
-
Process Step
Defines a collection of unit batches from which to select the basis for the span start or end time. You can supply a unit name, single-character wildcard (?), multi-character wildcard (*), or report parameter definition.
-
Select
Once a collection of unit batches has been defined in the Process Step field, the Select field defines the particular unit batch to use for the span start or end time.
Select field options
Select option
Value returned
All
All units from the collection. Only available for Span Start when double-filtering a collection of units already defined on the Layout tab.
First
The first unit from the collection.
Last
The last unit from the collection.
Index (value n)
The nth value from the collection.
-
Condition
A PI performance equation that the RtReports generator calculates at the start of each PI Unit Batch that meets the previous criteria. If the PI performance equation returns a true value, the PI Unit Batch is included in the report. If the equation returns a false value, then the PI Unit Batch is excluded.
For example, you can exclude any batch that contains a digital state of SHUTDOWN.
-
Evaluate From
Once you define the unit batch for the start time, you define the span start time using either the Start or End time of the unit batch in the Evaluate From field.
-
Evaluate To
Once you define the unit batch for the end time, you define the span end time using either Start or End time of the unit batch in the Evaluate To field.