Pablo Benvenuto

Learning Lab - Create a Simple Report in PI DataLink Part 2

Discussion created by Pablo Benvenuto Champion on Sep 12, 2012
Are you ready to Rock and Roll?  If you completed Part 1 of this Lab, let's dive into the second part of this Learning Lab.

Retrieving current values and timestamps

To retrieve the current value and timestamp, click on cell D7 and click on the Current Value function. Select the Tagname field and select the range A7:A11 once again. Select the time at left option and click OK. You can examine the function in the formula bar in Excel. You can always type these functions manually.

Retrieving archive values

In the second table of the template we will retrieve archive values using different retrieval modes. First we will retrieve interpolated archive values. Select cell B19 and click on the Archive Value function from the PI menu. Click on the Tagname field and select the range of cells A19:A23, where the Tag names are located. Select the Timestamp field and click on cell D14, which contains our desired time for the report. Select the time at left option and click OK.


This function has the following format: =PIArcVal("tagname","Date",Outcode,"PIServer","Mode")
Repeat this process for the Previous and Next retrieval modes. You just need to select cell D19, use the same inputs for Tagname and Timestamp and change the retrieval mode to Previous.

Lastly, we are going to search for any values stored in the archives at exactly the timestamp shown in cell D14. Select cell H19 and click on Archive Value. Select the Tagname field and select the cell range A19:A23, select the Timestamp and select cell D14, select the no timestamp option and click OK. This will return a value only if a value for that exact timestamp exists.

The final result should look like the figure below.


Have you seen the PI DataLink Basic workshop? Check out the Workshop Outline.