AssetFramework Basics
AssetFramework Basics
AssetFramework Basics
OSIsoft, LLC
1600 Alvarado Street
San Leandro, CA 94577
OSIsoft, the OSIsoft logo and logotype, Managed PI, OSIsoft Advanced Services,
OSIsoft Cloud Services, OSIsoft Connected Services, OSIsoft EDS, PI ACE, PI
Advanced Computing Engine, PI AF SDK, PI API, PI Asset Framework, PI Audit Viewer,
PI Builder, PI Cloud Connect, PI Connectors, PI Data Archive, PI DataLink, PI DataLink
Server, PI Developers Club, PI Integrator for Business Analytics, PI Interfaces, PI JDBC
Driver, PI Manual Logger, PI Notifications, PI ODBC Driver, PI OLEDB Enterprise, PI
OLEDB Provider, PI OPC DA Server, PI OPC HDA Server, PI ProcessBook, PI SDK, PI
Server, PI Square, PI System, PI System Access, PI Vision, PI Visualization Suite, PI
Web API, PI WebParts, PI Web Services, RLINK and RtReports are all trademarks of
OSIsoft, LLC.
All other trademarks or trade names used herein are the property of their
respective owners.
4|Page
Supports different Units of Measure
PI Asset Framework (PI AF) attributes are associated with specific Units of
Measure. AF is preloaded with numerous standard unit-of-measure classes and
conversion factors based on the International System of Units (SI). It also
supports user defined classes and Units of Measure. For example, the source
unit for a temperature sensor attribute in a reactor in the USA can be
associated with degrees Fahrenheit, the corresponding attribute for a reactor in
Italy can be associated with degrees Celsius. When working with the data
(doing calculations or displaying the data) this is properly taken into account.
Element templates in AF provide the basis for standardization. When applied for elements that
represent the same type equipment, all elements have the same set of attributes with a
consistent, user friendly naming. The attributes have same unit of measurement, same data
type, the same description, etc. This allows a harmonized, consistent representation of your
system.
Another benefit of using templates is the quick creation of many elements of the same type.
5|Page
Introduction to AF Key Features
Asset Framework provides an additional data layer in the PI System. It is based on an asset
model of your plant that you define for your company. The model consists of elements and
attributes.
You can model your plant by organizing and structuring the data
according to how you work with your company data. Examples
include organizing by physical location or by physical objects in their
processes like reactors, transformers and meters.
Since the AF asset model can span PI Data Archives, it allows you
to organize and search for PI System information across multiple PI
Data Archives.
The basis for the asset model is an Element, which contains Attributes that can reference PI
System data, design data or data from other systems:
6|Page
PI System Explorer (PSE) Navigation
In this section, we'll be discussing the basics of PI system explorer, or PSE as it is frequently
referred to for short.
PI system explorer is the main tool for configuring and managing PI asset frameworks, PI
notifications and PI event frames.
We'll start by opening PI System Explorer by going to all programs, PI System folder and look
for this icon .
Now as PSE starts up, you'll notice that the screen is divided into several different sections. So
we'll go over each of these, starting in the bottom left, we have what is known as the navigator
panel.
Here you'll see that there are several different objects that you might want to work on within
PSE. In this course, our primary focus will be on the Elements and Library options.
In the elements section which is where your hierarchy resides, this can be a physical or logical
representation of your process.
The library is a collection of objects that can be used throughout your AF hierarchy. This
includes templates, enumerations sets, tables, etc.
7|Page
Although not modified in this course, but it should be acknowledged due to its importance is the
Unit of Measure. This database provides automatic handling of simple conversions between
units of measures for attributes of the same UoM class. A UoM class is defined by the
fundamental dimension of its measurement. Some examples of UoM classes are Mass,
Temperature Volume, and Density.
You may have noticed as we selected different sections on the navigator pane, available
options were changing above it – this section is known as the browser. With Elements selected,
your hierarchy is visible, if the Library is selected, options to work on building templates, tables,
enumerations sets are brought into view.
To the right of the browser area, we have the viewer, which is your primary work area. From this
pane, we can build templates, add attributes, configure tables, etc.
The final section we can display is called the palette. By default, this pane is hidden to optimize
screen visibility/workspace. To make the pallet visible, go to the view menu, select palette, and
show palette. From the palette area, we have several options available. For now, we will
mention the tag search. We can perform a tag search allowing us to quickly drag and drop
already defined data into the attribute area to make new attributes on a template.
If we explore the menu options, we can see one item labelled ‘Go’. This menu option gives
keyboard short cuts to traverse the navigator pane.
The last thing to mention is the status bar. It's at the base of the PI System Explorer window.
This will tell you the status of a selected element. For example, from the Library, I have selected
the PressTemplate. You can identify when it was last modified and by whom from the status bar.
The components being the status bar, menu bar, and navigator panel for selecting groups of
objects to work on. The browser for selecting individual objects. The viewer for configuring
objects. And finally, the palette where we have quick access to templates and tags for drag and
drop editing.
8|Page
Keyboard Shortcuts (optional)
For those that like keyboard shortcuts, these navigation tips may be of interest to you.
It is a lot faster to use the keyboard shortcuts to move between the ribbons as well as to perform
other tasks in PSE. While there are many keyboard shortcuts, the most important will be those that
switch options in the Navigator Panel. This is because you will need to switch views frequently.
Navigate to the Library in the Navigator Pane using the keyboard. Then navigate back to the
Elements.
Step by step:
1. Press the Ctrl+3 key combination to navigate to the Library view. To navigate back to the
Elements view press the Ctrl+1 key combination. The Ctrl+<number> key combinations to
navigate to different views are (all these are found under the ‘Go’ drop down menu):
9|Page
Key Combination Action
CTRL+HOME Selects the first cell of the current page in the Viewer.
CTRL+END Selects the last cell of the current page in the Viewer.
ALT+HOME Selects the first page of objects in the Viewer.
ALT+END Selects the last page of objects in the Viewer.
CTRL+PAGE UP Selects the previous page of objects in the Viewer.
CTRL+PAGE DOWN Selects the next page of objects in the Viewer.
CTRL+ENTER If the Viewer contains multiple pages of objects, displays the
Select Page Number window.
ALT+ENTER In the Browser, displays the properties of the selected object.
SPACE Presses the currently selected button.
or
ENTER
Left, Right, Up, and Down Navigate objects in the Viewer or Browser.
Arrows
F2 Edits the selected object on the Viewer. For complex objects,
displays the edit window for the object.
F4 Displays the choices in the selected list box. For layered lists,
or displays the complete hierarchy of choices.
ALT+Up Arrow
or
ALT+Down Arrow
10 | P a g e
Connecting and Verifying Data Archive and AF Servers
From the left-hand corner of PSE, you see the word Database, from here, you can connect to
the correct AF Database (providing multiple databases exist). As we click on Database, in our
case, multiple databases display on the screen.
The database named Configuration is a database that should not be modified. It is used
internally.
Throughout this course, we will be using the Big Tire Co. databases unless otherwise directed.
Although, we are using AF to organize our company process data in a readable format, the data
actually exists in the Data Archive.
From PSE, the PI Server and AF Servers must be identified so the tool can connect to the
database created for your company’s data. During installation of the PI System, the connections
are built, however, it is good to know how to verify the connection.
From the File menu option, under Connections, a list of servers can be found. The name, user
logged in and type of server can be found in the connection window.
You can validate your connection to the Data Archive via PSE. Notice AF Server icon ( ) is
different than Data Archive server icon ( ).
11 | P a g e
The connection information is not only important for connecting PSE to the correct database,
this information is critical in locating the data (or storing the data) being collected within your
facility.
An alternate means of validating your connection to the Data Archive is via the PI SDK utility.
From the program menu, select PI System → PISDKUtility. The default view opens with
Connections selected. (From the PI-SDK > Connections section, the Data Archive servers
configured on the local machine are displayed.) To validate a connection to a Data Archive,
simply check the checkbox next to its name or IP address. If connection succeeds, connection
information will be shown.
The user that was used to authenticate on the Data Archive 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.
12 | P a g e
Searching and Filtering with PSE
Approach
Quick Element Search
1. Open the PI Big Tires Co. AF database from PSE, verify Elements is selected in the
Navigator.
2. Explore the element hierarchy: it contains 3 locations (Houston, Montreal and
Philadelphia (“Philly”)) with four presses in each location. (Slight pause as locations are
being opened)
3. Above the viewer pane, there is a Search box in the upper right-hand corner. Enter HOU
into the quick search and press Enter. The results of the search will appear in the
browser screen under the ‘Element Searches’ option and in the viewer pane.
4. Now let’s try a different search. Enter HOU*Press into the quick search and click on
Enter.
(Pause as 4 results should appear on the screen)
Note: one has been eliminated due to the additional criteria added to the search and an
additional quick search will display under the Element Searches option.
13 | P a g e
Note: The searches created display a little asterisk next to the searches name. If
you created a search to be used periodically, you can save it by right clicking on the
Element Search name, then select Save. From the same context menu, you can
rename the search.
If you do not save the search, it will not be available the next time you open PI System
Explorer.
14 | P a g e
In the above two searches, we had ‘All Descendants’ set to False.
Note: All Descendants specifies whether the search returns elements from the selected
levels and all levels below. The option should be set to true in most cases. The Name
field can make use of the wildcard characters (* and ?).
9. Let’s reset the criteria by clicking the reset button in the lower right hand corner.
10. Now, set ‘All Descendants’ to True and enter *1 into the Name field.
Pause – 3 records are found throughout the hierarchy.
11. Reset the criteria again. When you specify a template (e.g. PressTemplate) you can add
additional criteria. Click Add Criteria, select Attribute Value.
12. To select the attribute of interest, select the ellipse field next to the word Attributes.
Select Other Attributes, then the attribute of interest, for now, Press Status.
13. Press Status is based on an enumeration set, so a drop down box has the potential
values for the attribute. Set the value to “Running”.
14. Press Search. Currently there are 12 elements with the attribute Press Status. Odds are
some but not all Presses will be running.
15 | P a g e
Attribute Search
15. From the PSE menu, select Search – Attribute Search…
16. Verify the PI Big Tires Co. AF database is selected
17. Enter Press Status into the attribute name field. Click Search. Result: The Press Status
attributes for all 12 presses are listed. Click on OK.
16 | P a g e
Searching and Filters
As your AF hierarchy grows, it is important to be able to find the Elements you need. In the
following exercise, we will discuss searching, then filtering the search results.
Approach: Create a search view named Tanks that contains all the Storage Tanks for our
creatively named Production Area
Step by step:
Before creating the search and filters, the database needs to be changed.
a. Verify current database, so far, the Big Tire Co. database has been used.
b. Press Database, then highlight the OSI Production Facility database, press OK.
c. If you are not in the Elements, go to Elements in the Navigation pane or press the
Ctrl+1 key combination
d. Press the F3 key to bring up the Element Search window or from the menu, select
Search then Element Search.
i. Enter Production Area for the Element Search Root OR click … to select the
root from the hierarchy.
ii. Select True for All Descendants
iii. Select Generic TankTemplate for the Template
17 | P a g e
e. You can rename the search results in two ways.
Option 1: Right click the Element Search Results 1 in the Browser pane and select
Rename. Type in Tanks and press the Enter key.
Option 2: Click on the Element Search Results 1 and the press the F2 key, type in
Tanks and press the Enter key.
18 | P a g e
Viewing Additional Columns in Searches
b. In the Select Attributes dialog select the row with the name Internal Temperature and
click the button. Then click the OK button.
19 | P a g e
c. Now in the Viewer, we are able to see all the internal temperatures associated with all
the tanks using the Generic Tank Template.
Note: For large databases/hierarchies, the rows displays can be controlled by the ‘Maximum
Query Size’ located in Tools>Options menu.
20 | P a g e
Finding Points through PI System Explorer
Activity Objectives
• Review the search capabilities and options of PSE Tag Search.
Approach
1. Verify Elements is selected in the Navigation Pane. The menu varies with navigation
item selected.
2. From the PSE menu, select Search – Tag Search…
3. (optional) If criteria were cached from the last search, click the blue “x” in the search line
on the top to reset.
4. Search for tags matching the name pattern CD*158
21 | P a g e
This option is convenient in instances where a common point source is used in setting
up interfaces or specific groupings of data.
For example, enter point source=R to search for all tags with this criterion. In our PI
Server configuration, the R in point source indicates all tags associated with the Random
interface.
22 | P a g e
If you are working on setting up your hierarchy, it may be more convenient to bring up
the Tag Search in the Palette view. The same functionality exists, but it is viewed in a
fixed pane.
23 | P a g e
Create an Element using the Palette functionality
Work with the Palette using the OSI Production Facility database.
When you start building an Element it can be hard to find tags and fill out all attribute fields.
Thankfully, the Tag Search Palette process is streamlined. We will create a new Element
called Extruder containing all relevant PI Points.
Step by step:
Step 1. Navigate to the Elements view.
Step 2. Open up Production Line1 location. Right Click on Production Line1 and
select New Child Element.
Step 3. Choose <None> for the Element Template and click OK.
24 | P a g e
Step 4. Name the non-templated Element Extruder. You can press F2 to rename quickly
or right click on the new element.
25 | P a g e
OR
26 | P a g e
Step 7. Search for *EX* to find the appropriate PI Tags associated with the extruder. The * is
either a single or multicharacter wild card.
Step 8. As we are currently under Production Line1, Add the tags *PL1.EX1* for
External Temperature, Flow Rate, Internal Temperature and Pressure by
clicking and dragging each tag in the Viewer area. Notice how the description,
point type, and UOM match the PI tag definition.
Note: The tags can be added individually or all together – by selecting each with the control key
selected.
Note: The units of the PI Tag must exist in the UOM database before dragging tags from the
palette.
Step 9. Close the Palette window to allow more space to configure the attributes.
27 | P a g e
Step 10. Once added we can change the individual Attribute names. The names can be
updated through the configuration screen, select Name or by double clicking the
individuals name in the viewer screen.
Step 12. Check-In your changes, by selecting Check In or press the Ctrl+S key
combination to Check In your changes.
Note: We have not discussed the Check-Ins and their need to save changes to the database.
Whenever you make a change to an object, including whenever you create a new object, PI
System Explorer checks that object out from the database. You need to save these changes in
the database, although you can apply a change to a selected object by clicking in the toolbar
and then check in your changes later.
28 | P a g e
Hiding Check In and Check Out Dialogs (optional)
Step by step:
a. If you are not in the Elements view press the Ctrl+1 key combination or Select
Elements from the Navigator Pane
b. In the menu, navigate to Tools>Options…
c. In the Options dialog check the Check Box Only show database Check-In dialog
when Shift key is down
g. Press the Ctrl+S key combination. The changes are now checked in. (Another option
is File → Check In)
h. Verification of Check-in can be seen, by the disappearance of the check mark next to
the newly created element.
29 | P a g e
Part 2: Create a new element and check it in, but have the Check In dialog appear first.
Step by step:
a. Right click the Elements ( ) in the Browser pane and select New Element
(choose element template <None>). Alternately, you can also select Elements
( ) and press the Insert (Ins) key.
b. While holding the Shift key down, click in the Toolbar. A new screen
appears for verifying check-in.
Note that you cannot use the Ctrl+S key combination while holding down the Shift
key.
30 | P a g e
Creating Databases, Hierarchies, Templates and more
Note: The whole company does not need to be modeled in AF for you to be able to get
value out of it. In fact, the AF structure build-up is often project-driven. This means to begin
with, a small structure containing your pumps might be built for use in PI ProcessBook
displays. As more and more applications start making use of AF, the structure will
continuously grow to include more and more of your assets.
That being said, it is still a good idea to define the various hierarchy levels that will be
represented in the AF structure (divisions, locations, production lines, process, etc.) before
gradually adding the assets to that hierarchy.
Bottom-up
Often a Data Archive is already in place so one approach is to group the assets by similar Data
Archive points. These “similar object” groups become AF element templates, and the “objects”
become AF elements. Any foreign data that is available is imported. Next, analytics that may
seem useful are added, and finally consumers such as PI ProcessBook displays or PI Datalink
reports.
The bottom-up approach has the advantage of being a clear, reality-based path to follow. The
Data Archive points are known and analytics can be added on top of them.
However, a clear disadvantage is that this approach lacks vision. This approach does not
guarantee the result to be useful since the asset model was not built with a particular goal in
mind.
31 | P a g e
Top-down
Another approach is to start by asking theoretical questions:
✓
What is the goal of the asset model?
✓
What do the consumers need from AF?
✓
What are the business requirements?
✓
What analytics will be desirable?
✓
What sort of foreign data might be useful?
After answering these questions, the element templates and elements can be sketched, and
organized in a hierarchy. Next, AF attributes can be added for the desired data points, even if
the source for the data is not known yet. The first stage is simply to add the placeholders for that
data, i.e. non-configured attributes. If these attributes are confirmed to be the ones needed, then
the analytics can be added, the Data Archive tags can be mapped, and the model can be fully
implemented.
This top-down approach has the advantage of planning for the usefulness of the AF model.
Confidence that the model will be well designed and reusable is assured. This advantage
cannot be understated and usually outweighs all of the following disadvantages. One
disadvantage is that the design can drift away from reality and be incredibly hard to implement
while having little benefit over an easier alternative, which is hard to tell beforehand. Another
inherent disadvantage is that much of the available raw data that is not “necessary” will be
ignored from the model.
32 | P a g e
Create an AF Database, Element and Attributes
In previous lessons, connections to the servers and database, search functionality and how to
create an element from the palette have been covered.
In this exercise, a new database is being created to start a new element. Attributes will be
added to the element with different data reference types.
Create a database:
You are working for Velocity Terminals, a chemical company producing various chemicals. The
company has a number of storage tanks located in different countries that they would like to
monitor. You have been tasked with creating an asset model for these tanks in AF.
Open PSE and 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.
To create a new database, right-click anywhere in the list of databases and choose New
Database or click on the New Database button on the toolbar.
Enter the name AF Startup into the Name field of the Database Properties window
A description can be added as the usage of the database – in this case, Velocity Terminals test
database.
Select OK to complete database creation.
Now that we have a clean database, let’s create your first element:
Make sure the Elements section is selected from the Navigator Panel and create a new element
called Tank01.
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 default name of the element to Tank01.
Notice the small check mark next to the newly created Tank01 element. The check mark
indicates, changes are being made to the database and have not be ‘saved’.
33 | P a g e
Create 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.
As with elements, 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.
Rename Attribute1, to Capacity, by double clicking Attribute1 in the viewer pane or navigating to
the Name field in the configuration pane.
Set the Unit of Measure to US Gallons (it will be under the Volume class). Setting the UoM is
important to prevent misinterpretation of the measurement. The Unit of measure will be
displayed with the attributes value.
Since the Capacity attribute is a static value, the Data Reference is <None>.
Let’s go a little deeper in setting up two more attributes, each will use another form of data
reference.
Another method of creating a new attribute is to right click in the viewing pane, then select New
Attribute.
Start entering the Level attribute information. Default UoM as %, Value Type Double, and
Display Digits 2. After setting the Data Reference to PI Point, select the Settings button.
34 | P a g e
A search window will display – verify the Data Server is PISRV01, then either enter
Tank01LI.PV in the field next to the Tag Name OR select the tag search (magnifying glass) and
enter a portion of the tag name (for example, tank01*). (The tag search may need to be reset to
remove any cached information.) After selecting the tag name, select OK.
• Use the formula data reference to calculate the volume using the level (%) and the
capacity (m3).
Two previously created attributes are being used in this formula. Capacity and Level to
calculate the volume.
• Click the New Button, then expand the list of functions from the equations section ( ) to
pick the operators/functions to use in the formula.
35 | P a g e
• For completion, select Check In to save the changes in the database.
You can perform unit conversions by setting the units of measure (UOM). 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.
Note: It is recommended that you always assign the units explicitly! If you leave units selector at
“<default> then no unit conversion takes place. If the default UOM of an attribute is changed later
on, then no corresponding conversion will happen and results will not be correct!
36 | P a g e
Create an AF Table
Building the table is similar to building a table in other programs that have simple table building
capabilities.
Tables are held in the 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 AF.
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 ( ) on the right-hand side. Define the
table as follows:
Column Name Value Type Unit Of
Measure
MaterialID String <None>
Density Double kg/m3 (Density)
37 | P a g e
Under the Table tab, enter the following fictitious chemicals:
MaterialID Density
AQ4500 2100 kg/m3
HC1500 3422 kg/m3
WX1200|Old Recipe 8943 kg/m3
WX1200|New Recipe 9213 kg/m3
After completing the information in the table, select Check-In to save the information to the
database, then press OK to exit the Table Properties window.
Now, a plus (+) sign appears next to tables, indicating a table exists.
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 expose information in maintenance, production planning, or equipment databases
for use by PI client applications. For further information on tables and other advanced AF topics
with ‘Asset Framework: Beyond the Basics’ or with LiveLibrary.
38 | P a g e
Create an AF Enumeration Set
An enumeration set is an ordinal list of sequential integer values, which are mapped to names. It
allows AF attributes to refer to a common term instead of a number. This is analogous to the
Data Archive digital state sets used by Digital points. It is not needed to rebuild the digital state
sets or maintain them in AF. Enumeration sets are just a meaningful way to display information,
perform data validation and maintain data consistency across the AF structure.
Enumeration values can be nested in hierarchy. The hierarchy can have as many levels as
needed. In our case, WX1200 is produced with different recipes, which results in different
physical characteristics and density values. By adding an additional level below the WX1200
value we can distinguish between the old and new recipe.
An enumeration set is a table that correlates numbers with strings. Enumeration sets allow
attributes to be trended based on their numeric string equivalent. Enumeration sets are
analogous to digital state sets used in the Data Archive.
Be sure you are in the AF Startup Database.
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 or from the New Enumeration Set link in the
viewer.
Enter the material IDs from the table below as the names of that set:
Value Name
0 AQ4500
1 HC1500
2 WX1200
In the last lesson, a table was created with an Old and New Recipe associated with material id
WX1200.
To distinguish WX1200 produced with either the old or new recipe, we will add two child values
in a level below WX1200:
39 | P a g e
Value Name
3 WX1200|Old Recipe
4 WX1200|New Recipe
Select the name value associated with WX1200 and right click to create a new Child
Enumeration Set.
Enter the value of Old Recipe or New Recipe. The above information will be displayed in the
enumeration set table.
40 | P a g e
Unit of Measures Overview
The units of measure (UOM) feature allow automatic unit conversions for data values. Within
AF a measurement can be stored in one technical unit for a measurement and displayed with a
different unit of measure within the same measurement class.
For example, suppose AF attributes of a tank represents the diameter and the height and have
a UOM of meters. AF considers the selected unit of measure. This provides the option to show
the diameter and height in other units than in meters, e.g. to show it in inches. Another
consideration is in attributes with a formula. It is possible to calculate the tank volume in liters
based on the physical dimensions provided in meters. AF does the automatic conversion for you.
The relations between UOMs are defined with simple or formula conversion methods.
There is one repository with all units of measurement (UOMs),
which is shared by all AF Databases. In other words, the UOMs
defined for one AF database on your server is used in any AF
database on your server.
Unit of Measurements are organized in UOM classes. UOM classes
represent measurable properties, such as temperature, length, time,
and mass. To facilitate region specific use of UOMs, the UOMs are
associated with a UOM group, which can either be Metric or US
Customary (additional UOM groups can be defined).
Unit of Measure classes can be modified or the database can be expanded or added to based
on your specific requirements.
In this course, we are restricting our usage to assigning unit of measures to measurements and
exploring Unit of Measures.
41 | P a g e
Canonical UOM – will have the same value of the unit and will have a check mark by the name.
Answers:
1. Meter
2. 1 cm = 0.01 meter; either yard or foot (ft)
42 | P a g e
For future reference, creating new and editing existing UOMs can be made in the database.
Click on Unit of Measure in the PSE Navigator to edit UOMs, UOM classes and UOM groups.
43 | P a g e
Details on Reference Types
• PI Point
• PI Point Array
• Formula
• Table Lookup
• String Builder
• URI Builder
44 | P a g e
Formula Data Reference
Formula data reference allows you to perform simple calculations that are evaluated on-the-fly
by the client application (e.g. PI Vision, PI DataLink). Performance issues can arise in case of
long dependency chains (i.e. when a Formula needs to wait for its input values coming from a
chain of other Formulas). The best solution is to move the calculation to Asset Analytics
(discussed in Asset Analytics: Basics course) and use PI Points to store the calculation results.
Earlier, we created a Formula Data References to determine the Volume of a tank based on the
static value of the tank’s capacity and the current level of the tank.
Formula Data References allow the creation of simple custom calculations. Calculations can be
in the form of a single formula or a sequence of calculations. The calculations are executed on
demand, and the results are not archived anywhere. The functions available are limited and
they are not time-weighted.
We can add an additional calculation to the formula to discard values below a specific level (to
potentially take in the deviation error into account).
As stated, if the result is less than a specific value, we want a 0 to display due to measurement
tolerance values.
45 | P a g e
In order to use the result of Volume in another formula and eliminate getting a circular reference
error, the initial equation needs to be modified.
• Double click the equation (or Highlight) the original equation to edit the formula.
• Place the cursor at the beginning of the equation and enter M=, so the full equation is
now M=C*L/100
• Now, select New in the Equation section of the Formula Configuration window.
The following equation can be typed into the field or the formula can be input through the use
of the menu structure:
46 | P a g e
To verify your formula is working, select Evaluate while the formula is highlighted.
Accept the formula changes by clicking OK. Then Check In your changes.
47 | P a g e
Substitution Parameters in an Attribute Template
Substitution parameters are variables that be placed in attribute templates for PI point data
references. AF resolves a substitution parameter when elements are created. As an example,
the substitution parameter %Element% would resolve to the attribute’s element name.
For example, in a truck template, the tag for the speed attribute is configured
as %Element%.%Attribute%.PV. Once Truck1 is created from this template, AF would try to find
a tag named Truck1.Speed.PV.
Notice the default configuration for a PI Point Data Reference attribute template:
\\%Server%\%Element%.%Attribute%.
Substitution parameters can also be applied in Table Lookup and String Builder Data
References.
48 | P a g e
Defining the Substitution Parameters
AF supports numerous substitution parameters, which can be used in attribute templates. The
following table lists the ones most commonly used.
Name of the default Data Archive for the computer on which you
create the attribute. The default Data Archive for the computer on
which PSE is running.
%Server% Note: The %Server% parameter does not resolve to the computer
on which the AF database resides. The %Server% parameter can
resolve to a different Data Archive depending on the default in
AF Client.
49 | P a g e
Creating a Template from an Element
So far, in our Velocity Terminal database, an element and attribute have been created. Now we
are moving to one of the advantages of AF – templates.
Verify you have PSE open and the database set to AF Startup.
Select Tank01 from the Browser (verify the Elements section in the Navigator Panel is
selected) 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).
When converting you have to decide, how the PI Point Data Reference for the Level attribute
should be set. Select Substituted, which will set the PI point name according to a naming
pattern rule.
The default naming rule is %Element%.%Attribute%.%ID%.
Under Suggested Point Name, enter %Element%LI.PV and click Apply. Be sure to deselect
‘Include Tag Creation’.
If you create elements for another tank based on the template, the substitution parameters in
the point reference (enclosed with %) for the Level attribute will be replaced according to the
name of the new element:
]
Substitution parameters were discussed in the previous lesson.
Substitution parameters can be confusing at times, so we will briefly review their usage in this
template and attribute.
50 | P a g e
In this case, the level tags were previously created with a defined nomenclature: Element Name
including tank number, followed by LI.PV where LI = Level Indicator and PV denotes process
variable. In later lesson, as we create additional Elements with the template, the advantage of
templates and substitution parameters will become apparent.
Check-In the changes.
Let’s verify the template has been created (the check-in screen already verified it, but….)
Navigate to Library → Element Templates → The Tank Template should be visible in the
browser.
51 | P a g e
String Builder Data Reference
The String Builder data reference allows you to use substitution parameters and functions to
manipulate values and output a string.
Below some cases where the String Builder data reference is useful:
✓
Concatenate strings (Element Name + Attribute Name + Value).
✓
Format dates and numbers.
✓
Build paths to elements and attributes.
✓
Parse comments from operators stored in PI tags.
✓
Display element information as an attribute.
Note: Since this data reference supports substitution parameters, when used in a template,
value substitutions takes place at run time.
String Builder allows you to manipulate strings located anywhere in your hierarchy by using the
Related Attribute Values contextual menu (see figure below).
52 | P a g e
Adding to the Hierarchy
Locate your new element template from the Library > Templates > Element Templates
section and change its name to “Tank”.
Under the Attribute Templates tab of the Tank template, add four (4) new attribute templates
by clicking the button from the toolbar.
Note: though the display digits are not applied for non-numerical values, the default value for
Display Digits (-5) will be displayed, do not change the value.
Product Attribute
When you create the Product attribute, enable the Configuration Item Property.
Density Attribute
Configure the Table Lookup data reference for the Density attribute using the following:
53 | P a g e
After entering the Where clause information, select either ‘Add And’ or ‘And Or’ to complete the
WHERE Clause.
Select OK
Mass Attribute
Configure the Formula data reference for the Mass attribute using the following:
Parameters Equations
Variable Attribute Unit of Measure
D Density kg/L D*V
V Volume L
Select OK.
54 | P a g e
Tank Name attribute
This attribute will use String Builder as the Data Reference. To configure the attribute for Tank
name.
Select String Builder from the Data Reference dropdown selection and click on the Settings…
Click on the Add New String button, click on to get further selection options, then select
“%Element%” from Substitution Parameters:
Select OK
the changes.
55 | P a g e
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 AF elements.
However, for elements that would act only as organizing assets (folders) and that have
no attributes, a template is not required.
56 | P a g e
Creating an Element from a Template
Navigate from Templates → Element Templates → Right click on Tank → select New
→ Then New Element
From Elements:
Right click on Elements → select New Element
A new element is created in the hierarchy. Note it has the same characteristics as Tank01.
Navigate to the General tab of the new element.
Rename the Element to Tank02.
Update the attributes as indicated below for Tank02. Remember the capacity is a static value
and Product is selected from an Enumeration Set.
All attributes should have values after the refresh. (Note values will not exactly match the
screenshot below.)
57 | P a g e
58 | P a g e
Adding Layers to the Hierarchy
Our assignment was to create an AF hierarchy representative of our process which includes the
location of the storage tank.
You are working for Velocity Terminals, a chemical company producing various chemicals. The
company has a number of storage tanks located in different countries that they would like to
monitor. You have been tasked with creating an asset model for these tanks in AF.
Elements can be moved under other elements (then called Parent Elements) in order to
represent a logical hierarchy to be used by your applications
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.
In retrospect, you realize Tank01 and Tank02 are located in Montreal, Canada. The hierarchy
needs to be updated to indicate the location of the tanks.
From the Elements Browser, right click on Elements → select New Element with <None> for
Element Template → press OK.
59 | P a g e
Navigate to the General tab and rename the element to Montreal. Check in the changes.
Select a tank with the mouse and drag and drop it while holding the Shift key on the keyboard
in order to move the element under the Montreal element so it becomes child element of that
location.
60 | P a g e
Repeat for the second tank. Check-in the changes.
Now that the location is part of the hierarchy, we would like to create a new attribute called Tank
Level Information on the Tank Template with information in a string like the following:
Tank01 is located in Montreal, level is at 99.8%
Approach
1. From the Navigator Panel, select the Library section. Open the Tank Template under
Templates → Element templates.
2. Add the Tank Level Information attribute, value type= String, Data Reference= String
Builder.
3. Use the String Builder Data Reference dialog box to construct the string:
61 | P a g e
One option to create the requested string:
Note 1: to display the level value in the requested format (one digit after the decimal
point), use the Format (real,format) function in String Builder. Format follows
Performance Equation (PE) style syntax, e.g.: "%3.1f". The number before the decimal
indicates the minimum total number of characters to output, pre-padding with blanks, the
number after the decimal indicates the number of digits to display after the decimal point.
Note 2: You can construct an expression on a single line, using semicolons to separate
its terms. But you can also place each term on its own line, which eliminates the
semicolons and makes the expression structure more apparent (see above).
4. Click on Check-In
5. Navigate to Elements in the Navigator Pane, select Tank01 in the Browser, and select
the Attributes tab. Verify the attribute string for the Tank Level Information is as expected.
If required, correct the String Builder definition. (Be careful with the use of single and
double quotes.)
62 | P a g e
Bulk edits of the AF Hierarchy
PI Builder is an add-in to Microsoft Excel allowing rapid creation and edition of AF objects and
PI points in bulk.
Open Microsoft Excel, to a blank worksheet and select the PI Builder ribbon menu. (An
activation message will appear – X out of the wizard. We have a license but due to the transient
nature of the virtual environments the license is not validated.)
In the Connections section, select the Asset Server (AF Server: PISRV01) and the AF database
(AF Startup).
Now that two tanks have been created for Montreal, we can use those as a base for creating
additional Elements.
Import the tank elements from AF. To do this, select Elements > Find Elements from the PI
Builder ribbon menu, then select the Tank Template to search and find both tanks. (Note: It
maybe necessary to clear the search by clicking the Reset button in the bottom right hand
corner.)
63 | P a g e
Make sure to search child elements (verify ‘All Descendants’=True).
64 | P a g e
Select ‘Clear All’. Some columns remain selected as they are required.
65 | P a g e
Under Element, select to import the Template configuration of the element. This is important to
bring all components of the ‘Tank’ template to the individual elements being created.
Then Navigate to the Attribute Columns. From Template ‘Tank’ select Product and Capacity.
All attributes will be copied from the template during the creation of the new elements. Product
and Capacity are static values associated with individual tanks. By adding them to the
spreadsheet, an update can be made to these attributes at the time of creation.
Click OK
66 | P a g e
Modify the Tank 01 and Tank 02 records to Tank03 and Tank 04 respectively.
Verify the Product name matches one of the valid materials from the Material Properties AF
table as shown in the table below. Update the capacity for each tank as shown below.
The records are now ready to be exported to AF; which will create two new tanks.
Click on the “Publish” button from the ribbon menu ( ). A dialog for Publishing options will
display – by default the ‘Edit Mode’ is selected. Update it to either ‘Create Only’ or ‘Create and
Edit’. In this case, my preference is to select ‘Create Only’ as I know these should not exist in
this database.
Confirm your work by going to PSE > Elements and pressing the button or the F5 key
on the keyboard.
Let’s verify the product and capacity fields are correct and the data is being updated for Tank03
and Tank04.
67 | P a g e
Attribute Traits
Attribute traits hold characteristic information for their parent attribute. These can be limits,
forecast values, geolocation information, reason codes, asset health, and analysis start triggers.
They can either be defined as a fixed value or in combination with a Data Reference such as
e.g. PI Point or Table Lookup. Attribute traits are child attributes.
Limit attribute traits: limits typically represent the expected range of a process variable.
Following limit traits are defined:
• Minimum and Maximum (very lowest/highest possible value)
• LoLo and HiHi (very low/high value for an abnormal situation, typically initiates an alarm)
• Lo and Hi (low/high value that needs attention, typically initiates a warning)
• Target (aimed-for value such as setpoint)
Forecast attribute traits: forecasts contain predicted values, which allow to compare actual
value with the parent attribute. It typically comes from a future PI point.
Location attribute traits: use location attributes to define longitude, latitude, and altitude
information for an asset. You can use this information to identify the location of the asset on a
map. Used by Integrator for ArcGIS.
Reason attribute traits: use reason attribute traits on event frames and transfers to enable
users to select a reason code for excursions, downtime, and other events. The reason attribute
trait must be an enumeration set that is previously defined, or a system enumeration set
delivered with PI AF.
Analysis start-trigger traits: When users configure analytics to generate event frames, they
can optionally elect to store the name of the start trigger in the value of an attribute (string) and
mark that attribute with the analysis start trigger trait. This enables clients like PI Vision to
indicate the start trigger that created that particular event frame.
Health attribute traits: use health attribute traits on elements and models to enable users to
set a numeric health score and a health status (for example, healthy, out of service, in
maintenance, warning, or error). The HealthStatus attribute trait uses values from the Health
Status enumeration set, which is delivered with PI AF. Administrators can modify the Health
Status enumeration set as required.
Problem Description
You would like to use attribute traits to maintain limits for the normal operation of the tanks. For
all tanks the limits are the same.
Approach
1. In the PSE Navigator, select Library and open the Tank element template.
2. Select Limits… from the context menu of the Level attribute:
68 | P a g e
3. Set the limit traits as follows and click on OK.
69 | P a g e
Use of Categories
Categories can be used to group AF objects like elements, attributes, or tables together to
facilitate the administration of those objects. To add an attribute to a category, simply select one
or more categories from the Categories field of the attribute’s Configuration Panel, or
alternatively write the category name. If that category does not exist yet, a prompt will be shown
to ask if this category should be created.
Above the configuration panel, there is a Group By selection. The attributes can be grouped by
Category or Template. In this example, if we select Template, all attributes remain together. As
you develop more involved templates, a derived template could be used and grouping by
templates will allow easy visibility of the template origins.
In this exercise our focus it to group by category.
Upon selecting category, the attributes are grouped into several categories for potentially easier
viewing/editing. In this view, product properties, tank properties and process variables are
grouped together.
Now, move back to the AF Startup Database we are creating for our Velocity Terminal plant. We
are going to add some attribute categories.
Navigate to Library > Templates > Element Templates > Tank.
Select Category to group attributes.
Currently, there are no categories for grouping attributes into any categories.
Categories can be created from Library > Categories > Attribute Categories
Using this method, we will create 3 of the 4 attribute categories we need to group our attributes.
70 | P a g e
Three additional categories to be added are Material Properties, Product Properties, and Tank
Information.
Now we will use another method of creating a category.
Navigate to Library > Templates > Element Templates > Tank > Attribute Templates tab.
Select Level from the attributes, then from the configuration panel, select the browse button on
the right end of categories.
71 | P a g e
Select New Category.
72 | P a g e
Once all categories are created, begin updating the remaining attributes configuration with the
appropriate categories.
Attribute Category
Capacity Tank Information
Density Product Properties
Level Process Variables (already completed – but can be verified)
Mass Product Properties
Product Tank Information
Tank Level Information Tank Information
Tank Name Tank Information
Volume Tank Information
After updating all the attributes with the appropriate category. Group the attributes by category.
Be sure to check-in your changes.
73 | P a g e
Discover Tag Creation
Objectives
• Create a new attribute in a template
• Use AF attributes substitution parameters.
• Demonstrate automatic tag creation.
Problem Description
A new pressure transducer has been installed on every tank at Velocity Terminals. You have to
add a pressure attribute to the tanks in your AF structure; however, the PI points have not been
created.
Velocity Terminals would like you to use a meaningful naming convention for the PI tags created
as part of this project; they would like the tags to be named something like:
Tank01.Pressure.PV
Since our company has sites globally, it is better to use International units for pressure (Bar)
Approach
Add a new attribute to the Tank template, name it Pressure, Categorize it to Process Variable
and use Bar as the default UOM.
Select PI Point as the Data Reference, and click on Settings to configure it.
Data Server defaults to %Server%.
Under Tag Name, in order to match the naming convention they want,
enter %Element%.%Attribute%.PV which results in TankXX.Pressure.PV.
In the future, as Velocity Terminal builds out additional sites, it might be necessary to include
the site/location which is represented as %..\Element%-%Element%.%Attribute%.PV results in
Montreal-TankXX.Pressure.PV
Since the tags have not been created, check Tag Creation.
Tip: You could configure the tag settings (PointSource, InstrumentTag,Location codes, etc.)
from the Tag Creation Settings dialog window or import the settings of a working tag by
selecting the ellipsis (…).
74 | P a g e
Check-In the Tank Template with the Pressure attribute added.
Now, let’s create the PI point, by right clicking on Montreal → select Create or Update Data
Reference. A window will indicate when the PI Point creation is complete, close the window.
Now, what is the value shown for the Pressure attribute for any of the Tanks?
All should show Pt Created.
Note: In this example, we took the default settings associated with PI Point creation. By default,
there is no configuration associating the PI Point to any interface for data.
75 | P a g e
Visualizing Velocity Terminal Data with PI Vision
Activity Objectives
• Create a PI Vision display with tank data (AF database: Velocity Terminals)
• Incorporate objects with current data (trend, value object, gauge)
• Incorporate a tank from the Graphic Library
• Asset swap in PI Vision displays
Note: The first time PI Vision is started can take a few minutes.
The homepage provides an overview with thumbnails of the displays, which have been
prepared for the training.
5. Select Level attribute and drag it to the display canvas on the right-hand side.
76 | P a g e
6. From within the Trend, right click to select Configure Trend. A menu will appear on the
right-hand side of the screen. From the menu, various options exist to format the trend,
values, default time range, and trace options.
7. Click on the time selector at the bottom and switch time display range to one hour.
77 | P a g e
8. Click on the Graphic Library icon . Navigate to Tanks then select a tank and drag it
to the display.
78 | P a g e
9. Navigate back to Assets , select the Value object . Drag Tank Name (from the
attribute list) to the top of the tank picture.
79 | P a g e
10. From the right mouse button menu of the Value object, select Format Value.
Uncheck Label, Units and timestamp. Change Value color to black and font size to 36.
11. Now position a value object for the Product attribute in the right bottom corner. Format in
the same manner as the Tank name with the exception of font size of 18.
80 | P a g e
12. From the object list, select the Vertical Gauge object . Drag Level to the center of the
tank picture. Use Format Gauge (by right clicking on the gauge) to change the
appearance by removing the label and value.
13. Click on the Save icon on top right corner. Save display as Velocity Terminals Tank.
81 | P a g e
15. Use the time control at the bottom to change the display ranges. Use the left arrow to
step through past time periods.
16. Another means of changing the time range is from within the trend. Switch to Read Only
by deselecting the Edit Mode . Now, position the cursor in the bottom area of the
trend and drag ( ) the cursor back and forth to switch the time range.
17. To revert to the last hour from now, click on the Now button, then select the 1h from the
time range selector.
18. Note: after you have made a modification in a display, the display name will have an
asterisk at its end to indicate there have been changes.
To save your changes, click on the Save icon . To save the modified display under
another name select Save As from the dropdown next to the Save button and save
under another name.
19. To view Saved displays, navigate Home by selecting . If the display was
saved, it should be present in the list.
82 | P a g e
Summary Lesson: Best Practices - Written
The following recommendations provide some guidelines on how to best setup your AF asset
structure based on experience from existing AF installations.
Be aware that in real life you cannot follow all these recommendations!
83 | P a g e
• Build Different Views specific for your users
(covered in Asset Framework: Beyond the
Basics)
Use element references
• Use Enumerations
Limit the choices that
can be entered in attributes
84 | P a g e