PI DataLink Basics
PI DataLink Basics
© 2021 AVEVA Group plc and its subsidiaries. All rights reserved.
AVEVA, the AVEVA logos and AVEVA product names are trademarks or registered trademarks of aveva group plc or its subsidiaries
in the United Kingdom and other countries. Other brands and products names are the trademarks of their respective companies.
aveva.com
PI DataLink: Basics PAGE 2 OF 52
Table of contents
1 INTRODUCTION .......................................................................................................................................5
2 PI DATALINK BASICS.................................................................................................................................6
3.1 BACKGROUND: GET PI DATA WITH CURRENT AND ARCHIVE VALUE FUNCTIONS........................................... 15
3.1.1 Obtain a Current Value..................................................................................................................... 15
3.1.2 Obtain an Archive Value ................................................................................................................... 16
4.1 BACKGROUND: GET PI DATA WITH COMPRESSED, SAMPLED, AND TIMED DATA FUNCTIONS ......................... 21
4.1.1 Retrieving Compressed Data ............................................................................................................. 22
4.1.2 Obtaining Sampled Data................................................................................................................... 23
PI DataLink: Basics PAGE 3 OF 52
5.6 BACKGROUND: USING TIME FILTERED DATA IN A PREVENTATIVE MAINTENANCE EXAMPLE .......................... 40
1 Introduction
Before reading this section, please refer to the following course YouTube video:
Course Introduction
This course will teach you how to use PI DataLink to access your process data, create meaningful reports, and use them to
make key decisions about your plant performance. By the end of the course, you will be able to:
Throughout this class we will assume you have a basic knowledge of the PI System. If you are new to the PI System, we
encourage you to complete the PI System Basics class that is available for free on our Learning Page.
The course consists of text-based lessons, and video lectures. You are encouraged to follow along with all video lectures
using your Training Cloud Environment. Text-based lessons contain background theory, exercises, documentation, and
other useful information.
1. Hands-On: These lessons contain hands-on exercises with video step-by-step walkthroughs. While we are
demonstrating how to use different functions of PI DataLink, you are encouraged to do the same on your virtual
environment. If you have access to your own data, feel free to use it instead. It will give you an amazing
opportunity to leave this course with some great ready-to-use reports for your organization.
2. Knowledge check: Exercises with step-by-step solutions to complete on your own using your virtual
environment, or quizzes to keep your skills sharp.
3. Background: Readings or videos containing useful background information to assist your understanding. These
lessons are optional but encouraged as they will give you a more well-rounded understanding of the features of
PI DataLink. Throughout these sections we will link out to reference documentation. You may be examined on
the content inside these references, but as the exam is open book, you're welcome to visit these references
during the exam.
In the next lesson we'll cover the Learning Cloud Environment used in this class.
PI DataLink: Basics PAGE 6 OF 52
SOFTWARE VERSION
2 PI DataLink Basics
2.1 What is PI DataLink?
Before reading this section, please refer to the following course YouTube video:
OSIsoft Learning: What is PI DataLink?
PI DataLink is an OSIsoft add-in for Microsoft Excel. It lets you retrieve information from your PI System
directly onto a worksheet. Combined with the computational, graphic, and formatting capabilities of
Microsoft Excel, PI DataLink is a powerful tool for gathering, monitoring, analysing, and reporting PI System
data.
With PI DataLink, you can:
It is important to understand the following nomenclature when working with PI DataLink and its data
retrieval functions.
PI DataLink: Basics PAGE 7 OF 52
Term Meaning
Data item
A PI Point name or AF attribute name, for which the PI DataLink function returns
property values.
Root path
The common path to specified data items within PI System. It is optional for PI
DataLink functions. Valid entries include:
Data Archive name if the data item is a PI Point.
AF server and database if the data item is an AF attribute. For a data item of AF
Attribute, root path can also include the name of parent elements.
Blank if the data item is on the default Data Archive or the default AF Server and
default database.
Output cell
The worksheet cell where the function writes the result.
If you select a cell before you open the function task pane, PI DataLink inserts the
selected cell into the output cell field.
References:
• For more information see "Introduction" in PI DataLink User Guide
Query Function
What It Returns
Category Name
Current The current or most recent value
Value of a Data Item
Value of a Data Item at a specified
Single value
Archive time stamp
Value Computed value of a performance
equation at a specified time stamp
All the values of a Data Item for a
Compressed specified time period
Data A specific number of Data Item
Multiple value values beginning at a certain time
Evenly spaced, interpolated values
Sampled
for a Data Item over a regular
Data
interval
PI DataLink: Basics PAGE 8 OF 52
References:
• Documentation for the PI DataLink functions can be found here.
Before reading this section, please refer to the following course YouTube video:
Search for PI Tags and PI AF Attributes in PI DataLink
When your scope is an AF Server or Database, the top search field is applied to AF Attribute name as well as
the name, description, and categories of the parent element.
PI DataLink: Basics PAGE 10 OF 52
You can change columns displayed in the results pane by right clicking a column name in
the results pane and selecting which column you would like to be displayed.
You can use wildcard characters to augment your search, for example:
Use * to replace any number of characters:
Flow* = Flow_meter1, flow_meter2, flow_meter3, flowrate_pump1, flowrate_pump2
Use ? to replace one character:
Flow_meter? + flow_meter1, flow_meter2, low_meter3
References:
• Documentation for the PI DataLink search can be found here.
Before reading this section, please refer to the following course YouTube video:
OSIsoft Learning: PI Time
Both Fixed Time and Reference Time can be used with Time Offsets; Time Offsets can be used alone.
Expression Meaning
5-jan-92 12:34 12:34 p.m. on January 5, 1992
25-sep-12 00:00:00 (midnight) on
September 25, 2012
The PI System interprets many different formats for fixed time. In the event of an ambiguous input, the
Windows Region and Language settings of the computer where the PI Visualization Tool is installed take
precedence.
PI DataLink: Basics PAGE 12 OF 52
Use the first three letters as an abbreviation for any day of the week and any month of the year. For
example:
Expression Meaning
thu 00:00:00 (midnight) on the most recent Thursday
MAR 00:00:00 (midnight) on the current day in
March of the current year
PI DataLink: Basics PAGE 13 OF 52
Specify the abbreviation, the full time unit or the plural version of the time unit, such as s, second, or
seconds. Time offset is any of the time units with a valid value and a + or – sign included, e.g. +8h.
Time offsets can be used alone in a time field or come with a fixed time or reference-time abbreviation.
Expression Meaning
*-1h One hour ago
t+8h 08:00:00 (8:00 a.m.) today
y-8h 16:00:00 (4:00 p.m.) the day before yesterday
mon+14.5h 14:30:00 (2:30 p.m.) last Monday
sat-1m 23:59:00 (11:59 p.m.) last Friday
1-jan-20 – 1d Midnight 31 December 2019
• For a single time stamp, the reference time is the current clock time.
Rule 2: To define a time offset you must include a valid value with any time unit. Only for seconds, minutes, or hours,
you can specify a fractional value. You cannot specify fractional values for other time units.
Rule 3: A fixed timestamp consists of the fields of Year, Month, Day and Time (hours, minutes and seconds). If any of
these fields are not specified in the PI time expression, the following values will be assumed by default:
• If Time is not specified, then the default value would be Midnight.
• If Day is not specified, then the default value would be Current Day.
• If Month is not specified, then the default value would be Current Month.
• If Year is not specified, then the default value would be Current Year.
You can retrieve PI data from any PI System currently connected to your client machine. You must specify:
1. Data item(s)
o Can specify 1 or more, explicitly or via a cell
reference
2. Output cell
o Any data currently in this cell will be
replaced.
PI DataLink: Basics PAGE 16 OF 52
The result of this query will be the most current value and timestamp of the data item specified.
Note: Current Value is a volatile function: the function recalculates and updates values
whenever Excel calculates or recalculates any cell in the worksheet. To force an
immediate recalculation, press F9.
You specify:
1. Data item(s)
o 1 or more
2. Time stamp
o Excel Time Format or
o PI Time Format
PI DataLink: Basics PAGE 17 OF 52
During this section, please refer to the following course YouTube video:
Single value query
Activity description
You would like to prepare a report that shows the current value of External Temperature, Pressure and Flow Rate of
Mixing Tank2. You are also interested in knowing the value of these measurements at 7 am yesterday.
Approach
Part I – Get Current Values
1. Open Excel and in cell A1 type Current Values as a heading.
2. Click on cell A2. Select Current Value function.
3. Click on the magnifying glass next to Data Item(s) box.
4. Search for the External Temperature of Mixing Tank2.
5. Select Time at Left and click OK.
6. Repeat these steps for Pressure and Flow Rate in cells A3 and A4, respectively.
Part II – Add Archive Values
1. In cell C1 type Archive Values as a heading.
2. Click on cell C2. Select Archive Value function.
3. Click on the magnifying glass next to Data Item(s) box.
4. Search for the External Temperature of Mixing Tank2.
5. Type Y+7h in the Time stamp box. What time stamp will be retrieved? ___________
6. Select Time at Left and click OK.
7. Repeat these steps for Pressure and Flow Rate in cells C3 and C4, respectively.
Part 3 – Do you think this is an efficient way to search for the data item every time a value is retrieved? Check out the
next lesson if you are unsure of the answer!
PI DataLink: Basics PAGE 18 OF 52
During this section, please refer to the following course YouTube video:
Single value queries using cell reference
Activity description
You would like to include the current value of External Temperature of Mixing Tank1 in our daily report. You are also
interested in the value of this tank’s Internal Temperature at 7 am today.
Approach
Part I – Build a Template
1. Open Excel and click on cell A2. Click on Search.
2. Select the AF Database of OSIsoft Plant. Type Ext*Temp* in the search box and click ‘Enter’. The External
Temperature of all four tanks should show up on the search results list.
3. Select the external temperature of Mixing Tank1 and click OK.
4. In cell B1 type Current Value. In cell D1 type Archive Value as headings.
5. In cell A4 type Timestamp, in B4 type t+7h. What time do you expect to see? ___________
Your report template will look similar to this:
Activity description
You would like to include the current value of the External Temperature of all Tanks in your daily report. You are also
interested in knowing the value of the tanks’ Internal Temperature at midnight.
Approach
1. Open the file PI_DataLink_Exercises.xlsx.
2. Save it as <your initials>_ PI_DataLink_Exercises.xlsx then work on sheet Temperature at a Glance and fill in data
into all of the fields.
3. Use the Current Value and Archive Value queries to fill in the template. We should base our PI DataLink queries on
cell references whenever possible.
The graph and table below exemplify the different retrieval modes.
Next 13:30:00 1
The next graph shows the difference between Auto and Interpolated for a step point and an analogue point.
PI DataLink: Basics PAGE 21 OF 52
Auto Interpolated
During this section, please refer to the following course YouTube video:
Activity report
Activity Description
Your manager needs a report they can open each afternoon to see the current values of KPI’s for Mixing
Tank2, which are:
• External Temperature
• Internal Temperature
• Level
• Flow Rate
Your manager needs to see the KPIs values at midnight today. Not trusting this new “PI Thing” your manager
wants to see archive values around midnight as well as be able to type in a timestamp and see if there is an
archive value at an exact time.
Approach
• Open <your initials>_PI_DataLink-Exercises.xlsx then work on sheet Activity Report and fill in the data in all
fields.
• Use the Current Value and Archive Value queries to fill in a template.
Below is a graph of Compressed Data compared to Sampled Data. The Compressed Data function returns all
the data that had been archived for the data item of interest. Time intervals between the compressed data
values are uneven and depend on when the data was received and archived by the PI System.
You may need to know the value of a data item at specific timestamps, for example at the beginning of
every shift. Or you may need to compare the values of two different data items and having unevenly spaced
time intervals would not be that helpful. In these cases, using the Sampled Data function is helpful in
creating a PI DataLink report.
Note: If you switch the timestamps for Start and End Times, the data will be returned in reverse order
PI DataLink: Basics PAGE 23 OF 52
There are several optional checkboxes that will affect what is displayed, none of which are selected by
default:
• Hide count: When this box is unchecked, the top line of your results will return the number of events found within
that time range. When this box is checked, this count is not displayed and only the results are shown.
• Show time stamps: This checkbox determines if only the point values are returned, or if the corresponding
timestamp is also retrieved.
• Show Value Attributes and Show Annotations: will return additional fields if there are any annotations or quality
bits associated with the compressed events within the time range specified.
• Column and Row: This pair of radio buttons determine if the results are returned in columns or rows.
• The Number of Values option for this query behaves similarly, but rather than a
specific time range, you will specify a Start Time and the Number of Values that
you would like to retrieve. You can also check the box to have this go backwards,
rather than forwards in time.
During this section, please refer to the following course YouTube video:
Archived, sampled, and timed data functions
In this hands-on you would like to analyse the archived values of the External Temperature of Mixing Tank1 in your daily
report for the first two hours of every day. You would also like to see this temperature value every 10 minutes during
these two hours.
You are also interested in doing a comparison between Mixing Tank1 and Mixing Tank2 at the timestamps
where there is a value archived for external temperature of Mixing Tank1.
Approach
Part 1 – Build a Template
1. In Excel, create a Template for your report by typing Data Item, Start Time, End Time and Time Interval in cells
A1, A3, A4 and B5, respectively.
2. Using Search, find the attribute External Temperature for Mixing Tank1 and Mixing Tank2 and place them in cells
B1 and B2, respectively.
3. Type the Start Time of T (in cell B3), End Time of T+2h (in cell B4) and time interval of 10m (in cell B5).
PI DataLink: Basics PAGE 25 OF 52
Activity Description
Your task is to show the archived values of the Pressure of the two Mixing Tanks listed in your daily report for the past
24 hours. When retrieving the raw archived data for this process variable, you prefer to see one value each hour for the
past 24 hrs. You will use this report to do some analysis on this critical process variable of the mixing tanks.
Approach
1. Spend a few minutes and fill out the following table:
Data
Item
Start
Time
End
Time
Time
Interval
2. Open <your initials>_PI_DataLink-Exercises.xlsx then work on sheet Tank Analysis Report and fill in data for all of
the fields.
3. Use the Compressed Data and Sampled Data queries to fill in a template.
Bonus 1
Using Excel functions, modify your report such that you get one value at the top of each hour for the past 24 hours.
PI DataLink: Basics PAGE 26 OF 52
Bonus 2
The Excel Insert tab in the Sparklines section has several options to show lines and columns as well as
additional options to format the axes and colors.
To use this functionality, first select the cell where you want to place the Sparkline. Then choose the Sparkline type. For
Data Range, select the cells with the data (just select the values, not the timestamps). Verify your output cell and choose
OK. The result is a small trend of your data, with an assumption of evenly spaced values over time.
resulting in:
The Asset Filter Search function returns assets that meet specified filter criteria. The returned assets can be
used in the worksheet as a function array which can update automatically, or as static values.
The filter criteria include:
• Element name
• Element template
• Element category
• Element description
• Value of attributes
Using the Asset Filter, you will have the option of returning the search results in a Drop-down list
which would be used in building reusable reports.
Note: The Asset Filter option provides more options in filtering different assets and attributes when
creating an Element Relative Report. However, it requires a template for filtering the related assets.
During this section, please refer to the following course YouTube video:
Element relative PI DataLink reports
Activity Description
You want to create a report to review the internal and external temperatures for all of the tanks.
Approach
We will follow two approaches in creating this report. The first approach is to use the Search functionality
while the second approach is to use the Asset Filter functionality.
Method 1: Using Search
1. Choose cell A1 in Excel
2. Select the AF Server > OSIsoft Plant > Production Area in Search.
3. Search for *TEMP*
You will notice that the results include all the attributes because their parent elements are based on the
template named “Generic Tank Template”.
PI DataLink: Basics PAGE 28 OF 52
When working with Asset Filter and selecting the Drop-down list, the drop-
down list will appear in the cell above your Output cell. The selected Output
cell is where the selected attributes will start being listed.
Approach
1. Spend a few minutes to fill out the following table:
Root Path
Data Item
Yesterday’s Yesterday’s
Start Time End Time
Today’s Start Today’s
Time End Time
Time Interval 4 Minutes
Excel
function for
Comparison
(ratio)
2. You will use the template provided in sheet Operational Start Up of the file <your initials>_PI_DataLink-
Exercises.xlsx.
3. Use both PI DataLink functions of Compressed and Sampled data in retrieving the values and doing the
comparison.
4. Which PI DataLink function, do you think, would be more suitable for the purpose of comparison of yesterdays
and today’s values?
PI DataLink: Basics PAGE 30 OF 52
During this section, please refer to the following course YouTube video:
https://www.youtube.com/watch?v=EabeWgcjjfQ&t=1s&ab_channel=OSIsoftLearning
4.7.1 Workflow prior to Dynamic Arrays – PI DataLink version 2019 and earlier
When using the PI DataLink product, end users may see this message below:
The Multiple Value functions just discussed actually return an array of values and timestamps. This array
cannot be modified cell by cell, but the entire array can be modified. These values can change in size based
on the point used, the time range specified, and exception and compression settings. Therefore, it can be
necessary to resize the array.
If too many values are returned, you will receive the message “Resize to show all values” at the bottom of
the array.
To resize an array is to right click anywhere in the array, and choose Recalculate (Resize) Function
PI DataLink: Basics PAGE 31 OF 52
Starting with Office 2021 and Office 365 (January 2020 build or later), Microsoft introduced support for dynamic arrays.
Dynamic arrays can resize themselves if the data they contain updates. For instance, if a compressed data array shows
the events which occurred over the last day, and that number of events increases the next time, the spreadsheet opens,
and the dynamic array will resize itself without user interaction.
By default, DataLink continues to write legacy function arrays. However, where dynamic arrays are supported, the user
has the option to right-click on a legacy function array and convert to a dynamic array. After this conversion, any
subsequent modifications to the function through the task pane will write to the sheet as a dynamic array.
References:
• For more information see "Function arrays" in PI DataLink User Guide
PI DataLink: Basics PAGE 32 OF 52
Different Properties will be shown depending on the Data Item listed. For both PI Points and AF Attributes,
the Units of Measure are shown as UOM in PI DataLink Properties list.
Note: A Bad value for PI System is defined as any of the digital states from the System Digital State Set
in the Data Archive. Examples are I/O Timeout, No Data, Shutdown, No Sample, Intf Shut and Arc Off-
line. It makes no inferences about the Quality of the data in the plant.
PI DataLink: Basics PAGE 34 OF 52
• Conversion Factor: If the calculation mode is set to Total, the conversion factor may need to be changed to a
number other than 1.
For time-weighted total calculations, use the Conversion Factor calculator. From the dropdown make a
selection based on the units of measure of the process variable. The required conversion factor number
will then be calculated and placed in the Conversion factor field.
When you click on the calculator icon next to the Conversion factor entry field you will get a popup that
lets you select the appropriate conversion factor:
During this section, please refer to the following course YouTube video:
Calculated data
Activity Description
We want to practice how to use Calculated Data and obtain the Average, Maximum and Minimum of Flow Rate for
Mixing Tank1 for the period of past two hours and for the past one day.
Approach
1. In Excel create a template with
a. Root Path: \\PISRV01\OSIsoft Plant\Production Area\Production Line1\Mixing Tank1
b. Data Item: Flow Rate
c. Start Time: *
PI DataLink: Basics PAGE 35 OF 52
Example: Flow rate is measure in litres per minute (l/m) and stored in the Data Archive. We are interested in
calculating total litres for an 8-hour period. Shown in the following illustration, flow rate is:
• 3 l/m for 3 minutes
• 5 l/m for 2 minutes
• 1 l/m for 3 minutes
PI DataLink: Basics PAGE 36 OF 52
Total flow, is the area below the flow rate line (the area of the three rectangles added up).
Data Archive, however, assumes the unit of measure of the flow rate is gallons per day. Without applying
the conversion factor, the total flow calculated by Data Archive is returned as:
(3 litres per day x 3 min x 1 day/1440 min) + (5 litres per day x 2 min x 1 day/1440 min) + (1 litre per day x 3
min x 1 day/1440 min) = 0.01528 litres
The total computed by the Data Archive must be multiplied by the conversion factor of 1440 to get 22 litres:
0.01528 litres x 1440 = 22 litres
When the calculation mode is Total and part of the archived data within the range is bad, the reported value
is equal to the calculated total value divided by the fraction of the time period with good archived data. This
data normalization is equivalent to the assumption that for the bad data time range, the point value takes
on the average value of the entire range. However, this assumption may not be valid when a large fraction
of the time range contains bad data. Therefore, we recommend that you always look at the percent good
value before using the calculation result.
References:
• For more information see "Calculated Data" in PI DataLink User Guide
PI DataLink: Basics PAGE 37 OF 52
During this section, please refer to the following course YouTube video:
Calculating the total
Activity Description
We want to calculate the total Flow and the Average Flow Rate of Mixing Tank1 for yesterday. To know what conversion
factor to use, we need to bring the UOM of Flow Rate for Mixing Tank1.
Approach
1. In Excel create a template with
a. Root Path: \\PISRV01\OSIsoft Plant\Production Area\Production Line1\Mixing Tank1
b. Data Item: Flow Rate
c. Start Time: Y
d. End Time: T
2. Add a cell to your report template titled UOM and get this value for Flow Rate using Properties.
3. Add a cell to your report template titled Conversion Factor and write the appropriate value there.
4. Calculate the Average
5. Calculate the Total of Flow for the time range (don’t forget the Conversion Factor!)
6. Add the percent good.
• Maximum
You also want to do the same calculations for the entire week.
PI DataLink: Basics PAGE 39 OF 52
Approach
1. On the PI Server, the production is the sum of the productions from the two production lines and is stored as an
attribute named Production under the element of Production Area. It is defined as the sum of the flows of the
two Mixing Tanks in litres per minute.
2. Spend a few minutes and fill out the following table:
Root
Path
Data
item
Start
time:
End
time:
Time
interval:
UOM
3. You will use the template provided in sheet Production Summaries of the file <your initials>_PI_DataLink-
Exercises.xlsx. Use the values of your table in the provided template.
Note: When working with the weekly total, do not use the time interval. Only use it for the daily total.
The percent good field is located to the right of an aggregate calculation, so use
with the Maximum.
PI DataLink: Basics PAGE 40 OF 52
During this section, please refer to the following course YouTube video:
Controller state
Activity Description
We want to determine the amount of time a controller has been in the CASCADE state. The controller is a digital point,
named CDM158, and has five (5) discrete states. We are only concerned with the CASCADE state at this time.
Approach
1. In Excel create a label for the output cell Time in Cascade mode (hours).
2. Choose an empty output cell.
PI DataLink: Basics PAGE 41 OF 52
Approach
1. In Excel create a report template similar to the screenshot at the end of the activity.
2. Select cell B1 and search for the Mixing Tank1 Level attribute.
3. Modify the expression and apply the PE syntax rules to ‘level’>7
Note: The first ‘ in an Excel cell is used to signify that the cell content is text and that no Excel formulas
should be interpreted. To include an expression in a cell, you need to put a ‘ at the beginning of the
expression.
Approach
You will use the template provided in sheet Condition Based Inspection of the file <your
initials>_PI_DataLink-Exercises.xlsx. Get the total Operating Time of the pumps associated with tanks.
1. Use Asset Filter Search to bring the list of Assets without any attribute.
a. Specify the appropriate Root Path and Element Template in the search dialogue box and without selecting
any attributes, click Ok.
2. Use Time Filtered function to calculate the number of hours each pump was running.
PI DataLink: Basics PAGE 43 OF 52
Note: When using a cell reference for your Filter Expression, be sure that if the Filter Expression begins
with a timestamp or point name that you use two single quotes. The first single quote is used in Excel
to identify a text string, rather than a value, and will not be seen by the filter expression. Another
option is to enclose the entire filter expression in parenthesis, in which case the extra single quote is
not needed.
References:
• For more information see "Expressions" in PI DataLink User Guide.
If none of the preconfigured rules suit your needs, you can configure additional rules using Conditional
Formatting > New Rule. Multiple rules can be applied in configurable order using Conditional Formatting >
Manage Rules.
Note: The MS Excel TODAY() function returns the serial number of the current date. The serial number
is the date-time code used by Microsoft Excel for date and time calculations. Microsoft Excel stores
dates as whole number of days starting at 1900. Dates and times are values and therefore can be
added, subtracted, and included in other calculations.
Syntax: =TODAY()
Approach
Part 1
1. In Excel create a sheet with
a. Data Item: CDT158
b. Start Time: T
c. End Time: T-1d
d. Filter Expression: ‘‘CDT158’ > 150
2. Retrieve the Compressed Data and verify there are no values less than 150.
3. Values below 150 are unnecessary and we would not need to include them on our report.
Part 2
1. On a new sheet, create a sheet with
e. Tank: \\PISRV01\OSIsoft Plant\Production Area\Production Line1\Mixing Tank1
f. Process Variable: External Temperature
g. Start Time: T
h. End Time: T-1d
i. Filter Expression: ‘‘External Temperature’ > 200
2. Retrieve the Compressed Data and verify there are no
values less than 200; the filter expression removed
them.
PI DataLink: Basics PAGE 45 OF 52
Approach
1. Spend a few minutes and fill out the following table:
Root Path
Data Item
Start Time
End Time
Interval
Upper
Limit
Lower
Limit
Filter
Expression
2. You will use the template provided in sheet Production Level Report of the file <your initials>_PI_DataLink-
Exercises.xlsx.
These two Events functions return events that meet specified criteria in an AF database.
• Explore Events: this function returns one event per row and nests child events under parent events. This function
is useful to show child events under a parent event while preserving the hierarchy structure.
• Compare Events: this function returns one event per row but can return attributes from related events in that
same row. Specifically, to facilitate event comparison, the function can return attributes from child events or
parent events in the same row as the returned event. This function is useful to flatten the hierarchy to show a
particular child event that is common for each parent event.
5. From Columns to display select Event name, Start time, End time, Duration, Primary element, Maximum External
Temperature, Maximum Internal Temperature, Reason Code and Temperature Difference.
6. Click Ok.
8. Select the PivotTable under Comparing Tanks, then, from the Analyze tab, select Refresh
9. Which Reason Code caused the most production loss overall? __________________
10. Which Reason Code caused the most production loss for the Storage tanks? __________________
11. Which Tank has caused the most production loss? __________________
PI DataLink: Basics PAGE 49 OF 52
Just like the PI Calculated Data, it would be configured with a start time of *-7d, an end time of *, and an interval of 1
day (1d). Keep in mind that the ‘*’ in the expression does not always go to the current time of the machine, the ‘*’ in
this case is represented by the right side of the 8-hour bar below. If the PI expression was changed to
TagMax('tag','*-1d','*'), the results of the PI Calculated Data and the PI Expression would be identical.
However, the PI Expression will contain an extra interval at the start time of the expression when compared directly with
PI Calculated Data
Approach
1. Develop the expression for calculating the Percentage of Product A in the resulting mix.
2. Spend a few minutes and fill out the following table:
Expression
Start Time
End Time
Time
Interval
3. You will use the template provided in sheet Material Balance Report of the file <your initials>_PI_DataLink-
Exercises.xlsx.
4. How would you change the expression if one of the two Products was not flowing, and the associated point was
showing a bad value of “Shutdown”? (Hint: If Then Else)
8 Final Exam
The final exam in this course is taken online. Please check the course listing online for more details.