Pablo Benvenuto

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

Discussion created by Pablo Benvenuto Champion on Sep 12, 2012
In this Learning Lab I will show you how to use PI DataLink to extract single value data from the PI archive to build a production report on critical measurement of the process.

I will start with a template that you can download from here.  If you do not have a PI System to perform this tutorial, you can obtain a subscription to the OSIsoft Virtual Learning Environment where you can do all the Learning Labs hands on.  Read more.

First, we will use the Tag Attributes functions to populate cells B7:B11 with the tag descriptions of the tags located in cells A7:A11.  Then we will use the same function to populate Cells C7:C11 with the engineering units. We will also use the Current Values function to populate cells D7:E11 with the current values (showing timestamps).  Remember that we should base our  PI DataLink queries on cell references whenever possible.

Next, we will use the Archive Value function to populate cells B19:H23 with archive values that result from four different “retrieval modes”: interpolated, previous, next, and exact time.

MORE LEARNING OPTIONS

You also have the option to watch a video version of this Learning Lab shown below or download it from here.  Otherwise, continue reading this awesome Learning Lab right here in the community.


http://youtu.be/7DrL0HaTlhw

Ok, let's get started.  In the Virtual Learning Environment you can find the attached template in: C:\Labs\Visuals\Create a Simple Report in PI DataLink\Workspace.  If you are using your own environment, download the attached template and make sure that you are connected to a PI System.

Retrieving PI Tag attributes

To find the tag description of the tags whose names are in cells A7 to A11, click on the cell B7.
Click on PI > Tag Attributes.

pic6.png

When the Tag Attribue window opens click on the Tagname field and select the cell range A7:A11.  From the Attribute drop down window we can select any tag attribute.  Select descriptor and click OK.  Note that you can do this cell by cell, but using cell ranges as references will save you time.  In this example, the Current Value, Archive Value, and Tag Attribute functions allow you to select multiple tags.

You can also type PI DataLink functions directly in the cell to get tag attributes.  To do this you can click on a cell and enter the following function:
=PITagAtt("tagname","NameOfAttributeYouWant",”PIServer”)
If you leave the “PIServer” parameter blank, this function will use the default PI server.

You can now follow the same process to retrieve the Units.  Click on cell C7, Tag attribute, and select the cell range A7:A11 for the Tagname and the engunits for the Attribute.  Click OK.

If you enjoyed this Lab so far, please join us for Part 2.

Outcomes