Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals.

Slides:



Advertisements
Similar presentations
Introduction to Microsoft Access
Advertisements

Setting up an E-Larm A Step by Step Tutorial Engineering Consultants Group, Inc.
Microsoft Excel Presented by ShoWorks Fair Software and Online Entries
Introduction to Excel Formulas, Functions and References.
Microsoft Office XP Microsoft Excel
Developing an Excel Application
Tutorial 8: Developing an Excel Application
Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts
Calendar Browser is a groupware used for booking all kinds of resources within an organization. Calendar Browser is installed on a file server and in a.
Exploring Microsoft Excel 2002 Chapter 7 Chapter 7 List and Data Management: Converting Data to Information By Robert T. Grauer Maryann Barber Exploring.
XP New Perspectives on Microsoft Office Excel 2003, Second Edition- Tutorial 11 1 Microsoft Office Excel 2003 Tutorial 11 – Importing Data Into Excel.
Tutorial 11: Connecting to External Data
End Show Introduction to Electronic Spreadsheets Unit 3.
PI ProcessBook, PI DataLink and RtWebParts
Excel Web App By: Ms. Fatima Shannag.
FIRST COURSE Excel Lecture. XP 2 Introducing Excel Microsoft Office Excel 2007 (or Excel) is a computer program used to enter, analyze, and present quantitative.
DEMONSTRATION FOR SIGMA DATA ACQUISITION MODULES Tempatron Ltd Data Measurements Division Darwin Close Reading RG2 0TB UK T : +44 (0) F :
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts
131 Agenda Overview Review Roles Lists Libraries Columns.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Computer Literacy BASICS
Database Applications – Microsoft Access Lesson 2 Modifying a Table and Creating a Form 45 slides in presentation Accessibility check 9/14.
Managing Business Data Lecture 8. Summary of Previous Lecture File Systems  Purpose and Limitations Database systems  Definition, advantages over file.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
European Computer Driving Licence Syllabus version 5.0 Module 4 – Spreadsheets Chapter 22 – Functions Pass ECDL5 for Office 2007 Module 4 Spreadsheets.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Applying PI in the Chemical Industry
Miscellaneous Excel Combining Excel and Access. – Importing, exporting and linking Parsing and manipulating data. 1.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
1 Performing Spreadsheet What-If Analysis Applications of Spreadsheets.
Virtual Interaction Manager
TxEIS Security A role-based solution October 2010.
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Key Applications Module Lesson 21 — Access Essentials
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
ITCS373: Internet Technology Lecture 5: More HTML.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
Microsoft Access 2010 Chapter 10 Administering a Database System.
FIX Eye FIX Eye Getting started: The guide EPAM Systems B2BITS.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
XP. Objectives Sort data and filter data Summarize an Excel table Insert subtotals into a range of data Outline buttons to show or hide details Create.
Excel Web App By: Ms. Fatima Shannag.
DataLink for the Office 2007 Platform Jason King OSIsoft, Inc.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Working with Data Lists.
Excel 2007 Part (3) Dr. Susan Al Naqshbandi
Overview Excel is a spreadsheet, a grid made from columns and rows. It is a software program that can make number manipulation easy and somewhat painless.
Spreadsheets What is Excel?. Objectives 1. Identify the parts of the Excel Screen 2. Identify the functions of a spreadsheet 3. Identify how spreadsheets.
XP 1 ﴀ New Perspectives on Microsoft Office 2003, Premium Edition Excel Tutorial 2 Microsoft Office Excel 2003 Tutorial 2 – Working With Formulas and Functions.
Excel part 5 Working with Excel Tables, PivotTables, and PivotCharts.
Transportation Agenda 77. Transportation About Columns Each file in a library and item in a list has properties For example, a Word document can have.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
An electronic document that stores various types of data.
Microsoft ® Excel ® 2013 Enhanced Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Resource Review Excel formula basics Demonstrate how to enter manual formulas Examine some of the available functions and their usage Discuss the.
CTS130 Spreadsheet Lesson 6 Working with Math & Trig, Statistical, and Date & Time Functions.
Computer/LMS Access To log onto one of these computers: Enter your Username, for example: 2014BNS099 followed So a complete login.
Excel Tutorial 8 Developing an Excel Application
Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts
Statistical Analysis with Excel
Developing an Excel Application
Managing Multiple Worksheets and Workbooks
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Tutorial 7 – Integrating Access With the Web and With Other Programs
Presentation transcript:

Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals

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

Copyright © 2008 OSIsoft, Inc Course Overview Length: 1 day Interactive course:  Theory 50%  Exercises and examples 50% 3

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

