Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

RtReports

Journal action expression syntax

  • Last UpdatedAug 15, 2023
  • 5 minute read

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 tagVal('le:f420', periodStart + 60) which would return the value of tag le:f420 one minute after the start of the period. The expression is equivalent to: tagVal('le:f420', periodStart + '+1m'). Note the + sign in '+1m'.Computations of time periods from two timestamps are also supported by PI-PE, such as in [periodEnd] - [periodStart].

If the ReportTimeZone configuration option is set to "server", [periodStart] and [periodStart_PI] are the same and in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [periodStart] is in the "client" time zone, and [periodStart_PI] 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", [periodEnd] and [periodEnd_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [periodEnd] is in the "client" time zone, and [periodEnd_PI] 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", [stateStart] and [stateStart_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [stateStart] is in the "client" time zone and [stateStart_PI] 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", [stateEnd] and [stateEnd_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [stateEnd] is in the "client" time zone and [stateEnd_PI] 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", [unitBatchStart] and [unitBatchStart_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [unitBatchStart] is in the "client" time zone, and [unitBatchStart_PI] 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", [unitBatchEnd] and [unitBatchEnd_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option is set to "client" [unitBatchEnd] is in the "client" time zone, and [unitBatchEnd_PI] 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", [SubBatchStart] and [SubBatchStart_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [SubBatchStart] is in the "client" time zone, and [SubBatchStart_PI] 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", [SubBatchEnd] and [SubBatchEnd_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [SubBatchEnd] is in the "client" time zone, and [SubBatchEnd_PI] 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", [BatchStart] and [BatchStart_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [BatchStart] is in the "client" time zone, and [BatchStart_PI] 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", [BatchEnd] and [BatchEnd_PI] are the same and are in the PI data server time zone.

If the ReportTimeZone configuration option that is set to "client" [BatchEnd] is in the "client" time zone, and [BatchEnd_PI] 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

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in