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

PI DataLink

Compare Events example

  • Last UpdatedNov 21, 2022
  • 1 minute read

To see attributes from child events in a format that lets you easily compare the parent events, use the Compare Events function. Suppose you have temperature-alert events and each has a single child event that indicates a temperature threat when the pump temperature reaches a certain level. You can retrieve a function array that shows the start time, duration, and temperature recorded for the temperature-threat event stored for each temperature-alert event. The parent events have names that start with TempAlert and the child events are named TempThreat. To retrieve the function array for events stored during the past week in the Production database on the PI AF server AFSRV1, enter the following inputs:

Input

Value

Database

\\AFSRV1\Production

Search start

*-1w

Search end

*

Event name

TempAlert*

Column headers

Select the following:

  • Event name

  • .|Start time

  • .|End time

  • .|Duration

  • .|Primary element

  • .\TempThreat|Start time*

  • .\TempThreat|Duration*

  • .\TempThreat|Temperature*

    *Added to list from the Add Attributes window.

The function returns the following array:

Compare events array example

TitleResults for “How to create a CRG?”Also Available in