Академический Документы
Профессиональный Документы
Культура Документы
OSIsoft, LLC
777 Davis St., Suite 250
San Leandro, CA 94577 USA
Tel: (01) 510-297-5800
Fax: (01) 510-357-8136
Web: http://www.osisoft.com
OSIsoft Australia Perth, Australia
OSIsoft Europe GmbH Frankfurt, Germany
OSIsoft Asia Pte Ltd. Singapore
OSIsoft Canada ULC Montreal & Calgary, Canada
OSIsoft, LLC Representative Office Shanghai, Peoples Republic of China
OSIsoft Japan KK Tokyo, Japan
OSIsoft Mexico S. De R.L. De C.V. Mexico City, Mexico
OSIsoft do Brasil Sistemas Ltda. Sao Paulo, Brazil
OSIsoft France EURL Paris, France
Page ii
Learning workbooks and other material used in class can be downloaded from
http://learning.osisoft.com/. User manuals and other documentation can be downloaded from
http://techsupport.osisoft.com/ (login with an OSIsoft technical support account is required).
Page iii
Table of Contents
1.
2.
3.
4.
5.
6.
7.
Page iv
1.2
Tags and Assets The Basic Building Blocks of the PI System .............. 3
1.3
2.2
2.3
A Walkthrough of PI AF ........................................................................................23
3.1
3.2
3.3
4.2
4.3
4.4
4.5
5.2
5.3
6.2
6.3
6.4
6.5
7.2
PI AF Versioning ..........................................................................................81
7.3
7.4
8.
7.5
7.6
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
10.
11.
Exercises Solution...............................................................................................129
11.1 PI Performance Equations Exercise Solution (Section 6.2.2.1) ............129
11.2 PI Totalizer Exercise Solution (Section 6.3.2) .........................................130
11.3 Speedys Pizza Solution (Section 7.4) .....................................................134
12.
13.
Page v
PI System Basics
1. PI System Basics
1.1 What is a PI System?
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.
These are generally the parts involved in a PI System:
PI Server
PI System User
Data PI Interface
Buffer
Source
Table
Lookup DR
PI AF
Relational
Database
Data is collected from the source by the PI Interface program hosted by the acquisition 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, like PI ProcessBook.
Page 1
1.1.2
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.
In many cases there are many PI Servers in an organization, aggregating data from lower
levels.
Page 2
PI System Basics
1.2 Tags and Assets The Basic Building Blocks of the PI System
Objectives
Define a PI AF Asset and its components the element and the attributes
Define the four attribute types: Static (None), PI Point, Formula, and Table Lookup
Define a PI Server Tag and the attributes Tag Name, Descriptor, and Point Source.
Define the different data types that can be stored in PI Server Tags
Tags
1.2.1
Assets
What is an Asset?
The PI Asset Framework (AF) Server is a part of the PI System. It contains asset or
metadata that is usually organized according to the assets containing the tags being
monitored. Assets can be helpful to users of the PI System who do not know or are not
familiar with tags. Using assets they can find the data they need without understanding the
technical details of each piece of equipment. Assets are also helpful in finding all of the tags
associated with a specific piece of equipment.
Page 3
1.2.2
Problem Description
Identify the type of data that can be aggregated in a PI AF database.
There are four types of data (Attributes) that can be added by default, list them here:
Type of Data
Page 4
Data Reference
PI System Basics
1.2.3
It is a unique storage point for data in the PI Data Archive. It is simply a single point of
measurement. It has been the traditional unit in the PI Server.
1.2.4
The answer is pretty much everything. Below are the valid data types:
Across
1.
2.
3.
Down
2.
4.
5.
6.
7.
8.
Page 5
1.2.5
Problem Description
Identify the type of data that might be associated with each of the following:
Example: A temperature sensor:
_Float__
A switch position:
_______________________________________
A Batch ID:
_______________________________________
Operator comments:
_______________________________________
_______________________________________
_______________________________________
_______________________________________
1.2.6
Some Basic Point Attributes and Why they are Important to you
Each PI tag has a set of attributes that define it. 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 can be helpful in searching for tags.
For example, try to determine what the following tag may refer to:
M03_E1P1_MOTDRV1202_RUNSTAT
________________________________________________________
Descriptor
This is the human-friendly description of the PI Tag. It is often used as a search criteria 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.
PointSource
All tags are related to their interfaces that collect the data by an attribute called PointSource.
This means that in many cases you can find all of the tags associated with a particular device
by searching for all tags of a certain PointSource. This assumes that the user knows the point
sources in use and that will not be true in most situations.
Page 6
PI System Basics
You can use a special syntax, called PI System time, to specify inputs for timestamps and
time intervals. The PI System time uses specific abbreviations, which you combine to create
time expressions.
1.3.1
When specifying a PI System time, you can use specific abbreviations that represent relative
time units and reference times.
Time-unit abbreviations
Abbreviation
Time unit
second
minute
hour
day
week
mo
month
year
To specify time units, you can specify the abbreviation, the full time unit, or the plural
version of the time unit, such as s, second, or seconds. You must include a valid value with
any time unit. If specifying seconds, minutes, or hours, you can specify a fractional value.
You cannot specify fractional values for other time units.
Reference-time abbreviations
Abbreviation
Full
Reference time
N/A
Current time.
today
yesterday
sun
sunday
mon
monday
tue
tuesday
wed
wednesday
thu
thursday
fri
friday
sat
saturday
Page 7
1.3.2
Abbreviation
Full
Reference time
YYYY
N/A
M-D or M/D
N/A
DD
N/A
The previous PI System time abbreviations will be used in PI System time expressions. They
can include a reference time and a time offset, indicated by a direction (either + or -) and a
time unit with a value. PI System time expressions can be:
Reference times, time offsets and their combination are here detailed.
Reference Times
A reference time can be a fixed time, such as "24-aug-2012 09:50:00", or a valid PI System
reference-time abbreviation, such as "t".
A fixed time always represents the same time, regardless of the field or the current time.
Input
Meaning
23-Aug-12 15:00:00
25-Apr-13
Meaning
3-1 or 3/1
2011
25
tue
Time offsets
Entered alone in a time field, time offsets specify a time relative to an implied reference time.
The implied reference time depends on the type of field used where the expression is entered:
Page 8
PI System Basics
Type of
Field
Time
Offset
Start time
-1d
End time
+6h
End time
-30m
Timestamp
-15s
Implied Meaning
t-1d+12h
When included with a fixed time or a reference-time abbreviation, a time offset adds or
subtracts from the specified time.
1.3.3
Input
Meaning
*-1h
t+8h
y-8h
mon+14.5h
sat-1m
1-jan-11-1d
Page 9
1.3.4
Problem Description
Determine the "real" dates and times indicated by the PI System times in the table below:
Abbreviation
Answer
* - 30m
T-1d
y+8h
12 8:
Tuesday 2d
Answer
Today at 6:30 AM
Monday at 5:45 AM
15 minutes ago
You would like to build a report to show the data for the previous day, what would you use as
start time and as end time?
Page 10
PI System Explorer
2. PI System Explorer
The PI System Explorer, or sometimes referenced as PSE, is the configuration and
management tool for PI AF, PI Notifications and PI Event Frames.
PI System Explorer can be installed on a machine by running the PI AF Client installation kit.
It is also installed as part of the PI ProcessBook version 3.1+ install kit. The client part of the
PI Notifications installation kit will add extra sections to PI System Explorer (MyPI,
Notifications and Contacts), to configure notifications.
Page 11
Navigator Panel
PI System objects are grouped into sections displayed in the Navigator Panel. Groups
appearing by default include Elements, Event Frames, Library, and Unit of Measure. When
the PI Notifications feature is installed, MyPI, Notifications, and Contacts also appear in the
Navigator.
Menu Bar / Toolbar
Use these options for such tasks as opening/creating a database, searching for elements or
contacts, applying and checking in changes, setting view options, and so forth. Menus and the
Toolbar are context sensitive and will change and present different options depending on
what section is selected from the Navigator Panel.
Browser
Use the Browser to select the objects you want to work on and display in the Viewer panel.
The Browser displays the PI System objects that have been added to the PI AF database, such
as elements, templates, notifications, etc. Depending on the section selected from the
Navigator Panel, the following will be available from the Browser:
Viewer
This is the primary work area. Create and edit elements, attributes, templates, tables, contacts,
notifications and so forth in the Viewer panel. When configuring attributes through the
Viewer, a configuration panel can also be shown to help modify their configuration.
Palette
The Palette displays templates, data references and contacts that can be associated with
objects being defining in the Viewer. Often the Palette is hidden to optimize screen real
estate.
Page 12
PI System Explorer
Status Bar
Check the status bar after clicking an item in the Browser to see its status. For example, last
modification time, if the object is checked out or if a notification is currently loading.
2.2.1
During this class, the PI System data will be retrieved mainly using the PI System Explorer.
A connection to PI AF will be needed to access all the metadata related to your assets while a
connection to the PI Server will be required to access the process data from the PI Server
tags.
2.2.2
Connecting to a PI AF Server
To connect to the PI AF Server simply open PI System Explorer (PSE). The default PI AF
Server was set during installation, so you will be connected automatically to it. If a default PI
AF database has already been defined, PSE will connect automatically to it as well. If no
default PI AF database has been defined, a window will pop up and you will be invited to
create a new AF database.
It is possible to see which PI AF server the user is connected to by selecting the
button on the toolbar. The Select Database dialog box will show the current server name in
the top drop-down "AF Server" list.
Page 13
Problem Description
You may follow along as your instructor shows you how to validate connections to PI
Server(s) and PI AF server(s).
Approach
Open the PI System Explorer and connect to an AF database
Start > Programs > PI System >
To find out the credentials being used for connecting to the PI AF Server, go to File >
Connections
Page 14
PI System Explorer
2.2.4
Connecting to a PI Server
From the PI-SDK > Connections section, the PI Servers configured on the local machine are
displayed. To validate a connection to a PI Server, simply check the checkbox next to its
name or IP address. The connection information will then be shown if the connection attempt
is a success.
Note: The first time a PI System application is installed a default PI Server is selected. This is why, even
if you have never configured a PI Server at least one will appear in your Connections window.
The user that was used to authenticate on the PI Server will be shown in the status bar and the
connection information section on the right.
Note: The PI SDK Utility is a particularly useful tool to troubleshoot permission issues.
Page 15
2.2.5
Problem Description
A new site part of your company just had a PI System deployed and you want to be able to
visualize data from their new PI Server and PI AF database.
Your Instructor will give you the credentials to use:
PI Server machine name:
_______________________________________
_______________________________________
Credentials (optional):
_______________________________________
Approach
Using the PI System Explorer (2012+) application, it is possible to test and add connections
to PI Servers and PI AF servers. This is done through the Servers window accessible from
the File > Connections menu item.
Add a new connection to the PI Server (
specified above.
) and PI AF (
Validate the new connections by selecting the server and clicking on the
Page 16
)
button.
PI System Explorer
2.3.1
Most PI System applications will give the option of searching for Elements or Element
Attributes. Elements are the assets themselves while element attributes reflect tags value or
other associated data. When drilling down to an element, it is possible to inspect its Attributes
for their current value or any other key information.
Searching for Elements
In order to search for PI AF Elements, it is possible to use the top-right search box in PI
System Explorer, visible after selecting the Elements section of the Navigator Panel:
An advanced search can also be performed to retrieve Elements by selecting the Edit >
Advanced Search menu item from the Navigator Panel Elements section:
Page 17
Note: The Search Sub-Elements option should be checked in most cases. In order to perform a search,
fill in the Search Root and Name is fields. The Name is field can make use of the wildcard characters (*
and ?). Alternatively search for elements by simply selecting an Element Template from the Template is
drop-down list.
Make sure the search is being performed on the correct AF Server and Database before clicking the
Search button.
Searching for Attributes
In order to find specific PI AF Attributes and inspect their values, the Attribute Search
window can be used. This window is available from the Edit > Attribute Search menu
item.
In the majority of cases, you will be looking at data contained in elements, just as you would
have looked at tag data.
Page 18
PI System Explorer
Note: The advantage to using elements and attributes over tags is that you can clearly see what other data
is associated with an asset something you cannot determine using tags.
2.3.2
A Tag Search window is available from PI System Explorer in order to find the appropriate
tag to map to a PI Point Element Attribute. This tag search window is accessible from the
Edit > Tag Search menu item or from the search button (
) from the Settings of a PI
Point Data Reference attribute.
Page 19
By default, this window allows searching using a tag name mask. Upon expanding the mask
section, it is possible to further refine the search using additional common tag attributes like
the Descriptor for example, by adding the Description criteria.
Wildcard Characters
Wildcards can be used to create the masks for each tag attribute criteria. More than one can
be used in a single mask and can be placed at the beginning, at the end or anywhere in the
mask.
Use the star "*" to replace any number of characters:
cd*158
Use the question mark "?" to replace exactly one character like in this example:
Page 20
cd?158
CDM158, CDT158
cd??158
CDEP158
PI System Explorer
2.3.3
Objectives
Use the PI System Explorer searching tools to discover data in the PI System.
Problem Description
You need to familiarize yourself with the principles of searching for data using the PI System
Explorer.
Note: You must use the OSIsoft Enterprises PI AF database (Training Sample) for this exercise. If this
is not available, your instructor will give you alternate details for the exercise below.
Approach
Answer the following questions using the PI System Explorer connected to the OSIsoft
Enterprises PI AF database (your instructor will give you appropriate details):
What is the current head pressure for YUL Pump 009?
______________________
______________________
Note: Hovering over an Element will display its full path in the hierarchy, its location.
______________________
______________________
______________________
Page 21
2.3.4
Tag search is one of the most common functions that users will perform. The common Tag
Search window, available from PI ProcessBook for example, allows three types of search:
Basic, Advanced and Alias.
The Basic and Advanced search allow a user to filter the PI Server tags according to their tag
attributes value by using masks.
Basic search allows searching using common criteria through a defined menu.
Note: Alias search uses the PI Module Database (MDB). The PI MDB is no longer used as the main asset
structure for most applications beginning with PI Server 2010. Users should use the PI System Explorer
to find asset data.
Most of the tag searches will be filtered using one of the following two tag attributes or both
at the same time:
Tag Mask
This can also be called Tag Name. If your organization has a convenient naming convention
or you are very familiar with the tags in your plant, then your job of searching will be easier.
However, most people do not have that luxury. Most of us have to use some other criteria.
Descriptor
Descriptor is not a required tag attribute, but it is the one that many people use to find their
tags. For example, a temperature tag might be TC365674A.pv but the descriptor might be
read as Reactor 65 Operating Temp. The downside to searching by Descriptor is that it is
comparing text strings, and so can be fairly intensive on your computer processes.
Note: Some applications like PI Coresight or PI WebParts will use different tag search windows.
However, they will all give the same results given the same search criteria.
Page 22
A Walkthrough of PI AF
3. A Walkthrough of PI AF
An asset can be defined as being a
valuable item that is owned
(thefreedictionary.com). It represents
company locations, sites or equipment, for
example. Those are components everyone
in the company can easily relate to.
PI Asset Framework, or simply PI AF, is a
database of user-configured Process
Object Models called Elements, which
represent the logical components, the
assets, of a process.
These elements form an easily browsable data directory for PI System clients. It gives a
context to PI System data and transforms it into information.
Many sites have PI System data based on instrumentation. Often the configuration
information in the instrumentation is intended for functionality, not quality of information.
There may not have been rigorous tag naming standards. There may be missing descriptions
and/or engineering units. The PI System is often used to integrate information from different
sources and these sources may not have been configured consistently. The PI Server tags are
often built directly from these sources.
Page 23
What the PI Asset Framework (PI AF) can offer is normalization and context: the ability to
compare similar equipment and correct the inconsistencies and diversity of instrumentation
data and configuration. This allows organizations to see the comparability in processes from
dissimilar instrumentation and control systems and allows a more intuitive, organized access
to process data.
Page 24
A Walkthrough of PI AF
Compatible with Microsoft SQL Server Express and up to Microsoft SQL Server
farms with mirroring.
Usability
Flexible hierarchy and powerful search and indexing support for finding data.
Extensibility
Published AFSDK (PI AF) and ANSDK (PI Notifications) with training and support
on OSIsoft vCampus.
Customers and partners can create custom calculations (data references) and filtered
data recipients (delivery channels) with Microsoft Visual Studio (C# or VB).
Reliability
PI Asset Framework (PI AF) is not a special purpose add-on to the PI Server. It represents the
best way to access all PI System data for users and applications. It is a core component of the
PI System today and will become the core component of the PI System of tomorrow.
Page 25
Activity Objectives
Create a PI AF element with attributes using PI Point, Table Lookup, and Formula
data references.
Define the value types and units of measure for attributes in the element and in the
element template.
Extend the template with new attributes and see how these affect the original
element.
Problem Description
You are working for Velocity Terminals, a chemical company producing various chemicals.
As part of the assets, the company has some storage tanks located in different countries. You
are looking for a way to monitor the tanks activity using the PI System.
Approach
Follow the instructor as he performs steps to create various PI AF objects that will lead to the
creation of a single PI ProcessBook display to monitor all of Velocity Terminals tanks.
You will later be working on your own. For now, follow and listen closely to the information
in this initial exploration of the PI Asset Framework.
Page 26
A Walkthrough of PI AF
3.2.1
Creating PI AF Databases
Open PI System Explorer (PSE) from the start menu and, if necessary, connect to the PI
System (PI AF server) that your instructor indicates.
If you are in an OSIsoft training room, use the existing Training AF database (may be
another name; must be the one where the <PI Server Name> ModuleDB element resides) to
create the Velocity Terminals structure.
If you are sharing a common PI AF server with other students, create a new PI AF Database
in PI System Explorer named Velocity Terminals_<FirstInitial+LastName>.
If PSE opens normally, choose File > Database. If PSE does not open and a pop-up appears,
click on the Select option to get to the Select Database window, as shown below. Right-click
anywhere in the list of databases and choose New Database or click on the New Database
button on the toolbar. Name the database as specified above (ex.: Velocity Terminals_JDoe).
Make sure the database is selected in the list of available databases and click the OK button
or double-click on it to open your database.
About Databases
For convenience, each participant will have a separate database. In practice, it may be better to build
fewer, larger databases. That is because references in PI AF only work within the same database; it is not
possible to compare elements and values across databases. Companies may find it better to organize their
database at the business unit level and not the plant level. Just remember: The database is a universe in
PI AF, and thus it cannot think something exists outside of it.
The Configuration database
As an administrator, it is possible to view another database available by default. That database is called
Configuration. Do not use this database to organize your assets as it is only shown to administrators, and
used to store configuration data for PI System software.
Page 27
3.2.2
Creating PI AF Elements
Make sure the Elements section is selected from the Navigator Panel and create a new
element called Tank01 (this mean the Tank01 element will not be created under the <PI
Server Name> ModuleDB element).
From the Browser, right-click on
and select New Element or click the
button from the toolbar and select <None> as the element template.
Under the General tab from the Viewer, change the name of the element to Tank01.
About Elements
The element is the basic building block of PI AF. It is an organizing feature, and can be thought of like a
folder. It has relationships with other elements and has search characteristics, but it doesnt hold dynamic
or static values. Elements are generally organized hierarchically, though this is not required.
Elements represent physical or logical entities in your process: equipment, lines, products, systems,
organizations, sites, and even events like batches or transfers. They can be based on a template or created
without one, although later sections will emphasize the fact that templates are highly recommended.
Elements in a PI AF database must be uniquely named to their path. An element named Transformer
can exist under an element named System A while another element named Transformer can exist
under System B. However, two elements named Transformer could not coexist under the same
element System A. If it is possible, there is some sense in uniquely naming all elements regardless of
their position in the hierarchy.
The name of an element can contain any character except control characters or any of the following ( ; ?
` ' " \ | {} [] ).
3.2.3
Creating PI AF Attributes
From the Viewer, select the Attributes tab and then right-click on the white space to select
New Attribute to define attributes or click the
button from the toolbar.
Three (3) attributes will be created for Tank01. Start configuring the attributes using the table
below:
Page 28
Attribute Name
Default UOM
Value Type
Value
Capacity
US gal (Volume)
Double
20,000
Level
% (Ratio)
Double
N/A
Volume
m3 (Volume)
Double
N/A
A Walkthrough of PI AF
About Attributes
Attributes must also be uniquely named along their path within the element they belong to. Attributes can
have a configured constant value or can get a value dynamically from a Data Reference.
Attributes will generally be assigned units of measured (UOM). These UOM are organized into
convertible/comparable classes. The Default UOM configuration field defines the default unit of measure
to use to display the attributes values. This default unit of measure does not need to be the same as the
instrumentation. Later sections will show how this can be used and configured using data references.
The Value Type field for the attributes defines the format the value itself will have. The various types will
be familiar to those with programming experience. In general, value type Double can be used for most
analog/numeric values and value type String for everything else. Other types may also be useful in certain
circumstances. For example, a value type of Boolean allows either a 0 or a 1, which is represented as
False (0) or True (1).
Configuration Item attributes (identified by this icon ) are the ones defining the element or asset. An
example would be an attribute storing the serial number of a pump; changing the attributes value would
mean the pump would have been replaced by a new one. Checking the
check box for
an attribute indicates that a change in value will result in a revision change to the element. A
configuration item attribute is intended to be configured by a user or administrator of the PI System
database and not be set programmatically or by a data reference, it should thus be cleared for attributes
with values that will change with the process.
With the Attributes tab selected, select the Level attribute and change its data reference to PI
Point and then click on the Settings button.
Select the correct PI Server at the top and enter BA:LEVEL.1 (or use the tag search (
and click the OK button.
))
Select the Volume attribute and from the Configuration Panel, select the Formula data
reference. Clicking on the Settings button will bring up the Formula Configuration window.
Page 29
Note: When configuring a Formula data reference, it is required to explicitly set the units of measure
(UOM) when units conversion are necessary. Units of measure can be explicitly set for the parameters as
well as for the result. Do this from the parameters configuration section by choosing the appropriate
UOM from the Unit of Measure drop down. Do this also in the Result section at the bottom left.
Use the formula data reference to calculate the volume using the level (%) and the capacity
(US gal). Use the new button ( ) to add Parameters to use in the formula. Expand the list of
functions from the Equations section ( ) to pick the operators/functions to use in the
formula. Make sure to explicitly set the units of measure for the Capacity, the Level and the
Volume from the Formula Configuration window.
Press the
button on the toolbar and then the
the menu: File > Check In to save these changes.
Page 30
A Walkthrough of PI AF
3.2.4
Creating PI AF Tables
Create a new PI AF table and name this table Material Properties. Building the table is similar
to building a table in other programs which have simple table building
capabilities.
In the PI System Explorer, first navigate to the Library section from the
Navigator Panel. Right-click on the Tables item to select New Table, or
click on the
button from the toolbar.
Under the General tab, change the name of the table to Material
Properties.
Select the Define Table tab and add two (2) rows by right-clicking in the
blank area to select Insert or by selecting the starburst Insert a row button (
right-hand side. Define the table as follows:
) on the
Column Name
Value Type
Unit Of Measure
MaterialID
String
<None>
Density
Double
kg/m3 (Density)
Density
AQ4500
2100 kg/m3
HC1500
3422 kg/m3
WX1200
8943 kg/m3
About Tables
Tables are held in the PI AF database to provide contextual information through the Table Lookup data
reference. Tables can provide information about the equipment or process entities or they can be used to
store tag names or other configuration information to be used in PI AF.
Tables can be created internally (like in this exercise), imported from an external relational or tabular data
source, or linked dynamically to an external relational data source. In this way, Tables can look up
information in a maintenance, production planning, or equipment database and expose it in PI AF for use
by the PI client applications.
3.2.5
From the Navigator Panel, select the Library section. Right-click on the Enumeration Sets
item to create a New Enumeration Set, or click the
button from the
toolbar and name the new set MaterialID. Enter the material IDs from the table below as the
names of that set:
Page 31
Value
Name
AQ4500
HC1500
WX1200
3.2.6
Select Tank01 from the Elements section in the Navigator Panel and right-click on it to
select Convert > Convert to Template (note this does not delete or change the element, but
does set it to a new template).
Locate your new element template from the Library > Templates > Element Templates
section and change its name to Tank. Under the Attribute Templates tab, add three (3) new
attribute templates by clicking the
button from the toolbar.
Attribute Name
Default UOM
Value Type
Data Reference
Density
Double
Table Lookup
Mass
kg (Mass class)
Double
Formula
Product
<None>
<None>
Configure the Table Lookup data reference for the Density attribute using the following:
Table
Result Column
Where
Material Properties
Density
MaterialID = @Product
Configure the Formula data reference for the Mass attribute using the following:
Parameters
Page 32
Equations
Variable
Attribute
Unit of Measure
Density
kg/L
Volume
D*V
A Walkthrough of PI AF
the changes. Go back to the Elements section, select the Tank01 element and
look at its attributes. Pick any material for the Product attribute enumeration list and then
click on
. Note the value of the Density attribute.
Note: Elements should always be created from a template, even if at the moment of creation only one
asset would make use of that template. This ensures consistency in the creation and management of PI AF
elements.
However, for elements that would act only as organizing assets (folders) and that have no attributes, a
template is not required.
3.2.7
Data Reference
Value
Capacity
<None>
30,000
Level
PI Point
SINUSOID
Product
<None>
HC1500
(Tank01 should have AQ4500)
).
Page 33
attributes default values at the element template level. Attributes derived from a template have a Reset to
Template option on their right-click menu to remove any unique value or configuration string definition
for this attribute and reset it to the default values established at the template level.
This allows to create, but also to maintain many elements with the template, knowing that changes are
applied to all appropriate related elements.
Templates also allow the AF database to grow into an analysis tool when ready to do so. It is possible to
add calculations and analytics into the template at any time since that information will be propagated to
all of the elements automatically. It is not necessary to have the complete analysis at the time of template
creation.
In this example we created a template from an existing element, but it is possible to go directly to the
Library to create a new template by right-clicking Element Templates and selecting New Template or by
clicking the
button from the toolbar.
PI AF Templates have an
check box under the General tab. Checking this box allows
for additional attributes to be created at the element level, outside of the element template. Obviously, this
will no longer guarantee all elements have the same set of attributes.
Templates may be the most powerful and unique feature in PI Asset Framework. Very few applications
would not benefit of the use of templates when building PI AF elements.
3.2.8
Elements can be moved under other elements (then called Parent Elements) in order to
represent a logical hierarchy to be used by your applications.
Tip
When dragging and dropping elements under a parent, make sure that
parent element was first saved to the database (check-in)! If the
parent element was not checked in before moving another element under
it (child element), the move operation might cause the child element to
be deleted as PI AF doesnt know the parent element yet exist.
Create a new element not based on any template that will be named Montreal. Check-in the
changes.
Select both tanks using the mouse and drag and drop them while holding the Shift key on
the keyboard in order to move those elements under the Montreal element so they become
child elements of that location.
Select the Parent-Child Reference Type for each tank element. The different reference
types will be discussed in the next chapter.
Moving Elements Around
You can move elements around in the Viewer using the mouse and keyboard. This will result in creating
an element reference, or making a copy of the element or simply moving it.
Page 34
A Walkthrough of PI AF
If you simply drag an element under a parent element, with no key pressed, a link or Element Reference
will be created, and the element will now exist in two places in the hierarchy. In this case, the element
icon has a link designator (
If you drag the element under a parent element while pressing the Ctrl key, a copy of the original element
will be created under that parent element. The original and the copied elements will not be linked.
If you drag the element under a parent while pressing the Shift key, the element will be moved under that
parent element.
3.2.9
PI AF Builder is an add-in to Microsoft Excel 2007 and later allowing rapid creation and
edition of AF objects in bulk.
Open Microsoft Excel, and select the PI AF Builder ribbon menu. Click on the AF
Database button and connect to your AF Server and personal database.
Import the tank elements from PI AF. To do this, select Elements > Find Elements from the
PI AF Builder ribbon menu, then select the Tank Farm as the root and/or the Tank Template
to search and find both tanks (make sure to check the Search Sub-Elements check box).
Page 35
Next, use the Transposed Attributes button part of the same window to import the
configuration and value of the Capacity, Level and Product attributes only.
Once you click OK, the objects imported from PI AF on the spreadsheet should look like the
following:
Note: In the screenshot above, there is an equal sign (=) in front of the Level attribute value (attributes in
column headers are prefixed by the pipe ( | ) character) in the form of =\\Server\Tag. Nothing must be
put in front of a static value attribute like the Capacity (value of 20000). The equal sign indicates a
configuration string for the attribute instead of a static value. Because the equal character is also used by
Excel for formulas, a single quote/apostrophe ( ' ) is inserted before it.
Also note the x in the Selected(x) column A that indicates if PI AF Builder needs to process this row or
not and apply those modifications to the element or attribute(s).
Use Excel functionalities (find-replace, Ctrl+H) to create records for two (2) additional tanks
(Tank03 and Tank04). Make sure the PI Server name is correct for the Level attribute
definition as well as the Product name matches one of the valid material from the Material
Properties PI AF table.
Page 36
A Walkthrough of PI AF
Name
|Capacity
|Level
|Product
Tank03
10000
=\\PI Server\SINUSOIDU
HC1500
Tank04
10000
=\\PI Server\CDEP158
WX1200
Note: In this example we used the Transposed Attributes option of the PI AF Builder. Not making use
of this feature will result in each element and attribute to be imported in a different row instead of having
one row to represent each element along with its attributes. In the case where imported elements are tied
to the same template, the Transposed Attributes method is far superior.
The records are now ready to be exported to PI AF to create those two additional tanks using
the Export button from the ribbon menu ( ).
Confirm your work by going to PI System Explorer > Elements and pressing the
button or the F5 key on the keyboard.
Note: To rename an element, simply right-click on it in PI System Explorer > Elements and select
Rename. This can also be achieved by using the NewName column with the PI AF Builder in Excel.
Because PI AF keeps relationships using the elements GUID, elements can be renamed without breaking
relationships between elements or elements and their attributes or their templates. GUIDs are also used in
the relationships of elements in data references as well.
Canonical UOM
Page 37
Data
byte
byte
Select the Data UOM class from the left side and create new units of measure using the
button from the top toolbar. Populate the fields as follow:
Press the
Name
Abbreviation
Reference UOM
Method
kilobyte
KB
byte
megabyte
MB
kilobyte
gigabyte
GB
megabyte
Note: From any database of this PI AF system, it will now be possible to make use of the new Data units
of measure class.
Select from the menus Tools > Build and then Draw > Symbol Library. Now, from the
drawing area of the screen, add a new symbol from the symbol library by dragging out a
square of approximately 1 inch on the screen, as shown below.
Page 38
A Walkthrough of PI AF
This brings up the Symbol Library window where a tank symbol will be selected and added
to the screen from the Tanks category.
Make sure you are still in Build mode (else click again on the hammer ( ) icon) and add a
Bar next to the tank to represent its level by selecting Draw > Bar and then dragging out a
bar shape on the screen. From the Define Bar window that shows up, open the pull/down flyout menu next to the Tag Search button and select Element Relative.
The selected tank should appear with its attributes. Select Level and use the down arrow to
push it into the Selected Attributes list, then click
OK.
Add a dynamic value by selecting Draw > Value
and clicking just below the tank symbol on the
drawing area. Still using the Element Relative
option, select the Level attribute again.
Add a trend by selecting Draw > Trend and
dragging out a rectangle the size of the trend
wanted. Still using the Element Relative option,
select the Mass attribute to be shown on that
trend.
Add another Value symbol above the tank, but
this time select to Add Element Name by
clicking this button at the bottom of the Select
Attributes window (refer to the picture on the
right).
Page 39
(Optional) Add two other value symbols to display the Capacity and the Volume attributes.
Switching to Run mode from Tools > Run, select a different tank from the left panel to
confirm the PI ProcessBook display is now element relative, meaning the information shown
depends on which tank is selected on the side pane. Leveraging the PI AF structure and
templates allows creation of reusable PI ProcessBook displays to represent similar
equipment.
Note the Mass attribute shown on the trend symbol has a history displayed, even though the
attribute was created couple moments ago. The values are not actually stored in the PI Server,
but historical values can still be displayed as they are calculated on demand.
PI AF has the power to transform PI Server data into information.
Page 40
4.2.1
Bottom-up
Since often a PI Server is already in place, one approach is to group all tags by asset, and then
attempt to group the assets by similar PI Server tags. These similar object groups become
PI AF Element Templates, and the objects become PI AF Elements. Any foreign data thats
available is imported. Then, analytics that may seem useful are added, and finally consumers.
The bottom-up approach has the advantage of being a clear, reality-based path to follow. The
PI Server tags are known and analytics can be added on top of them.
However, a clear disadvantage is this approach lacks vision. This approach does not
guarantee the result to be useful.
Page 41
4.2.2
Top-down
The preferred approach will be a compromise: begin top-down, identifying goals and trying
to identify a good design for everything, but quickly move to a mix of this theory and
bottom-up experimentation. If a piece of data looks useful, add it to the model, because its
rarely a mistake to do so.
This planned approach combines the advantages of top-down and bottom-up: assurance that
the model will be useful, yet a good grounding in reality and completeness during
construction. The steps of this approach are:
Page 42
4.3.1
By default, three (3) reference types exist in PI AF between a parent and a child element.
Parent-Child
With a Parent-Child reference, the child, like in real life, can have multiple parents. The child
element can thus be part of multiple hierarchies. This reference type is best suited for assets
belonging to multiple views of the same information. For example, Pump01 can be organized
according to its location, Site ABC, or according to its equipment type, a pump.
The child element will only be deleted when its last parent is deleted. Furthermore, ParentChild element references can exist on their own: deleting the "master" ( ) Pump01 element
does not delete the other Parent-Child element references.
Weak Reference
A Weak Reference is qualified as having a "weak" reference strength. On the opposite,
Parent-Child and Composition are considered "strong" references. Think of the weak element
reference as a Parent-Child element reference, in that it allows Pump01 to be organized into
different views, except that a weak referenced element cant exist on its own.
The child element will be deleted as soon as no more "strong" reference exist. This can be
useful if you want one view of your assets to be a "master" view. For example, the master
Page 43
view would be the one by site and would contain the elements as Parent-Child, while other
views, like the Pumps one, would reference the elements using a Weak Reference. Deleting
the element in the "master" view would remove it from all other structures automatically.
Composition
The Composition relationship binds two elements together so that whenever one is changed
or calculated, the other is too. Deleting the parent element deletes the child as well. For
example, a valve attached to a tank may be represented as a separate element in PI AF, but is
really a part of the tank asset and cannot exist outside of it. Removing the tank from a site
removes the valve as well. Typically, an element having a Composition relationship with its
parent would not be referenced elsewhere by itself.
Exercise Objectives
Problem Description
Now that part of your equipment (4 tanks) were defined and organized under their location
(Montreal, Canada), you now want to model and organize the tanks for the other locations of
your company called Velocity Terminals:
Montreal, Canada
Tokyo, Japan
Sydney, Australia
You also want the ability to view the companys tanks according to the division they are part
of, receiving or distribution. After searching on the enterprise portal, you end up finding the
following documents.
Page 44
Page 45
Approach
Model the extra tanks in PI AF using the VelocityTerminals_Tags&Assets.xlsx worksheet.
Note the PI Server tags in Sheet1 (Tags Ex 4.6) (your instructor may ask you to build these
tags and walk you through building them using the PI Tag Configurator add-in to Microsoft
Excel).
Note: The PI Tag Configurator Excel add-in is used as an Import (from the PI Server) and Export (to the
PI Server) tool to mainly create or edit PI Server tags. It can be added by going to File > Options > Addins > Excel Add-ins and then browsing for its location: %PIHOME%\SMT\PITagCnf.xla (where
%PIHOME% is usually C:\Program Files (x86)\PIPC).
Copy the tag names and prefix them with '=\\<PIServerName>\ to obtain the following under
the |Level column of Sheet3 (Assets):
'=\\TRAINING01\TANK05LI.PV (note the apostrophe before the equal sign)
Use PI AF Builder Export function to create the new elements in your PI AF database.
Using PI System Explorer create new elements, not based on any template, to model the
locations and divisions. Use the drag and drop techniques discussed previously to organize
the tanks in their appropriate hierarchies.
Note: Make use of Element References. Use Parent-Child references under the locations and Weak
references under the divisions.
Page 46
Questions
Based on this experience with PI AF and your experiences with your process information
and/or PI Server in your work life, perhaps a few questions are suggested:
1.
Where would I find the assets, equipment, logical process units to form into elements in my facility?
2.
How many (estimate) assets would I likely need to get started using PI AF? How many templates
would be required to reflect the commonalities?
Page 47
PI Coresight: Modern and intuitive Web visualization tool allowing ad hoc analysis through rapid
screen creation.
PI DataLink: Microsoft Excel add-in allowing importation of PI System data on a spreadsheet for
integration with Excel features and production of reports and/or analysis.
PI ProcessBook: Process representation tool allowing monitoring through trends, values or charts
displaying real-time and/or historical data.
PI WebParts: Set of interactive Web Parts for Microsoft SharePoint allowing enterprise-wide
sharing of PI System real-time information.
Through each one of those tools, PI System data can be retrieved. Data organized in PI AF
can thus be easily found and used to create displays, screens or reports. If those documents
are applicable to a specific asset, because of the templatized nature of PI AF elements,
these documents will also be applicable to all similar assets. Similar assets are the ones
coming from the same element template.
In the next sections the concept of Element Relative displays, screens or reports will be
introduced to demonstrate how the PI AF structure can be leveraged by the various PI System
visualization tools.
Page 48
The Related Assets feature gives you the list of asset coming from the same element
template as the one(s) you are currently looking at.
5.2.1
Activity Objectives
Approach
If a PI Coresight server is accessible, watch and follow the instructor as he creates a new PI
Coresight display to analyze Tank01 data and later make use of the Related Assets feature to
reuse the same screen for the other tanks part of the PI AF system.
If a PI Coresight server is not accessible, watch the main screen as the basic concepts of PI
Coresight, as well as the Related Assets feature, are explained in a short video
(http://www.youtube.com/watch?v=bUOW1yVBLnk)
Note: The http://coresighttraining.osisoft.com Web site can be used to demonstrate PI Coresight. You can
connect using pischool\Student01 with password student.
Page 49
With PI DataLink 2013+, it is possible to create reports that will leverage the PI AF model,
allowing for reports to be reusable across similar assets. This version moves away from PI
AFs predecessor, the PI Module Database, to fully embrace the power of the Asset
Framework. PI DataLink 2013+ also benefits from the new integrated search engine,
allowing to search for tags and assets all at once.
5.3.2
Using this search window, it is possible to automatically generate drop-down lists in Excel to
allow this report to be applicable to multiple similar assets. In order to achieve this, the
following steps are needed:
1.
2.
3.
Select the cell where you want to have the ability to choose an asset from a drop-down list.
From the PI DATALINK ribbon, click on the Search button.
Use the tools to navigate to a top-level element, parent to all the elements you would like to add to
the selection list (the top-level element can be of a higher level than the direct parents to include all
required assets, for example we could navigate to the Locations element within our Velocity
Terminals structure).
Page 50
4.
5.
6.
7.
In the search bar, type in a mask for an attribute that is common to all assets you want populated in
the list (for example Level or Vol*).
Set the Root path length to the Maximum using the slider.
Select Drop-down list for the Insert root paths in option.
Select all results from the result window and click OK.
5.3.3
Exercise Objectives
Problem Description
You have a PI ProcessBook display to monitor the current status of your tanks. However,
every day you need to produce a small report to present the hourly averages for the level and
Page 51
mass present in your tanks for the previous day. Microsoft Excel and the PI DataLink add-in
seem the logical tools to use since all of your tanks are already modeled in PI AF.
Approach
Use Microsoft Excel and PI DataLink to create a one-page report showing the hourly
averages for the Level and Mass attributes for your Velocity Terminals tanks. Make sure to
use a drop-down list to make this report reusable for all tanks.
Hint: To calculate hourly averages, the Calculated Data function should be used. To get the
proper results, the following parameters of that function should be used:
Page 52
Before taking a closer look at some of the tools available, it is important to understand the
differences of each one with regards to the others in order to know what tool to use in what
circumstance. Here is a list of questions that will make those differences more obvious and
will allow identifying which solution to take to perform a specific calculation:
Note: Given the variety of possible calculation methods, the most difficult part of setting up a calculation
in the PI System is determining which choice is best. Too often people may choose a familiar method
over what would be the best and most effective method.
The next sections detail the characteristics of each calculation tools which will make the
previous questions more relevant.
The Performance Equation (PE) syntax is an algebraic syntax used to perform calculations
and filter data in multiple client and server products from the PI System suite. These include:
Page 53
This syntax has three (3) rules when it comes to writing expressions:
1.
PI Server tag names and time stamps are written enclosed in apostrophes ('):
For example: 'CDT158', '*-1h', '03-Feb-2013 13:38', 'Sinusoid', etc.
2. Text strings or digital states are written enclosed in double quotes ("):
For example: "This is a comment.", "OFF", "Active", etc.
3. Mathematical operators and PE functions are written has is.
For example: +, -, *, ^, TagAvg(), FindGT(), etc.
A reference document can be opened to view all the available Performance Equation
predefined functions, how they work, as well as examples on how to use them. This can be
found on any computer with PI System products installed at the following location:
%PIHOME%\Help\PEReference.chm
6.2.2
Activity Objectives
Learn where to find and how to use the PEReference.chm reference file
Explore the functions of the Performance Equation syntax.
Approach
Locate this useful help file and open it:
On 32-bit machines, it is usually located at:
C:\Program Files\PIPC\Help\PEReference.chm
With the instructor, examine the highlights of this syntax and its available functions.
Note: The functions each have examples at the bottom that can be copied and pasted to notepad or to
other PI System products directly.
Page 54
6.2.3
Exercise Objectives
Learn to apply the Performance Equation syntax to different calculation and filtering
problems using the PEReference.chm as a reference.
Your solution
Hints
TagAvg()
TagTot()
TimeGT()
TimeGE()
The amount of time
returned is in
seconds.
Page 55
6.2.4
Page 56
6.2.5
Activity Objectives
Approach
Open PI-ICU (Interface Configuration Utility) from the Start menu.
From the Interface menu, select New Interface Instance from a bat file or the open folder
icon, navigate to PI\Bin\PIPESchd.bat and select it. (There may be a pause while the PI
Server registers the interface.)
At the bottom of the PI-ICU General section, note the list of scan classes (and offsets). By
default, new PI Systems have 1 minute, 2 minutes, and 30 seconds scan classes established.
Add two new scan classes to the list:
(01:00:00,00:00:00)
(00:00:10,00:00:00)
Once completed, save your work and restart the interface service (use the PI ICU top-toolbar
buttons to do so).
Page 57
6.2.6
Exercise Objectives
Problem
Scheduling
_CDT158.10mAverage
_CDT158.1hTotal
_SINUSOID.%30-70
_Ba:Level_Status
You can verify your newly created tags are receiving values by adding them to a Trend
symbol in PI ProcessBook. Remember some tags you created might not update frequently.
Page 58
6.2.7
Although the PI Performance Equation syntax is flexible and readily understood, the
scheduler has many limitations:
The scheduler must parse the entire calculation string and identify the PI Server
tags every time it calculates. This is a serious performance disadvantage when
compared to compiled calculation options.
In the PI Performance Equation syntax, the tags are specified explicitly by their
name. This means if the source tag is renamed at one point, the calculation will
break.
The syntax for the calculation is stored and entered on one single line/string of
text. Because tag names are explicit these formulas can many hundreds of characters,
especially when If-Then-Else statements are employed. This makes documenting,
verifying, and modifying calculations difficult.
Calculations cannot be easily re-used against different tag sets as there is no context
for these calculations. The formula must be rebuilt every time it is used against
similar assets or tag assets, using the PI Tag Configurator Excel add-in.
PI Performance Equations can only read a value from and write a value to the PI
Server they are running on.
Calculations cannot be scheduled on multiple triggers. Only one tag can be used
to trigger event based calculations, even if multiple tags are used as inputs into the
formula.
All of these limitations are resolved in PI ACE, which is a calculation option covered later in
the course.
6.2.8
PI Recalculator Subsystem
The Recalculator is an interface like service which signs up for updates to the archive events
of all Performance Equation tags in order that it can recalculate PI Performance Equation
(Point Source C) tags if there are changes to the input tags in the archive. In operation, for
many customers who have significant performance equations, this has been a serious server
performance drain. Therefore we do not start the recalculator by default on system startup.
Page 59
Note: The PI PE Recalculator as described above, can be problematic if generally applied and can be
challenging to configure efficiently.
The Recalculator Interface can only recalculate if values already exist in the PI Server archive files.
The PI Totalizer uses PI snapshot data, before it may be filtered by data compression
for its source data. Therefore when compared to a Performance Equation calculation
with similar function, it may see a richer set of data and therefore be marginally more
accurate than a Performance Equation tag which uses compressed archive data.
However, this should not be significant if tags have well configured compression
algorithm parameters.
Page 60
The PI Totalizer does not have to interpret strings as the PI PE Scheduler does and it
has persistent memory to hold the running summary totals therefore it is a great
deal more efficient than the PI PE Scheduler when applied to similar problems.
Note that for many function types, including StdDev, Maximum, Minimum, Median
and Range, if TotalCloseModes of NSampleMoving or TimeMoving are selected, the
totalizer must maintain tables of all of the value during the period. This can be very
memory intensive and affect performance.
The PI Totalizer holds the source tag by its tag number, not its name, so tag
renaming will not break it. Changes to tag names used in the Performance Equation
syntax filters (Filter the source data with the following expression:) will break the
totalizer.
Like the PI PE Scheduler, the Totalizer can never read a value from another PI
Server except the one it is running on and cannot write to another PI Server.
You can only run one PI Totalizer Subsystem per PI Server and you cannot run it on
another computer, so you cannot increase the PI Totalizer calculation capacity by
moving it to another computer or having more than one scheduler.
Note: Since Totalizers are based on snapshot data that may not be stored in the archives, there is no
recalculator for the PI Totalizer. If the totalizer misses calculation periods, it has no way to restore those
calculations.
Page 61
6.3.2
Activity Objectives
Learn how to build Totalizers with the PI SMT 3 plug-in Totalizer Editor
Problem Description
Wed like to build three Totalizers:
1. A shift average for the CDT158 tag (shifts are twelve hours, starting at 6AM and
6PM).
2. The total number of gallons used per batch (where the flow rate tag is CDEP158 in
GPM and a batch starts when tag BA:Active.1 turns to Active and ends when it
turns back to Inactive).
3. A moving average on the CDEP158 tag, to smooth this volatile data flow (where the
moving average will include 5 values).
Approach
Well use the PI SMT > Points > Totalizer plugin editor.
Your instructor may ask you to precede the tag names with your student number or initials to
identify them as yours:
For the first totalizer, _CDT158.ShiftAverage, select a time-weighted average with natural
sampling and write the final result After a time period elapses. The first shift starts at 6
hours after midnight and lasts 12 hours long. The final result will be written at the end of the
12 hours, but should also be Stamped one second after start.
For the second totalizer, _CDEP158.BatchTotal, select a time-weighted total with natural
sampling and make the totalizer close whenever the batch active tag BA:Active.1 goes to
Inactive. Post interim results as new values come in (ramp). The result will be a total in
gallons, from a flow meter with readings in gallons per minute (GPM).
About Totals and the Conversion Factor:
Since the units of measure defined in the PI Server (the EngUnits attribute of each tag) are simply text,
the PI Server needs to make an assumption whenever calculating a total, the area under the curve. Indeed,
a totalization result greatly depends on the units of time of the EngUnits attribute. In fact, 1 m/s is much
faster than 1 m/h, proving the point that the units of measure are crucial in a totalization.
Hence, in order to be able to calculate a result, the PI Server will always make the assumption that the tag
units of measure are units per day, for example gal/day or ft/day. If these are not truly the units of
Page 62
measure, a conversion factor will need to be applied, that is a conversion between 1 day and the real units
of time: 24 for hours, 1,440 for minutes and 86,400 for seconds.
This should need to be applied only when Totals are requested, because this is the only calculation where
the units of measure of the result are not the same as the source tag units. For example, a total on a tag
with units of ft/h will be a result without the units of time, in ft. However, the result of an average on the
same tag will be in ft/h, thus no need for a conversion.
For the third totalizer, _CDEP158.MovingAverage, select a time-weighted moving average
that will close every time five (5) source tag values are read.
The PI Totalizer Subsystem should pick up the new tags and begin to process them
immediately. The results of the newly created calculations can be examine by using the PI
SMT > Data > Current Values plug-in, searching for tags with PointSource of T. If
Configure or Pt Created is the current value, the totalizer tag may simply not had enough
time or enough values to give a result yet. Their values can be checked at a later time.
PI ACE Components
PI ACE Scheduler
This is the system service which runs on a dedicated or shared server and evaluates the
triggers, queues the calculations, performs the calculations, and writes the results.
Page 63
PI ACE Manager
It is a system management tool for PI ACE which can run on any PI System client which has
privileges to edit the module database of the designated PI ACE host PI Server. It can be used
to start, stop, register and reconfigure the schedule of PI ACE calculations.
Though PI ACE can read and write from any PI Server it has privilege to, the scheduler is
managed by the PI Module Database (OSIsofts pre-PI AF legacy context database) in a
particular PI Server, which could be considered its home PI Server (and it must be the
default PI SDK selected server for the computer that PI ACE is running on).
In general, the PI ACE Wizard is used to develop PI ACE DLLs. These must be stored on the
same computer in the correct directory path on the PI ACE Scheduler. When the calculations
in that DLL are scheduled, the scheduler will calculate them and based on triggers in the
activity of PI tags or on a clock schedule it will perform calculations and post any appropriate
results.
PI ACE supports a sophisticated triggering and scheduling system, such that if calculations
do not happen precisely when they are triggered, the snapshot values in PI are stored in a
queue and when the calculation happens some time later, the results are posted back at the
triggered time. This allows PI ACE to handle many calculations and still accurately use the
correct data and post them back to the correct time, even if the scheduler is temporarily busy
or the data is changing.
Installation notes
When installing it is important to realize that not all components should be installed on every
computer. The PI ACE Wizard is only useful where there is a copy of Microsoft Visual
Studio installed. The PI ACE Scheduler is not intended for client/end-user computers and can
cause problems if it is scheduled and started without being configured. The PI ACE Manager
can be installed anywhere where a PI Server manager feels it is important to manage a PI
ACE Scheduler. The Installation allows you to choose the components you want to install.
Choose carefully.
Page 64
Further the PI ACE installation still includes the legacy PI ACE version 1 scheduler and
wizard which support (pre .Net) VB6 calculations. As no new installation could use these
options there is no reason to install them unless rather dated, legacy PI ACE v1 calculations
are still in use and copy of Microsofts VB6 is still available to maintain them.
There are numerous installation options and architectures which may be appropriate for
different applications for PI ACE. Many customers run it on a dedicated server, some
customers run it on a server which also runs a PI Server and/or PI AF. Although your
instructor may be willing to explore brief questions concerning architecture that material is
covered in other classes and documentation.
6.4.2
PI ACE Features
PI ACE Scheduler: PI ACE implements a terrific, queued scheduling and
triggering engine. It includes a method for automatic or manual recalculation.
PI ACE Objects: The PI ACE Wizard converts the PI Server tags indicated in the PI
Module Database aliases into sophisticated PI ACE Objects with easy-to-use
methods and properties which make object oriented programming with the PI Server
data easy. PI ACE calculations are built in Microsoft Visual Studio and make use of
intellisense. PI ACE thus becomes a rapid development tool.
Performance: The compiled PI ACE *.dll files are much higher performing for
every kind of calculation than Performance Equation tags. Even with these
performance advantages, it is also possible to spread the calculation load across
multiple PI ACE scheduler engines running on separate machines.
Flexibility: PI ACE supports the rich VB.NET language so it is possible to use
external databases (with ADO.net) and third-party DLLs, including those written
in C# or other languages. PI ACE Calculations can write results to another data
source, or read from another data source than the PI Server. PI ACE also offers
sophisticated debugging, logging, and performance diagnostics.
Contextualization: PI ACE allows for the creation of one calculation that can then be
applied to many similar tag sets through the PI Module Database aliases.
High Availability: PI ACE is not only compatible with the PI Server HA
architecture, but also has the ability to support redundant/failed over PI ACE
engines, which assure the calculations will always be executed and their results
available.
Limitations of PI ACE
Although many associate VB with easy-to-design forms, PI ACE does not support
a user interface. It only runs in the background and does not support any end-user
interactivity at run-time.
PI ACE is still pretty much tied to PI AF precursor: the PI Module Database (MDB).
It is not yet adapted for use with PI AF directly. There are ways they can work
together, but this requires significant understanding of both PI ACE and PI AF
(including the AFSDK).
Page 65
6.4.3
Activity Objectives
Know what PI Advanced Computing Engine (PI ACE) components are required.
Differentiate the PI Tag Configurator and the Module Database Builder add-ins for
Microsoft Excel.
Problem Description
In order to be able to complete the PI ACE exercises successfully, a set of PI Server tags and
a Module Database structure need to be created on your designated PI Server. The PI ACE
application will also need to be installed if not already available.
Approach for local PI Servers
1.
(optional) If your instructor indicates that PI ACE needs to be installed, first check to see that the
appropriate PI Server is the default PI Server. To do this, open the Start menu > All Programs > PI
System > PISDKUtility > Connections > Options, and make sure the default PI Server is the right
one (usually your local PI Server).
2. (optional) To complete the PI ACE installation, run the PI ACE installation kit from the provided
directory. Install ONLY the following components:
ACE Manager
ACE 2.x Scheduler
ACE Wizard for VB.NET 2005, 2008, and 2010+
3. Open the C:\Class\Exercises\02_PI ACE\PIACE_Tags.xlsx Excel worksheet.
4. While on the Tags worksheet, select the Add-ins ribbon and click on PI-SMT > Export Tags to
create the necessary tags for the PI ACE exercises on your designated PI Server.
(Optional) Approach for a shared PI Server
1.
(optional) If your instructor indicates that PI ACE needs to be installed, first check to see that the
appropriate PI Server is the default PI Server. To do this, open the Start menu > All Programs > PI
System > PISDKUtility > Connections > Options, and make sure the default PI Server is the right
one (usually your local PI Server).
2. (optional) To complete the PI ACE installation, run the PI ACE installation kit from the provided
directory. Install ONLY the following components:
ACE Manager
ACE 2.x Scheduler
ACE Wizard for VB.NET 2005, 2008, and 2010+
3. Open the C:\Class\Exercises\02_PI ACE\On-site Option\PIACE_Tags&Modules.xlsx Excel
worksheet and select the Tags tab.
4. Select the entire Tags worksheet by pressing Ctrl+A and Find-Replace by pressing Ctrl+H. Find
ZZ and after Replace with <your unique student number or initials>. Repeat the same for the
MDB worksheet.
Page 66
5.
6.
While on the Tags worksheet, select the Add-ins ribbon and click on PI-SMT > Export Tags to
create the necessary tags for this exercise on your designated PI Server.
From the MDB worksheet, select the entire sheet once more and use the Find-Replace option to
replace all occurrences of TRAIN01 with the name of your default/designated PI Server. Then, select
the Add-ins ribbon and click on PI-SMT > Module Database Builder > Export Items to build an
MDB structure on the PI Server.
6.4.4
Activity Objectives
Problem Description
Flows measured by flow meters CDT158 and SINUSOID are merged together in the plant
before reaching Tank01. You would like to know the total flow coming into Tank01 in realtime, anytime one of the two flow meters tag receive a reading in the PI Server (this cant be
done using a PI Performance Equation tag, since it allows for only up to one trigger tag).
Both flow meters have the same units of measure, m/h.
Approach
The PI Server tag TANK01FI.ACE will be used to store the total flow fed to Tank01.
Use the PI ACE Wizard (from Microsoft Visual Studio 2005+ > Tools > PIACEWizard) to
create a new calculation to calculate that total flow as being the sum of tag CDT158 and
SINUSOID.
1.
Create the new calculation from Tools > PIACEWizard > New.
Page 67
2.
Configure the inputs and outputs PI Server tags to use in the calculation.
3.
Write the calculation logic that will be executed by the PI ACE Scheduler.
Note: The Visual Basic environment does not allow certain characters to be used to name variables,
unlike tags within the PI Server. At the top of the PI ACE code is a comment block that shows how PI
ACE has adapted the tag names into PIACEPOINT object names. In this case TANK01FI.ACE was
renamed to TANK01FI_ACE within the code (the actual tag name was not changed).
4.
Page 68
5.
Register the calculation using the PI ACE Wizard so it executes anytime CDT158 or SINUSOID
receive a new value on the PI Server.
Page 69
6.4.5
Before PI AF was released in 2008, PI Servers included a similar but much simpler tool
called the PI Module Database (MDB). The PI Module Database is still part of the PI Server
and is a single root hierarchical database of objects called modules (simpler versions of
elements) which have only two types of things that PI AF would call attributes: the Alias (a
pointer to a PI Server tag, similar to the PI Point data reference) and the Property (which
would accept various kinds of entered values, similar to an attribute without a selected data
reference (<None>)).
The concept of templates is unknown to the PI Module Database. However, building modules
by copying existing ones (using the Module Database Builder add-in for Excel, the precursor
to the PI AF Builder) ends up giving similar results as the resulting modules offer an
interchangeable indirect reference to PI Server tags (aliases) and static context information
(properties); which is very valuable to PI ACE. OSIsoft PI Batch implementations also still
take advantage of the PI Module Database.
Although the PI Module Database is not nearly as powerful as PI AF, PI ACE still benefits
from using the MDB.
In 2010, OSIsoft released PI Server 2010 which hosted the PI AF Link synchronization tool,
synchronizing the legacy PI Module Database and PI AF. The synchronization is automatic
and provides replication of the PI Module Database structure under a root PI AF element in a
specific PI AF database. This allows for the orderly retirement of the PI Module Database.
Through PI AF Link, MDB Aliases are built as simple PI Point data reference attributes while Properties
become attributes with simply no data reference (<None>). The Formula and Table Lookup data
reference attributes are not compatible with the MDB and as such are labeled Not supported. With the
Page 70
limitations of the PI Module Database in mind, PI AF elements can still be built under this single root,
using element templates. They will result in usable MDB modules for applications still based on them.
Page 71
6.4.6
Activity Objectives
Approach
In order to prepare for a later PI ACE exercise, accomplish the following:
1.
From the Library section of the navigator panel in PI System Explorer, edit the Tank element
template by adding an additional attribute (check-in the changes once completed).
Attribute
Name
Volume ACE
Default
UOM
m3 (Volume)
Value
Type
Double
Value
Data Reference
2.
Holding down the Ctrl key, drag and drop the Velocity Terminals structure under the <PI Server
Name> ModuleDB PI AF element. By doing this step, the Velocity Terminals database that was
built in chapters 3 and 4 will be copied to the PI Module Database. Check-in the changes.
3.
Confirm the structure is available in the PI Module Database by opening PI SMT > Operation >
Module Database. It is possible to also confirm the MDB to AF synchronization works well by
selecting the Operation > MDB to AF Synchronization plug-in.
Page 72
6.4.7
Exercise Objectives
Distinguish the tasks the PI ACE Wizard, PI ACE Scheduler and PI ACE Manager
can perform.
Identify the advantage of using asset context to scale out calculations to multiple
similar assets.
Problem Description
The volume of each tank needs to be analyzed over the past two (2) years by the engineers.
Data for a total of ten (10) tanks is currently available, but that number should go higher in
the next few months.
What calculation tool should we use in order to calculate the Volume for our tanks?
Approach
1.
At the top of the code (with the Imports OSIsoft.PI.ACE statement that is already there)
add the following:
Imports PISDK
Imports OSIsoft.PI.ACE.PIACEBIFunctions
The code should look like the below logic. Notice the Capacity needs to be retrieved from the
Properties of Tank01 has it couldnt be added as an Input to the calculation:
Page 73
Note: The above code declares an object of type PIModule and a simple analog variable. It assigns the
currently running PI Server module to the object by using the PI ACE assigned string variable Context
(which at run-time gives the currently assigned PI Server module path). This is used to extract the value
of the capacity property from the module, to use it in the volume calculation.
3.
Debug, Test and Register the calculation using the PI ACE Wizard (a 10 seconds with 0 offset
scheduling can be chosen).
4.
In PI ACE Manager, open the tree view for Tanks > Volume > Context to select:
\\PIServerName\Velocity Terminals\Locations\Montreal\Tank01
Note: The executable, module and context icons should be green. If everything is grey, it is likely the PI
ACE Scheduler service is not running. You can start it from Run ( +r ) > services.msc applet.
5.
6.
(optional) Using the PI ACE Manager, right-click on the Tanks executable and recalculate the
volume results for the past day (from *-1d to *, with no interval).
Page 74
Page 75
6.5.2
Questions
The PI AF Formula data reference, PI Performance Equation Scheduler Tags, PI Totalizer Tags, and PI
ACE are all options for calculated data in tags. They have marked differences and some similarities.
1. What if I need history (calculation results before now)? What are the merits of each tool?
2.
What if I need to apply the same calculation to many unique but similar things?
3.
What if my calculation is complex and executed often? Which are the most efficient options?
4.
What if I need to modify the calculations often? Which choices will work best for that?
5.
Page 76
7.1.1
PI AF Permissions Type
Definition
Read
The ability to read or see the object. Without this permission, it is not
possible to obtain the object or search for it.
Write
The ability to create and modify an object. If users do not have Write
permission on the PI AF database, then they cant modify any object
within the database, regardless of the specific permission on that
object.
Read Data
Write Data
Subscribe
SubscribeOthers
Delete
Execute
Admin
Setting permissions can be done for individual PI AF objects or for collections of objects.
When you create new objects, except for child elements, the collection security is used as the
default security. When you create a child element, the security descriptor of the parent
element becomes its default security.
Page 77
7.1.2
The following chart shows the available securable collections of AF objects in an AF Server
(PI System). Boxes are collections available at the PI AF server level while collections
represented by locks are available at the PI AF database level.
PI System
(AF Server)
Contacts
Databases
Database
Notification Contact
Templates
Analyses
Enumeration Sets
Analysis Templates
Notifications
Categories
Reference Types
Elements
Tables
Element Templates
Transfers
Note: The write permission on a PI AF database is enforced automatically on every other object in the
database. This allows for a simpler mechanism for disabling Write permission without having to recompute security descriptors for all objects within the database.
7.1.3
Page 78
Page 79
entire UOM database. Clicking the lock ( ) from the top toolbar gives access to the
Permissions for the Unit of Measure database.
When modifying the security for a collection, you can replace the security descriptor for all
previously created members of the collection. Right-click on the collection item and then
select security. From the Permissions Dialog, click the Advanced button and select the
Replace all child object permissions. This can also be used to modify the security
descriptor for a specific hierarchy of elements.
7.1.4
Page 80
Problem Description
In most OSIsoft classrooms, the group Students is included in the local administrators
group on all computers and that gives all StudentXX domain accounts administrative
privilege on all computers and PI AF Databases. Find your PI AF Database that contains your
tanks and alerts. Add your student account and give it all privileges on this database. Remove
the local Administrators group privilege.
What effect did this have? Can other students now edit your database? How is this privilege
reflected in elements and other objects inside of the database? (try running PI System
Explorer as another studentXX by right-clicking on PI System Explorer while holding the
Shift key, and then clicking on Run as different user).
7.2 PI AF Versioning
PI AF has the ability to save different versions of elements. If desired, you can set the
effective date of each checked in/saved version. When an AF Element has versions this is
indicated by a small clock icon presented with the PI AF element icon in the browser. If you
right click this element, there is a Show History option which will allow you to select the
versions and view the details of their configuration.
This can be used in two ways.
7.2.1
Benchmark Versioning
A more sophisticated implementation recognizes that the configuration, structure, even the
relationships between elements appropriately changes over the life of a process. To
implement this versioning, when you make changes and check in, apply the effective date for
this version to begin applying to. From the effective date until the current time, or another
version with a subsequent effective time, this version will be seen and used by PI AF.
Query Date PI System Explorer
The query date in PI System Explorer is set very simply by the Query Date toolbar button.
The default date points to the last version in time (not the current time), so if you have future
versions, you will see the latest or most future version in PI System Explorer unless you
change the Query Date.
Query Date PI ProcessBook & PI WebParts
The query date for PI AF in PI ProcessBook and PI WebParts are automatically set to
dynamically to the time of evaluation of the display, even within a trend.
Page 81
7.2.3
Objectives
Problem Description
Over the past weeks, Tank02 has been inspected and rust at the base of the tank has become
an important matter. In order to prevent leakages, the tank has finally been replaced yesterday
by a brand new one. This new tank has a higher capacity bringing the capacity of Tank02
from 30,000 US Gal to 45,000 US Gal.
We want to save this change in configuration for the Capacity from 30,000 to 45,000, and
want that change to be effective starting yesterday at midnight (00:00:00). We then want to
confirm the change is recorded by looking at the data before and after within PI System
Explorer and PI ProcessBook.
Approach
1.
2.
Note: The Capacity attribute uses a <None> data reference (static value). When the value of a static
attribute is changed, the change will be automatically effective, without the need to check in.
HOWEVER, a check in will be required if the attribute is marked as a Configuration Item.
3.
4.
While holding down the Shift key on your keyboard, click the
button.
The Check In window shows up and notice now the possibility to create a new version, setting up an
effective date and including a comment. Check the Create New Version check box and set the
proper effective date for the new Capacity value.
Page 82
5.
After clicking Check In, notice the clock icon ( ) on the Tank02 element in the browser meaning
more than one version of the element now exist.
From PI System Explorer, verify that the before and after values are recorded by displaying the
Show History window. Holding down the Ctrl key on your keyboard, select both versions effective
dates on the left to confirm what changed between both versions.
Page 83
7.
To see the values before and after the change in the PI System Explorer Viewer, the Query Date
will need to be modified to a time where the new version was not yet effective. Use the File > Query
Date or the top toolbar
button to navigate in time and confirm you can see the 30,000
value for the Capacity of Tank02.
Note: When using the Query Date in PI System Explorer, you can always go back to the original setting
to show the current values for all attributes. Do this by clicking the drop-down arrow next to the Query
Date top toolbar button, and then selecting Set to Latest.
8.
9.
To see the values before and after in PI ProcessBook, create a Trend to show the Mass and the
Capacity attributes of Tank02 over the past 48 hours. Do you see the change in the values at the
expected time?
(Optional) What happens in the Browser section of PI System Explorer if you select the Version tab
for Tank10 and you set an Obsolete Date of yesterday at midnight? How can you make Tank10
reappear?
Page 84
A powerful feature of the Element Template is the ability to set a Base Template. A base
template effectively includes all the base element templates attributes in the newly created
element template. When an element is created from an element template that includes a base
template, the element contains all attributes from both element templates.
A Base Template is best used when you are modeling elements that have a set of attributes in
common with a few attributes that differ. For example, if you have a set of tanks, some with
two valves and some with one valve, you can create an Element Template for the one-valve
models and use that as the Base Template for the two-valve models. Set the base template of
an element template in the General tab alternatively, you can set the base template at creation
time by right-clicking the base template and select New Derived Template.
To view the template inheritance tree from the PI System Explorer Library, simply organized
the templates by inheritance.
7.3.2
Substitution parameters can be used when creating Element Template Attributes. The
%Element% expression is an example of a substitution parameter that would translate to the
attributes element name. For example, imagine the Element Tank01 with a Level attribute
Page 85
coming from the Tank template. The Level attribute is configured at the template level to
show the value of the following PI Server tag \\PIServer\%Element%LI.PV. When Tank01
is created, its Level attribute would try to look for the following PI Server tag:
\\PIServer\Tank01LI.PV, thus substituting %Element% by the name of the element: Tank01.
Notice the default configuration for a PI Point Data Reference attribute template. If not
configured, it will automatically configure the tag name as being
\\%Server%\%Element%.%Attribute%, meaning a tag named like the element name, dot, the
attribute name, and within the default PI Server configured for the client will try to be found
(ex.: \\TRAINING01\Tank01.Level).
Substitution parameters can also be useful as part of the WHERE clause of a Table Lookup
Data Reference.
Page 86
7.3.3
The substitution parameters are listed in the following table. The ones in bold are the
commonly used Name substitution parameters.
Parameter
%System%
%Server%
%Database%
%Element%
%ElementId%
%\Element%
%..\Element%
The name of the owning element of the element in which the attribute
resides. To retrieve further ancestors, use the '..\' notations, such as
%..\..\Element%.
%Attribute%
%..|Attribute%
%AttributeId%
%Model%
%Analysis%
%StartTime%
The local start time if it can be obtained from the time context.
%UtcStartTime%
The coordinated universal (UTC) start time if it can be obtained from the
time context.
%EndTime%
The local end time if it can be obtained from the time context.
%UtcEndTime%
The coordinated universal (UTC) end time if it can be obtained from the
time context.
%Time%
%UtcTime%
The coordinated universal (UTC) time if it can be obtained from the time
context.
%<Environment
Variable>%
%Description%
%ElementDescription%
Not only can substitution parameters be replaced by the name of a PI AF object like an
attribute, but it can also be replaced by the value of that attribute.
Page 87
Imagine the Velocity Terminals example again. Imagine the tag names are always built the
same way following this tag naming convention:
LLEEEEEEMM.TT
Where
LL
EEEEEE
MM
TT
This could lead us to easily determine that the level of Tank01 would have its level tag named
15TANK01LI.PV. With that in mind, substitution parameters would make it possible to
configure the Level attribute at the template level in such a way that any newly created tank
in the PI AF hierarchy would automatically see its Level attribute mapped to the correct PI
Server tag. The idea here is to have all the required information somewhere in the structure so
the attribute can reconstruct the tag name depending on where it is in the hierarchy. A
solution to the above tag naming convention would simply be to add an ID attribute under the
city name element.
Then, the Level attribute could be built using the following configuration string:
\\%Server%\%@..\|SiteID%%Element%LI.PV
Page 88
7.3.4
The above %@..\|SiteID% substitution parameter can be read as: Give me the value of the
parent-elements SiteID attribute. Each symbol in the previous substitution parameter mean
something different. In order to better understand what each symbol mean, refer to the
following table, giving the definition as well as examples.
Symbol
Examples
%Element%, %Attribute%
%@.\<ChildElement>|<Attribute>%
..
%..\..\Element%, %..|Attribute%
References an element.
%..\Element%
References an attribute.
%..|Attribute%, %@|<Attribute>%
%@..\..\|<Attribute>%
%[]%
7.3.5
Definition
Exercise Objectives
Problem Description
Velocity Terminals will buy other facilities in the next few months where multiple tanks are
present. They are going to implement the same tag naming convention at those new locations
and will want to save time when adding those extra assets to the actual PI AF hierarchy.
They want to use the substitution parameters to speed up the asset addition/configuration
process in PI AF. To demonstrate that this is feasible, you are asked to convert the Level
template attribute of the Tank element template so that it uses substitution parameters to
automatically find the correct PI Server tag.
Looking again on the Velocity Terminals portal, you find the below table in a spreadsheet:
ID
15
Location
Montreal, Canada
Page 89
ID
Location
23
Sydney, Australia
44
Tokyo, Japan
Approach
1.
2.
3.
Create an attribute under each city Element to display its ID (hints: you may want to use a Table
along with an Element Template and a Table Lookup Attribute Template).
Modify the Level attributes configuration string for the Tank template, using substitution
parameters so that the tag names are automatically built according to the expected tag naming
convention.
Validate the new configuration string by selecting a tank (between Tank05 and Tank10), and rightclicking its Level attribute to select the Reset to Template option.
Note: Because the Tank template was created from the Tank01 element, the Level attribute of Tank01
will be changed by the above exercise. In order to correct the situation, simply edit the Level attribute of
Tank01 so it points to the BA:LEVEL.1 tag.
7.3.6
The value retrieval methods of the PI Point Data Reference allows an attribute to retrieve a
value based on a relative time instead of the current value, or aggregate values such as
averages, totals, minimums, etc.
Page 90
Specify a relative time to be used with the By Time retrieval option in the Relative Time
field. Specify the time expression as a PI System Time format (ex.: -2h or T+6h). Refer to
section 1.3.2 for more details on the time expressions. Select in the By Time list box, the
value to return with regards to this relative time. This list box basically indicates whether to
pick a real value in the PI Server archive or to interpolate a value at the relative time
specified.
Note: A substitution parameter could be used for the Relative Time field. For example, an
enumeration set attribute called Time Offset could contain the following (*-30m, *-1h, *-2h, *-1d). This
Page 91
would then allow a user or an application to quickly change the summary calculation time range by
selecting the desired value from the enumeration set.
In order to be able to rebuild the structure as is, it is required to check the Include All
Referenced Objects, so that Templates, Tables, UOMs, etc. are also exported to the .xml
file.
Page 92
7.5 Solo / Group Exercise Speedys Pizza and Advanced Template Design
This is a solo or group activity that is designed to maximize learning in a specific
topic area. Your instructor will have instructions, and will coach you if you need
assistance during the activity.
Exercise Objectives
Problem Description
You are installing a PI Server and PI AF for Speedys Pizza and you are
currently focusing on Speedys delivery fleet.
(A file to create the tags required for the exercise Speedys Pizza is located at
C:\Class\Exercises\03_Speedy's Pizza\SpeedysPizza_Tags.xlsx or the location specified by
your instructor).
Speedys Pizza has eight (8) delivery vehicles:
ID
Model
SP1
PizzaStar
CA HYK427
SP2
PizzaStar
CA HRZ648
SP3
PizzaStar
CA HBB139
SP4
JCar SuperVan
CA HAR990
SP5
JCar SuperVan
CA HEED21
SP6
JCar SuperVan
CA HQB932
SP7
StoreRunner
CA HOT263
SP8
StoreRunner
CA HEE563
Units
PI Server Tag
Mile
SP?.Trip
Percentage
SP?.GasLvl
SP?.Speed
Minute
SP?.Timer
Page 93
The first three of these measurements are sent back to the store with real-time updates via
radio. The time counter for each vehicle is maintained at the store.
Each type of delivery vehicle can also send other information over the radio link:
The PizzaStar vans have a gas tank capacity of 20 US gallons and also capture:
Measurement
Units
PI Server Tag
Degree Fahrenheit
SP?.OvenT
Engine Temperature
Degree Fahrenheit
SP?.EngT
Percentage
SP?.OilLvl
Oil Level
The JCar Supervans have a gas tank capacity of 30 US gallons and capture additional data:
Measurement
Units
PI Server Tag
RPM
SP?.MtrRPM
Degree Fahrenheit
SP?.EngT
Oil Level
Percentage
SP?.OilLvl
GPS Longitude
Seconds (")
SP?.GPSLong
GPS Latitude
Seconds (")
SP?.GPSLat
Motor RPM
Engine Temperature
The two StoreRunner vehicles have a smaller gas tank capacity of 15 US gallons and also
have:
Measurement
Units
PI Server Tag
GPS Longitude
Seconds (")
SP?.GPSLong
GPS Latitude
Seconds (")
SP?.GPSLat
The GPS readings are in Seconds (") (from the Plane Angle UOM Class, where there is a
relation between degree, minutes and seconds). The degrees and minutes are assumed.
Speedys Pizza wants the Fuel Efficiency in miles per gallon (MPG) (double) for every
delivery vehicle.
Your task is to build the templates, elements and configure the attributes required to support
Speedys Pizza vehicle monitoring system.
Approach
Page 94
(Optional) Display the Fuel Efficiency in liters per hundred kilometers (L/100 km).
In order to convert from MPG, the Formula option will need to be used when
specifying the conversion.
(Optional) Categorize the attributes by grouping them in categories and display them
in those groups by checking the
checkbox in the upper right
corner of the attributes Configuration Panel.
Page 95
Questions
1.
2.
Which application of PI AF do you think will be most useful for your process: a database of assets,
or databases of contextual data which can add value for this process?
3.
Some processes (like data centers or wind turbine farms) can be described with only a handful of
templates because they have a great many of just a few types of components, while others (like
power plants or oil refineries) have many unique things and very complex relationships and could
require hundreds of templates. Others are somewhere in between. Where on this spectrum would
your process fall? Although implementing PI AF is considerably more challenging for more
complex processes, can you see where it could provide more value? If you have very few repeated
components, can you still see benefit in using templates? For instance, might templates be useful
when implementing PI AF across a fleet of sister plants?
4.
Do you think you have to have the whole system, the entire plant or the entire fleet described by PI
AF to get value from it?
5.
PI AF implementation projects that are done entirely by process engineers will often do many things
the hard way because they are missing the data wrangling and system knowledge that I.T.
professionals bring to the effort. On the other hand, if I.T. departments attempt to implement PI AF
without the critical input of subject matter experts, they will likely produce something shallow
without as much value because most I.T. departments do not understand the process well enough to
make valuable templates. Do you think your PI AF implementation project can benefit from I.T. and
process engineers working together?
Page 96
As the PI Notifications service is based on PI AF, it can provide alerts on data from multiple
PI Servers and other data sources. Every PI Notifications server has however one PI Server
which holds its history (called the history PI Server). It keeps a record of all notification
instances/events, when they started and ended and the end user responses to them
(acknowledgements and comments). PI Notifications configurations are stored in its
corresponding PI System Database (AF Server).
Very often in work, the measure of success is done on how many things are produced. For PI
Notifications, the more alerts are produced, very often the less successful the use of PI
Notifications becomes. If too many alerts are provided to a recipient, he probably wont be
able to give each one of them the appropriate attention or response. This will make the
implementation useless as all of the alerts will become noise to the recipients. Most PI
Notifications implementations analyze billions of new values per day and produce less than a
dozen events per day.
Hence, it is crucial to carefully filter the notifications rules so as to produce only appropriate
alerts. This suggests the creation of all notifications rules should be done as a two-step
process:
1.
2.
Page 97
This is how well learn about PI Notifications. First well look at triggering and filtering and
later, well look at content, subscriptions, delivery channels and recipient response.
Questions
1.
Lets say you have a teenage driver and you could have the family car send you e-mail or text alerts
whenever they were driving it. What kind of alerts would you like to get?
2.
Lets say you have a company with six hundred (600) delivery vehicles. Would you still want to be
aware of the same alerts?
3.
What if you had six thousand (6,000) delivery vehicles? Would this have an impact?
4.
If we start making notifications, sometimes getting an alert per week can seem reasonable. But what
if you start building more notifications and eventually have 600 alerts a week. Is it still reasonable?
Even if each rule seems individually reasonable?
5.
Thinking of your process, what would make good alerts? Grade/product batch changes? Noncompliance (governmental) events? SQC / SPC out of control violations? Equipment or subsystem or
system or unit failures? Is the e-mail inbox a good place for the sort of alerts that occur regularly in
the control room?
Page 98
Activity Objectives
Note: Although almost all classroom settings will have PI AF servers and clients already installed, not all
will have PI Notifications installations. Follow your instructors guidance if you are required to install PI
Notifications to continue.
The instructor will identify which components will need to be installed on each students
computer (if not already installed):
Identify the appropriate History PI Server for the installation. Notifications history will be
stored in seven (7) tags per notification on that PI Server (counts as one (1) tag in the license
as of PI Server 2010 SP1+).
Install the required PI Notifications software on the participants computer:
PI AF
History PI Server
SMTP Server
From Email
Page 99
PI Notifications Client
This feature includes add-ins to PI System Explorer. Within this host, you configure,
subscribe to or unsubscribe from, and view the archived or active events of notification rules.
The client also enables you to receive new events through PI Notifications Desktop Alert.
The PI Notifications client will require (and install if needed) the PI AF Client. Note that
even if the class is using a shared PI Notifications Server if the PI Notifications Client is not
installed the necessary components will not appear under PI System Explorer.
8.3.2
PI Notifications Service
This feature runs a service instance to evaluate notification rules in real time, send out
notification messages, process acknowledgment requests and escalations, and record the
history in the history PI Server. In practice - the server is generally installed on a server class
computer, which may be shared with the PI AF server or may be a dedicated server. The PI
Notification Service is associated with a given PI System (AF Server) and has a specified
history PI Server to record its history though it can trigger and read data from any PI Server
which the PI System recognizes.
8.3.3
This page provides a link which is embedded in the email message; a subscriber can click
directly on this link to acknowledge a notification message or to comment on a notification
instance. The PI Notifications Acknowledgement Page requires Microsoft IIS 5.0 or greater
and ASP.NET 2.0 installed on the same machine. For Microsoft IIS 7.0, the IIS metabase and
IIS 6 configuration compatibility option must be enabled.
Note: During installation (or subsequently in the Notifications settings menu) you will be requested to
submit an SMTP server and an optional backup SMTP server. This is generally a corporate sponsored
mail server that will be used to receive and forward the e-mail based alerts from PI Notifications. Note
that although any Internet Information Service that comes with any Microsoft server operation system kit
can install an SMTP mail server, it is rarely received well by Information Technology policies and
management to start such a rogue mail server for a specific purpose such as this. In general it is always
good practice to identify the management of your established mail servers and coordinate the application
of PI Notifications with them. Installation of an SMTP server is not required for the class.
Note: By default the PI Notifications installation does not start its Windows service. Navigate to the
Windows Services applet to start the PI Notifications Scheduler service for the first time.
Page 100
Activity Objectives
Notification States are reason codes that provide priority and a classification of the
essential type of alert. These can be grouped into state groups for organization. Examples for
groups include Operational Alerts, Compliance alerts, Quality Alerts, System Alerts, and
Environmental Alerts. Examples for States include tank overflow/spill alert, six minute noncompliance alert, critical equipment failure, etc.
State Groups and States
Like Units of Measure, State Groups and States cross all databases on a given PI System. For
this reason all students in a class cannot build the same State Groups and States. As before, if
you are on a shared server, watch your instructor build this group and states. If you have a
dedicated PI AF Server and PI Notifications, build these as described below.
1.
2.
3.
4.
5.
Page 101
Activity Objectives
Approach
Well configure a Notification for our tanks. This notification will trigger whenever Tank01
is over 95% full and contains HC1500. Tanks regularly reach high levels, but HC1500 is
caustic and if it spills, well have an environmental reporting mess on our hands, so we want
to know if it is almost full. Other chemicals are not considered dangerous.
Follow the instructor during this section, well have the opportunity to work independently a
bit later:
1.
2.
Overview tab
3.
Trigger tab
4.
5.
6.
7.
8.
Click the upper Select Target button and select the Tank01 element.
Under Conditions, select New Condition > And Conditions, since we need two conditions to be true
to send a notification.
From the And Conditions window, select New Condition > Comparison.
For the input, click the search icon and select the Level under attributes.
This is an overflow alert, so select > for the operator.
Note: We could enter the value here and specify the limit over which to send the alert, but it will be left
blank for now as the value will be entered in the template.
9.
Leave the Value field unpopulated and click OK. PI System Explorer will confirm whether you
want to do this; select Yes.
In the Library (Navigation Panel) under Element templates, locate your tank template.
Select the attributes tab and right-click on the Level attribute. From this select New Child
Attribute Template.
This should create a hierarchical child attribute under Level. Call this Overflow Limit set the
value type to double and the default UOM to % (Ratio). Then enter a default value of 95 and save
Page 102
the modifications.
10. Return to Notifications and select the Tank Overflow notification. Under the trigger tab, double-click
on the comparison condition to edit it.
11. Instead of a value, select Attribute for the Compare to section, and then use the search button to find
the new Overflow Limit attribute.
12. The next option is a Deadband limit (think of it as a reset limit). Lets set this to five (5).
About the Deadband Option
The deadband prevents the level from exceeding the limit and then sending the alert every time it crosses
and recrosses the limit, even though we essentially do not have a new event; the value is just still high. In
order to generate a new event, the value must go below the deadband to close the first event and reset the
notification, then if it crosses the limit again that will be a new event. This is a very important way to
filter events.
In our tanks example, the deadband is set to 5, so if the value drops below 90, the first event will be
closed. If a deadband is not set then every time the level crosses the limit it will close and re-open a new
alert event.
13. We wanted our alert only to be sent if there is an overflow condition when the tank contains product
HC1500. Thus select New Condition > Comparison, still from within the And Conditions window.
14. Select the Product attribute as the Input and the In operator and then enter HC1500 as the Compare
to value. The In operator is required here since the Product attribute is configured as an
Enumeration Set.
15. The deadband condition does not apply in this case. Click OK.
16. The next option is a Time True filter. This option is also an important filter because it prevents
alerts from being sent on momentary anomalies or spikes. It asks that a condition be true for a
given amount of time before it generates an alert. Set this to 3 seconds.
Page 103
Page 104
22. Restart the PI Notifications Scheduler service from Start > Administrative Tools > Services. This is
only required when the first notification is started on the PI AF system, in order to make sure all the
PI Notifications components are connecting to the PI Server successfully.
Page 105
23. Go back to the Elements and take a look at Tank01. Select HC1500 as the product and write a value
greater than 95 for the Level (in order to be able to write values from PI System Explorer, open the
Settings for the Level attribute and uncheck the Read Only checkbox at the bottom).
24. Go back to your notification configuration and verify it was triggered by looking on its History tab.
The configuration of the Content and the Subscriptions tabs will be covered later.
Activity Objectives
Approach
Since we have more than one tank, we should create overflow notifications for all of them. PI
Notification templates apply the same great template functionality of elements templates and
allow the creation of many PI Notifications very efficiently and rapidly.
1.
2.
3.
4.
Check in your work and then right-click on the Tank Overflow notification template to select New >
New Notification. This window now shows existing elements from the target element template.
Select only those elements with no existing Tank Overflow notification by selecting the top option
Page 106
7.
8.
9.
Select > Elements Without Existing Notification. Make sure only the tanks under the nonreplicated hierarchy are checked (the MDB to AF synchronization structure may show up additional
tanks in the list).
Click OK to create the missing notifications for the other tanks and return to the Notifications section
to confirm the notifications creation.
To see which tank a notification applies to, simply display the target element name like in the below
picture:
Go to Elements in the navigation panel. Create a new child element (Tank11) under the Tokyo site
based on the Tank template, just to confirm that a Tank Overflow notification was automatically
created.
Activity Objectives
Prepare two (2) message formatting templates for email and text message delivery.
Approach
1.
2.
3.
4.
From PI System Explorer, navigate to Notifications > Tools > Notifications Settings, then select
the Delivery Formats tab.
Right-click the existing Global Default Email format and select Duplicate. Rename the new format
as Default Email with Table.
Right-click the existing Global Default Email format and select Duplicate. Rename the new format
as Default Text Message.
Select the Default Email with Table format and modify the formatting so that a table will be
available to organize the information related to the notification.
Page 107
5.
Select the Default Text Message format. Remove everything from the Body section of the message,
to keep a single-line message that will mention the notification name, the target elements name and
leave a space to enter the trigger value.
Page 108
6.
8.7.2
Activity Objectives
Approach
We want to prepare two (2) message formats to send to our recipients. The first message
format is meant for email delivery and should include a table to display the critical
information. The second message format will be used to send a text message.
1.
From the PI System Explorer Library section of the navigator panel, select Templates >
Notification Templates > Tank Overflow, and then select the Message tab.
Right-click on the Default Email with Table message format template and select Duplicate.
Page 109
3.
4.
(Optional) Using the Content pane on the right, add a File from your computer and then drag and
drop it on the Attachments section, located between the Subject and the Body message sections.
Right-click on the Default Text Message message format template and select Duplicate. Rename
the duplicated format Tank Overflow Text Message.
Page 110
6.
Add the Trigger Input > Level > Value and Units within the brackets of the Subject section.
7.
The settings for the Email delivery channel allow to configure the primary and backup SMTP
server to relay the emails as well as the From email address for the alerts. The IT department
should indicate which servers and ports to use for the primary and backup SMTP servers. As
for the Sender Email, this address is not validated and can thus be set to any address desired
(i.e.: PINotifications@domain.com). In most cases, the Allow contacts to set sender email
should not be enabled.
Once the email delivery channel is setup, most email addresses should be provided by Active
Directory (AD). If the AD doesnt include all email addresses needed, it will be possible to
create additional emails within the Contacts section of PI System Explorer, as it will be seen
in section 8.9 Adding Contacts.
Page 111
8.8.2
The Microsoft Office Communications Server (OCS) delivery channel provides delivery of
messages to the Microsoft Office Communicator service, now known as Microsoft Lync.
This delivery channel provides for integrated email and instant messaging alerts to clients.
For the companies that use Microsoft Lync, this can be a powerful way to connect people to
the process.
The delivery channel consists of two (2) components: the PI Notifications OCS Delivery
Channel and the PI Notifications OCS Relay Service. The first is a plug-in that comes with
PI Notifications and thus installed on the PI Notifications server, while the second is a
separate installation kit that needs to be installed on the Microsoft Lync server. It acts as an
intermediary between the OCS delivery channel and the Lync server.
To configure the OCS delivery channel, select the Notifications section from the navigator
panel and select Tools > Notification Settings > Delivery Channels. Right-click the OCS
delivery channel and select Settings to enter the FQDN (Fully Qualified Domain Name) of
the Microsoft Lync / OCS server. Again, IT personnel should be able to provide all the
required information.
For more information see the OCS section in the PI Notifications 2012
User Guide.
The OCS or Lync contact addresses are also usually retrieved from the Active Directory.
Again, it will be possible to explicitly add those addresses from PI System Explorer, by
creating what is called a new Delivery Endpoint of type OCS.
The OCS Delivery Channel consumes presence information from OCS to decide whether to
try to send an instant message. The selected presences specify the levels of presence for
which this delivery endpoint should receive message. When a notification is triggered, a
message is only sent if the presence of the subscriber is online or one of the checked
presences.
Page 112
The OCS delivery channel will not be further discussed in this class as it will not be
configured nor used in the exercises.
8.8.3
Web Service
The Web Service delivery channel allows PI Notifications to contact and provide information
to a Web Service by calling one of its Methods. To use this delivery channel, a Web service
must thus be available on a Web server that the PI Notifications Scheduler service is able to
reach.
About Web Services
A Web service is a method of communication between two electronic devices over the Web. In most
cases, it is a service hosted on a Web server that provides methods to its clients. Those methods will
usually wait for incoming information from one end, then crunch the data, to finally return the data to the
same client or pass that information to another one.
There are many Web services commercially available, and many development environments
offer templates and other tools to develop custom Web services. Just to have an idea of a
Web service, the http://www.webservicex.net/ website offers samples like a Global Weather
werbservice. Access this Global Weather Web service and try to retrieve weather conditions
for the local classroom nearby city.
http://www.webservicex.net/globalweather.asmx
Page 113
The above is the standard look of a Web service. Notice the two (2) available methods:
GetCitiesByCountry and GetWeather. Keep in mind Web services are usually not accessed
by people, but rather accessed by applications to retrieve or transfer information, meaning
this user interface is rarely looked at.
Unlike the other two default delivery channels, the Web service is not configurable from the
Notifications section. The only configuration necessary to send information to a Web Service
via PI Notifications will be done when creating a new Delivery Endpoint of type
WebService from the Contacts section of the navigator panel in PI System Explorer. That
will be seen in a later section.
PI Notifications normally gets the contacts and their addresses (email, OCS, etc.) from the
configured domain Active Directory (AD) database. This prevents from having to do the
tedious task of entering all of the potential subscribers and their contact information to start
using PI Notifications.
This AD access is configurable from the Contacts navigator panel section, and then from the
Tools > Active Directory Properties menu item. If the PI Notifications service runs on a
domain machine, it should automatically find the Active Directory server through DHCP and
configure itself. If configuration is necessary, it is possible to use this window to specify the
FQDN of the Active Directory / DNS server and the domain identity PI Notifications should
use to retrieve the contacts.
Page 114
8.9.2
Because the Active Directory database are often very large, contacts information is only
available from search results. To search for contacts, click the
button under the
Contacts section or use the search field. The star (*) can be used as a wildcard for that search.
OSIsoft classrooms computers should return all student AD users by performing a search for
stu*.
By default, only AD users will be returned from a search. AD groups can also be returned and
subscribed to a PI Notifications by modifying the Notification Settings > Global
Configuration > Show Active Directory Groups from False to True.
Page 115
8.9.3
Activity Objectives
Problem Description
For those who dont have entries in Active Directory or if you dont have access to your
Active Directory (which is worth pursuing), you can enter custom contacts one at a time. This
may be appropriate for vendors or other contacts not in your company who you may still
want to send notifications to. Custom contacts (like UOM and PI Notifications States) are
available to all PI AF databases.
Approach
Adding a custom contact in PI System Explorer:
1.
2.
3.
Note: E-mail accounts are available for the students to use on Outlook.com. These accounts are the
following:
PIStudent01@outlook.com (password: student01)
Page 116
8.9.4
PI Notifications Groups
An escalation team is a delayed delivery group which receives alerts on a notification only if
a specified time period called the Escalation period has elapsed, and the acknowledgement
requirement is not satisfied. Acknowledgments will be discussed in a later section, but it is
the ability to inform the PI Notifications server that the alert was acknowledged by a contact.
When a notification alert is sent to initial subscribers a timer is started, and if the
acknowledgment requirement is not satisfied by the time the escalation teams timer is up, the
escalation team will be sent alerts which will be labeled as escalation alerts.
Building escalation teams is very similar to building groups and so they can be included in
the subscribers area of a notification. Keep in mind that if an escalation team is added to a
notification that does not require acknowledgements, they will never receive alerts.
Try this out:
Create a new escalation team called Students Escalation by right-clicking the Escalation
Teams folder and selecting New Escalation Team. Add your StudentXX user as well as your
neighbor StudentXX contact and select a 5 minutes Escalation period.
8.9.6
A delivery endpoint is simply any subscriber to a notification, like everything that was
defined in the present section. However, one type was not mentioned and is here defined.
This delivery endpoint is the Web Service. As part of the classroom installation, a Web
Service for testing should be installed and available.
Webservice example: The Work Order Generator (Optional)
This is a custom Web service designed to act as an automatic work order generator. Imagine a
notification that would trigger whenever a piece of equipment needs maintenance. Via the
Webservice, the notification would pass all necessary information to the maintenance system
so a work order can be generated. For the purpose of this training, a SQL Server database
called WorkOrderGenerator will act as the maintenance system. This database is hosted on
your local SQL Server instance.
The Web service itself should be available at the following URL:
http://localhost/WorkOrderGenerator2013/Service1.asmx
Page 117
Page 118
Exercise Objectives
Problem Description
You would like to be alerted of a Tank Overflow on any of Velocity Terminals tanks. You
would like to receive an email as well as a brief text message whenever that is the case.
Furthermore, a work order should be created in the maintenance system of the company
(WorkOrderGenerator databse) whenever there is a Tank Overflow.
Approach
1. Navigate to the Tank Overflow notification template from the Library navigator
panel section and select the Subscriptions tab.
2. Add your StudentXX Email and SMS contacts, selecting the appropriate Delivery
Format for each one.
Page 119
3. (Optional) Add the Work Order Generator Web service delivery endpoint, and
then configure the bottom part of the viewer to specify the values to use for the three
(3) Web service methods parameters, by double-clicking on the parameters name.
a. For the EquipementName, select the Target.
b. For the FailureType, select the Name.
c. For the ActionToTake, enter custom text: Check if maintenance is
required.
Page 120
Tip
PI DataLinks Notification Search add-in allows to retrieve a report of the notifications that
were triggered during that last month for example. It dumps the history information of your
subscribed notifications on the spreadsheet to allow for reporting on that data.
Note: If a contact is not subscribed to a notification, the only way he can visualize the notifications
history is by looking under the History tab of the notification in PI System Explorer.
Page 121
Exercise Objectives
Problem Description
Speedys Pizza wants to have three (3) things set with alerts which will be later configured to
be sent to the manager on duty (your Student number).
Speedys Pizza management wants to be alerted under the following circumstances.
Since they have a Delivery in 15 minutes or its free! policy, they want to be aware
of any vehicle that left the restaurant for more than 30 minutes (the time counter
will reset when the vehicle is back at the restaurant, so 15 minutes maximum to
deliver and then get back).
They want to be aware of any speeding vehicle. They feel no one should go over 40
mph.
If any vehicles gas tank has less than 10% gas left, they need to be aware so they
can make sure they have enough to refuel.
Approach
In order to build a notification template so that it can be applied to all types of vehicles, the
target element template must be one common to all vehicles. That also means the attributes
used in the notifications triggering condition must also be part of that element template
(Timer, Speed and Gas Tank Level).
Build the notification templates, one per condition, and then apply them to all vehicles in the
fleet.
Page 122
Page 123
The Acknowledge With Comment hyperlink is usually a better choice to add since it allows
the user to enter a comment if needed. That Web page must be accessible from the users
computer when reading the notification email. The Web server must also have access to the
Active Directory and the PI Notifications server. If subscribers need the ability to
acknowledge from outside the domain firewall (on the Internet), then the Web server will
have to be visible externally.
Subscribers can also acknowledge a notification through the PI ProcessBook or PI DataLink
notification add-ins, or via the PI Desktop Alerts or MyPI tools.
Administrators can acknowledge a notification via its History tab, by right-clicking the alert.
Note: A notification that has ended before it is acknowledged is not acknowledgeable anymore and the
notification is considered expired. Comments can however be entered for an alert at any time, even if the
notification has expired or if it never required an acknowledgment.
Exercise Objectives
Problem Description
Tank02 has the highest capacity of all Velocity Terminals tanks. If a Tank Overflow alert
would occur for this tank, one acknowledgment should be required.
Page 124
Approach
1.
2.
3.
4.
5.
From the Notifications > Notification Settings > Global Configuration section of PI System
Explorer, copy the Acknowledgment Web Page URL and paste it in Internet Explorer to see if you
can successfully access the page (it will display an error, but if the OSIsoft logo shows up, the page
is available).
Configure the Tank Overflow (Tank02) notification to make sure it will contain the
acknowledgment Web page with comment hyperlink in the email Body, and make sure to increase
the required amount of acknowledgment to 1.
Check In the changes and trigger the notification to send out the email.
Validate the acknowledgment process by clicking the hyperlink in the email.
Confirm the acknowledgment was successful by looking under the History tab of the Tank Overflow
(Tank02) notification. Also try to acknowledge using other tools like the Notification PI
ProcessBook add-in to compare both methods.
Questions
1.
Did any of the created notifications generate any alerts? Where can we check?
2.
Page 125
9. Custom Plug-Ins
Through the OSIsoft developers community, called the OSIsoft vCampus
(http://vcampus.osisoft.com/), it is possible to develop and find additional Data References
other than the four (4) default ones. An example of a custom data reference is the Rollup one
that will be introduced as an optional step in the Final Exercise to this class.
The same is true with Delivery Channels for the PI Notifications software. Apart from the
three (3) default Email, OCS and Web Service delivery channels, custom ones can be
developed. Those custom delivery channels can allow PI System information to be distributed
to other specific applications or systems. Custom delivery channels are already available
through again the OSIsoft vCampus community, such as the XML delivery channel for
example.
Page 126
Exercise Objectives
Problem Description
You have 215 Wind Powered Turbine units in your wind farm and you have PI Server tags
built for them. The engineers have interesting data in various spreadsheets. You also have
maintenance data in a Microsoft SQL Server. Youd like to integrate all that data into PI AF
using a common template.
PI Server Name
Approach
We will create an asset database primarily using the tool PI AF Builder. Much of the work
will be accomplished within Microsoft Excel.
There is a spreadsheet pre-configured for you to use in this exercise:
TxLakeWindFarm_WPUs.xlsx
The PI Server tags to use may need to be created using the TxLakeWindFarm_Tags.xlsx
spreadsheet and the PI Tag Configurator add-in to Microsoft Excel.
1.
2.
3.
4.
5.
6.
Create a PI AF database to represent the wind farm (please use a unique name within the class if the
same PI AF server is shared amongst the group).
There should be a top-level element under which you will create all the wind turbines.
Open the TxLakeWindFarm_WPUs.xlsx spreadsheet to see how many turbines this wind farm has
and then use a blank spreadsheet to create the PI AF elements using the PI AF Builder. The wind
turbines are to be called WPU_TxLKE001, etc. and based on the same template.
Validate that the wind turbines were created by opening PI System Explorer.
Create and configure the necessary attributes to fully model the data available in the
TxLakeWindFarm_WPUs.xlsx and TxLakeWindFarm_WPUModels.xlsx workbooks, both
located in the C:\Class\Exercises\04_TxLake Wind Farm folder.
Create and configure the necessary attributes to fully model the data available in the PI Server.
Page 127
Hint: Because the tag naming convention includes the wind turbine name, it is possible to use
substitution parameters in the template to populate the PI Point data references.
7.
8.
Add an attribute to show the energy generation (MWh) from the instantaneous GenWatts tag (kW).
This is a running total over the last hour on the instantaneous generation attribute (.GenWatts tag),
which can be seen as a rate tag in kW/hour.
Add an attribute to show the WPU effectiveness or yield (%) with the following formula:
Power / Rated Power * 100
9.
Create a PI AF table linked to the wind farm maintenance system (Microsoft SQL Server database:
WindFarmMaint)
Use the Microsoft OLE DB Provider for SQL Server driver.
Enter the Microsoft SQL Server instance name you noted at the beginning of this exercise.
Use Windows authentication.
Enter the Microsoft SQL Database name you noted at the beginning of this exercise
Link to the TxLakeMaint table (SELECT * FROM TxLakeMaint).
10. Create and configure the necessary attributes to fully model the data available from the Microsoft
SQL Server relational database.
11. Create Attribute Categories to organize the attributes in logical groupings.
About Attribute Categories
Categories can be used for various PI AF objects, such as the attributes. Attribute Categories are used to
group attributes together so it is easier to look, search or perform aggregations on the attributes of a PI AF
model. Categories are not extensively used in client applications like PI ProcessBook or PI DataLink.
However, for specific tools like the below explained Rollup data reference, the use of categories is
essential.
12. Complete the PI ProcessBook display TxLakeWindFarm_WPUStatus.pdi and make it Element
Relative to monitor the wind turbines of the TxLake Wind Farm.
13. (Optional) Install the Rollup custom data reference and use it to calculate the Total Energy
Generated for the whole wind farm (MWh). The Rollup custom data reference is available from the
C:\Class\Extras\PIAFRollupDataReference\.
About Custom Data References and the Rollup Data Reference
Four data references are built-in by default in PI AF. However, it is possible to develop your own custom
data references to interact with your applications and systems or generate different calculation results.
These can be developed by subscribing to the OSIsoft vCampus community (http://vcampus.osisoft.com)
At a top-level element (like the wind farm element), an attribute, using the Rollup custom data reference,
can be created to aggregate multiple attributes from children elements. The aggregation can be an
average, a minimum, a maximum or a sum. The attributes used in the aggregation must belong to the
same attribute category. The Rollup data reference is available on OSIsoft vCampus only and is not an
officially supported data reference.
Page 128
Exercises Solution
Solution
Hints
'SINUSOID' + 'SINUSOIDU'
IF PCTGood('CDT158', '*-1h',
'*')>=80
THEN TagTot('CDT158', '*-1h', '*')
ELSE NoOutput()
or
TagTot('CDT158', '*-1h', '*', 80)
For the past day, how
much time (in % of a
day), was the tag
Sinusoid between 30 and
70?
Page 129
11.2 PI Totalizer Exercise Solution (Section Error! Reference source not found.)
Step-by-Step Solution
1.
2.
Open the PI System Management Tools, connect to the PI Server and select Points > Totalizers.
Create a new Totalizer tag, naming it _CDT158.ShiftAverage, and selecting a Block-Time
Weighted-Average and other values for its attributes as specified below:
3.
4.
Page 130
Exercises Solution
5.
6.
Save your work by clicking on the floppy disk icon often as the configuration is sometimes lost if a
new tab is selected and the save button wasnt clicked.
Create a new Totalizer tag, naming it _CDEP158.BatchTotal, and selecting a Block-Time
Weighted-Total and other values for its attributes as specified below:
7.
8.
9.
Under the Options tab, modify the Conversion Factor to 1440 to take into account the conversion
between minutes (GPM) and the PI Server assumption of units per day:
Page 131
10. Make sure to save your work to create the totalizer tag by using the top toolbar floppy-disk save
button.
11. Create a new Totalizer tag, naming it _CDEP158.MovingAverage, and selecting a Moving-Time
Weighted-Average and other values for its attributes as specified below:
Page 132
Exercises Solution
The PI Totalizer Subsystem should pick up the new tags and begin to process them
immediately. The results of the newly created calculations can be examine by using the PI
SMT > Data > Current Values plug-in, searching for tags with PointSource of T. If
Configure or Pt Created is the current value, the totalizer tag may simply not had enough
time or enough values to give a result yet. Their values can be checked at a later time.
Page 133
Create tags required for the exercise from the file SpeedysPizzaTags.xlsx located in C:\Class (or the
location specified by your instructor).
Create the Base Template. From within PSE, select Library > Templates > Element Templates >
New Template.
3.
4.
Page 134
Exercises Solution
5.
In the white space, right-click, then select New Attribute Template or select the New Attribute
Template button in the menu.
Or
6.
Create the attributes standard to all the vehicles (Tripmeter, Gas Tank Level, Speed, and Time
Counter).
7.
8.
For Example, for model PizzaStar, the template is derived from the base template.
Page 135
9.
10. Complete derived templates for each delivery van type. After checking in and refreshing the Browse
window, the individual models should appear under the base template.
11. Create individual elements for the 8 vehicles currently owned/operated by Speedy Pizza. Name them
according to the initial table with vehicle listing.
Page 136
Exercises Solution
12. Verify all the expected fields are present in the individual elements representing the appropriate
model. Vehicle SP1 is shown below for reference:
13. Verify all attributes are being updated based on the PI Points. For example, Engine Temperature is
based on %Element%.EngT but the tag should be listed as SP1.EngT or the appropriate Element ID
in place of %Element%
Page 137
14. Add the Fuel Efficiency calculation to the base template. As given in the hint, the Fuel Efficiency
can be calculated using the tank level, trip meter and tank capacity.
15. After adding this to the base template, check in the template, then verify the elements have the fuel
efficiency attribute added.
Page 138
Exercises Solution
Page 139
Version
2010 R2 SP1
2012
2012 SP1
PI DataLink
2013
PI Notifications
2012
PI ProcessBook
2012 SP1
PI Server
2012 + patch
PI SMT
2012 SP1
Page 140
2013
2012 Express
2010
Revision History
Reviewer
Description
2010
Martin Bryant
2012
Linda Payne
2012b
Louis-Philippe Pag-Morin
2012c
Louis-Philippe Pag-Morin
2012e
Alejandro Molano
Page 141