Journal action expression syntax
- Last UpdatedAug 15, 2023
- 5 minute read
- PI System
- RtReports 5.0
- Visualization
PI performance equation syntax
RtReports relies on the PI Performance Equation Subsystem and requires PI performance equation syntax.
Journal action expression components that require PI performance equation syntax are:
-
State transition equations
-
Suppress monitoring equations
-
Calculation Time Value expressions
For more information about PI performance equations, refer to your PI Server System Management Tools (SMT) documentation.
Variable syntax within journal actions
RtReports allows for variables within journal action expressions. These variables are replaced at runtime before RtReports passes the equations for processing. AF elements attributes and event frames attributes are supported.
The variables you can set are:
-
Action parameters, which must be enclosed in curly brackets { }.
-
Aliases, which must be enclosed in square brackets [ ].
-
Predefined variables, which must be enclosed in square brackets [ ].
RtReports provides predefined variables which can be used in journal action expressions. The variables are replaced or resolved at run time before the equation is sent to the PI System for parsing and evaluation.
RtReports predefined variables
|
Predefined Variable |
Explanation |
Context |
|---|---|---|
|
[Any Alias] |
The RtReports execution engine will resolve Absolute and relative aliases before passing the equation for processing. |
All |
|
[periodStart] [periodStart_PI] |
The time stamp at the start of the period for which the action is defined (unit batch, operation, phase, step, time). This variable is replaced by the PI time string representing the start of the period. This allows date arithmetic such as which would return the value of one minute after the start of the period. The expression is equivalent to: . Note the + sign in ''.Computations of time periods from two timestamps are also supported by PI-PE, such as in . If the ReportTimeZone configuration option is set to "server", and are the same and in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone, and is in the PI data server time zone. |
All |
|
[periodEnd] [periodEnd_PI] |
The timestamp at the end of the period for which the action is defined (unit batch, operation, phase, step, time). Durations of a period can be calculated: duration = periodEnd - periodStart Both variables are replaced by PI formatted dates thus giving the duration of the period in seconds. If the ReportTimeZone configuration option is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone, and is in the PI data server time zone. |
All |
|
[stateStart] [stateStart_PI] |
Time stamp at the start of the current state. If the ReportTimeZone configuration option is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone and is in the PI data server time zone. |
All |
|
[stateEnd] [stateEnd_PI] |
Time stamp at the end of the current state. If the ReportTimeZone configuration option is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone and is in the PI data server time zone. |
All |
|
[prevStateNum] |
The number of the previous state. |
All |
|
[StateNum] |
The number of the current state. |
All |
|
'*' |
The current evaluation time. Note that the usage is the same as in PI DataLink. |
All |
|
[unitBatchStart] [unitBatchStart_PI] |
Time stamp at the start of the current unit batch. If the ReportTimeZone configuration options is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone, and is in the PI data server time zone. |
Batch/UnitBatch |
|
[unitBatchEnd] [unitBatchEnd_PI] |
Time stamp at the end of the current unitbatch. This is the true end time for units which overlap. If the ReportTimeZone configuration option is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option is set to "client" is in the "client" time zone, and is in the PI data server time zone. |
Batch/UnitBatch |
|
[unitBatchForcedEnd] |
For unit batches which overlap, the time stamp indicating when another unit batch has started during the running of the current unit batch. |
Batch/UnitBatch |
|
[UnitBatchSeqNr] |
Occurrence of the current unitbatch. |
Batch/UnitBatch |
|
[UnitName] |
Unit Name of the current unitbatch. |
Batch/UnitBatch |
|
[Procedure] |
Name of the current procedure |
Batch/UnitBatch |
|
[SubBatchStart] [SubBatchStart_PI] |
Time stamp at the start of the current subbatch. If the ReportTimeZone configuration option is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone, and is in the PI data server time zone. |
Batch/SubBatch |
|
[SubBatchEnd] [SubBatchEnd_PI] |
Time stamp at the end of the current subbatch. If the ReportTimeZone configuration option is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone, and is in the PI data server time zone. |
Batch/SubBatch |
|
[SubBatchSeqNr] |
Occurrence of the current subbatch. |
Batch/SubBatch |
|
[SubBatchName] |
Name of the current subbatch. |
Batch/SubBatch |
|
[SubBatchNameFull] |
Path to current Subbatch |
Batch/SubBatch |
|
[SubBatchName.N] |
Subbatch Name at the depth N. |
Batch/SubBatch |
|
[BatchStart] [BatchStart_PI] |
Time stamp at the start of the current batch. If the ReportTimeZone configuration options is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone, and is in the PI data server time zone. |
Batch |
|
[BatchEnd] [BatchEnd_PI] |
Time stamp at the end of the current batch. If the ReportTimeZone configuration option is set to "server", and are the same and are in the PI data server time zone. If the ReportTimeZone configuration option that is set to "client" is in the "client" time zone, and is in the PI data server time zone. |
Batch |
|
[BatchID] |
Batch Id of the current Batch |
Batch |
|
[Product] |
Product Name of the current Batch |
Batch |
|
[Recipe] |
Recipe Name of the current Batch |
Batch |
|
[UniqueID[n]] |
Identifier for each UniqueID defined within the current Batch. Specifying [UniqueID] resolves to all UniqueIDs contained within the batch. Aliases will have the names [UniqueID1], [UniqueID2], etc. |
Batch |
|
[ElementName] |
Name of the current Element |
Element |
|
[ElementPath] |
Path to the current Element. |
Element |
|
[SeqNr] |
Occurrence of the current Module/Time. |
Module/Time |