Copyright © 2008 OSIsoft, Inc Course Content  Introduction to PI  Common Dialog Windows  PI Tags  Data Flow  PI Time Format  PI Processbook  PI Datalink 5

Copyright © 2008 OSIsoft, Inc 1.0 Introduction to PI

Copyright © 2010 OSIsoft, LLC 1.0 PI Basics 7

Copyright © 2010 OSIsoft, LLC 1.1 What is a PI System?

Copyright © 2008 OSIsoft, Inc The PI System 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

Copyright © 2008 OSIsoft, Inc Basic Parts 10

Copyright © 2008 OSIsoft, Inc Architecture of a Typical PI System 11

Copyright © 2010 OSIsoft, LLC 1.2 PI Tags 12

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

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

Copyright © 2010 OSIsoft, Inc. Data Flow

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

Copyright © 2008 OSIsoft, Inc 17 Data Flow Data acquisition node PI server

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

Copyright © 2010 OSIsoft, Inc. Exception Filtering

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

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

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

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

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

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.

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

Copyright © 2010 OSIsoft, Inc. PI Exception Test - Example Scan = 1m, ExcDev = 1, ExcMax = 10m 27 DCS Value Exception Current Snapshot 12: Yes 12: : No 12: : Yes 12: … … No 12: : Yes 12:

Copyright © 2010 OSIsoft, Inc. PI Server Snapshot and Data Compression

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

Copyright © 2010 OSIsoft, Inc. 30 Snapshot The snapshot contains the most recent value, for each tag in the PI server

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

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)

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

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

Copyright © 2010 OSIsoft, Inc. Compression Results Raw values scanned. 35 After Compression. After Exception. Time Temperature

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

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

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.

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

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

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.

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

Copyright © 2010 OSIsoft, Inc. 43 Exception and Compression Defaults ExcDevPercent = 1 (% of span) ExcMax = 600 (10 minutes) CompDevPercent = 2 (% of span) CompMax = (8 hours) Zero = 0 Span = 100

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

Copyright © 2008 OSIsoft, Inc 1.3 PI Time Format

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

Copyright © 2008 OSIsoft, Inc Absolute Time dd-mmm-yy HH:mm:ss ddDay mmmMonth (Jan, Feb, Mar, Apr, May, …) yyYear HHHours in 24 hour format mmMinutes ssSeconds 00000Milliseconds Example: 18-feb-05 10:43:

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 :00:00 on the 25th of the current month 21:30:01.029:30: PM on the current date 48

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

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

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 h02: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

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

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 :e. *-Monday c. t-1.5d f. 09-Jun-06 22:45: Group Recap Question (optional) 53

Copyright © 2008 OSIsoft, Inc 2.0 Common Dialog Windows

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

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

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

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc Tag Search Window – Alias Search 63 Search through aliases in the PI ModuleDB (described later)

Copyright © 2008 OSIsoft, Inc Tag Information Windows 64 Pt. Attr... Pt. Values...

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

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

Copyright © 2008 OSIsoft, Inc 4.0 PI Processbook

Copyright © 2008 OSIsoft, Inc 5.0 PI DataLink

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

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

Copyright © 2008 OSIsoft, Inc PI DataLink Menu 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 © 2008 OSIsoft, Inc PI DataLink Menu with Excel 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 © 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

Copyright © 2008 OSIsoft, Inc DataLink Settings

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc Interpolated Values Time Values 80

Copyright © 2008 OSIsoft, Inc Tag Attributes 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

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()

Copyright © 2008 OSIsoft, Inc Refreshing Your Queries 83

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

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

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

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

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc How to Resize an Array 93

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

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

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

Copyright © 2008 OSIsoft, Inc "IF" Function in Excel Syntax: =IF(Logical_test, value_if_true, value_if_false) 97

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

Copyright © 2008 OSIsoft, Inc Exercise DL2 Objective: Learn to retrieve process data using the Compressed Data function 99 Operational Start Up

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

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

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

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

Copyright © 2008 OSIsoft, Inc Performance Equation Functions 104

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

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.

Copyright © 2008 OSIsoft, Inc Computing Totals 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 © 2008 OSIsoft, Inc Exercise DL3 Objective: Learn to extract multiple calculated values from a PI Database using the Calculated Data function 108 Daily Production

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 Show or hide the filtered data zone

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

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

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

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

Copyright © 2008 OSIsoft, Inc PI Calculated Data vs. PI Expression 114

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/ :00:00 12/01/ :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’ >

Copyright © 2008 OSIsoft, Inc CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/ :00:00 12/01/ :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’ >

Copyright © 2008 OSIsoft, Inc CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/ :00:00 12/01/ :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’ >

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 (Optional)

Copyright © 2008 OSIsoft, Inc Questions 124