Download presentation
Presentation is loading. Please wait.
Published byKristopher Blankenship Modified over 9 years ago
1
Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals
2
Copyright © 2008 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
3
Copyright © 2008 OSIsoft, Inc Course Overview Length: 1 day Interactive course: Theory 50% Exercises and examples 50% 3
4
Copyright © 2008 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 and Processbook Please ask questions as they arise! 4
5
Copyright © 2008 OSIsoft, Inc Course Content Introduction to PI Common Dialog Windows PI Tags Data Flow PI Time Format PI Processbook PI Datalink 5
6
Copyright © 2008 OSIsoft, Inc 1.0 Introduction to PI
7
Copyright © 2010 OSIsoft, LLC 1.0 PI Basics 7
8
Copyright © 2010 OSIsoft, LLC 1.1 What is a PI System?
9
Copyright © 2008 OSIsoft, Inc The PI System 2010 9 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 Data IT MONITOR Custom Data APIs / SDKs Relational Data OLEDB / ODBC SQL SERVER / ORACLE Web Services SOA / EXTERNAL DATA LEGACY APPS Real-Time Data DCS / PLC / SCADA / OPC HISTORIANS / INTERFACES
10
Copyright © 2008 OSIsoft, Inc Basic Parts 10
11
Copyright © 2008 OSIsoft, Inc Architecture of a Typical PI System 11
12
Copyright © 2010 OSIsoft, LLC 1.2 PI Tags 12
13
Copyright © 2008 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. 13 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
14
Copyright © 2008 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) 14
15
Copyright © 2010 OSIsoft, Inc. Data Flow
16
Copyright © 2008 OSIsoft, Inc Data Tests Every value can go through 2 data screening tests 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” 16
17
Copyright © 2008 OSIsoft, Inc 17 Data Flow Data acquisition node PI server
18
Copyright © 2010 OSIsoft, Inc. New Event Processing PI Interface Exception Report PISnapSS Snapshot Data Compression Event Queue file(s) Shared Memory PIArchSS Archive Cache Primary Archive Online Archives Archive 18
19
Copyright © 2010 OSIsoft, Inc. Exception Filtering
20
Copyright © 2010 OSIsoft, Inc. PI Interface Exception Report New Event Processing PISnapSS Snapshot Data Compression Event Queue file(s) Shared Memory PIArchSS Archive Cache Primary Archive Online Archives Archive 1
21
Copyright © 2010 OSIsoft, Inc. 21 Exception Test (Interface Level) Exception test: ExcMax (time) + ExcDev - ExcDev Current 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. 22 Exception Test When a value violates 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 Temperature Time passes the exception test
23
Copyright © 2010 OSIsoft, Inc. 23 Raw Data - Example Raw values scanned on the data source. Without Exception and Compression tests, these would all be archived Time Temperature
24
Copyright © 2010 OSIsoft, Inc. 24 Exception Test - Example Time Temperature P E P P P E E E EE E E EE E: Exception P: Previous E
25
Copyright © 2010 OSIsoft, Inc. 25 Exception Test - Results Time Temperature Successive values sent to the PI Server. When a value is sent, it becomes the new snapshot.
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. 26
27
Copyright © 2010 OSIsoft, Inc. PI Exception Test - Example Scan = 1m, ExcDev = 1, ExcMax = 10m 27 DCS Value Exception Current Snapshot 12:00 50.0 Yes 12:00 50.0 12:01 50.3 No 12:00 50.0 12:02 51.1 Yes 12:02 51.1 … … No 12:02 51.1 12:12 51.4 Yes 12:12 51.4
28
Copyright © 2010 OSIsoft, Inc. PI Server Snapshot and Data Compression
29
Copyright © 2010 OSIsoft, Inc. New Event Processing PI Interface Exception Report PISnapSS Snapshot Data Compression Event Queue file(s) Shared Memory PIArchSS Archive Cache Primary Archive Online Archives Archive 2
30
Copyright © 2010 OSIsoft, Inc. 30 Snapshot The snapshot contains the most recent value, for each tag in the PI server
31
Copyright © 2010 OSIsoft, Inc. New Event Processing PI Interface Exception Report PISnapSS Snapshot Data Compression Event Queue file(s) Shared Memory PIArchSS Archive Cache Primary Archive Online Archives Archive 2
32
Copyright © 2010 OSIsoft, Inc. 32 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 Current snapshot < Compmax (s)
33
Copyright © 2010 OSIsoft, Inc. 33 Compression Test – Example Time Temperature A: Archived Value A A A A A A A The compression algorithm is performed on new snapshots to determine which data is kept in the PI archives
34
Copyright © 2010 OSIsoft, Inc. 34 Compression Results Time Temperature 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
35
Copyright © 2010 OSIsoft, Inc. Compression Results Raw values scanned. 35 After Compression. After Exception. Time Temperature
36
Copyright © 2010 OSIsoft, Inc. New Event Processing PI Interface Exception Report PISnapSS Snapshot Data Compression Event Queue file(s) Shared Memory PIArchSS Archive Cache Primary Archive Online Archives Archive 3a 3b
37
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. It is appropriate to turn off data compression for laboratory, manually entered, totalized, and other tags where each event is significant in itself 37
38
Copyright © 2010 OSIsoft, Inc. 38 Data Compression – How Much Data? This highly variable data can not be compressed by PI. Every value is a pivot point for the compression algorithm. All values are archived. This data appears highly compressible. Probably only three or four of these values would be stored in the archive.
39
Copyright © 2010 OSIsoft, Inc. 39 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
40
Copyright © 2010 OSIsoft, Inc. 40 Exception and Compression Attributes Each PI Tag can be individually configured for its exception reporting and compression Exception Reporting Attributes Compression Attributes ExcDev or ExcDevPercent ExcMax ExcMin CompDev or CompDevPercent CompMax CompMin Compressing
41
Copyright © 2010 OSIsoft, Inc. 41 Set Appropriate Zero & Span Be careful when defining Zero and Span attributes because: ExcDevPercent and CompDevPercent attributes are automatically adjusted according to Span; The accuracy and range of Float16 values are set by the Zero and Span; Zero and Span are used by many functions in PI ProcessBook.
42
Copyright © 2010 OSIsoft, Inc. Step Attribute The Step attribute affects both display and compression: Instead of using the usual compression algorithm, a second exception test is applied using the CompDev value. 42
43
Copyright © 2010 OSIsoft, Inc. 43 Exception and Compression Defaults ExcDevPercent = 1 (% of span) ExcMax = 600 (10 minutes) CompDevPercent = 2 (% of span) CompMax = 28800 (8 hours) Zero = 0 Span = 100
44
Copyright © 2010 OSIsoft, Inc. Recommendations Set the compression deviation to the minimum change that is measurable by the instrument. Set the exception deviation to ½ of the compression deviation. These are starting point recommendations. 44
45
Copyright © 2008 OSIsoft, Inc 1.3 PI Time Format
46
Copyright © 2008 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 46
47
Copyright © 2008 OSIsoft, Inc Absolute Time dd-mmm-yy HH:mm:ss.00000 ddDay mmmMonth (Jan, Feb, Mar, Apr, May, …) yyYear HHHours in 24 hour format mmMinutes ssSeconds 00000Milliseconds Example: 18-feb-05 10:43:29.323 47
48
Copyright © 2008 OSIsoft, Inc Absolute Time dd-mmm-yy HH:mm:ss "Date" fields default to the current date "Time" fields default to 00. ExpressionMeaning 2500:00:00 on the 25th of the current month 25-Aug-0300:00:00 on that date 8:08:00:00 on the current date 25 808:00:00 on the 25th of the current month 21:30:01.029:30:01.0200 PM on the current date 48
49
Copyright © 2008 OSIsoft, Inc Absolute Time – Other Formats SymbolMeaning *Current time t00:00:00 on the current day (TODAY) y00: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 49
50
Copyright © 2008 OSIsoft, Inc Relative Time SyntaxMeaning +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) 50
51
Copyright © 2008 OSIsoft, Inc Combined Formats SyntaxMeaning *-8h8 hours ago T-7d00:00:00, 7 days ago Y+11hYesterday at 11:00:00 AM Monday + 14.5h02: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 51
52
Copyright © 2008 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 52
53
Copyright © 2008 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 6d. y-1y b. 22 22:e. *-Monday c. t-1.5d f. 09-Jun-06 22:45:35.0943 Group Recap Question (optional) 53
54
Copyright © 2008 OSIsoft, Inc 2.0 Common Dialog Windows
55
Copyright © 2008 OSIsoft, Inc PI Connection Manager Viewing Connection Information Use the check boxes to connect / disconnect from the available PI servers Connection settings Connection information 55
56
Copyright © 2008 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 56
57
Copyright © 2008 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 57
58
Copyright © 2008 OSIsoft, Inc PI Connection Manager Changing Passwords A PI user can change is own password from the PI Connection Manager Select Tools > Change Password 58
59
Copyright © 2008 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 59
60
Copyright © 2008 OSIsoft, Inc Tag Search Window – Basic Search 60 Start searching according to the criteria Display the attributes/values for selected tags Tag search results Look for a specific value/status/attribute Look for a specific point type/class/source Tag name mask Select PI Server(s) to search through Validate selection
61
Copyright © 2008 OSIsoft, Inc Tag Search Strategies Tag Search using wildcards: Use * to replace any number of characters Example: 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 61
62
Copyright © 2008 OSIsoft, Inc Tag Search Window – Advanced Search 62 SQL-like query based on user- defined conditions 1- Define condition 2- Click 'Add' … 3- Click 'Search
63
Copyright © 2008 OSIsoft, Inc Tag Search Window – Alias Search 63 Search through aliases in the PI ModuleDB (described later)
64
Copyright © 2008 OSIsoft, Inc Tag Information Windows 64 Pt. Attr... Pt. Values...
65
Copyright © 2008 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. 65
66
Copyright © 2008 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) 66
67
Copyright © 2008 OSIsoft, Inc 4.0 PI Processbook
68
Copyright © 2008 OSIsoft, Inc 5.0 PI DataLink
69
Copyright © 2008 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 69
70
Copyright © 2008 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 70
71
Copyright © 2008 OSIsoft, Inc PI DataLink Menu 71 12345678 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
72
Copyright © 2008 OSIsoft, Inc PI DataLink Menu with Excel 2003 72 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
73
Copyright © 2008 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 1 2 4 5 7 6 3 73
74
Copyright © 2008 OSIsoft, Inc DataLink Settings 74 1 2 4 3
75
Copyright © 2008 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. 75
76
Copyright © 2008 OSIsoft, Inc Preset functions 76 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
77
Copyright © 2008 OSIsoft, Inc Current Value Function: PICurrVal Retrieves the current value for a tag Arguments 1. 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 77 1 2 3 4
78
Copyright © 2008 OSIsoft, Inc Archive Value Function: PIArcVal Retrieves a single value from the PI archive for a specified time stamp Arguments 1. 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 78 1 2 3 4 5 6 7
79
Copyright © 2008 OSIsoft, Inc Archive Value Retrieval Mode Retrieves a value from the PI archive for a specified time only if an archived value exists at that time 79
80
Copyright © 2008 OSIsoft, Inc Interpolated Values 0 0.5 1 1.5 2 2.5 3 3.5 012345 Time Values 80
81
Copyright © 2008 OSIsoft, Inc Tag Attributes 81 1 2 3 4 Function: PITagAtt Retrieves an attribute associated with a tag Arguments 1. PI Server name or cell reference 2. Tag name or cell reference(s) to a list of tags 3. Attribute 4. Output Cell
82
Copyright © 2008 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 82 =NOW() and =TODAY() =PICURRVAL()
83
Copyright © 2008 OSIsoft, Inc Refreshing Your Queries 83
84
Copyright © 2008 OSIsoft, Inc Dynamic Time Functions in Excel Function: =TODAY() Returns today’s date at 00:00:00 Example: = Today() – 1 signifies yesterday at 00:00:00 Function: =NOW() Returns the current time and date Example: =Now() - 3/24 signifies 3 hours ago 84
85
Copyright © 2008 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 85
86
Copyright © 2008 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 86 Activity Report
87
Copyright © 2008 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. 87
88
Copyright © 2008 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 Arguments 1. 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 88 1 2 3 4 5 6 7 8 9 10
89
Copyright © 2008 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) 89
90
Copyright © 2008 OSIsoft, Inc Sampled Data Function: PISampDat Retrieves evenly spaced interpolated values from the archive Arguments 1. 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 90 1 2 3 4 5 6 7 8 9
91
Copyright © 2008 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 91
92
Copyright © 2008 OSIsoft, Inc To Edit an Array Three options are available: 1. Manually: 1. Select the new cell range for the array 2. Press F2 3. 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 92
93
Copyright © 2008 OSIsoft, Inc How to Resize an Array 93
94
Copyright © 2008 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 94
95
Copyright © 2008 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 Arguments 1. 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 95 1 2 3 4 5 6 7 8 9 10
96
Copyright © 2008 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) 96
97
Copyright © 2008 OSIsoft, Inc "IF" Function in Excel Syntax: =IF(Logical_test, value_if_true, value_if_false) 97
98
Copyright © 2008 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 98
99
Copyright © 2008 OSIsoft, Inc Exercise DL2 Objective: Learn to retrieve process data using the Compressed Data function 99 Operational Start Up
100
Copyright © 2008 OSIsoft, Inc Timed Data Function: PITimeDat Retrieves sampled data synchronized with an array of time values Arguments 1. 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 100 1 2 3 4 5 6
101
Copyright © 2008 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 Arguments 1. 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 101 1 2 3 4
102
Copyright © 2008 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 102 5 6 7 8 9 10 11 12 13 14 15 16
103
Copyright © 2008 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" 103
104
Copyright © 2008 OSIsoft, Inc Performance Equation Functions 104
105
Copyright © 2008 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 another o 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 105
106
Copyright © 2008 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. 106 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.
107
Copyright © 2008 OSIsoft, Inc Computing Totals 0 1 3 5 7 01234567891011 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
108
Copyright © 2008 OSIsoft, Inc Exercise DL3 Objective: Learn to extract multiple calculated values from a PI Database using the Calculated Data function 108 Daily Production
109
Copyright © 2008 OSIsoft, Inc Filtered Sampled Data Function: PISampFilDat Retrieves a series of evenly spaced interpolated values that satisfy a filter condition Arguments 1. Filter expression using the Performance Equation syntax In this example, the filter is written to remove all values from tag which are lesser or equal than 120 2. Show or hide the filtered data zone 109 1 2
110
Copyright © 2008 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 Arguments 1. 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 which are not equal to the digital state ON 3. Show or hide the filtered data zone 110 2 3 1
111
Copyright © 2008 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 111 Off-Specification Production
112
Copyright © 2008 OSIsoft, Inc Expression Calculation Function: PIExpDat Retrieves data from calculations on tag expressions (via the Sampled Data dialog box) Arguments 1. PI Server name or cell reference 2. Expression to evaluate following the Performance Equation syntax 112 2 1
113
Copyright © 2008 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) 113
114
Copyright © 2008 OSIsoft, Inc PI Calculated Data vs. PI Expression 114
115
Copyright © 2008 OSIsoft, Inc PI Calculated Data vs. PI Expression PI Expression PI Calculated Data time * *-7d max 1day time 8h 1day max If the time interval in the PI expression was changed to 1 day, it means for TagMax(‘sinusoid’, ‘*-1d’, ‘*’) function, the results of both expressions will be identical. 115
116
Copyright © 2008 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. 116 Expression Calculation
117
Copyright © 2008 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 117 Quality Control Report
118
Copyright © 2008 OSIsoft, Inc Advanced Calculated Data Returns a single calculated value or evenly spaced calculated values from the PI data archive Advanced features: Filtering Expression sampling options Event-weighted or time- weighted calculations Definition of a minimum percent of good values 118
119
Copyright © 2008 OSIsoft, Inc Expression Sampling Modes - Example Event-weighted average between 11 PM and 12 AM for tag CDT158 with a filter expression like ( ‘BA:CONC.1’ + ‘BA:TEMP.1’ > 30 ) 119
120
Copyright © 2008 OSIsoft, Inc CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/2008 23:00:00 12/01/2008 00:00:00 Expression Sampling Modes – Point Compressed Evaluates the filter expression at the timestamp of any compressed value of the source point 120 Filter Expression is ‘BA:CONC.1’ + ‘BA:TEMP.1’ > 30 75.45 75.32 17.21 23.1 28.97 35.54 44.76 61.12 63.25 64.75 67.25
121
Copyright © 2008 OSIsoft, Inc CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/2008 23:00:00 12/01/2008 00:00:00 Expression Sampling Modes – Expression Compressed Evaluates the filter expression at the timestamp of any compressed values of any tags in the filter expression 121 Filter Expression is ‘BA:CONC.1’ + ‘BA:TEMP.1’ > 30 61.21 17.86 14.65 17.54 33.76 46.89 54.79
122
Copyright © 2008 OSIsoft, Inc CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/2008 23:00:00 12/01/2008 00:00:00 Expression Sampling Modes – Interpolated Evaluates the filter expression at evenly spaced sampling intervals 122 Filter Expression is ‘BA:CONC.1’ + ‘BA:TEMP.1’ > 30 73.98 26.21 29.56 50.34 62.97
123
Copyright © 2008 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 123 (Optional)
124
Copyright © 2008 OSIsoft, Inc Questions 124
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.