copyright © 2010 osisoft, inc version 4.6 using pi datalink the visuals
TRANSCRIPT
Copyright © 2010 OSIsoft, Inc
Version 4.6
Using PI DataLink
The Visuals
Copyright © 2010 OSIsoft, Inc
Introductions
Instructor Students
Tell us about your PI System What is your role with PI? What skills do you need to learn?
2
Copyright © 2010 OSIsoft, Inc
Course Overview
Length: 1 day Interactive course:
Theory 50% Exercises and examples 50%
3
Copyright © 2010 OSIsoft, Inc
Objectives
Understand the fundamentals of PI technology Learn to access data in the PI server Become familiar with the use of PI Datalink
Please ask questions as they arise!
4
Copyright © 2010 OSIsoft, Inc
Course Content
Introduction to PI Common Dialog Windows PI Tags Data Flow PI Time Format PI Datalink
5
Copyright © 2008 OSIsoft, Inc
1.0 Introduction to PI
Copyright © 2010 OSIsoft, Inc
OSIsoft is a Trusted Partner
> $188M Revenues Over 20% reinvested in R&D Approaching 50% revenue from outside N. America
30+ Year History Founded 1980, ~630 professionals HQ San Leandro, CA
Recognized Global Leader Dominant market position across
industries
Recognized
Experienced
Knowledgeable
14,000+ Customer Installations 40% of Fortune 1000 process and
manufacturing companies use the PI System 65% of Global 500 process and manufacturing
companies use the PI System
Strategic Partnerships Microsoft, SAP, Cisco, Intel Rockwell, Emerson
14,000+ Customers,110+ countries
7
Copyright © 2010 OSIsoft, Inc
Calgary, Alberta
San Leandro, CA
Phoenix, AZ
Houston and Longview,TX
Frankfurt, Germany
Perth, Australia
Sydney, Australia
Singapore
São Paulo, Brazil
Tokyo, Japan
Manama, Bahrain
Beijing, China Montréal, Québec
Philadelphia, PA
Cleveland, OH
Johnson City, TN
Savannah, GA
OSIsoft Offices
Naucalpan, México
KwaZulu, Natal, South Africa
New Plymouth, New Zealand
Moscow, Russia
Shanghai, China
Czech Republic
Madrid, Spain
Paris, France
Global Presence
Copyright © 2010 OSIsoft, LLC
1.0 PI Basics
9
Copyright © 2010 OSIsoft, LLC
1.1 What is a PI System?
Copyright © 2010 OSIsoft, Inc
The PI System 2010
11
PI System 2010
Virtualization
High availability
Windows integrated security
Real-time Interfaces
PI Server
PI Asset Framework PI Archives
PI Notifications PI Analytics
PE Totalizer PI ACE
64-bit product
IT DataIT MONITOR
Custom DataAPIs / SDKs
Relational Data OLEDB / ODBC
SQL SERVER / ORACLE
Web ServicesSOA / EXTERNAL DATA
LEGACY APPS
Real-Time DataDCS / PLC / SCADA / OPC
HISTORIANS / INTERFACES
Copyright © 2010 OSIsoft, Inc
Basic Parts
12
Interface Node
PI Server
`
Client PC
Data Source
Copyright © 2010 OSIsoft, Inc
Architecture of a Typical PI System
13
Copyright © 2010 OSIsoft, LLC
1.2 PI Tags
14
Copyright © 2010 OSIsoft, Inc
What is a PI Tag?
It is a unique storage point for data in the PI system. It is simply a single point of measurement.
15
Examples A flow rate from a flowmeter A controller’s mode of operation The batch number of a product Text comments from an operator The results of a totalizer or calculation
Copyright © 2010 OSIsoft, Inc
PI Tag Attributes
Each PI Tag has a set of attributes for: Describing the tag to a User/Client Application
o “How is the information displayed?” Describing the tag to the Control System Interface
o “How is the information found?” Describing the tag to the PI Server
o “How is the information stored?”
16
Copyright © 2010 OSIsoft, Inc
PI Tag Attributes – Display
Tag name: unique name of the PI point Descriptor: PI tag description EngUnits: Engineering units PointType: type of variable stored Zero, Span and Typical value: minimum, range
and typical values Point source: allows grouping of PI tags by data
interface (DCS,PLC, or other sources)
17
Copyright © 2008 OSIsoft, Inc
1.2 Data Flow
Copyright © 2010 OSIsoft, Inc
Data Tests
Every value can go through 2 data screeningtests before being archived:
Exception Test “Send only significant changes in data to the
server”
Compression Test“Store only data needed to reliably represent
process behavior”
19
Copyright © 2010 OSIsoft, Inc 20
Data Flow
New Value (scan or
exception based)
Exception Test Snapshot
PI Compression Algorithm
PI Archives
Data acquisition node
PI server
Copyright © 2010 OSIsoft, Inc
Raw Data - Example
Raw values scanned on the data source. Without Exception and Compression tests, these
would all be archived
Time
Tem
per
atu
re
21
Copyright © 2010 OSIsoft, Inc
Exception Test (Interface Level)
Exception Test:
ExcMax (time)
+ ExcDev
- ExcDevCurrent Snapshot
• New values outside the box violate the Exception test.
• The Exception Test is performed by the interface• When a value violates the Exception test, this value
and the previous one are sent to the PI Server.
22
Copyright © 2010 OSIsoft, Inc
Exception Test
When a value passes this test, that value and the previous value are reported. Why? To have a better representation of the actual tag behavior
Snapshot value
+/- ExcDev
Trend if previous value
is not sent
Previous value
Trend if previous
value is sent
Tem
per
atu
re
Time
passes the exception test
23
Copyright © 2010 OSIsoft, Inc
Exception Test - Example
Time
Tem
per
atu
re
P
E
P
P
P
E
E
E
EE
E E
E E
E: Exception P: Previous
E
24
Copyright © 2010 OSIsoft, Inc
Exception Test - Results
Time
Tem
per
atu
re
Successive values sent to the PI Server.When a value is sent, it becomes the new snapshot.
25
Copyright © 2010 OSIsoft, Inc
Directed Exercise
Time Value Snapshot Time Current Snapshot
10:00:00 70.3 10:00:00 70.3
10:01:00 67.1
10:02:00 71.4
10:03:00 70.1
10:04:00 68.2
10:05:00 66.0
10:06:00 65.8
10:07:00 64.2
10:08:00 60.0
10:09:00 63.1
Consider the following parameters: ExcDevPercent: 2 Span; 200 ExcMax: 180
The current snapshot value and timestamp are: 70.3 10:00:00
Which pass the exception test (not including previous values):
26
Copyright © 2010 OSIsoft, Inc
Turning Off Exception?
Behavior of ExcDev = 0, ExcMax = 0, is that Exception Test is turned off All values are sent to PI. This will increase the traffic between the data
collection node and the server.
27
Copyright © 2010 OSIsoft, Inc
Compression Test (PI Server)
Compression Test:
Last archived value
• If a value between the last archive event and the current snapshot is outside the box, the current snapshot violates the compression test. In this case, the value previous to the current snapshot will be archived.
• The Compression Test is done by the PI Server• Compression can be turned off with the Compressing attribute
+ CompDev
- CompDev
Currentsnapshot
< CompMax (s)
28
Copyright © 2010 OSIsoft, Inc
Compression Test – Example
Time
Tem
per
atu
re
A: Archived Value
A A
A
AA
A
A
The compression algorithm is performed on new snapshots to determine which data is kept in the PI archives
29
Copyright © 2010 OSIsoft, Inc
Compression Results
Time
Tem
per
atu
re
When the user requests a tag-time for which the value is interpolated, the difference can be no greater than
±CompDev
Values kept in the PI archives
30
Copyright © 2010 OSIsoft, Inc
Compression Results
After CompressionressionAfter ExceptionRaw values scanned
Tem
per
atu
re
Time
31
Copyright © 2010 OSIsoft, Inc
Turning Off Compression?
Behavior of Compression Compressing set to Off: all exceptions are archived
(no compression) Better Compressing set to ON, CompDev set to 0:
successive identical values (or values aligning perfectly) are not archived. This is much more efficient
32
Copyright © 2010 OSIsoft, Inc
Data Flow
The exception and compression specifications should be adjusted to achieve efficient archive storage without losing significant data.
Disk space and Performance vs Data accuracy
33
Copyright © 2010 OSIsoft, Inc
Exception and Compression Attributes
Each PI Tag can be individually configured for its exception reporting and compression
Exception ReportingAttributes
CompressionAttributes
ExcDev or ExcDevPercent
ExcMax ExcMin
CompDev or CompDevpercent
CompMax CompMin Compressing
34
Copyright © 2010 OSIsoft, Inc
Recommended Data Compression Specifications
Set the Compression Deviation to the minimum change that is measurable by the instrument.
Set the Exception Deviation to ½ of the compression deviation
Note: these are starting point recommendations.
Note: ExcMin, ExcMax, CompMin and CompMax are in SECONDS
35
Copyright © 2008 OSIsoft, Inc
1.3 PI Time Format
Copyright © 2010 OSIsoft, Inc
PI Time Format
Absolute (a specific point in time) * : (NOW) t : 00:00:00 on the current day (TODAY) 18-feb-05 16:00:00
Relative (time is offset from another time) +8h : + 8 hours
Combined t+8h : today + 8 hours
37
Copyright © 2010 OSIsoft, Inc
Absolute Time
dd-mmm-yy HH:mm:ss.00000dd Daymmm Month (Jan, Feb, Mar, Apr, May, …)yy YearHH Hours in 24 hour formatmm Minutesss Seconds00000 Milliseconds
Example:
18-feb-05 10:43:29.323
38
Copyright © 2010 OSIsoft, Inc
Absolute Time
dd-mmm-yy HH:mm:ss
"Date" fields default to the current date"Time" fields default to 00.
Expression Meaning
25 00:00:00 on the 25th of the current month
25-Aug-03 00:00:00 on that date
8: 08:00:00 on the current date
25 8 08:00:00 on the 25th of the current month
21:30:01.02 9:30:01.0200 PM on the current date
39
Copyright © 2010 OSIsoft, Inc
Absolute Time – Other Formats
Symbol Meaning
* Current time
t 00:00:00 on the current day (TODAY)
y 00:00:00 on the previous day (YESTERDAY)
Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. Sunday
00:00:00 on the most recent of that day of the week
Absolute time formats
40
Copyright © 2010 OSIsoft, Inc
Relative Time
Syntax Meaning
+2d + two days
-1.5h - One hour and a half
+32m + 32 minutes
-15 s - 15 seconds
Number of: Hours (h) Minutes (m) Seconds (s)
Leading sign (+ or -) is required. No default time unit: must specify d, h, m, s, w, mo, or y Can use fractions only for Hours, Minutes and Seconds
+2.5h, -0.5m Relative time is most often part of a Combined time
Years (y) Months (mo)
Weeks (w) Days (d)
41
Copyright © 2010 OSIsoft, Inc
Combined Formats
Syntax Meaning
*-8h 8 hours ago
T-7d 00:00:00, 7 days ago
Y+11h Yesterday at 11:00:00 AM
Monday + 14.5h 02:30:00 PM on the most recent Monday
Uses both an absolute and a relative time The absolute part of the time can be *, T, Y, or a day of
the week
42
Copyright © 2010 OSIsoft, Inc
Directed Exercise
PI Time Express the following timestamps using the absolute time
format: Tuesday-2d 1 6: y+8h *-30m
Express the following times in valid PI timestamps: Today at 6:00 AM The 4th of the current month at 16:00 12 hours ago
43
Copyright © 2010 OSIsoft, Inc
What are the two filtering tests that each event that is read on the data source can go through before being archived in the PI Server?
Which of the following are invalid PI times? a. 4 6 d. y-1y
b. 22 22: e. *-Monday
c. t-1.5d f. 09-Jun-06 22:45:35.0943
Group Recap Question (optional)
44
Copyright © 2008 OSIsoft, Inc
2.0 Common Dialog Windows
Copyright © 2010 OSIsoft, Inc
PI Connection Manager Viewing Connection Information
Use the check boxes to connect / disconnect from the available PI servers
Connection settings
Connection information
46
Copyright © 2010 OSIsoft, Inc
PI Connection Manager Editing Connection Settings
The connection settings can de edited
Click the Save button to apply the changes
To change the default PI server, select Tools > Options
47
Copyright © 2010 OSIsoft, Inc
PI Connection Manager Adding a New Connection
To add a new PI server connection, select Server > Add Server
Network Path: either PI Server IP address or Hostname Default User Name: PI user used to connect Password: password if PI user is password protected Confirm: validates the connection at creation time Connection Type: PI 3 or PI 2 server Port Number: 5450 for a PI 3 Server or 545 for a PI 2 Server
48
Copyright © 2010 OSIsoft, Inc
PI Connection ManagerChanging Passwords
A PI user can change is own password from the PI Connection Manager Select Tools > Change Password
49
Copyright © 2010 OSIsoft, Inc
Directed Exercise
Connecting to PI:• Learn about connecting to PI with the PI SDK• Discover the IP address and computer name of your
PI Server
50
Copyright © 2010 OSIsoft, Inc
Tag Search Window – Basic Search
51
Start searching according to the
criteria
Display the attributes/values for selected
tags
Tag search results
Look for a specific value/status/attrib
ute
Look for a specific point
type/class/source
Tag name mask
Select PI Server(s) to
search through
Validate selectio
n
Copyright © 2010 OSIsoft, Inc
Tag Search Strategies
Tag Search using wildcards: Use * to replace any number of charactersExample: flow* = flow_meter1, flow_meter2, flow_meter3
Use ? to replace one character Example: tank?_level = tankA_level, tankB_level
Note 1: Search criteria are not case sensitive
Note 2: Search criteria can be combined Example: Look for Tag Mask = flow* and Point Source = o
52
Copyright © 2010 OSIsoft, Inc
Tag Search Window – Advanced Search
53
SQL-like query based on user-defined conditions
1- Define condition2- Click 'Add'…3- Click 'Search
Copyright © 2010 OSIsoft, Inc
Tag Search Window – Alias Search
54
Search through aliases in the PI ModuleDB (described later)
Copyright © 2010 OSIsoft, Inc
Tag Information Windows
55
Pt. Attr... Pt. Values...
Copyright © 2010 OSIsoft, Inc
Directed Exercise – Searching for tags
Tag Mask: BA*
Tag Mask: *158*
Descriptor: *end*
Advanced Search:
PIpoint.Span > 100 AND
PIpoint.CompDevPercent > 1
Save this search as a favorite.
56
Copyright © 2010 OSIsoft, Inc
What information needs to be specified when creating a new connection to a PI server?
What are the two wildcard characters available in a tag search?
Group Recap Question (optional)
57
Copyright © 2008 OSIsoft, Inc
4.0 PI DataLink
Copyright © 2010 OSIsoft, Inc
Objectives Learn how to effectively use PI DataLink in MS Excel Be able to retrieve current and archived values Be able to retrieve sampled values from the archive Learn how to retrieve calculated values Learn how to retrieve PI expressions values Learn how to filter the results Learn how to use the trend element
PI DataLink
59
Copyright © 2010 OSIsoft, Inc
What is PI DataLink ?
PI DataLink is an OSIsoft Add-In for Microsoft Excel (and Lotus 1-2-3)
This Add-In lets you import data from the PI System into a spreadsheet for further analysis
60
Copyright © 2010 OSIsoft, Inc
PI DataLink Menu
61
1 2 3 4 5 6 7 8
1. Functions that retrieve a single value
2. Functions that retrieve series of values
3. Functions that retrieve calculated values
4. Trend display tool, Tag search and connections
5. Alternate tag identification methods
6. Module Database related methods
7. Settings and help
8. Notification search
Copyright © 2010 OSIsoft, Inc
PI DataLink Menu with Excel 2003
62
Functions that retrieve a single value
Functions that retrieve series of values
Functions that retrieve calculated values
Function to retrieve notifications
Tag search, connections, settings and help
Alternate tag identification methods
Trend display tool
Copyright © 2010 OSIsoft, Inc
PI DataLink Settings
1. Determines how tags selected in the Tag Search dialog window are copied on the spreadsheet: Columns or Rows
2. Determines if the PI server's name is copied automatically in PI DataLink dialog boxes
3. Determines which time zone PI DataLink interprets time from (PI server vs client station)
4. Option to Display #N/A instead of blanks when there are more cells than data to fill them
5. Option to ignore locale settings on the operating system when parsing timestamps
6. Determines the number format for PI DataLink results
7. Determines the date/time format for PI DataLink results
12
45
7
6
3
63
Copyright © 2010 OSIsoft, Inc
DataLink Settings
64
1
2
4
3
Copyright © 2010 OSIsoft, Inc
Help on functions
Hovering the mouse over a specific function make the description appears below the ribbon.
To get help from the documentation, click on the function icon and press F1 on the keyboard.
65
Copyright © 2010 OSIsoft, Inc
Preset functions
66
• Every function in the ribbon with a triangle pointing downward gives you preset functions
• These preset functions have the time related fields already filled for you or location of data
• Click on the desired options to use them
Copyright © 2010 OSIsoft, Inc
Current Value
Function: PICurrVal Retrieves the current value for a tag
Arguments1. PI Server name or cell reference
2. Tag name or cell reference(s) to a list of tags
3. Output Cell
4. Display the timestamp
67
1
2
3
4
Copyright © 2010 OSIsoft, Inc
Archive Value
Function: PIArcVal Retrieves a single value from the PI archive
for a specified time stamp
Arguments1. Tag or Expression data retrieval
2. PI Server name or cell reference
3. Tag name or cell reference(s) to a list of tags
4. Time when to retrieve the data
5. How data are retrieved
6. Output Cell
7. Display the timestamp
68
1
2
3
4
5
6
7
Copyright © 2010 OSIsoft, Inc
Archive Value
Retrieval Mode Retrieves a value from the PI archive for a specified
time
69
Copyright © 2010 OSIsoft, Inc
Archive Value
Retrieval Mode
70
• Previous - retrieves the value exactly matching or preceding the specified timestamp. • Previous only - retrieves the value preceding the specified timestamp. • Interpolated - interpolates the value at the specified time.• Auto - retrieves the value exactly matching or interpolates the value at the specified time. • Next - retrieves the value exactly matching or following the specified timestamp. • Next Only - retrieves the value following the specified timestamp. • Exact Time - retrieves only a value exactly matching the timestamp, or returns No events found if no value exists.
Copyright © 2010 OSIsoft, Inc
Interpolated Values
0
0.5
1
1.5
2
2.5
3
3.5
0 1 2 3 4 5
Time
Val
ues
71
Copyright © 2010 OSIsoft, Inc
Tag Attributes
72
1
2
3
4
Function: PITagAtt Retrieves an attribute associated with a tag
Arguments1. PI Server name or cell reference
2. Tag name or cell reference(s) to a list of tags
3. Attribute
4. Output Cell
Copyright © 2010 OSIsoft, Inc
Update a Spreadsheet
Pressing F9 key does Recalculates Excel dynamic time functions
Recalculates Current Value function
Recalculates other PI DataLink functions based on these functions
Pressing CTRL+SHIFT+ALT+F9 simultaneously does Everything that F9 does Recalculates other PI DataLink functions based on relative PI time
(i.e. ‘Monday', '*', '*-3h')
Best practice to build your spreadsheet Use references to cells for the Tag Name, Start Time and End Time Use references to cells containing dynamic Excel time functions
73
=NOW() and =TODAY()
=PICURRVAL()
Copyright © 2010 OSIsoft, Inc
Refreshing Your Queries
74
Copyright © 2010 OSIsoft, Inc
Dynamic Time Functions in Excel
Function: =TODAY() Returns today’s date at 00:00:00
Example: =Today() – 1signifies yesterday at 00:00:00
Function: =NOW() Returns the current time and date
Example: =Now() - 3/24signifies 3 hours ago
75
Notes: These functions are in units per day
Copyright © 2010 OSIsoft, Inc
Directed Exercise
1. Open the PI and Excel time.xls spreadsheet located on the CD
2. Fill the table converting the desired times with PI and Excel time abbreviations
76
Copyright © 2010 OSIsoft, Inc
Exercise DL1
Objective: Learn to extract a single value from a PI Database using the following functions:
Current value function Archive value function Tag attributes function
77
Activity Report
Copyright © 2010 OSIsoft, Inc
Archived vs. Sampled Values
Archived:
Values stored in the PI archive
Sampled:
Values evenly spaced in time. These values are interpolated from the archived values.
78
Copyright © 2010 OSIsoft, Inc
Compressed data (start time/end time)Function: PICompDat
Retrieves compressed data from the archive based on a start time and an end time
Arguments1. Search for a time range
2. PI Server name or cell reference
3. Tag name or cell reference(s) to a list of tags
4. Date/Time to begin extraction to Date/Time to end; data can be returned in reverse order
5. Filter
6. Show or hide the filtered data zone
7. How to treat data at the beginning and end of the time range
8. Output Cell
9. Display count, timestamps, quality bits and annotations
10. Vertical or horizontal result
79
1
2
3
4
567
89
10
Copyright © 2010 OSIsoft, Inc
Calculation Boundary Types
Inside (default): Returns values at start and end times, if they exist, or the nearest values occurring within the range.
• Outside: Returns the closest values occurring immediately outside the range.
• Interpolated: Returns interpolated values at start and end times.
• Auto: Interpolated, but using Inside behavior for tags with step attributes set on Windows-based PI Servers.
80
Copyright © 2010 OSIsoft, Inc
Calculation Boundary Types
Inside (B,C,D) Outside (A,B,C,D,E) Interpolated (F,B,C,D,G)
B
C
D
E
Start
Time
End
Time
A
F (interpolation) G (interpolation)
81
Copyright © 2010 OSIsoft, Inc
Compressed Data (start time/number)
Function: PINCompDat Retrieves compressed data from the archive based on a start
time and a number of values to be returned
Arguments1. Search for a number of value
2. PI Server name or cell reference
3. Tag name or cell reference(s) to a list of tags
4. Date/Time to begin extraction to Date/Time with a number of values; data can be returned in reverse order
5. Filter
6. Show or hide the filtered data zone
7. How to treat data at the beginning and end of the time range
8. Output Cell
9. Display timestamps, quality bits and annotations
10. Vertical or horizontal result
82
1
2
3
4
567
89
10
Copyright © 2010 OSIsoft, Inc
Quality Flags
Some applications allow reading or writing of additional information such as the quality or the status of a specific value (questionable, substituted)
These bits can be shown in a separate column, beside the value itself
Consult interface-specific documentation to determine if they support this functionality
The PI Server allows addition of annotations on archived values
This information can be shown with the show annotations option
They will be in another column beside the other(s)
83
Copyright © 2010 OSIsoft, Inc
Sampled Data
Function: PISampDat Retrieves evenly spaced interpolated values
from the archive
Arguments1. Tag or Expression data retrieval
2. PI Server name or cell reference
3. Tag name or cell reference(s) to a list of tags
4. Date/Time to begin interpolation with evenly time space data and Date/Time to end
5. Filter
6. Show or hide the filtered data zone
7. Output Cell
8. Display timestamps
9. Vertical or horizontal result
84
1
2
3
4
5
6
789
Copyright © 2010 OSIsoft, Inc
Resize the array
If the array has not been resized to show all values, the last row of data will contain this message:
• Resize to show all values
85
Copyright © 2010 OSIsoft, Inc
To Edit an Array
Three options are available:1. Manually:
1. Select the new cell range for the array
2. Press F23. Press CTRL+SHIFT+ENTER simultaneously
2. Via the dialog window:1. Right-click on a cell in the array
2. Select the name of the function in the contextual menu
3. Do the modifications in the dialog window
4. Click on OK
3. For functions that need to be resized:1. Right-click on a cell in the array
2. Select the Recalculate (Resize) PIDL formula option
86
Copyright © 2010 OSIsoft, Inc
How to Resize an Array
87
Copyright © 2010 OSIsoft, Inc
Array Values
Use this PI DataLink setting to output #N/A in the cells of a PI DataLink array not containing any data
88
Copyright © 2010 OSIsoft, Inc
Exercise DL2
Objective: Learn to retrieve process data using the Compressed Data function
89
Operational Start Up
Copyright © 2010 OSIsoft, Inc
Timed Data
Function: PITimeDat Retrieves sampled data synchronized with an array
of time values
Arguments1. Tag or Expression data retrieval
2. PI Server name or cell reference
3. Tag name or cell reference(s) to a list of tags
4. Time when to retrieve the data; it must use reference cells only
5. How data are retrieved
6. Output Cell
90
1
2
3
4
5
6
Copyright © 2010 OSIsoft, Inc
Calculated Data
Function: PICalcDat Retrieves a calculated value for a
given tag, in a specified time interval. Calculations allowed are: total, minimum, maximum, standard deviation, range, count, average and mean
Arguments1. Tag or Expression data retrieval
2. PI Server name or cell reference
3. Tag name or cell reference(s) to a list of tags
4. Date/Time to begin calculation to Date/Time to end
91
1
2
3
4
Copyright © 2010 OSIsoft, Inc
Calculated Data
Arguments…5. Sub-interval calculation
6. Filter
7. Conversion Factor
8. Type of calculation
9. Weighting
10. How expression is evaluated
11. Sampling frequency
12. Minimum % of good value needed
13. Output Cell
14. Display time, minimum or maximum timestamp inside the interval
15. Display % of good value
16. Vertical or horizontal result
92
5
6
7
8
9
10
11
12
13
14
15
16
Copyright © 2010 OSIsoft, Inc
The Three Rules of Performance Equations
Numbers and operators are written as is. Tag names and timestamps are written in
single quotes: 'CDT158' Strings are written in double quotes:
"This is a string"
93
Copyright © 2010 OSIsoft, Inc
Performance Equation Functions
94
• % of time tag has good valuesPctGood()• Range of min to maxRange()• Time-weighted standard deviationStDev()• Time-weighted averageTagAvg()• Event-weighted averageTagMean()• Maximum value in periodTagMax()• Minimum value in periodTagMin ()• Time integral over a periodTagTot()
Copyright © 2010 OSIsoft, Inc
What is a Conversion Factor?
Used with PI DataLink, in the Calculated Data function
A multiplier used to change a number from one unit of measure to anothero Ex: 1000 g/kg, 2.54 cm/inch, 24 hours/day, 1440 minutes/day
When using the Total function in Calculated Data, it is used to correct PI’s assumption that the data is in units per day
Is equal to 1.0 when source data is in units/day
95
Copyright © 2010 OSIsoft, Inc
Conversion Factors
It is important to supply the correct conversion factor when calculating TOTALS with PI because PI assumes the engineering units of a rate tag is units per day.
96
Example: For a flow measured in m³/h, a conversion factor of 24 must be supplied to convert between the engineering units of the rate tag and the units/day assumption of PI.
Rate tag Assumption of Conversionengineering units the PI Server Factor
Units / day Units / day 1Units / hour Units / day 24Units / minute Units / day 1440Units / second Units / day 86400
Copyright © 2010 OSIsoft, Inc
Computing Totals
0
1
3
5
7
0 1 2 3 4 5 6 7 8 9 10 11
Time (m)
Flow (GPM)
Normal total = (3 gpm x 3m) + (5 gpm x 2m) + (1 gpm x 3m) = 22 gallons
PI assumes this measurement to
be units/day
PI total = ((3 gallons per day x 3m x 1day/1440m) + (5 gallons per day x 2m x 1day/1440m) + (1 gallon per day x 3m x 1day/1440m)) *
1440m/1d = 22 gallons
The total computed by PI must be multiplied by a factor of 1440
Copyright © 2010 OSIsoft, Inc
Exercise DL3
Objective: Learn to extract multiple calculated values from a PI Database using the Calculated Data function
98
Daily Production
Copyright © 2010 OSIsoft, Inc
Filtered Sampled Data
Function: PISampFilDat Retrieves a series of evenly spaced interpolated
values that satisfy a filter condition
Arguments1. Filter expression using the Performance Equation
syntax
In this example, the filter is written to remove all values from tag <tagname> which are lesser or equal than 120
2. Show or hide the filtered data zone
99
1
2
Copyright © 2010 OSIsoft, Inc
Filtered Compressed Data
Function: PICompFilDat or PINCompFilDat Retrieves compressed data based on a start time and
an end time or an initial date/time and a number of values to be returned which also satisfy a filter condition
Arguments1. Search for a time range or for a number of value
2. Filter expression using the Performance Equation syntax
In this example, the filter is written to remove all values from tag <another tagname> which are not equal to the digital state ON
3. Show or hide the filtered data zone
100
23
1
Copyright © 2010 OSIsoft, Inc
Conditional formatting in Excel 2007
New conditional formatting of Excel gives great look and a comprehensive perspective to your report
Useful to compare values extracted from PI
101
Copyright © 2010 OSIsoft, Inc
CONCATENATE Function in Excel
Cannot combine text and references to cells in PI DataLink dialog boxes
Use the CONCATENATE function to join several text strings into one text string Up to 30 text items Items can be:
o Texto Numberso References to cell
Syntax: =CONCATENATE(text1, text2, etc…) Example: =Concatenate("my name", " is ", B2)
(assuming that cell B2 contains a name)
102
Copyright © 2010 OSIsoft, Inc
Exercise DL4
Objective: Learn to apply filters to select the values to extract from a PI Database using the following function Sampled Data
103
Off-Specification Production
Copyright © 2010 OSIsoft, Inc
Expression Calculation
Function: PIExpDat Retrieves data from calculations on tag
expressions (via the Sampled Data dialog box)
Arguments1. PI Server name or cell reference
2. Expression to evaluate following the Performance Equation syntax
104
2
1
Copyright © 2010 OSIsoft, Inc
Other Expression Calculation Methods
Expression calculations can also be performed For one specific time in the past (Archive Value dialog box) For a specific list of timestamps (Timed Data dialog box) To obtain statistics or totals on an expression (Advanced Calculated
Data dialog box)
105
Copyright © 2010 OSIsoft, Inc
PI Calculated Data vs. PI Expression
106
PI Calculated Data - Compute the maximum of sinusoid tag over each 24 hour period for the last 168 hours (7 days)
PI Expression - Compute the maximum of sinusoid tag for the most recent 8 hours, every 24 hours period for the last 168 hours (7 days)
Copyright © 2010 OSIsoft, Inc
PI Calculated Data vs. PI Expression
PI Expression
PI Calculated Data
time
**-7d
max maxmax max maxmax max1day 1day1day 1day 1day1day 1day
time
8h 8h8h 8h 8h8h 8h
1day 1day1day 1day 1day1day 1day
max maxmax max maxmax max
If the time interval in the PI expression was changed to 1 day, it means forTagMax(‘sinusoid’, ‘*-1d’, ‘*’) function, the results of both expressions will be identical.
107
Copyright © 2010 OSIsoft, Inc
Exercise DL5
Objectives: Learn to carry out a calculation for the current value of an expression;
Use MS Excel’s Conditional Formatting to make your PI Data Link reports more useful.
108
Expression Calculation
Copyright © 2010 OSIsoft, Inc
Exercise DL6 (Optional)
Objectives: Learn to apply complex filters to extract archived
values Learn to synchronize data extraction Learn to extract maximum value of a time range
using Calculated data function Use MS Excel’s Conditional Formatting to make
your PI DataLink report easy to use
109
Quality Control Report
Copyright © 2010 OSIsoft, Inc
Time Filtered
Function: PITimeFilter Retrieves the amount of time where an expression is true
Arguments1. PI Server name or cell reference
2. Expression to evaluate
3. Date/Time to begin evaluation to Date/Time to end
4. Sub-interval evaluation
5. Time units of the response
6. Output Cell
7. Display Start Time or End Time
8. Display % of good value
9. Vertical or horizontal result
118
1
2
3
5
6
8
9
7
4
Copyright © 2010 OSIsoft, Inc
Data validation cell
Data validation constrains input answer in a cell to criteria:
Integer numbers only Decimal numbers only Date and/or time Items chosen from a list
Useful to build preformatted report.
119
Copyright © 2010 OSIsoft, Inc
Exercise DL7
Objective: Calculate an operating time with the function Time Filtered
120
Operating Time - Excel
Copyright © 2010 OSIsoft, Inc
Trend Display Tool
Create trends similar to PI ProcessBook trends Based on PI Data and/or Data
from the worksheet Option to update automatically Option to modify scales and
appearance Possibility to zoom in a part of
the trend
Select PI Ribbon > Insert Trend
121
Copyright © 2010 OSIsoft, Inc
Trend Display ToolConfiguration
Trend Wizard Define data sources Define how they are
displayed
Format Properties Configure every single
item on trend Colors, line styles, etc.
122
Copyright © 2010 OSIsoft, Inc
Trend Display ToolRight-Click Menu
The right-click menu allows the user to: Temporary modify the scales and the time frame Revert to original scales and time frame Permanently modify the scales and the time frame
(the Revert option does not apply to this change) Add a scroll bar for the time frame Add markers Change the trend's appearance
(colors, lines, etc.) Add or remove traces Delete, move, resize the trend
123
Copyright © 2010 OSIsoft, Inc
Exercise DL8
Objective: Learn to use the Insert Trend function with: Data from MS Excel worksheet and PI data
124
Tank Level
Copyright © 2010 OSIsoft, Inc
PointID to Tag
Function: PIPointIDToTag This function allows the user to always make reference to a
specific point ID and not the tag name. Very useful when tag names are expected to change
Arguments1. PI Server name or cell reference
2. Point ID
2. Output Cell
125
1
2
3
Copyright © 2010 OSIsoft, Inc
Attribute Mask to Tag
Function: PIAttributeMaskToTag This function returns a list of tag names in PI that match
one o more specified tag attribute values.
Arguments1. PI Server name or cell reference
2. Tag name or cell reference(s) to a list of tags
3. Descriptor mask, default to everything
4. Point Source mask, default to everything
5. Point Type mask , default to everything
6. Point Class mask , default to everything
7. Engineering Units mask , default to everything
8. Output Cell
9. Vertical or horizontal result
126
1
2
3
5
6
8
9
7
4
Copyright © 2010 OSIsoft, Inc
Recap Exercise DL9
Time Permitting - Build a PI DataLink Report to: Use PI function to show number of saleable boards produced
per shift Use PI function to show average length of saleable boards Show total value of scrap produced per shift Add meaningful text labels and formatting to the data to
facilitate its use Work in teams if you wish Bonus: Display the current value of the tag in RED when the
reactor temperature drops below 60
127
(Optional)
Copyright © 2010 OSIsoft, Inc 145
Conclusion
“By using PI, we have been able to see what we guessed was happening. We have been able to validate our ideas and turn them into substantive savings. In our case, 10% of our operations budget.”
Chilkoot Ward Director of UtilitiesUniversity of Alaska (Power Generation)
Copyright © 2010 OSIsoft, Inc
Questions
146