copyright © 2008 osisoft, inc version 4.6 using pi datalink and processbook the visuals

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

Upload: kristopher-blankenship

Post on 20-Jan-2016

292 views

Category:

Documents


2 download

TRANSCRIPT

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

Copyright © 2008 OSIsoft, Inc

Version 4.6

Using PI DataLink and Processbook

The Visuals

Page 2: 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

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

Copyright © 2008 OSIsoft, Inc

Course Overview

Length: 1 day Interactive course:

Theory 50% Exercises and examples 50%

3

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

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

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

Copyright © 2008 OSIsoft, Inc

Course Content

Introduction to PI Common Dialog Windows PI Tags Data Flow PI Time Format PI Processbook PI Datalink

5

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

Copyright © 2008 OSIsoft, Inc

1.0 Introduction to PI

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

Copyright © 2010 OSIsoft, LLC

1.0 PI Basics

7

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

Copyright © 2010 OSIsoft, LLC

1.1 What is a PI System?

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

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 AnalyticsPE 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

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

Copyright © 2008 OSIsoft, Inc

Basic Parts

10

Interface Node

PI Server

`

Client PC

Data Source

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

Copyright © 2008 OSIsoft, Inc

Architecture of a Typical PI System

11

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

Copyright © 2010 OSIsoft, LLC

1.2 PI Tags

12

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

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

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

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

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

Copyright © 2010 OSIsoft, Inc.

Data Flow

Alexandre Fiset
Transition: Now that we know how to create PI tags, let's see how data is archived.
Page 16: Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals

Copyright © 2008 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”

16

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

Copyright © 2008 OSIsoft, Inc 17

Data Flow

Data acquisition node

PI server

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

Copyright © 2010 OSIsoft, Inc.

New Event Processing

PI Interface

ExceptionReport

PISnapSS

Snapshot

DataCompression

Event Queue

file(s)

Shared Memory

PIArchSS

Archive Cache

Primary Archive

Online Archives

Archive

18

Alexandre Fiset
Timing: Don't go in details here. The idea is to show the data flow and that each of these steps are covered in the following sections.
Page 19: Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals

Copyright © 2010 OSIsoft, Inc.

Exception Filtering

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

Copyright © 2010 OSIsoft, Inc.

PI Interface

ExceptionReport

New Event Processing

PISnapSS

Snapshot

DataCompression

Event Queue

file(s)

Shared Memory

PIArchSS

Archive Cache

Primary Archive

Online Archives

Archive

1

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

Copyright © 2010 OSIsoft, Inc.21

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

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

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

Tem

pera

ture

Time

passes the exception test

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

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

Tem

pera

ture

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

Copyright © 2010 OSIsoft, Inc.24

Exception Test - Example

Time

Tem

pera

ture

P

E

P

P

P

E

E

E

EE

E E

E E

E: Exception P: Previous

E

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

Copyright © 2010 OSIsoft, Inc.25

Exception Test - Results

Time

Tem

pera

ture

Successive values sent to the PI Server.When a value is sent, it becomes the new snapshot.

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

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

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

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

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

Copyright © 2010 OSIsoft, Inc.

PI Server Snapshot and Data Compression

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

Copyright © 2010 OSIsoft, Inc.

New Event Processing

PI Interface

ExceptionReport

PISnapSS

Snapshot

DataCompression

Event Queue

file(s)

Shared Memory

PIArchSS

Archive Cache

Primary Archive

Online Archives

Archive

2

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

Copyright © 2010 OSIsoft, Inc.30

Snapshot

The snapshot contains the most recent value, for each tag in the PI server

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

Copyright © 2010 OSIsoft, Inc.

New Event Processing

PI Interface

ExceptionReport

PISnapSS

Snapshot

DataCompression

Event Queue

file(s)

Shared Memory

PIArchSS

Archive Cache

Primary Archive

Online Archives

Archive

2

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

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

Currentsnapshot

< Compmax (s)

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

Copyright © 2010 OSIsoft, Inc.33

Compression Test – Example

Time

Tem

pera

ture

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

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

Copyright © 2010 OSIsoft, Inc.34

Compression Results

Time

Tem

pera

ture

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

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

Copyright © 2010 OSIsoft, Inc.

Compression Results

Raw values scanned.

35

After Exception.

Time

Tem

pera

ture

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

Copyright © 2010 OSIsoft, Inc.

New Event Processing

PI Interface

ExceptionReport

PISnapSS

Snapshot

DataCompression

Event Queue

file(s)

Shared Memory

PIArchSS

Archive Cache

Primary Archive

Online Archives

Archive

3a

3b

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

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

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

Copyright © 2010 OSIsoft, Inc.38

Data Compression – How Much Data?

This highly variable data cannot be compressed by PI. Everyvalue is a pivot point for the compression algorithm. Allvalues are archived.

This data appears highly compressible. Probably only three or four of these values would be stored in the archive.

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

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

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

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

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

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.

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

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

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc

1.3 PI Time Format

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

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

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

Copyright © 2008 OSIsoft, Inc

Absolute Time

dd-mmm-yy HH:mm:ss.00000dd Day

mmm Month (Jan, Feb, Mar, Apr, May, …)

yy Year

HH Hours in 24 hour format

mm Minutes

ss Seconds

00000 Milliseconds

Example:

18-feb-05 10:43:29.323

47

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

Copyright © 2008 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

48

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

Copyright © 2008 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

49

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

Copyright © 2008 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)

50

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

Copyright © 2008 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

51

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

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

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

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

53

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

Copyright © 2008 OSIsoft, Inc

2.0 Common Dialog Windows

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

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

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc

PI Connection ManagerChanging Passwords

A PI user can change is own password from the PI Connection Manager Select Tools > Change Password

58

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

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

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

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/attrib

ute

Look for a specific point

type/class/source

Tag name mask

Select PI Server(s) to

search through

Validate selectio

n

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

Copyright © 2008 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 

61

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

Copyright © 2008 OSIsoft, Inc

Tag Search Window – Advanced Search

62

SQL-like query based on user-defined conditions

1- Define condition2- Click 'Add'…3- Click 'Search

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

Copyright © 2008 OSIsoft, Inc

Tag Search Window – Alias Search

63

Search through aliases in the PI ModuleDB (described later)

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

Copyright © 2008 OSIsoft, Inc

Tag Information Windows

64

Pt. Attr... Pt. Values...

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc

4.0 PI Processbook

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

Copyright © 2008 OSIsoft, Inc

5.0 PI DataLink

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

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

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

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

mhamel
Big Picture: Explain where the functionalities of PI will appear in MS Excel.Important info: Version 4.0.3 of PI DataLink can used with MS Excel 2003 and 2007. Older version of PI DataLink still works with MS Excel 2007.
Page 71: Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals

Copyright © 2008 OSIsoft, Inc

PI DataLink Menu

71

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

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

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

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

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

12

45

7

6

3

73

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

Copyright © 2008 OSIsoft, Inc

DataLink Settings

74

1

2

4

3

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

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

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

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

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

Copyright © 2008 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

77

1

2

3

4

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

Copyright © 2008 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

78

1

2

3

4

5

6

7

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

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

mhamel
Advanced topics: DataLink 4.0.3 used with Excel 2007 supports the usage of subseconds as the timestamp argument for the archive value retrieval.Task to caretaker: Add a notes page to talk about the timestamp with subseconds precision.
Page 80: Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals

Copyright © 2008 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

80

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

Copyright © 2008 OSIsoft, Inc

Tag Attributes

81

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

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

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

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

Copyright © 2008 OSIsoft, Inc

Refreshing Your Queries

83

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

Copyright © 2008 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

84

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

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

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

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

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

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

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

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

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

88

1

2

3

4

567

89

10

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

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

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

Copyright © 2008 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

90

1

2

3

4

5

6

789

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc

How to Resize an Array

93

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

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

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

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

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

95

1

2

3

4

567

89

10

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

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

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

Copyright © 2008 OSIsoft, Inc

"IF" Function in Excel

Syntax:

=IF(Logical_test, value_if_true, value_if_false)

97

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

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

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

Copyright © 2008 OSIsoft, Inc

Exercise DL2

Objective: Learn to retrieve process data using the Compressed Data function

99

Operational Start Up

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

Copyright © 2008 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

100

1

2

3

4

5

6

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

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

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

101

1

2

3

4

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

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

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

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

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

Copyright © 2008 OSIsoft, Inc

Performance Equation Functions

104

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

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

105

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

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.

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

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

Copyright © 2008 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

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

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

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

Copyright © 2008 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

109

1

2

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

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

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

110

23

1

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

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

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

Copyright © 2008 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

112

2

1

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

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

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

Copyright © 2008 OSIsoft, Inc

PI Calculated Data vs. PI Expression

114

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

Copyright © 2008 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.

115

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

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

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

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

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

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

mhamel
Pitfall: Using this function with too much events to look at for the filter can cause the function to fail. You must insure that ArcMaxCollect parameter is great enough to let you perform a filter on values. Another way could be to split your query into time slices.
Page 119: Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals

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

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

Copyright © 2008 OSIsoft, Inc

CDT158BA:CONC.1BA:TEMP.1Advanced 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.4575.32

17.21 23.128.97

35.5444.76

61.1263.25 64.75

67.25

mhamel
Demo: It is important to show a demonstration of this.
Page 121: Copyright © 2008 OSIsoft, Inc Version 4.6 Using PI DataLink and Processbook The Visuals

Copyright © 2008 OSIsoft, Inc

CDT158BA:CONC.1BA:TEMP.1Advanced 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.8614.65

17.54

33.7646.89

54.79

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

Copyright © 2008 OSIsoft, Inc

CDT158BA:CONC.1BA:TEMP.1Advanced 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

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

Copyright © 2008 OSIsoft, Inc

Questions

124