Professional Documents
Culture Documents
Version 5.1
How to contact us
OSIsoft, LLC
Perth, Australia
New Plymouth, New Zealand
OSIsoft Europe GmbH
Frankfurt am Main, Germany
OSIsoft Asia Pte Ltd.
support@osisoft.com
Singapore
Houston, TX
Johnson City, TN
Longview, TX
Mayfield Heights, OH
Philadelphia, PA
Phoenix, AZ
Savannah, GA
Sales Outlets/Distributors
Middle East/North Africa
Republic of South Africa
Russia/Central Asia
South America/Caribbean
Southeast Asia
South Korea Taiwan
www.osisoft.com
OSIsoft, LLC is the owner of the following trademarks and registered trademarks: PI System, PI
ProcessBook, Sequencia, gRecipe, sRecipe, and RLINK. All terms mentioned in this book that are known
to be trademarks or service marks have been appropriately capitalized. Any trademark that appears in this
book that is not owned by OSIsoft, LLC is the property of its owner and use herein in no way indicates an
endorsement, recommendation, or warranty of such party's products or any affiliation with such party of
any kind.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013
1994-2010 OSIsoft, LLC. All rights reserved
Conventions
The following conventions are used throughout this book.
Bulleted List
Item 1
Item 2
Item 3
Numbered lists
This represents a list of steps with a specific order to respect.
1. Item1
2. Item 2
3. Item 3
A bold font is to emphasize user interface element names, including names of buttons, dialog boxes, and
menu items; it also highlights processes, utilities, system components and modules.
A Consolas font is used for code or computer input by the user or output to the display, also for
filenames and path names and formulas.
A Consolas font with a border like the figure below represents a block of code.
' Variables / Objects.
Dim myvar as string
Myvar =
A Consolas font with a border like the figure below represents a block of SQL query.
SELECT FROM TABLE WHERE
An italic font is used as placeholders for variables or information unknown that will be determined by
you, the reader.
An underlined blue font is used to report URL.
The content you will retrieve in this rectangle is important and requires your attention.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page i
Most of these references are to user manuals that can be downloaded from
http://techsupport.osisoft.com > Download Center > Documentation > User Manuals. (Login
to an OSIsoft technical support account is required.) Use the "Product" drop down list box to
choose the correct user manual.
2
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page ii
Table of Contents
1.
2.
3.
4.
1.2
1.3
2.2
2.3
2.4
2.5
2.6
2.7
3.2
3.3
3.4
3.5
5.
6.
7.
6.2
6.3
6.4
6.5
7.2
7.3
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page iii
9.
10.
8.2
9.2
9.3
PI ActiveView .......................................................................................................159
10.1 Advanced Web Part Possibilities .............................................................159
11.
12.
Conclusion ...........................................................................................................179
12.1 Training .......................................................................................................179
12.2 vCampus .....................................................................................................179
12.3 Tech Support ..............................................................................................179
12.4 Further Questions ......................................................................................180
13.
14.
15.
Glossary ...............................................................................................................185
16.
Index .....................................................................................................................186
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page iv
Objectives
1.1.1
The PI System collects, stores, and manages data from your plant or process. You connect
your data sources to one or more PI Interface Nodes. The Interface Nodes get the data from
your data sources and send it to the PI Server. Users get data from the PI Server and display it
with client tools (for example, PI ProcessBook, PI DataLink, and PI WebParts).
There are generally four parts involved in a PI System:
Data
Source
Interface
Node
PI / AF
Server
Client
PC
Figure 1
Data is collected from the source by the PI Interface program hosted by the Interface Node.
The data is sent to the PI Server (Asset data can be contained in the PI AF Server). It is read
from the PI/AF Servers by the Client tools.
1.1.2
Architecture of a PI System
Sometimes the architecture can be very simple. Some customers have as few as one or two
interfaces feeding data to a PI Server. Everyone reads that PI Server for their data.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 1
PUMPS
VALVES
MANUAL DATA
PI SERVER
NODES
PRESSURE SENSORS
PLC / INSTRUMENT SYSTEMS
PI INTERFACE
NODES
CLIENT APPS
ACTUATORS
SCADA / DCS
CLIENT APPS
TRANSFORMERS
WEB APPS
ANALYTICAL TOOLS
MOTORS
LIMS SYSTEM
CLIENT APPS
10101
00110
10011
OTHER DATA
SOURCES
DATA SOURCES
OTHER
SYSTEMS
OTHER
SYSTEMS
DMZ
Figure 2
Figure 1 shows how the PI System architecture can be deployed at the site level and
integrates your manufacturing and corporate networks.
Each part of the PI System can be multiplied or connected to another system. Every
installation is a little unique.
Figure 2 shows how this architecture can be expanded and built up to provide access across
your entire enterprise organization and tie together all of your manufacturing and business
data.
BUSINESS SYSTEMS
PORTAL SERVERS
SITE 1
APPLICATION SERVERS
PI ENTERPRISE
SERVICES
MORE CLIENT APPS
MOBILE CLIENTS
SITE 2
ENTERPRISE
PI COLLECTIVE
ENTERPRISE DATACENTER
SITE 3
Figure 2
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 2
WIRELESS
BUSINESS NETWORK
1.1.3
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.
1.1.4
Problem Description
Identify the type of data that might be associated with each of the following:
Example: a Temperature Sensor ___a floating point value___
A switch position:
_______________________________________
A Batch ID:
_______________________________________
Operator comments:
_______________________________________
_______________________________________
_______________________________________
_______________________________________
1.1.5
Digital:
Discrete value (On/Off, Red/Black/Green)
Int16: Integer value, 16 bits (0 to 32767, acc: 1/32767)
Int32:
Integer value, 32 bits (-2147450880 to 2147483647)
Float16:
Scaled Floating Point number, 16 bits (1/32767 times range)
Float32:
Floating Point number, 32 bits (single precision)
Float64:
Floating Point number, 64 bits (double precision)
String: Text value up to 976 characters
Timestamps: Any Time/Date in the range 1-Jan-1970 to 1-Jan-2038
And for anything that will not fit cleanly into any of the defined types,
Blob:
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 3
Some Basic Point Attributes and Why They are Important to You
There are some common tag attributes that are often used in client tools. Most of these
attributes are used for display or informational purposes.
Tag Name
Unique name of the PI point used to search for tags. Most tags are built using a local naming
convention. Sometimes knowing the naming convention this can be helpful in searching for tags. For
example, try to determine what the following tag may refer to:
M03_E1P2_MOTDRV1202_RUNSTAT
________________________________________________________
Descriptor
This is the human-readable description of the PI Tag. It is often used as a search criterion in place of the
tag name when the tag name is not intuitive. Very often the tag name is some sort of abbreviation
convention and the descriptor is used to capture the full name.
EngUnits
This field refers to the Engineering Units of the point. Since there is no referential integrity involved
here, this field can be of very limited use in searching. For example, gallons per minute could be written:
Gallons/minute, Gallons per Minute, gals/min, gpm, etc.
PointType
This is the type of variable stored, sometimes used to help in searching (for example when looking for a
string tag).
Zero and Span
These two tag attributes define the minimum and maximum values for a tag. The minimum is the Zero
value and the maximum is derived from taking the Zero point and adding the Span. This affects the
following items:
Note: In most cases, users will not be able to change these attributes.
PointSource
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 4
1.2
Objectives
1.2.1
Often you will experience a situation where one of the following conditions will be true:
You are watching a trend and you can see many values, but when the trend is
refreshed most of them disappear.
You query for historical data in Microsoft Excel. You are sure the device is being
scanned every ten seconds, yet you see an uneven recording of data (what appear to
be gaps in timestamps).
This is completely normal behavior. It is a result of two filters that are applied.
1.2.2
Filtering Noise
At the Interface level, a process called the Exception Test is applied. The Exception Test
filters all values that are considered noise.
Noise: Insignificant changes, as defined as those below the instruments accuracy threshold, as set by the
person creating PI Points, and identical values, such as a valve that is reading OPEN over and over again.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 5
Temperature
The deadband is created by applying the tag attribute ExDev in both a plus and minus
direction.
ExMax
ExDev
C
A
B
ExDev
F
Time
Figure 4
In the illustration, which values will be sent to the PI Server?
Answer: Values _____, _____, and _____.
Why do we need the previous value?
We send the previous value for a very basic reason: without the previous value it would not
be possible to correctly draw the historical trend.
Consider the series of points below. Draw one trend using just the initial value (Value A) and
the value that jumps out of the deadband (Value B). Then draw a trend line that includes not
only those two points but the value previous (Value C).
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 6
Temperature
Time
Of the two trend lines you just drew, which trend is more accurate?
But what if my values never go outside the deadband!
No problem. The ExcMax attribute sets a limit on how long the interface can go without
reporting a value to PI. After the ExcMax time period, the interface sends the next new value
to PI, regardless of whether the new value is different from the last reported value.
Note: Some interfaces do not support exception reporting. See the documentation for your interface to
determine whether it supports this capability.
1.2.3
Problem Description
You want to determine from the raw data which values will pass the exception test and which
will be filtered out.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 7
Span:
200
ExcMax:
180
10:00:00
1.2.4
The PI Server uses a Compression Algorithm to determine what events need to be saved in
the PI Archive, or what is meaningful.
Meaningful: The data required to accurately reproduce the original data from the data source.
But isnt everything meaningful?
Not necessarily. For example, consider the following illustration. Which values would you
require to accurately represent the movement of the value at a later date?
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 8
Co
E
Temperature
D
mp
Co
ev
D
mp
ev
B
A
CompMax
Time
Figure 5
In the illustration, which values will be sent to the PI Server?
Answer: Values _____, _____, and _____.
1.2.5
ExcDevPercent = 1 (% of span);
ExcMax = 600 seconds (10 minutes);
CompDevPercent = 2 (% of span);
CompMax = 28800 seconds (8 hours);
Zero = 0;
Span = 100.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 9
1.3
Time and PI
Objectives
1.3.1
A PI Time Abbreviation
A time alone
A date alone
A date and time combined
A date or time can be a either the Windows time format (configured in the Regional Setting
dialog of Microsoft Windows) or the PI Time format (dd-mmm-yy HH:mm:ss.00000)
Note: If no date is specified the system will assume today. If no time is specified then the system will
assume midnight.
What are the Common PI Time Abbreviations?
* represents NOW
T represents today at midnight
Y represents yesterday at midnight
Monday or Mon represents Monday at midnight (or another specified day or its first
three letters)
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 10
Hours (h)
Minutes (m)
Seconds (s)
Weeks (w)
Days (d)
Years (y)
Months (mo)
Note: There is no default time unit. Hour, Minute and Second intervals can use fractions (for example
+2.5h or -0.5m).
1.3.3
Problem Description
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 11
Answer
* - 30m
y + 8h
Tuesday 2d
Express the following times in valid PI time abbreviations:
Abbreviation
Answer
Today at 6:00 AM
Monday at 6:30 am
12 hours ago
1.3.5
Questions
1.
2.
What are the two filtering tests that each event can go through before being archived in the PI
Server?
3.
Hours
Minutes
Seconds
Days
Weeks
Months
Years
_____________
_____________
_____________
_____________
_____________
_____________
_____________
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 12
Objectives
2.1.1
There are three dialog boxes that are used in one way or another in every PI application that
you will use. They are common because they address functions that are used regardless of the
specific application. They involve:
Some applications will use different formats, but they all accomplish the same functions. For
example, the Tag Search function on PI WebParts is based on different web architecture
and thus looks slightly different.
2.1.2
The PI Connection Manager is invoked from most applications and will control what PI
Server(s) you can communicate with.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 13
You will need to know the following when you need to connect to a PI Server:
2.1.3
All PI Server connections are stored in something called the Known Servers Table (KST).
Each client computer keeps its own serialize list of PI Servers in the registry. Sometimes
there can be duplicate or bad entries. Use this feature of the About PI-SDK application to
clean it out.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 14
2.2
Objectives
2.2.1
Tag Search is one of the most common functions that users will perform. There are three
types of search:
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 15
Basic
Advanced
Alias
Basic allows you to search using common criteria through a defined menu
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 16
Advanced Tag Search allows those who prefer a SQL Query syntax to find the tags they
need. In certain circumstances it can be more specific than the Basic Search.
2.2.3
Problem Description
You need to familiarize yourself with the principles of tag searching.
Approach
Answer the following questions using tag search:
How many tags are there that begin with the letters BA:?
__________________
How many tags appear where he Compression Deviation is greater than 1 and the Point Class
is 'Base' in the Advanced Tag Search?
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 17
2.2.4
______________________________
The way we collect, aggregate, and store data is all determined by a tags configuration
called tag attributes. Ever wondered how to actually see the tag attributes?
For more information see PI Point Classes and Attributes (PI Server
System Management Guide, version 3.4.380, pp. 21).
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 18
Questions
1.
2.
3.
Which of the following PI Tag Attributes are not default filtering search criteria in a Basic Tag
Search?
a. Point Type
b. Tag Name
c. Zero
d. Point Class
e. Point Source
f. Typical Value
2.3
Objectives
2.3.1
There are two modes of operation within ProcessBook, Run Mode and Build Mode.
Run Mode has the following properties:
Default mode;
Allows you to browse PI ProcessBook (Workbook) elements;
Visualize previously created displays;
Change to Build Mode at any time by selecting Tools > Build or by clicking on the
Build icon in the Drawing toolbar.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 19
2.3.2
In Build Mode when you select an object (with a single click) you can resize and reposition it
on the display.
2.4
Objectives
PI ProcessBook displays one or more ProcessBooks, which are collections of display entries.
For more information, see "What Can You View with PI ProcessBook" in
PI ProcessBook User Guide, version 3.2, pp. 1-2.
2.4.1
A Status icon (labeled 3 in the figure below) is at the bottom of the display in the Status Bar.
A green circle indicates all dynamic elements are good. If the circle is red, at least one
dynamic element is in a Bad Data state. To find out which element(s) is in error, you can
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 20
2.4.2
There is a Status Bar at the bottom of the display window. This Status Bar shows several
pieces of information about the display(s) that is open. It shows whether the data being
displayed is using the Time Zone for the PI Server or for the Client Time (1). It shows the
Layers of displays that are open (2). Finally, there is an icon representing the Default Line,
Fill, and Background color for an element (4).
2.4.3
Tooltip Statistics
Hovering the mouse cursor over a dynamic element presents the Tooltip Statistics, which
presents the statistics for the longest time range specified by an element in your display.
These Statistics are the average, minimum, maximum, count, range, and population standard
deviation.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 21
If the data source is unavailable, Trends show nothing, Dynamic Values show "No Data",
Trend Cursors show "No Data", Bar Graphs show diagonal lines, and Multi-state Symbols
show the user defined Bad Data color.
2.5
Objectives
2.5.1
It is possible to view the Details about a dynamic element by going to View>Details or rightclicking and selecting Show Details and Annotations. You can choose Data, Statistics, or
Point Attributes. If you select Data, you can view snapshot and compressed data, and
annotations from a dynamic element selected on your display.
2.5.2
Add Annotations
If you have write privileges to the specified point, it is also possible to write an annotation
directly from the display. Annotations are stored on the PI Server and so will be available to
all users and will be stored with your process history.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 22
2.5.3
Data, Statistics or Point Attributes can be exported to a file or copied to the clipboard. If you
choose to export to a comma delimited .csv file, you can easily import that into Microsoft
Excel.
2.5.4
It is also possible to navigate between PI ProcessBook Workbooks and Displays using the
Navigation Toolbar. This toolbar, shown below, allows you to easily open recently opened
Workbook and Display files from the drop down menu, use the forward and backward arrows
to switch between displays rapidly, set a Home Workbook or Display, and to Bookmark
several of your favorite displays. This toolbar should hopefully be intuitive as it is
reminiscent of a web browser navigation toolbar.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 23
2.5.5
Below the Navigation Toolbar is the Playback Toolbar, shown below. This lets you easily
scroll through the time range of your entire display. You can manually change the time range
included by clicking and dragging the end markers individual, or you can slide the whole
time range by clicking and dragging from somewhere in the middle of the time range. Finally,
there are play, stop, and fast-forward buttons that provide control very similar to a DVR or
other recording device. This allows you to scan the display quickly.
2.6
Objectives
2.6.1
You can quickly produce a trend of any dynamic symbol on an existing display to
immediately research the history of any symbol on your display.
In Run mode, there are two ways to create a trend.
1.
2.
Or:
1.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 24
Then click on the Trend Display button to create an Ad-Hoc Trend. It is possible to save this new
window as a Display using File>Save.
2.6.2
Certain functions can be used in Run mode only. A full screen trend is activated by doubleclicking on the trend in the display in Run mode. Double-click again to deactivate it and
return to the full ProcessBook display.
2.6.3
You can zoom in and out on a trend by clicking the cursor and drawing a rectangle to
represent the boundaries of the area over which you would like to zoom in on. This will
temporarily change the x- and y-axes.
You can also manually change the vertical axis by selecting the View>Trend Scale or by
double-clicking on the vertical axis. This will open a pop-up window where you can choose
one of three options for the vertical scale. The Autorange option scales to the minimum and
maximum of the tag over the specified time range. The Database option scales to the zero
and span of the tag. Finally, you can select the Absolute option, which lets you specify the
exact minimum and maximum you would like displayed. These three options for scaling are
common within the trends in our client tools, and they will be seen again.
There are also buttons provided on each trend for zoom options. The magnifying glasses
either halve or double the time range currently shown. The arrows move forward or backward
one unit in time as currently shown.
In the example above, the plus magnifying glass will halve the time range specified, in this
case taking it from 8 hours to a time range of 4 hours. The minus magnifying glass will
double the specified time range, in this case going from 8 hours to 16 hours. The forward and
backward arrows will move the trend forward and backward in time, in this case an amount
of 8 hours.
2.6.4
Reverting a Trend
You can use the Revert button to go back to your original configuration. This is an easy way
to return to the configured view after you have zoomed in or out on a specific time range.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 25
Finally, you can use the menu or toolbar to change the time range of the trend. To change it
from the toolbar, use the Change Time Range icon. To change the time range from the
menu, you must select View> Time Range. Either of these will open a pop-up window that
allows you to specify the start time (the From parameter) and end time (the To parameter) in
either PI Absolute or Combined time. It is important to note that for your trend to receive
automatic updates that the end time must be now (*) and that the time range must be 7 days
or less (24 hours or less for ProcessBook v. 3.0 or earlier).
2.6.6
Trend Cursors
Trend cursors are static indicators that display the timestamp and value(s). You can have
multiple trend cursors per trend, and they can display values for multiple traces (tags). To
activate a cursor, just click on the edge of the trend and drag to the point of interest on the
trend. You can also set them manually from the toolbar by clicking on the Trend Cursor
icon.
2.6.7
Show/Hide Traces
Traces can be shown or hidden by clicking on the tag name in the legend or by right-clicking
on Trend > Trend Traces. Traces can be shown or hidden individually or all at once.
Changes made in View mode are temporary. To make any changes permanent, you must be
in Build mode and save the display.
2.6.8
Objectives
Problem Description
Open the PI ProcessBook application and establish a connection to a PI server. If you do not
know the name of your PI Server or the username and password you will use, please contact
your PI system manager.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 26
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 27
Step-by-Step Solution
A. The PI ProcessBook environment
1. Open PI ProcessBook Application.
2. Click on the Refinery tab.
3.
4.
5.
Open the top bar menus: File, Edit, View, Insert, Tools, Draw, Arrange, Window and Help.
Stop your mouse on some of the different icons of the toolbars to observe those with the same
functions that are present in the menus you just opened.
6.
) button located on
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 28
Check the checkbox beside the PI server you want to connect to. If you are prompted for a
password, enter the one that will be specified by the trainer.
The Tag Search window
2.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 29
Note: The more criteria you use for your tag search, the more effective you will be in finding exactly the
tag(s) you need.
C.
5.
6.
7.
8.
Use a Trend Cursor to find when the maximum value of the last day occurred (
).
Return to the original time scale (See step 2).
Alter the Y-axis scale of a trend by double-clicking on the Y-axis. Use the Trend Scale dialog
box to change the vertical scale for the tag in the trend. You do not have to be in Build (
)
mode to edit the trend.
9. Move the mouse cursor over the SINUSOID trace or the SINUSOID tag label in the legend area
and click to hide this trace. You can notice that when the mouse cursor is over the trace or the tag
label are highlighted. Click again to display them again.
D. The details and annotations
1.
2.
3.
4.
5.
Right-click on the trend and click Show Details and Annotations. The Show Details and
Annotations window will appear on the right. The Data option should be presented to you.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 30
6.
7.
8.
Observe the Data, Statistics and Point Attributes for the selected tag by changing the Option
field.
Validate if the maximum value you have found in part C is the same returned by the Statistics
window.
Refresh the tags data from Data option by clicking on the Refresh Data button (
).
9.
Choose the Statistics option and click on the Save to file button (
). Enter the filename and
choose the extension: .TXT or .CSV.
10. Using the Windows Explorer locate the file you just saved and open it.
11. Open a blank MS Excel spreadsheet.
12. Choose the Point Attributes option and click on the Copy to clipboard button (
). Switch to
MS Excel application, select the cell which will receive information and select right-click >
Paste. The Point Attributes information will be copied from the clipboard to MS Excel.
13. Choose the Data option. Select the last event in the data grid by clicking on it once. The
Annotations section will no longer be grayed out.
14. Click in the Value field of the first row and enter: This value is out of range.
15. Click in the drop-down list of the Value Type field and choose String. Leave the description field
empty.
16. Click on the Save all changes button to save the annotation with the event.
17. You can try to visualize the annotation from the trend object. An annotation takes the
representation of a white sheet above the trace area as shown in the figure below. If you move
your mouse cursor over and leave it there for a moment you can read the added comment.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 31
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 32
2.7
Objectives
2.7.1
To create a new ProcessBook file use File > New or the New icon. From here, you can create
new ProcessBook Displays, ProcessBook Workbooks, or ProcessBook Entries. The easiest
ways to conceive of ProcessBook Displays are that they are individual sheets, similar to
memos. Workbooks are entire books that are composed of many of these sheets, but to put
these sheets in the book, we need to create individual Entries. For now, we will focus on
Independent Displays and return to Workbooks and Entries later.
A display can contain a wide variety of elements, both static and dynamic. To add any of
these elements to a display, you must be in Build mode, and then select the desired element.
Draw it on the display and define its configuration when prompted. For now, we will focus
on the static elements.
2.7.2
The static objects available include shapes, lines, and text boxes. ProcessBook does come
with its own Symbol Library that includes many familiar process symbols. These include
things like tanks, values, and heat exchangers.
The majority of the static elements have options similar or identical to many Paint programs.
Things like grouping, alignment, stacking, rotation, and attachments. Just like these Paint
programs, you can do multiple object selection by clicking and dragging, using the Control
key, or using the Shift key.
If this Symbol Library (described below) is insufficient, you can also import graphics from
files. Use Draw > Graphic to insert a graphic file. This provides you greater options for
customization.
2.7.3
The symbol library button allows access to a rich library of symbols. To access the symbol
library, use the Symbol Library icon from the toolbar or Draw> Symbol Library from the
menu. Similarly, to import an image file into a display, use the Graphic button in the toolbar
or select Draw > Graphic from the menu.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 33
Questions
4.
5.
What two user interface elements allow you to change the start time and end time of a Trend or XY
Plot in Run mode?
6.
2.7.5
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 34
Problem Description
The goal is to represent a process as a schematic to make it easy for all personnel to identify
its components. Drawing tools are available to create schematics. In this exercise, you are to
create a simple schematic to represent a tank, an agitator and a valve as presented in the
figure below.
Approach
Create a ProcessBook independent display file called Exercise PB2.PDI. To make it easier to
align items, you can activate the Snap to Grid option by selecting Arrange > Snap to Grid.
Add the following items to the display:
One tank from the Symbol Library. You can use any tank you wish.
One horizontal pipe from the Symbol Library going into the tank and one pipe
going out. If you wish you can draw one long pipe and set the tank over it, so it
appears to pass behind it.
One text box labeling the tank Stirred Tank. Place this near the tank. You may wish
to alter the color and size of the text for visibility.
One mixer from the Symbol Library. Place this over the tank.
One valve from the Symbol Library. Place this over the pipe, so it appears that the
valve is in line with the pipe flow.
There are many possible solutions yours does not have to look exactly like this. Feel free to
improvise and be creative with your display.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 35
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 36
Step-by-Step Solution
1.
4.
Click on Options if you want to change the color or fill pattern of the tank. Note that the color can
only be changed if the fill mode is Shaded, Solid or Hollow.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 37
5.
6.
7.
8.
9.
Draw the pipes by selecting Draw > Symbol Library. Once this option is selected, use the left
button of the mouse to select the area where you want to draw the symbol. Select the pipes category,
then a horizontal pipe symbol. Stretch to fit. Repeat if necessary for the second pipe.
Draw the agitator by selecting Draw > Symbol Library. Once this option is selected, use the left
mouse button to select the area where you want to draw the symbol. Select the mixers category, then
a mixer symbol. Click on Options if you want to change the color or fill pattern of the tank.
Add a Text item by selecting Draw > Text. Write in the tank: Stirred Tank.
Draw the valve by selecting Draw > Symbol Library. Once this option is selected, use the left
button of the mouse to select the area where you want to draw the symbol. Select the valves
category, then a symbol. Click on Options if you want to change the color or fill pattern of the tank.
Save the display and exit the display.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 38
Objectives
3.1.1
Use the Data Favorites docking window to drag and drop items to create dynamic
elements
Import and Export your Data Favorites for consistency
Introduction to Dynamic Elements (Optional)
Dynamic Elements are ProcessBook objects that are linked to PI data and that update in realtime. The following Dynamic Elements can be added to a display:
3.1.2
Trend
XY Plots
Bar Graphs
Dynamic Values
Multi-State Objects
Drag from Data Favorites to Create a Dynamic Symbol
Data Favorites is a way to store a persistent list of the tags you reference the most often. It is
accessed by View> Data Favorites. This allows you to configure dynamic elements by
dropping a data source from the list onto the display or element. You specify if you would
like to create a Bar, Trend, Dynamic Value or XY Plot elements when a data reference is
dropped. Additional traces are added when dropped onto an existing Trend or XY Plot. You
can also create multiple items at a time.
The Data Favorites pane consists of two sections, the Search and Favorites sections. The
Search section is where you can search for tags based on tag mask or use the Tag Search icon
to open a dialog for increased search options. When the tags are listed, you can drag and drop
individual tags into your Favorites section, or you can select one or multiple tags, right-click,
and then select Add to Favorites.
3.1.3
The list of Data Favorites is local to the machine only. So to propagate a consistent list of
Data Favorites across multiple physical machines, it is possible to import and export your list
of Data Favorites to and from a file. Simply right-click in the Favorites section and choose
the appropriate action. You can import favorite tags from any applications supporting drag
and drop like Excel, Word, etc.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 39
3.2
Objectives
3.2.1
Build a Trend
Add a linear regression trace to a trend
Use the Format paintbrush
Build an XY Plot
Build a Trend
To build a trend in a display, you must first be in Build mode. There are then three different
ways to build a trend. You can just drag and drop the Data Favorite with the Trend option
selected. Alternatively, you can use the menu option by selecting Draw > Trend or use the
toolbar by clicking on the Trend icon. Then draw a rectangle with the mouse to define the
size of the trend. A design window with four different tabs allows configuration of the trend:
General;
Display Format;
Trace Format;
Layout.
In the Display Format tab, Markers indicate PI archived values. When not checked three
trace markers appear at evenly spaced intervals to help identify individual traces on a
multiple trace trend.
3.2.2
You can also add a regression line in the form y=mx+b, where m is the slope and b is the yintercept. Simply check the box in the Trend Definition configuration pane.
3.2.3
Use the Format paintbrush to copy the formatting properties to another trend. Double-clicking
the Formatting Paintbrush button allows you to apply formatting to more than one symbol.
To turn off the formatting paintbrush selection, click the button again or press the ESC key.
There is a maximum of fifty traces by default, but this setting can be changed. (This change is
made in Procbook.ini. For more information on this see Trend Definition Section in the PI
ProcessBook User Guide, version 3.2, p. 215).
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 40
XY Plots
XY Plots, also known as Scatter Plots, are used to show relationships between value sets. It is
a powerful tool to graphically show the correlation between two or more tags.
Values on the horizontal scale (x-axis) represent the values of a PI point rather than time.
3.2.5
Objectives
Build trends.
Familiarize yourself with the different trend building options.
Problem Description
You are now ready to create a trend with PI tags. You will need a new display in your
workbook to do this. Make sure you create the display inside your workbook.
Approach
If the time permits, add a second trend showing all of the tags that begin with the letters BA:.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 41
Step-by-Step Solution
1.
2.
3.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 42
Specify the time range to display the last 5 days in the plot time section by setting the style to
Full time stamp, the Start field to *-5 Day and the End field to *;
Click on the OK button to create the trend.
4. Save the trend object by saving the display using File > Save.
5. Optionally repeat the steps above except in the Tag Search find all tags with a tag mask of BA:*.
Leave the remainder of the options to their defaults.
6. Save the trend object by saving the display using File > Save.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 43
3.3
Objectives
3.3.1
A Bar Graph shows the current value of a tag as compared to a specified range of values.
A common mistake is to confuse Fill color with Background color when working with Bars.
Typically Fill color is the bottom part that indicates the value of a traditional empty/full
gauge and the Background color is the top part of the gauge.
3.3.2
Values
A Value is the reading obtained at a particular moment in time for a tag in the PI database.
3.3.3
Multi-State Symbols
A Multi-State symbol is one that changes color to reflect changes in value for a particular
tag. Any object except a trend, graphic, button, or OLE object can be made a Multi-State
symbol by assigning a tag to it.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 44
Buttons
Buttons are elements that create a link to other applications, such as a calculator or word
processor, or other ProcessBook workbooks or displays. They give you the ability to navigate
to the desired information quickly, efficiently, and logically can mean the difference between
an application that is useful and one that frustrates the user. There are two types of navigation
when using PI ProcessBook, and they are not exclusive.
For example, if you find you work often with a particular display and frequently need to
update a report with the information you have been monitoring, you can add a Button that
automatically will open a spreadsheet program. You also can use a Button to connect to
frequently used displays, other ProcessBook workbooks, or Web sites.
3.3.5
Objectives
Bar Graph;
Value of a PI Tag;
Multi-State Symbol;
Command Button.
Problem Description
Dynamic elements allow displaying changes of operating conditions in time, which facilitates
the understanding of the use of dynamic elements in schematics. With this exercise, you use
the display created in Exercise 2 and save it under Exercise PB4.PDI, add a level indicator
and an alarm display (low and high). Modify the design of the tank so that it graphically
shows the level.
Approach
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 45
One Dynamic Value indicating the level in the tank. You will use the tag
BA:LEVEL.1. Place that near the tank. You may wish to alter the color and size of
the text for visibility.
One Bar Graph to indicate visually the level in the tank. You will use the tag
BA:LEVEL.1. Place that over the tank body and make it slightly smaller than the
tank. This might be easier if you activate the Snap to Grid option by clicking on
Arrange > Snap to Grid. You will have to experiment with the Forward and
Backward options in the Arrange Menu to get the tank on the bottom, the bar
graph, and the mixer to display all at once.
Two Multi-state Symbols will act as visual alarms for high and low level. You will
use the tag BA:LEVEL.1 as the triggering tag. To do this, add two small circles or
squares to the display, off to one side of the tank. They will have the following
parameters:
The upper circle/square will be green if the value is below 50 and red if above
50.
The lower circle/square will be green if the value is above 10 and red if below
10.
One Multi-state Symbol will act as visual indicator of the valve position. You will
use the tag BA:ACTIVE.1. The valve itself will be a multi-state symbol with the
following parameters:
Insert a command button in your display from the button icon. A configuration
dialog box appears. In the text item, enter Calculator. Select Operating system
command as its type. Finally, in the action item, enter the command line that will
start the calculator (Typically: C:\WINDOWS\SYSTEM32\CALC.EXE or
C:\WINNT\system32\calc.exe).
Save the display by selecting File > Save.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 46
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 47
3.
4.
5.
Enter this Search Mask: BA:* and click on the left green arrow button (
).
Locate the BA:LEVEL.1 tag from the result list and drag and drop it in the Favorites area.
Click on the drop-down list of the Default Symbol of the Data Favorites windows and choose
Value.
6.
From the Favorites area, drag and drop the BA:LEVEL.1 tag into the blank display. Write Level (%)
above the value by selection Draw > Text.
7. Add a low and high visual alarm.
By selecting Draw > Ellipse first, draw two small circles, they will be activated to become visual
alarms;
In Build mode, select the high-level circle and then click on Multi-State button (
). Select
BA:LEVEL.1 tag. Set the number of states to 2. Define the limit of the first state to <= 90. Set the
color of the first state to green, and second state to red;
Repeat the same thing to add the low-level alarm using the same tag. Set the number of states to
2. Define the limit of the first state at <= 10. Set the color of the first state to red and second state
to green.
8. Create a bar graph to replace the tank.
Click on the drop-down list of the Default Symbol of the Data Favorites windows and choose
Bar.
From the Favorites area, drag and drop the BA:LEVEL.1 tag into the blank display.
Resize the bar and make it the same size as the tank body. This might be easier if the option from
Arrange > Snap to Grid is not activated;
Set the bar graphs parameters. Select the BA:LEVEL.1 tag. Keep the default values of upper and
lower limits, and the start value. Click on the OK button to complete the bar graph configuration;
In Build mode, right-click on the Bar Graph and choose Format Color. Choose the proper fill
color. Use None for the background and line color.
9. Move the agitator drawing on the bar graph. Use Arrange > Bring to front option to move the
agitator out from under the bar graph.
10. Add a calculator command button by selecting Draw > Button. In the Define Button dialog box,
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 48
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 49
4.
5.
6.
7.
In Build mode, select the high-level circle and then click on Multi-State button (
). Select
BA:LEVEL.1 tag. Set the number of states to 2. Define the limit of the first state to <= 90. Set the
color of the first state to green, and second state to red;
Repeat the same thing to add the low-level alarm using the same tag. Set the number of states to
2. Define the limit of the first state at <= 10. Set the color of the first state to red and second state
to green.
Create a bar graph to replace the tank.
Use Draw > Bar to create a bar graph. Draw a rectangle over the tank body and make it the same
size as the tank body. This might be easier if the option from Arrange > Snap to Grid is not
activated;
Set the bar graphs parameters. Select the BA:LEVEL.1 tag. Keep the default values of upper and
lower limits, and the start value. Click on the OK button to complete the bar graph configuration;
In Build mode, right-click on the Bar Graph and choose Format Color. Choose the proper fill
color. Use None for the background and line color.
Move the agitator drawing on the bar graph. Use Arrange > Bring to front option to move the
agitator out from under the bar graph.
Add a calculator command button by selecting Draw > Button. In the Define Button dialog box,
put in a name for the button: Calculator. In the action item, enter the command line that will start the
calculator. You will find the calculator (calc.exe) in the C:\WINDOWS\SYSTEM32 or
C:\WINNT\SYSTEM32 according to the operating system used.
Save your display with the Save as option under the name: Exercise PB4.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 50
3.4
Objectives
3.4.1
There are menu options in ProcessBook such as links and operating system commands that
are easy to miss. In this section we study these and the normal ProcessBook display entries.
Then you will be asked to open displays using different techniques and to create new entries.
A ProcessBook Workbook is a collection of individual displays of data and analysis. It
organizes data from the PI Server and other sources in the same workspace. A ProcessBook
Workbook can organize OS Commands, Hyperlinks to files or URLs, or a linked display. A
Workbook and its displays are stored in a single file (.piw). They are useful because you can
allow easier sharing of displays across the enterprise and manage displays by tasks or by
roles. There are fewer files to manage and they incorporate other needed content.
3.4.2
The New button opens a display in a new window, and the Open button opens a display in
the last window you viewed.
If you double click an entry while in Build mode you will edit the entry instead of opening it.
A common mistake is to confuse the New button with File > New to create a new display.
3.4.3
You can choose Book View or Outline View to navigate workbook files. Both views support
a hierarchy of levels that can be modified in build mode.
For more on this topic, see Book View (PI ProcessBook User Guide,
version 3.2, pp. 35-39).
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 51
Consider planning an organizational structure and a naming convention for your ProcessBook
and the entries within it.
An asterisk (*) beside the name of the file in the title bar means that the document has not
been saved or has been modified since the last save.
The next step in creating a ProcessBook is to add individual entries. By arranging and
combining displays and other entry types, you can create a complete working environment
for plant personnel. You can add the entry titles to the ProcessBook and then complete the
detailed design of the entries later.
3.5
Creating Entries
Objectives
3.5.1
Text entries provide headings or to provide static information. Useful for organizing PI
ProcessBook documents by adding titles.
3.5.2
Display entries page that can contain different objects (trends, process mimics, etc.).
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 52
3.5.3
3.5.4
Operating System Command entries open another application. This can be used to launch
external files, applications, and websites. The icon will usually represent the application. If
that icon is not available, the default icon is the running man.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 53
Questions
1.
When creating a new ProcessBook entry in a workbook, what option needs to be set to display that
entry as a separate tab?
2.
Name the five dynamic elements that can be created in a ProcessBook display.
3.5.6
Objectives
Problem Description
You need to organize existing displays from your organization to give one access point for
users. You want to publish only the path to this ProcessBook file (workbook) to facilitate the
deployment and security management from the enterprises IT/IS group.
Approach
Create a ProcessBook file called Exercise PB5.PIW and follow these instructions:
Insert a text separator that will appear as a tab in book view and name it Exercises
Book
Create a display named Plant Status that will be put at level 2
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 54
Create a linked display to Exercise PB4.PDI that will be put at level 3 and name
it Batch Reactor.
Create a linked ProcessBook to PIDEMO.PIW file that will be put at level 2 and
name it External Plant. The file PIDEMO.PIW is located under the
PIPC\Procbook\en folder.
Create a link to call the calculator from PI ProcessBook. Browse to select the
calc.exe file from the c:\windows\system32 directory for Windows
XP/ME/2003. This entry will be at level 2.
Modify the hierarchy to follow these instructions.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 55
Step-by-Step Solution
A. Create the ProcessBook
1. Select File > New.
2. A new screen appears with three choices:
ProcessBook (.piw) File;
ProcessBook Entry;
ProcessBook Display (.pdi) File.
3. Select ProcessBook (.piw) File and name it Exercise PB5.
4. Click on the OK button. A new screen appears with the name Exercise PB5.
5. Save this ProcessBook with the name Exercise PB5.PIW.
B. Insert a Text type entry on level 1 and name it Exercises book using the steps below.
1. In Build mode, select Insert > Text. A new screen appears in which you must supply additional
information.
2. Type a label like: Exercises book.
3. As this is your first entry, its hierarchy level is 1 and it may not be modified.
4. Click on the OK button. A title corresponding to Exercise book appears in the ProcessBook file
created earlier.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 56
C.
Page 57
F.
ProcessBook file.
Insert an Operating System Command type entry on level 2 and name it Calculator.
1. In Build mode, select Insert > Link / OS Command. A new screen appears in which you must
supply additional information.
2. Type a label named Calculator.
3. Choose a hierarchy level of 2.
4. Press the arrow next to the Browse button and select Applications. Browse to select the calc.exe
file from the c:\winnt\system32 directory for Windows NT4/2000, or
c:\windows\system32 directory for Windows 95/98/XP/ME/2003.
5. Click on the OK button. This will create the OS command and open the calculator. You can close
it by selecting File > Close. A title on the second hierarchy level corresponding to Calculator
appears in the PI ProcessBook.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 58
Objectives
Note: There is not a specific exercise on these objectives. However, the information from this chapter will
be used in subsequent exercises.
4.1.1
Introduction (Optional)
Performance Equations are special tags in the PI Server that perform calculations using other
PI Tags as the data source and record the calculation results as the values of the Performance
Equation tag. These Performance Equation tags require a specific syntax, known as the
Performance Equation Syntax. This syntax is important because, while it originated with the
Performance Equation tags, it is now used in multiple places. These include ProcessBook
Calculation Datasets, DataLink Expressions, and PI WebParts PI Calculation Datasets. They
are also used in filter expressions, found throughout these client tools.
4.1.2
Numbers and mathematical operators are written as is: 10, 0.125, 34.56, +, -, *, /, ^
Tag names and timestamps, whether absolute or combined time format, are written
in single quotes: 'cdt158', 'temp_tank_1', 'FIC5821.PV', *, T+6h, 13-Jun-2009
Strings are written in double quotes: "This is a string"
In many places, the single and double quotes will be automatically filled in for you. This is
most common when using a PI Tag Search window. However, you should always double
check to ensure the proper syntax has been used. Also, when looking at the state of a digital
tag, you will want to use the string value of the tag, not the number from the digital set.
4.1.3
There is also a rich library of mathematical functions available. These are the typical
mathematical functions like sin(), cos(), log(), exp(), abs(), etc. Aside from the mathematical
functions, there are also many PI functions that apply specifically to PI data. These include
things like:
Page 59
For a complete list of built-in functions that can be used, consult the
PEReference.chm document. It is available at
http://techsupport.osisoft.com. Search for "performance equations" in the
search box at the upper right of the screen. See the file "PI 3 Performance
Equations Help File" in the search results. You will also find it in
\\pipc\help\pereference.chm.
4.1.4
The conversion factor is a multiplier used to change a number from one unit of measure to
another.
Ex: 1000 g per kg, 2.54 cm per inch, 24 hours per day, 1440 minutes per day
Because PI is not aware of engineering units, it assumes that rate tags are in terms of units per
day. Typically, this assumption is inaccurate as many tags are measured in terms of units per
second, units per minute, or units per hour. When using the Total function in Calculated
Data, a conversion factor is used to correct PI's assumption that the data is in units per day.
The conversion factor is equal to 1.0 when the source data are in units per day.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 60
Rate tag
engineering units
Units / day
Units / hour
Units / minute
Units / second
Assumption of
the PI Server
Units / day
Units / day
Units / day
Units / day
Conversion
Factor
1
24
1440
86400
Example: For a flow measured in gallons per min, a conversion factor of 1440 must be
supplied. This is because the PI server assumes all inputs to totalizations are expressed in
units per day, and 1440 represents the conversion between the actual rate tag (units per
minute) and the rate that PI assumes (units per day). This is independent of the interval of the
proposed totalization. For example, the conversion factor of an 8 hour totalization of a rate
tag measured in of units per minute is still 1440.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 61
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 62
5. ProcessBook: Calculations
Data Sets provide a means of displaying some data that was originally derived from raw
process values or other relational data.
Datasets can be:
We will only be covering the PI Calculation Data Set, as the other topics are more advanced
and covered in other classes offered by OSIsoft.
5.1
Objectives
5.1.1
The two types of calculated data sets in PI ProcessBook are PI Summary Data Sets and PI
Expression Data Sets. Go to the Tools>Data Sets to define the PI Calculation you would like
to define.
For more details on this see PI Calculation Data Sets (PI ProcessBook
User's Guide, pp. 164-167).
For step-by-step instructions see Create a PI Calculation Data Set (PI
ProcessBook User's Guide, p. 165)
5.1.2
When you define a dynamic element you can specify a PI Calculation Data Set instead of the
common use of a tag. Just click the drop-down arrow next to the Tag Search button and you
are presented with the PI Calculation Data Sets dialog box. Select a Data Set and the desired
column (calculation).
The Stepped Plot is used for calculations as the default. You normally do not wish to
interpolate between calculations. Tag Name can be typed or searched. Interval is the period
to examine. Sync Time is used to offset from other calculations for timing or load balancing.
Elements which include data from a data set are updated automatically. Many elements of a
ProcessBook can use the same Data Set simultaneously. Different ProcessBooks can include
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 63
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 64
Objectives
Problem Description
You need to see displays not of raw data but showing the results of particular calculations. In
one calculation you need to see a 30 minute running average for CDT158. Also show the
interval maximum and minimum and display all with the live process value.
In a second calculation you want to create a display to illustrate the mixing of two
ingredients: CDT158 and BA:LEVEL.1. Your calculation will solve for the percent of Product
A (CDT158). You will show this graphically in a display. The approaches to solve each
problem with sample illustrations are on the next sections.
Problem Part A Approach
In the ProcessBook file (.piw) you created earlier in the "Organize Your Displays" exercise
above, add a new display entry called Exercise PB7A. Add a new trend on the average value
for the last 12 hours. The trend shows stair step trace. Also, add the live process value to the
trend. Label the trend CDT158 Calcs. The figure below illustrates the resulting trend.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 65
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 66
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 67
Create a new display type entry titled Exercise PB7A in the ProcessBook file you created in the
"Organizing Your Displays" exercise above and open it.
2. Create a data set by following Tools > Data Sets > New > PICalculation.
3. Enter the following parameters in the PI Calculation Data dialog:
Server: select a server
Tag name: CDT158
Name: LEVEL
Description: TANK LEVEL
Interval: 1 h
Synchronization: 00:00:00
Refresh interval: 1 min
Step Plot: yes
4.
5.
6.
Build a new trend named Tank level. Click on PI Calculation from the dropdown menu to select the
traces.
Select the data set you just created. Select the Average, Minimum and Maximum columns by holding
down the ctrl key. Return to the Define Trend dialog by clicking on the OK button.
In the Tags in Plot section add the tag CDT158.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 68
7.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 69
First a trend symbol will be added; in the ProcessBook file of the "Organizing Your Displays"
exercise above, create a display type entry named Exercise PB7B and open it.
2. Create a data set by following Tools > Data Sets > New > PICalculation.
3. Enter the following parameters in the PI Calculation Data dialog:
Server: select a server
Expression: ('CDT158'/('CDT158'+'BA:TEMP.1'))*100
Name: PERCENT_PRODA
Description: % Product A
Interval: 30m
Synchronization: 00:00:00
Column: %ProductA
Refresh interval: 1 m
Step Plot: yes
4.
5.
Create a new trend named % Product A. Click on PI Calculation on the dropdown menu.
Choose the data set PERCENT_PRODA and select the column %ProductA. Return to the Define
Trend dialog.
6. Set the plot time:
Start: *-8h
End: *
7. Set the display and trace formats as you want and click on the OK button.
8. A tank symbol will be added; draw a tank with two inlet pipes and an outlet one.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 70
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 71
Objectives:
6.1.1
Determine when it is necessary to install the add-in in Excel and where it is located
Introduction (Optional)
PI DataLink is an OSIsoft add-in for Microsoft Excel. This lets you import data from the PI
System into a spreadsheet. As the name implies, it provides a link between the PI Server and
spreadsheet programs on Microsoft Windows platforms. DataLink allows a user running
Microsoft Excel or Lotus 1-2-3 can exchange information directly with the PI System.
6.1.2
DataLink Installation
It is also important to note that PI DataLink is an add-in for Excel. For versions of DataLink
3.X and less, this means that even after installing the PI DataLink software, you must still
locate the add-in and manually add it in to Excel. The add-in is located in \\PIPC\Excel.
By default, the PIPC directory is in Program Files, but this is customizable, so you will need
to know where it is on each machine. For versions 4.X and later with Excel 2007 and later,
the add-in is automatically installed during the installation process.
6.2
Objectives
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 73
DataLink Settings
The DataLink settings affect how your data is displayed and refreshed. It is important to
know how you have configured your settings to appropriately understand what information
DataLink is giving you.
You can change all of the settings for DataLink by going to the Settings icon in the
Resources section of the PI Ribbon.
1.
2.
3.
4.
Sets how tags selected in the Tag Search dialog window are copied onto the spreadsheet: Columns
(default) or Rows
Sets various display functions within PI DataLink reports. None are used by default.
Sets the Number and Time formats used by PI DataLink.
Sets the method and Interval for the Automatic Update function.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 74
Note 1: The Calculate option means that values are only recalculated for DataLink functions that
reference Excel time functions and not times in PI time format. The Full Calculate option must be used
to recalculate both DataLink functions based on Excel time functions and on PI time format.
Note 2: The default of 0 for the Interval is considered Auto, which is a 5 second interval.
By default, PI DataLink does not automatically update as new PI data is available in the
Snapshot. With PI DataLink version 4.1, there is a new Automatic Update toggle button on
the PI Ribbon (or choose Update from the PI Menu in Excel 2003) that can be configured to
use either Calculate, which uses Excel Time functions, or Full Calculate, which uses PI
Time functions.
There are also several helpful tricks for each section on the PI Ribbon. You can hover the
mouse over a function to cause a tooltip description to appear.
If you need more assistance, there is DataLink Help documentation available from the Help
icon in the Resources section. Many of the functions have a small triangle near them, which
expands a menu to give you preset functions with specific points in time for you to query.
Just click on one of the desired options to use it.
6.2.2
By default, each DataLink query is performed on demand. This means that unlike
ProcessBook, your Excel spreadsheet will not be updated automatically as new snapshot
values are sent to the PI Server. As discussed above, one way to enable automatic refreshes is
through the Automatic Update button.
You can also perform a manual, one time, on-demand refresh of the data. This can be
accomplished in several ways. If you want to perform the Calculate function, as described
above, you can simply hit the F9 key. To do a Full Calculate, as described above, you will
need to hit Ctrl+Shift+Alt+F9 keys simultaneously.
6.2.3
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 75
PI Time
T
Y
*
*-3h
Time signified
Today at 00:00:00
Yesterday at 00:00:00
Now
3 hours ago
There are two other tools that should look familiar from the Common Dialogs section
previously discussed. The first is the PI Connection Manager dialog window. This can be
opened from the Connections icon in the Tools section of the PI Ribbon. As previously
described, this is how you manage your connection(s) to your PI Server(s). The second is the
Tag Search dialog window. This is found from the Tag Search icon in the Tools section of
the PI Ribbon. This tool returns a list of tags that you found during your search. This is
useful to use to retrieve a list of tag names for cell references for later PI DataLink queries.
OSIsoft recommends that it is best practice to build your spreadsheet using references to cells
for the Tag Name, Start Time and End Time and any other desired parameters. This allows
you to change your functions easily and see how the PI data or calculations change
accordingly.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 76
Problem Description
Fill in the table converting the desired times into PI and Excel times
Approach
6.3
Objectives
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 77
The first DataLink function we will discuss is the Current Value (=PICurrVal). This function
retrieves the Snapshot value for a tag. No timestamp is provided to the query, as it is always
assumed to be now (* in PI time or =NOW() in Excel time). When you click the Current
Value icon in the Single Value section of the PI Ribbon (or select it from the menu in older
versions of PI DataLink), a configuration pane opens.
You can retrieve PI data from any PI Server currently connected to your client machine. The
server chosen is the one designated as your default in the PI Connections Manager.
You can, and it is recommend to, use cell references within your DataLink queries. This can
be quite useful for building a single display that easily transitions between sets of data for
various tags, time ranges, filter expressions, and much more.
For the Current Value query, you will need to provide it with the PI Server name and the
Tagname. You must specify the Output Cell where you would like the PI data to be written
in the spreadsheet. Below this Output Cell designation are radio buttons that allow you to
choose if and how the timestamp is displayed. The default is for no timestamp to be shown.
It is a common error to accidentally mix up cell references within a DataLink query in the
configuration pane. Typically, it is easiest to select the desired output cell first, and then open
the configuration pane from the PI Ribbon. Once in the configuration pane, deliberately select
all cell references to be used.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 78
The other DataLink function that returns a single value is the Archive Value (=PIArcVal).
This function retrieves an archived value at a specific timestamp.
Similar to the Current Value function, this function requires you to set the PI Server,
Tagname, and Output Cell, and timestamp location. You must additionally, however,
provide a Timestamp in the past. This timestamp may either be in Excel time or PI time, and
additionally may be a cell reference to a cell containing either of those.
The one additional piece of information required is the Retrieval Mode, which prompts a
discussion of those modes.
6.3.3
Retrieval Mode
When you request a value from the PI Archive, there are several options for how it is returned
to you. The first is Exact Time. This will only retrieve a value from the PI archive for the
specified time if and only if an archived value exists at that exact time.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 79
6.3.4
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 80
6.3.5
Objective
Learn to extract values and attributes from the PI database using the following functions:
Current value;
Archive value;
Tag attributes.
Problem Description
You need to build a basic activity report using data collected in your PI Server. You want this
type of report to show values from the production plant floor before morning meetings. This
report will show current values and ones from a specified time every morning.
Approach
We will use the Current Value, Archive Value and Tag Attributes queries to fill in a
template activity report. We should base our PI DataLink queries on cell references whenever
possible. Open the file Exercise_DL1_Template.xls and fill in data into all of the fields.
Note: Not all of the tags used in this example have engineering units.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 81
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 82
Note 1: Notice that you can use the PI Datalink functions without the dialog box. Simply type in the
formulas as follows:
Tag attribute:
Syntax
=PITagAtt("tagname","NameOfAttributeYouWant","PIServer")
Example
=PITagAtt($A$7,"descriptor",)or =PITagAtt("sinusoid","units",)
Current Value:
Syntax
=PICurrVal("tagname",Outcode, "PIServer")
Example
=PICurrVal($A$7,1,)
Archive value:
Syntax
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 83
=PIArcVal($A$7,$D$13,1,, "Interpolated")
=PIExTimeVal("tagname","Date","PIServer")
Example
=PIExTimeVal($A$7,$H$25,)
Note 2: We have seen that it is possible to enter a formula by entering one tag at a time. However, it is
possible to save time by selecting a range of cells instead of a single cell or using the copy/paste function
of MS Excel. You must edit the formula and remove any unnecessary $ characters (absolute cell
references) before using MS Excel copy/paste function.
Note 3: Note the impact of the point type and step attributes when you use archive value. For digital tags,
the interpolated and previous values are equal and have the same timestamp because no interpolation is
possible between states.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 84
6.4
Objectives
There are three types of queries you can perform to return multiple values. They are
Compressed Data, Sampled Data, and Timed Data.
Compressed Data returns all of the values that were actually archived during the specified
time range. This means that you will only retrieve the events that passed Exception and
Compression Testing. If an event was filtered out due to these tests, you will not see them.
You can include the current value in your query, which will not have gone through
Compression.
Sampled Data retrieves values evenly spaced in time. These values are interpolated from the
archived values. As such, you may miss maxima and minima in your overall trends, but each
data point is a valid interpolation (or exact match) of your actual trend at that timestamp. See
the graphic below for a clearer picture.
Finally, there is Timed Data, which retrieves interpolated (or exact match) events that match
a series of timestamps. This is most often used when comparing the Compressed Data of
one tag with the Timed Data values of another tag to determine correlation between
variables.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 85
The Compressed Data function (=PICompDat) is in the Multiple Values section of the PI
Ribbon. There are two different ways to query for information. You can either choose a
Time Range, or a Number of Values. To choose between these two, there is a radio button.
The default selection is Time Range.
As should be expected, you must specify the PI Server and Tag(s), either explicitly or by
cell reference. You must then provide the Start Time and End Time.
Note: If you switch the timestamps for Start and End Times, the data will be returned in reverse order.
The next field is optional and is the Filter field. We will return to this field later. There is an
associated check box that will show or hide the filtered data zone(s).
The next drop down menu is how to treat data at the beginning and end of the time range.
Similar to the options for retrieving a single archived point, retrieving multiple values can be
obtained differently. These differences, however, occur only at the boundaries.
The default choice is Inside, and will retrieve events that only fall within the specified time
range.
Outside will retrieve all of the events inside the time range specified, plus one more event
before and after, respectively, of the time range specified. The exception is if the end time
specified is now (* or =NOW()), then no future events can be retrieved.
Interpolated will return compressed events within the time range specified, plus an
interpolated event at the exact timestamps of the start and end time specified. As before, Auto
has the same behavior as Interpolated for all tags with the Step attribute turned Off, but will
retrieve data with the behavior of Inside for all tags with Step turned On. You then need to
specify an Output Cell.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 86
There are several optional checkboxes that will affect what is displayed, none of which are
selected by default. The first is Hide Count. When this box is unchecked, the top line of your
results will return the number of events that were found within that time range. When this box
is checked, this line is not displayed and only the results are shown.
The Timestamps checkbox determines if only the tag values are returned, or if the
corresponding timestamp is also retrieved.
Quality bits and annotations will return additional fields if there are any annotations or
quality bits associated with the compressed events within the time range specified.
Finally, there is a pair of radio buttons that determine if the results are returned in rows or
columns.
The Number of Values option for this query behaves similarly, but rather than a specific
time range, you will specify a Start Time and the Number of Values that you would like to
retrieve. You can also check the box to have this go backwards, rather than forwards in time.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 87
Sampled Data (=PISampDat) is also found in the Multiple Values section of the PI Ribbon.
As stated before, this function retrieves evenly spaced interpolated values from the archive.
Much like the Compressed Data query, you must specify PI Server, Tag(s), Start Time,
End Time, and Output Cell. You have the optional parameters of a Filter Expression (to be
covered later) and timestamp display.
The main difference is the Time Interval field. This field requires a PI time, or cell
reference, that will be used to divide the time range you specified into discreet timestamps at
which data events will be interpolated.
6.4.3
Timed Data
The final Multiple Value query is the Timed Data function (=PITimeDat), which is also in
the Multiple Values section of the PI Ribbon. This function retrieves sampled data
synchronized with an array of time values.
Again the PI Server, Tag name, Data retrieval mode, and Output Cell must be specified.
In this case, the times used to retrieve events must be a range of cells, rather than a hardcoded
time. This is typically done by querying one tag for events, and then using those timestamps
to find the values for other, related tags.
6.5
Arrays in PI DataLink
Objectives
6.5.1
The Multiple Value functions just discussed actually return an array of values and
timestamps. These values can change in size based on the tag used, the time range specified,
and exception and compression settings. Therefore, it can be necessary to resize the array.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 88
If you need to resize the array, there are three options available. First, you can manually
resize the array by selecting the new cell range for the array and pressing F2. Then pressing
CTRL+SHIFT+ENTER simultaneously. The key combination of CTRL+SHIFT+ENTER will
also allow you to edit the values of the array, which you normally cannot do in Excel.
Another method to resize the array is via the dialog window. You should right-click on a cell
in the array, select the name of the function in the contextual menu, do the modifications in
the dialog window, and then click on OK.
Finally, you can right-click on a cell in the array and select the Recalculate (Resize) PIDL
Formula option.
6.5.3
Questions
1.
What is the advantage of having PI DataLink reports using cell references containing Excel
dynamic time functions instead of PI time?
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 89
2.
What are the three ways to resize an Excel array generated with a PI DataLink function?
3.
Using one of the Compressed Data functions, what additional information will be provided if the
Show Value Attributes and Show Annotations options are checked?
6.5.4
Objective
Problem Description
You need to compare the values stored in the PI Server that relate to the startup of a piece of
equipment in your facility. You want to determine if there is any deviation between startup
operations by examining today and comparing it to the same time period from the day before.
The tag you want to use as a metric is CDT158. Your shift begins at 6:30 am in the morning
and you want to gather the first 30 values beginning at that time for today and yesterday, and
do some quick math to determine the deviation. A ten percent deviation in a positive or
negative direction will be considered over / under range. All other outcomes will be
considered nominal.
Approach
We need to create a spreadsheet that will show the first 30 values today using the tag
CDT158. We want to compare these values to the previous days starting 30 values. Open the
file Exercise_DL2_Template.xls and fill in data into all of the fields. Both queries are using
the Compressed Data (Start Time / Number) query. Use cell references for all of the dialog
box fields. The formulas used to compare the two queries are found in the upper right portion
of the spreadsheet. They both have a single quote inserted before the equal sign so MS Excel
will treat them as strings and not formulas. You can copy and paste the contents and then
remove the leading single quotes.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 90
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 91
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 92
Objective
7.1.1
You can create trends similar to ProcessBook Trends in your DataLink reports. These Trends
can be based on PI Data and/or Data from the Worksheet. These Trends have the option to
update automatically. You can also modify scales and appearance and zoom in a part of the
trend in much the same way you can within ProcessBook.
The Trend Control is an ActiveX control that can be inserted onto any Excel spreadsheet. To
insert a Trend, select the Trend icon in the Tools section of the PI Ribbon. A trend wizard is
provided to make inserting trends easier, which allows you to define the data source(s) and
how they are displayed. There are two sources of data that the Trend Control can plot:
Worksheet Data and PI Data.
Note: Because the Trend is an ActiveX control, it cannot be displayed through DataLink for Excel
Services. All other DataLink functionality will work. We will cover this in greater detail later.
To use Worksheet Data, you must specify the cell range of the data by typing it manually or
selecting it with the mouse. For ease of use with PI DataLink functions, the Include all cells
in array option is specified as the default, in which case you need choose only one cell of the
array. The Stepped option plots the data in a stepwise manner, much as the Step attribute for
a point.
To use PI Data, you must specify the tag name by typing it manually, searching for it using
the Search button, or using a reference to a cell. You then click on the Add button. The
last screen of the Trend Wizard is to configure the trend title and the placement of the trend.
If a new worksheet is selected, the trend is placed on a blank worksheet at the top left corner.
If the existing worksheet option is specified, then the cell where the trend is to be placed must
be specified.
Quick changes can be made to the trend by selecting some of the items on the right-click
menu. The right-click menu allows the user to temporarily modify the scales and the time
frame, revert to the original scales and time frame, permanently modify the scales and the
time frame, add a scroll bar for the time frame, add markers, change the trend's appearance,
add or remove traces, and delete, move, or resize the trend. Using the Change Scale item
allows you to change both trend time range and Y-axis scale. If a change in the scale is
deemed undesirable, the Revert option can be selected to undo the changes made. The
Revert option always reverts back to the settings defined in the Trend Wizard.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 93
7.1.2
Objective
Learn to use the Insert Trend function with data from MS Excel worksheet and PI
data.
Problem Description
You have some production limit specifications and you want to be able to see how the
previous days production measured up against those limits. The production tag you need to
use is CDT158 and the limits are as follows:
Upper Limit
225
Target Rate
150
Lower Limit
75
Approach
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 94
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 95
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
12.
13.
14.
15.
16.
17.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 96
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 97
7.2
Objectives
7.2.1
The Calculated Data function (=PIAdvCalcDat) returns a single calculated value or evenly
spaced calculated values from the PI Server. Calculation modes are: Total (time-weighted),
Minimum, Maximum, Standard deviation (time-weighted), Range, Average (time
weighted), Mean (non-time-weighted).
To retrieve a single calculated value, do not specify an interval and the PIAdvCalcVal()
function is used. To retrieve evenly spaced calculated data, the specified interval, in relative
PI Time format, determines the spacing of the calculation and the PIAdvCalcDat() function is
used.
You must supply the PI Server name or cell reference, Tag name or cell reference(s) to a list
of tags, and the Start and End Times for the calculation.
The Time Interval is optional and refers to how often the calculation will be performed.
When a Time Interval is specified, the show start time and show end time options become
available. If no Time Interval is specified, the calculation will only be performed once over
the specified time range. The Conversion Factor is typically only applicable to the Total
calculation mode and will be discussed in further detail below.
Check show pctgood if you want DataLink to display the percentage of the time range that
contains good values. We recommend that you always look at the percent good value before
using the calculation result. The percent good value is normally returned to the right of
calculated value cell. Timestamp(s) are returned when the calculation mode is Minimum,
Maximum, or Range.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 98
Objective
Problem Description
You are the production manager and want to create a report showing last weeks daily
production totals. In this report, you want to display the total production, average, minimum
and maximum and standard deviation for that week. Also, you would like to present this data
on a daily basis.
Approach
We will use the built-in PI Calculated Data functions to show the above statistics for the
entire week (using no time interval) and each day of the week (using a time interval of 24h).
Use the file Exercise_DL4_Template.xls to organize and display this data.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 99
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12. Enter 1440 in the Conversion Factor field for the total calculation mode only. For all other
calculation modes leave this field to one or 1.
13. Click on the OK button.
14. Repeat steps 3-14 for columns C through G using the appropriate selection for Calculation Mode
(e.g., select Average in column C). When you get to column G, make sure the show percent good
check box is checked.
15.
16.
17.
18.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 100
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 101
Filtered Data
We now revisit the Multiple Value functions that we previously discussed, but now we will
include filter expressions. Before, these fields were optional. Now we will discuss how they
work. The functions are for Compressed Data (=PICompFilDat or =PINCompFilDat) and
Sampled Data (=PISampFilDat).
Filtered Compressed Data
This function returns compressed values from the PI Server based on a start time and an end
time. The number of data points retrieved for the given time period is returned in the first cell.
If the time range option is chosen and a filter expression is not specified, the PICompDat()
function is called. Otherwise, the PICompFilDat() function is called. If the number of values
option is chosen and a filter expression is not specified, the PINCompDat() function is called.
Otherwise, the PINCompFilDat() function is called.
If a filter expression is specified, the specified range of compressed values are retrieved from
the PI Server while a given filter expression is True. If the Mark as filtered option is
selected, a Filtered status is returned for each group of values that does not satisfy the filter
expression.
Filtered Sampled Data
This function gathers evenly spaced, sampled values from the archive. If a filter expression is
not specified, the PISampDat() function is called. Otherwise, the PISampFilDat() function is
called.
If a filter expression is specified, the specified range of compressed values are retrieved from
the PI Server while a given filter expression is True. If the Mark as filtered option is
selected, a Filtered status is returned for each group of values that does not satisfy the filter
expression.
Note: When using a cell reference for your Filter Expression, be sure that if the Filter Expression begins
with a timestamp or tag name that you use two single quotes. The first single quote is used in Excel to
identify a text string, rather than a value, and will not be seen by the filter expression.
7.2.4
This topic is not specific to PI DataLink, but the Conditional Formatting found in Excel
2007 can give your DataLink reports a great look and a comprehensive perspective. It is
useful to compare values extracted from PI. Conditional Formatting is found in the Home
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 102
Objectives
Learn to use the Filter Expression option of the Sampled Data function to
constrain the values that are extracted.
Combine PI values with Excel conditional formatting for more intuitive reports.
Problem Description
As a quality control manager, you want to examine the tank level of product over the last 12
hours for a tag that does not report many values due to its lack of volatility, and thus it has a
high compression rate on the PI Sever. Since there are only a few values passing through the
compression test, it is better to perform a Sampled Data query rather than a Compressed
Data query.
The tag you will use is SINUSOID. You want to build a report that will filter out mean tank
levels, which is defined as a level between 30 and 80. You want to use red conditional
formatting to know when the tank is in danger of overflowing, defined as the highest 10% of
values. You are also interested in the times of low product level, defined as the lowest 20% of
values, which should be highlighted in green. For all values returned, data bars should be
used to visually show the overall level of the product in the tank. Then change the upper and
lower limits to 75 and 25, respectively, to test your report.
Approach
Use PI Datalinks Sampled Data function to get evenly spaced data. Since we only want to
see data that are outside of the norm, we will apply filters to show high values, low values,
and a list including both. Use the file Exercise_DL5_Template.xlsx as a template to design
this report.
Note: The MS Excel Today() function returns the serial number of the current date. The serial number is
the date-time code used by Microsoft Excel for date and time calculations. Microsoft Excel stores dates as
whole number of days starting at 1900. Dates and times are values and therefore can be added, subtracted,
and included in other calculations.
Syntax:
=TODAY()
Example:
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 103
When you enter a date in Microsoft Excel 97 and you enter only two digits for the year, Microsoft Excel
enters the year as follows: The years 2000 through 2029 if you type 00 through 29 for the year. For
example, if you type 5/28/19, Microsoft Excel assumes the date is May 28, 2019.The years 1930 through
1999 if you type 30 through 99 for the year. For example, if you type 5/28/91, Microsoft Excel assumes
the date is May 28, 1991.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 104
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 105
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 106
7.3
Expression Data
Objectives
7.3.1
PI Expressions behave much the same way that PI Performance Equations do. They follow
the same expression syntax and can use one or many PI Tags as the data source(s). The
benefit to PI Expressions is that they only calculate on demand. However, the downside is
that, unlike Performance Equations, there is no history of these calculations stored on the PI
Server, so it is more difficult to see historical trends.
There are a number of options available for calculating expressions that contain tags.
Expression calculations can be performed for one specific time in the past using the Archive
Value function (=PIExpVal), for evenly spaced data using the Sampled Data function
(PIExpDat), or for a specific list of timestamps using the Timed Data function
(=PITimeExpDat). Expression calculations can also be performed to obtain statistics or totals
on an expression using the Advanced Calculated Data function.
The difference between PI Calculated Data and PI Expressions is shown in an example
below. The PI Calculated Data computes the maximum of the tag over each 24 hour period
for the last 168 hours (7 days). The PI Expression computes the maximum of the tag for the
most recent 8 hours, every 24 hour period for the last 168 hours (7 days). The format for this
expression would be: TagMax(tag,'*-8h','*') with 1 day interval. If the time interval in the PI
Expression is changed to 1 day, the results of both expressions would be identical.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 107
7.3.2
Objectives
Problem Description
As a Shift Team Leader in a bottling plant, you want to produce a real time report that shows
the average speed of the bottle filler for the past hour. You also wish to compare this average
to the average of the 3 hours before, to know whether you are positively impacting
production speed for your shift or not. The speed of the bottle filler is measured by the tag
SINUSOID.
Approach
Using the built-in function TagAvg, calculate and display the average for the filler speed tag
(SINUSOID) for the last hour. Using the built-in functions Sgn and TagAvg, calculate
whether your hourly production rate is better or worse than that for the three hours prior. Use
MS Excels conditional formatting to get a quick view of your performance. Use the file
Exercise_DL6_Template.xls as a template for this report.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 108
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19. On the Ribbon, Click Home > Conditional Formatting > Highlight Cells Rules > Equal To
20.
21.
22.
23.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 109
7.3.3
Objectives
Problem Description
As the person in charge of the quality control of the process, you want to easily identify when
specific characteristics of the process exceed quality threshold values. The process you
analyze takes place in seven (7) phases. During three (3) phases of the process, the
monitoring of physical characteristics is critical at the phase change; these phases are Phase1,
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 110
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 111
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28. Press on the F4 key on the keyboard two (2) times. This will transform the absolute cell reference
into a row relative cell reference. It means the dollar sign in front of the row position will be
removed. You will then see a reference like Sheet1!$A12 instead of Sheet1!$A$12.
29. Propagate the result down to cell C150 by dragging the cells handle at the cells lower-right corner.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 112
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 113
71.
72.
73.
74.
75.
76.
Enter the value 0.45 in the Format cells that are GREATER THAN field.
Select Custom Format from the with drop-down option.
Choose a blue color for the filling of the cell.
Click on the OK button.
Select cell range from D12 to D150.
On the Ribbon, click Home > Conditional Formatting > Highlight Cell Rules > Between
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
Enter the value 0 and 500 in the Format cells that are BETWEEN fields.
Select Custom Format from the with drop-down option.
Choose a green color for the filling of the cell.
Click on the OK button.
Be sure to keep the cell D12 to D150 range selected.
On the Ribbon, click Home > Conditional Formatting > Highlight Cell Rules > Greater Than
Enter the value 500 in the Format cells that are GREATER THAN field.
Select Custom Format from the with drop-down option.
Choose a red color for the filling of the cell.
Click on the OK button.
The resulting report should look similar to the one presented below.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 114
7.4
Objectives
7.4.1
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 115
There are three (3) expression sampling modes for sampling the filter expression:
Pt. Compressed (default) Evaluates the filter expression at the timestamp of any
compressed value of the source point;
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 116
There are two (2) expression sampling modes for sampling the expression to be summarized:
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 117
7.4.2
Problem Description
Perform an event-weighted average that evaluates the filter expression at the timestamp of
every compressed value of the source point. Then perform a time-weighted average that
evaluates the filter at the timestamp of every compressed value of any of the tags in the filter
expression.
7.4.3
The Time Filtered Data function (=PITimeFilter) dialog box returns the amount of time for
which a given expression is true over a specified time range. The Expression must still follow
the PI Performance Equation Syntax. The user can specify multiple time ranges as evenly
spaced intervals as in the Calculated Data dialog box.
Note: If you can enter the expression into a cell on the worksheet and refer to it in the dialog box, begin
the expression with a single quote so that Excel will interpret the expression as a string.
Argument
Explanation
Expression (string)
Stime (string)
Etime (string)
Interval (string)
Timeunit (string)
Outcode (integer)
PIServer (string)
The PI Server.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 118
Objective
Problem Description
As the person in charge of the maintenance program, you want to know the operating time for
a specific pump. Find the amount of time the pump was ACTIVE using the function Time
Filtered. This method performs the calculation in a single step; saving the step of doing the
filtering with the IF function in MS Excel. It returns the amount of time that an expression is
true.
The operating status is measured by the tag BA:ACTIVE.1.
Approach
The Time Filtered function returns the amount of time that an expression is true. Use the
results to perform an analysis of the time that your machine state was ACTIVE. The report
should allow the user to select the time unit to display. Use the file as
Exercise_DL9_Template.xls a template for this report.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 119
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
17. For data validation steps write this time unit: seconds in cell I2, and minutes in cell I3, and
hours in cell I4, and days in cell I5.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 120
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 121
The PointID to Tag function (=PIPointIDToTag) allows the user to always make reference
to a specific point ID and not the tag name. This is very useful when tag names are expected
to change frequently.
The Attribute Mask to Tag function (=PIAttributeMasktoTag) allows the user to always
have a fresh list of tags based on the specified attribute masks. It allows you to return a list of
PI Tags that meet a certain set of search criteria. This is very similar to doing a Basic Tag
search through the PI SDK, but this allows you to build in cell references into your DataLink
report and search for tags without having to open the Tag Search specifically. Again, this is
useful when you have tags that change names often, or when you want to build a highly
interactive report.
7.4.6
Objective
Problem Description
As the section head of a small sawmill, you are responsible for the quality and the quantity of
board that is produced. You wish to create a PI DataLink report to help your weekly analysis
of shift performance.
The tag BA:CONC.1 represents the length of board produced and each archived value
represents another full board. Boards under 5 feet long are considered scrap. This means they
should not be included as production. Accounting has determined that scrap production costs
$2.00 for every foot.
The plant starts up on Monday at 8:00 am and goes idle at 4:00 pm on Friday. Shifts are 8
hours long and run 24 hours per day.
Produce a report for last week, by shift, of the following:
Approach
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 122
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 123
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35. In the task pane click in the Time Interval (optional) field.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 124
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 125
Introduction to PI WebParts
Objectives
8.1.1
PI WebParts is a set of OSIsofts third party web parts for Microsofts SharePoint server. PI
WebParts pages have these features:
Because of these features, PI WebParts is considered a thin client. This makes it much more
accessible to members of your organization and means that fewer people need a working
knowledge of PI, while maintaining the visibility of your PI data. You can view your data
from anywhere at any time. The advantages of PI WebParts pages are that you can share files
and documents in online Document Libraries, making it so there is only one version of the
truth because everyone views same data. It also increases team collaboration and
productivity.
8.1.2
A web part page is a special type of Windows SharePoint Services page that contains web
parts. A web part page contains WSS zones. A single or multiple web parts are located within
a zone. These web parts can be WSS web parts, PI WebParts, or other third party web parts.
Each zone is configured independently. These zones can be configured to pass parameters
between them to create interactive web part pages. Overall, the display environment offered
by SharePoint and PI WebParts is highly configurable and can be tailored to your specific
needs.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 127
Problem Description
You need a new Team Site for the Web Part Pages for the remainder of the course.
Approach
Create a new Team Site with the same permissions as the parent.
8.1.4
Document Library
A Document Library is an online storage location for Web Part pages and shared documents
and files. The documents stored here can be used as a central point for users needing to view
and edit this material. SharePoint and PI WebParts both support multiple document libraries.
It can also be used to link these documents to specific web parts for display purposes. We
will cover this in more detail later.
To create a new Document Library, click on the Site Actions drop-down menu in the upper
right corner and select the Create link. This will open a new web page with several choices
for the page you are going to create. Click on the Document Library link in the left column
of the Create page and name the library. Finally, click on the Create button to create your
library.
Note: There is no default document library, so when selecting a library, they are presented in alphabetical
order.
You can open a document library by clicking View All Site Content on the Top Bar menu
and then clicking the document library name in the Document Libraries section. If you
chose to add the document library to the Quick Launch bar, you can also click the document
library name there to open it.
8.1.5
Web Part Pages are where you will add and configure various web parts. It is similar to
ProcessBook, where the Team Site in Web Parts is analogous to a ProcessBook Workbook
and the Web Part Pages are analogous to the ProcessBook Entries.
To create a new Web Part Page, click on the Site Actions drop-down menu in the upper right
corner and select the Create link. This will open a new web page with several choices for the
page you are going to create. Click on the Web Part Page link in the right column of the
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 128
Objectives
Problem Description
You are new to SharePoint. You have your own team site, but you need to be familiar with
how to get around.
Approach
Open a browser and login in to the SharePoint server. If you do not know the name of the
SharePoint server, or the username and password to use, please contact your PI or SharePoint
system manager. Navigate to your Team Site using. Use the Create function to add a new
Document Library. Call this Document Library: ProcessBook Files. Add links to the
default Links web part to the following URLs:
www.osisoft.com;
www.cnn.com;
www.microsoft.com;
Extra Credit
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 129
Copy an image to your desktop (make sure before you upload it that it is a correct
size - double-click to open it and resize if necessary);
Upload it to your Shared Documents Library;
Copy the URL;
Edit the web part and add the URL.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 130
Step-by-Step Solution
1.
2.
3.
4.
Enter information regarding the name and the layout of the document library page.
Enter ProcessBook Files as page name;
Leave the other default settings;
Click on the Create button to validate your selection.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 131
5.
6.
www.osisoft.com;
www.cnn.com;
www.microsoft.com;
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 132
7.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 133
10. In the Site Image box, click on the Edit > Modify
Shared Web Part link.
11. Paste the URL of your picture to the image link.
12. Click on the OK button.
13. Click on the Exit Edit Mode link.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 134
8.2
Objective
PI WebParts are third party web parts that can be used to display processes, documents and
information for effective team collaboration based on Microsoft SharePoint technology. The
special features of the web parts included in PI WebParts are that they can request and render
data from PI Data Services (PI, relational, and web service data sources) and that they
update/refresh automatically.
The following configuration section applies to all PI WebParts:
Time Range
Selected Data
Appearance
Layout
Advanced
The PI WebParts Tag Search is similar to PI smart clients tag search. Advanced and default
search modes can be toggled by hitting the More/Less link in the upper right corner.
8.2.1
The simplest PI WebPart is the PI Gauge. The PI Gauge web part displays an analog style
gauge with a pointer that indicates the real-time value of the configured data point with
respect to the scale around the perimeter. Hovering over the gauge causes a tooltip to appear
indicating the displayed real-time value. Only one data point can be represented per gauge.
Many gauges can be added to the web part in horizontal or vertical format. The following
configuration section applies specifically to the PI Gauge part:
Format
Legend
Zone and Scale
You can open an Ad hoc Trend of the tag over the time range specified in the PI Gauge
configuration by selecting the Ad hoc Trend option from the PI Gauge web part menu.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 135
Objective
Problem Description
You are new to PI WebParts. You have your own team site, but you are not sure how to use
it. You want to try to configure a simple web part, and have selected the PI Gauge web part.
Approach
Create a new page in your Team Site called Exercise_R2. If you are not already in Edit
Mode, select Edit Page from the upper right page menu. Add an PI Gauge web part to any
zone. Click on the upper-right menu icon for that web part and select Modify Shared Web
Part. Add the tags BA:CONC.1, BA:LEVEL.1, and BA:TEMP.1. Configure each of the tags
separately based on the table below.
Tag
BA:CONC.1
BA:LEVEL.1
BA:TEMP.1
Color
Label
Range
Color
Label
Range
Color
Label
Range
Zone 1
Green
Normal
80%
Blue
Normal
90%
Blue
Cold
20%
Configuration
Zone 2
Red
High
20%
Orange
High
10%
Green
Normal
70%
Zone 3
Red
Hot
10%
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 136
Step-by-Step Solution
1.
2.
3.
4.
Enter information regarding the name and the layout of the web part page
Enter Exercise_R2 as page name;
Leave the other default settings;
Click on the Create button to validate your selection.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 137
6.
In the PI Gauge web part, click Edit > Modify Shared Web Part.
7.
8.
In the Name mask field, enter BA* and then click on the Search button.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 138
9. Double click on the listed tags or select the tags and click on the Add button.
10. Click on the OK button at the bottom of the window.
11. In the Modify Shared Web Part pane on the right
Select the tag BA:CONC.1.
Change the number of zones to 2.
Change Zone 1 color to Green.
Change the Label to Normal.
Change the Total Scale Percentage to 80.
Select Zone 2.
Change Zone 2 Label to High.
Change Zone 2 Color to Red.
Change Zone 2 Total Scale Percentage to 20.
Repeat for the remaining two (2) tags.
Note that the default setting for the gauge is
horizontal.
12. Click on the OK button at the bottom of the edit
pane.
13. Click on the Exit Edit Mode link.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 139
The PI Values web part presents single events. It can also be configured to present summary
values such as the average, minimum, maximum, or standard deviation. This data is updated
automatically and can be sorted by clicking on the column title.
Clicking on a Dataset will open an ad hoc trend, as will selecting Ad hoc Trend in the PI
Values web part menu.
In the PI Values configuration, the Table Columns section is used to add and remove
columns from the web part.
If you are displaying values for a large number of tags, the Number of Rows to Display
parameter can be adjusted to specify the number you show at one time. The additional rows
are hidden, but can be paged through by using the arrow navigation at the bottom right corner
of the PI Values web part.
Formatting templates can be created and selected in the Behavior Settings dropdown.
Template creation is part of the PI WebParts User and Administration class and is beyond the
scope of this course. For now, we will leave this with the default.
The Summary Parameters section is used to configure the Calculation Interval, Interval
Type, Sync Time and Conversion factor (which is only applicable to Totalizations). You
can also choose to use the web part time range and to display the summary settings.
There are three types of Intervals that can be chosen. The first is type Fixed. If you have an
average that is being calculated over an hour and it is scheduled on the hour, then the Fixed
Interval will only display the last fully run hour and will not update during the hour.
The second Interval type is Running. Using the same calculation as before, this Interval type
will begin the average calculation at the top of the hour and continuously update the average
over the course of the hour as new data becomes available.
The final Interval type is Moving. Again using the concept of an hour average, this Interval
type will calculate the average over the last hour, or, expressed in PI Time, *-1h to *.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 140
Objective
Problem Description
You understand how to configure a basic web part. You want to try the PI Values web part.
Approach
Create a new page in your Team Site called Exercise_R3. Add one PI Values web part to any
zone. Add all of the tags that begin with BA: to the data area. In the selected columns choose
DataSet, Time, Value, Interval Minimum, and Interval Maximum. The Calculation Interval
should be set to 24h and the sync time to 00:00:00 (this will give yesterdays statistics). You
want to display the Summary Settings in the web part. Click on the OK button and on the
Exit Edit Mode link.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 141
Step-by-Step Solution
1.
2.
3.
Enter information regarding the name and the layout of the web part page
Enter Exercise_R3 as page name;
Leave the other default settings;
Click on the Create button to validate your selection.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 142
4.
5.
6.
7.
8.
9.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 143
The PI TimeSeries web part presents columns and rows of time series data. The configuration
of this web part is similar to that of the PI Values. This web part, however, uses the time
range specified as the bounds of the data that it retrieves.
The data contained in the PI Timeseries and PI Values tables can also be exported to Excel by
selecting the Export to Excel>Open option from the web part menu.
Note: It is a known issue that the Export to Excel>Save function does not work. The work around is to
use the Export to Excel>Open and then save the opened Excel spreadsheet.
8.2.6
Questions
1.
2.
True or False: To obtain their values, the PI WebParts are connecting directly to a PI server.
True or False: If you need to display four gauges on your page, you need to insert and configure four
PI Gauge web parts.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 144
Objective
Problem Description
You want to see historical data for a tag.
Approach
Create a new page in your Team Site called Exercise_R4. Add one PI TimeSeries web part.
Configure it to show the last 4 hours of data for the tag CDT158.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 145
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
9.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 146
Objectives
9.1.1
The PI Trend web part provides data visualization using an interactive trend graph updating
in real-time. This is very similar to the Trend in ProcessBook and DataLink. The web part
supports trend cursors and zooming. The configuration panel includes Time range selection,
Data selection, Vertical scale, Trends properties and formatting, and Time Scale.
Select the Export to Excel option from the PI Trend web part menu. Data contained in the PI
Trend web part (original configuration or zoomed in area) will be exported in an Excel
spreadsheet.
Note: The Export to Excel > Save is currently a known bug. This should open a save dialogue box to
save the file without opening it, but this is not currently the case. This should be updated in the next
release. In the meantime opening the file and then saving is a simple work around.
9.1.2
PI TimeRange
PI TimeRange web part makes an implicit connection to other PI WebParts and it allows the
user to change the start and end times for other web parts on the page. The buttons next to the
text fields open a calendar dialog box for selecting a date and time or timestamps can be
directly entered in the fields. Both PI and Windows time formats are supported. By default,
when you edit the PI TimeRange web part, it will affect all PI Trends on the same page.
These connections can be made explicitly, rather than implicitly. We will cover making
explicit connections later.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 147
9.1.3
Objectives
Problem Description
You want to see a trend with data and so you will create a page and use the PI Trend web
part. You also want to use the PI TimeRange web part to control the trend. Finally, you want
to export the value to Microsoft Excel.
Approach
Create a new page in your Team Site called Exercise_R5. Add one PI Trend and one PI
TimeRange web part to any zone. Add the tag CDT158 to the data area of the PI Trend web
part. Exit the edit mode and test the web part interaction by changing the time in the PI
TimeRange web part to a Start Time of *-24h and notice the effect on the PI Trend. Click on
the upper-right menu icon for the PI Trend web part and select Export to Excel > Open.
Once the file is opened, save it to your desktop. Re-open the file and verify the contents.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 148
Step-by-Step Solution
1.
2.
3.
13. To Export the file, click the down arrow in the upper right corner of the PI Trend and select Export
to Excel > Open. Once the Excel spreadsheet has opened, save the file to your desktop.
14. Reopen the saved Excel file and verify the content.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 149
9.2
Objectives
9.2.1
Explain the SVG format and how to download the SVG Viewer
Create .svg files from ProcessBook displays
Insert ProcessBook .svg files in a SharePoint document library
Configure the PI Graphic to show PI Data
SVG Format Explained
Scalable Vector Graphics is an Adobe graphic file format that enables dynamic generation of
high quality graphics from real time data. PI ProcessBook 2.2 and higher has an SVG add-in
that allows the conversion of ProcessBook files into the SVG type and vice-versa.
9.2.2
Scalable Vector Graphics (SVG) is a graphic file format and web development language
based on XML. SVG enables Web developers and designers to create dynamically generated,
high-quality graphics from real-time data with precise structural and visual control. With this
powerful technology, SVG developers can create a generation of Web applications based on
data-driven, interactive, and personalized graphics.
Because it is based on XML, SVG content can be linked to back-end business processes such
as e-commerce systems, corporate databases, and other rich sources of real-time information.
You can create web-based applications, tools or sophisticated user interfaces with common
Web scripting and programming languages such as JavaScript, Java, and Microsoft Visual
Basic.
Source: http://www.adobe.com/svg/overview/svg.html
9.2.4
The PI Graphic presents ProcessBook displays that are saved in an SVG format. They are
then shared in a document library, making it easier for users to share files.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 150
PI ProcessBook SVG files do not support VBA or ActiveX Scripting, SQC, and Batch trends. The PI
ActiveView web part must be used to maintain all of the functionality of PI ProcessBook PDI displays,
which will be covered later.
9.2.5
The SVG files that you want to display in PI Graphic web parts must be uploaded to a
SharePoint document library.
9.2.6
The PI Graphic Configuration tool provides the ability to search for SVG files and select
one for display. There is also a button to configure a web part connection that sends a path to
a file. The section is expanded by default, but can be collapsed by clicking its collapse button
(-). This tool part contains two main sections, Selected File and XSL Transform.
The Select File field shows the full path to the SVG file to display in the web part. The path
may be a UNC path to a file share or an absolute or relative URL. Typically, we recommend
uploading the SVG file to the SharePoint Server in one of the Document Libraries associated
with the site and use the URL to the file in that library. The contents of the field can be
changed by typing or by selecting a different file from the File Search dialog box.
The XSL Transform File text field accepts a URL to an XSLT file. By using an XSLT in an
PI Graphic web part, the user can enhance an SVG file that is authored in PI ProcessBook
without permanently altering its contents. The transformation logic can include pattern-based
substitution to change tags or server names, adjust the visual representation of a display, or to
attach JavaScript logic to specific elements.
SVG Displays created in ProcessBook can be edited in the smart clients by:
If you have PI ProcessBook installed on your local machine and you have access to the
PI Server on which the data in the PI Graphic web part relies, it is possible to perform what is
known as a Roundtrip in ProcessBook. This involves launching the SVG file in
PI ProcessBook, making any desired additions, edits, or deletions, and then saving the SVG
file. You can then save it directly the Document Library, or save the file locally and re-upload
it. The PI Graphic should be automatically updated with the changes you made in
ProcessBook. You may have to refresh the screen so that it renders again.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 151
Objective
Problem Description
You have some PI ProcessBook displays that your users would like to preserve in web parts.
Approach
Create a new page in your Team Site called Exercise_R6. If you are not already in Edit
Mode, select Edit Page from the upper right page menu. Add one PI Graphic web part to any
zone. Minimize the browser window and open PI ProcessBook. Select the display Main
Column Bottom and open it. Use the Save As function and save it to your desktop in the
.SVG file format. Go back to your browser and navigate to the ProcessBook Files Document
Library you created earlier. Upload the .SVG file there. Finally, go back to the page you
created for this exercise and configure the PI Graphic web part to display your .SVG file.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 152
Step-by-Step Solution
1.
Before you begin, minimize your browser and open PI ProcessBook. The default workbook
PIDEMO.PIW should open. If it does not, navigate and open that workbook.
2. On the Refinery tab, open Main Column Bottom.
3. Select File > Save As and save the file to your desktop as a Scalable Vector Graphics (.SVG) file.
4. Close the PI ProcessBook application.
5. Return to your Team Site in your browser and navigate to your document library ProcessBook Files
that you created earlier.
6. Select Upload and use the Browse button to select the Main Column Bottom.svg on your
desktop. Upload the file to the library.
7. Click on Site Actions > Create.
8. Click on Web Part Page.
9. Enter information regarding the name and the layout of the
Web Part Page.
Enter Exercise_R6 as page name;
Leave the other default settings;
Click on the Create button to validate your selection.
10. In one of the Web Part Zones, click on the Add a Web
Part link.
11. Check the PI Graphic web part, click on the Add button.
12. In the PI Graphic web part, click Edit > Modify Shared
Web Part.
13. Click Browse and select your .SVG file. You may have to
use the folder navigation buttons (in the upper left corner of
the browse window) to travel up one level and into a
different document library.
14. Click on the OK button at the bottom of the edit pane.
15. Click on the Exit Edit Mode link.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 153
Select Edit > Launch in PI ProcessBook to open the file from the web server.
2.
3.
4.
5.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 154
9.3
Objectives
9.3.1
Excel Services is brand new server technology that is included with Office 2007. The
downside to Excel historically is that it is not easy to share and that it was difficult to reuse
the data. Excel Services has been introduced to make life easier when it comes to leveraging
important Excel spreadsheets on a large scale. In summary, Excel Services will make it
simple to manage, share, and control spreadsheets.
This new technology is a thin client (no downloads) way to share the output of Excel files
without the need for any client Excel components to be present and loaded on the client
machine. It represents an innovative way to share the contents and calculations in a controlled
manner to end users.
These server-side Excel files can also be used as the basis on which consumers can build
custom applications based on the data and calculations inside of an Excel document by taking
advantage of the newly introduced set of Web services that expose the Excel spreadsheets
data.
9.3.2
Excel Web Access offers a web view that displays data and charts from an Excel Workbook,
has a similar "look and feel" to Microsoft Office Excel, such as sheet tabs, outline buttons,
and drop-down arrows, and allows you to edit a few cells from the spreadsheet. It provides
browser-based access to spreadsheets that you can incorporate spreadsheets in portals and
dashboards. You can limit access to spreadsheets either for regulatory and audit concerns or
to protect intellectual property in spreadsheets. It also eliminates multiple versions of the
truth, or many copies of the same spreadsheet that are out of sync with each other by sharing
them via online document libraries. It also allows you to leverage servers to offload longrunning calculations from desktop machines.
An Excel Web Access Web Part is also available which allows embedded Excel reports into
existing Portal pages. Interaction with other Web Parts is available through the use of
connections, covered later.
9.3.3
The major requirements are Microsoft Office SharePoint Server (MOSS) 2007 using
Microsoft Enterprise Client Access License (CAL) and with Excel Services enabled in
SharePoint. To create the worksheets, you need Microsoft Excel 2007, or Excel 2003, XP or
2000 with the latest service pack and Microsoft Office 2007 Compatibility Pack.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 155
9.3.4
Similar to the way you must save and upload an SVG file to a Document Library to display
your independent ProcessBook Displays, you must publish the Excel file to a Document
Library to use it in a Web Part. The Excel Services are installed only with Microsoft Office
SharePoint Server (MOSS), not WSS or SPS.
9.3.5
Objective
Problem Description
Your manager wants to be able to see reports on the intranet. You decide to use PI DataLink
for Excel Services to post live PI DataLink reports in a web page.
Approach
Open a spreadsheet containing data from the PI DataLink Compressed Data (Start
Time/Number) function (Exercise_DL5_Solution.xlsx if you do not wish to create
your own) and publish it on the SharePoint Server.
Create a new page in your Team Site called Exercise_R7. If you are not already in Edit
Mode, select Edit Page from the upper right page menu.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 156
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 157
Step-by-Step Solution
1.
Navigate to your Team Site in your browser and navigate to your document library Shared
Documents.
2. Select Upload and use the Browse button to find and select Exercise DL5 Solution.xlsx from
where you have saved the class materials. (Alternately, use an Excel 2007 file from a previous
DataLink exercise.) Upload the file to the library.
3. Click Site Actions > Create.
4. Click Add Web Part Page.
5. In the Name field enter Exercise_R7.
6. In one of the Web Part Zones, click Add a Web Part, and then click OK.
7. Check the Excel Web Access (EWA) box, click Add.
8. Click Edit > Modify Shared Web Part.
9. Browse for your workbook you uploaded.
10. Click OK.
11. Click OK to close the edit panel.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 158
10. PI ActiveView
10.1 Advanced Web Part Possibilities
Objectives
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 159
PI ActiveView is a client application that allows users to post .pdi files to their Intranet.
There are a few rules to using PI ActiveView that each user and developer has to keep in
mind. One is that the application will not open a ProcessBook workbook. You must break
your workbook out into individual component display (.pdi) files and insert them as Objects
within HTML (hypertext markup language) files. These can be either .htm files, .asp files, or
any variation on that web standard.
You can do this manually, or you can use a utility that OSIsoft includes in every PI
ActiveView installation. This utility is a small application written in VBA that performs these
tasks. It is possible to find it in: .\PIPC\ACVIEW\WebDev\EXPORT.PDI
Because PI ActiveView connects directly to the PI Server, it does require a direct connection
through port 5450 and a local installation. This does mean that PI ActiveView is a smart
client, not a thin client. Thus, we find it usually better suited to a companys intranet
environment, rather than a full web deployment.
Note: Linked ProcessBook buttons do NOT work with PI ActiveView. You must remove them from PI
ProcessBook before you create your display files.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 160
The RtMessenger interfaces with Windows Office Communicator to display who in your
organization is online.
These specialty web parts are covered in more depth in our other training options such as our
PI WebParts User and Administration class and in some of our online webinars.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 161
You can save time by creating element relative PI Displays instead of displays that show data
for specific named PI tags.
11.1.1 The AF Structure Described
AF provides an asset model that allows users to organize and structure PI data and other data
according to objects that users are most familiar with, such as physical objects in their
processes like reactors, transformers and meters.
With AF, the overall PI System evolves from a server-centric approach to a more companyor enterprise-wide approach. The PI System becomes less focused on PI tags and more
focused on user-centric objects called Elements. AF is based on the Element, the useroriented object that contains attributes, which reference PI data, configured data, or data from
other systems.
The PI System Explorer is your access into the databases comprising AF. Use the Explorer to
configure the objects that represent your process, for example, reactors, transformers, meters,
boilers, heat exchangers.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 163
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 164
You can search for PI Tags by browsing the PI System explorer browser tree structure or by
specifying search criteria.
11.1.2 Build Element Relative Displays in ProcessBook
PI ProcessBook is able to tie into AF to create Element Relative Displays. It can help you
build displays when you have redundant units.
Problem
A site has 100 units, such as wind turbines, AMI meters, valves, or pumps; each unit is
exactly the same with the same types of tags and properties. It is necessary to build a display
and monitor each one. You would prefer to not have to build 100 displays or to manage the
navigation between them.
Solution
Define the units as elements in AF with the PI Tags referenced as Element Attributes. You
can also build in any additional Attributes that you may want to reference. First, select a
template unit. Design the display using aliases from the template. Shift the context from
one unit to another. One display can be used to monitor all 100 units.
To add elements to a display, go to View > Element Relative Display. Choose the elements
that you wish to be included in the display. They will then be available in that display for
reference. To add the attributes to a Dynamic Element, you need to do the following:
Click Element Relative in the dropdown list beside the Tag Search button.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 165
You will see a list of all the elements defined underneath the current element of
interest (i.e. the element selected in the Element Relative Display pane).
Choose the item you want to display and click OK.
Objectives
Problem Description
The assets of the production area have been completely modeled in the AF database. This enables the PI
client tools to access it. The operators on the floor will need to use various PI ProcessBook displays to
take advantage of this information. They first need a display that will show general information about the
production lines.
Approach
Both production lines have identical information attached to them, so the best way to build this is to use
an element relative display. A template Production Line - Template.PDI has already been
prepared by the operators with the images and shapes, but they rely on you to add the dynamic
information such as values and trends. The display needs to be converted to an element relative display
and the proper elements of interest attached to the display. You need to add the following information:
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 166
Once the display is completed, select the first production line in the Element
Relative Display panel and move the time range into the past. Notice the product
mixed, which is stored in the AF server and not the PI server, changed based on the
modification done in the Element Versioning exercise.
Save the file.
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 167
Step-by-Step Solution
1.
Open the template display file named Production Line - Template.PDI. This display
contains only static shapes and text.
Click the menu File > PI Systems and connect to your AF Server and database.
Click the menu View > Element Relative Display. On the left pane appearing, click the Search
icon.
To link the display to the production area and its production lines child elements, search for the
Production Area element, select it and click OK. [If your AF database does not have this element,
please find two elements that have at least 3 common attributes (i.e. the names of the attributes are
identical) and use them in this step and the steps below.]
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 168
Expand the production area to find the two production lines, select the first.
Insert the value "Percent Full" by going to Draw > Value, clicking in the area labeled "Percent Full"
on the display and selecting Element Relative instead of Tag Search with the
button. At this
point, make sure the ProductionLine1 element is selected, click Add Element Name, OK and OK
again. You can adjust the color and size of the element name to make it bigger.
7. Using similar steps, add as many of the values shown on the display as you can ("Product Stored,"
"Product Mixed," "Mixer Speed"). You will need to select the appropriate attributes.
8. Add a trend of "Temperature" in the rectangle labeled "Temperature."
9. In the Elements of Interest panel on the left side of the display, toggle between ProductionLine1
and ProductionLine2 to confirm all the settings in your display are element relative.
10. Save the file locally on your training computer.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 169
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 170
Navigate through the tree by clicking to expand nodes and select AF attributes.
Note: Support for the display of attribute values is limited to certain types of attributes only. Specifically,
PI WebParts can display the values of attributes containing constant values or PI Point data references.
Furthermore, PI Point data references must be based on a PI Point (not another attribute) and in the data
reference definition in AF the value retrieval methods must not be modified. Attempting to configure a
web part to display the value of other kinds of attributes will result in unsupported data reference errors
in the web part.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 171
PI TreeView web parts can pass AF Attributes and context paths to both PI WebParts and
third-party or custom web parts.
Note: PI TreeView respects access restrictions applied within the AF Server. Users must have Read
access or better to an element or attribute to see it in the web part.
To configure the PI TreeView web part:
1.
Click the Browse button in the PI TreeView tool pane to display the Configure AF TreeView
dialog.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 172
The root node should specify a parent that includes all desired descendent elements and attributes
desired for use. This parameter is required to configure the web part.
Default Selected Node: An optional path to an element used as the default selected node for the
web part. The path uses the following format:
\\<AF Server Name>\<AF Database Name>\<Element>
Attributes of the specified element path are sent to connected web parts automatically when the
page is loaded.
You can configure the PI TreeView web part as a provider of the AF context path to other
web parts. With proper configuration on both provider and consumer, when the user chooses
an element in the PI TreeView, any data item on the consumer web part will be redirected to
display the attribute on the selected element that has the same name as the data item.
For example, in Figure 11 above if the user is viewing element "Colo 01.01" and then clicks
on element "Colo 01.03", the consumer web parts will all change any data items that
reference attributes in "Colo 01.01" to display the attributes that have the same name in "Colo
01.03".
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 173
On the Web Part Page title bar, click Site Actions> Edit Page. The Connections selection in the
Web Part menu only appears while in Edit mode.
Decide which two web parts you want to connect. You can create or modify the same connection
starting from either web part.
From either the Consumer (the Web Part receiving the data) or Producer (the one providing the data)
Web Part, click the Web Part menu, and then move the cursor over Connections.
From the connection type submenu, select the type of connection you want to create or modify, such
as Provide Row To or Filter Data With.
From the available Web Parts submenu, select the web part for which you want to create or modify
a connection.
Some web parts require editing in the configuration panel to complete the connection. In the
configuration pane for PI WebParts, click on the Connections button (lightning bolt) to
complete the connection.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 174
Objective
Problem Description
You understand that you can pass data from one web part to another. You want to create a
web page where you can see a list of tags, but drill down to view the recent history for any
one of them. You decide to use the PI Values web part to list some tags and want to pass
selected tag names to the PI TimeSeries web part.
Approach
Create a new page in your Team Site called Exercise_R8. Set the page in Edit Mode. Add
one PI Values and one PI TimeSeries web parts to any zone. Modify the settings of the PI
Values web part by selecting Modify Shared Web Part. Perform a tag search on tags that
begin with CD and add them to the data area. In the selected columns choose: DataSet, Time,
Value, and Current State. Add the values for Interval Maximum and Interval Minimum and
click on the OK button.
For the PI Values web part pass the parameter of Tag Name to the PI TimeSeries web part.
Test the web part interaction by clicking on a tag name in the PI Values web part and observe
the PI TimeSeries web part. Below is a sample illustration.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 175
Try to do this exercise on your own before proceeding to the step-by-step solution.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 176
Step-by-Step Solution
1.
2.
3.
4.
5.
6.
7.
8.
11. On the PI TimeSeries Web Part, click Edit > Modify Shared Web Part.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 177
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 178
12. Conclusion
12.1 Training
The OSIsoft Training page is located at http://training.osisoft.com. From here you can see our
current training offerings and upcoming events. There are currently 5 Ways to Learn about
PI, with additional methods coming shortly.
Live training webinars are offered regularly for customers who are enrolled in the Software
Reliance Program (SRP). We have both the Show Me the Value webinar series which
provides new and exciting business ideas, and the Show Me How webinar series that
provides technical knowledge on a very specific topic.
12.2 vCampus
vCampus is a subscription-based, online offering that consists of providing everything people
need to develop applications on the PI System. Focusing on 'doing it right', this communityoriented program provides resources such as:
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 179
Get computer platform (CPU type, operating system, and version number) as follows:
On Windows, right-click on My Computer icon and select Properties tab.
On UNIX, type uname -a
Note the time that the difficulty started, and be prepared to report the contents of the message
log at that time. The message log is found in the Operation > Message Log Viewer option in
SMT. You will likely also need the PIPC log covering the applicable timerange. This log is
located in \\pipc\dat.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 180
Objectives
Problem Description
Your company has extended the production plant with brand new machinery. In order to give
access to the plant data to your coworkers, you need to implement new material using the
PI ProcessBook, PI DataLink and PI WebParts.
Some of the data will only be used by operators who are experienced with PI ProcessBook
and like its flexibility. You will need to create a few displays for them and organize them
adequately. Other data requires a more numerical analysis and you prefer using PI DataLink
to analyze it. Finally, other data are of interest for the whole plant staff and you chose to
distribute it using PI WebParts so that everyone will be able to access the data using their web
browser.
Approach
Here are the items that should be implemented so that your users can have an efficient access
to the data of the new section in the plant:
A standalone display showing a pump picture and two tags related to it,
BA:ACTIVE.1 and B A:CONC.1.
A ProcessBook containing a link to the display mentioned above, an embedded
display (described below) and a URL link to the OSIsoft technical support
website.
The embedded display showing a tank image and a scaled bar graph with its
level. This display should be element relative if you have an AF database
structure you can use that has the same aliases in two or more modules.
A cell showing the current state of a piece of machinery using tag CDM158.
A table with the latest 10 values of tag CDT158.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 181
A PI Expression with the average of Sinusoid for the last hour and how that
compares with the current value of CDT158.
The table should use conditional formatting to highlight the lowest 10% of values
to help the users visualize the report.
An PI Gauge web part showing the key performance indicator (KPI) represented
by tag sinusoidu
A text web part explaining in 1 sentence how the users can pull an ad hoc trend
of the current electrical consumption using the PI Gauge.
An PI TimeSeries web part showing the history of the last 10 minutes of the tag
BA:TEMP.1.
An PI Graphic web part containing the display previously created in
ProcessBook
An Excel Web Access web part containing the PI DataLink report previously
created.
Note: This recap exercise can be performed in various ways, no Step-by-Step solution is provided so you
can design your own solution. Please consult your instructor if you have any questions.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 182
Hours
Minutes
Seconds
Days
Weeks
Months
Years
__H___________
__M___________
__S___________
__D__________
__W__________
__MO_________
__Y___________
Chapter 2 Question 1:
The PI Server name, the connection type, the default user, and the port number.
Chapter 2 Question 2:
The * for any number of characters and the ? for a single character.
Chapter 2 Question 3:
c. and f.
Chapter 2 Question 4:
The scroll bar and the One time period forward backward functions.
Chapter 2 Question 5:
The second statement is false. Any changes done in Run mode are temporary and will not
change the original configuration of the display. Those changes will not be saved.
Chapter 2 Question 6:
Integer, float, string, array, file, etc.
Chapter 3 Question 1:
The level of the entry need to be set to 1.
Chapter 3 Question 2:
The Trend, XY plot, Bar Graph, value and any Multi-state Symbol are all dynamic
elements.
Chapter 6 Question 1:
The PI DataLink functions will be refreshed when the Excel spreadsheet is Calculated. To
refresh PI Time functions, a Full Recalculate must be performed.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 183
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 184
15. Glossary
COM
Component Object Model, a software interface standard for software componentry introduced
by Microsoft in 1993.
DCOM
Distributed Component Object Model, a Microsoft proprietary technology for software
components distributed across several networked computers to communicate with each other.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 185
16. Index
No index entries found.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying, recording,
or otherwise, without the prior written permission of OSIsoft, Inc.
Copyright 1995-2010 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 186