PI System Administration
PI System Administration
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved.
AVEVA, the AVEVA logos and AVEVA product names are trademarks or registered trademarks of aveva group plc or its subsidiaries
in the United Kingdom and other countries. Other brands and products names are the trademarks of their respective companies.
aveva.com
Page |i
Software Versions Used in this Document:
The list below describes the software versions used in this version of the course.
Software Version
PI Data Archive 2018 SP3 Patch 3
PI AF Server 2018 SP3 Patch 3
PI OPC interface 2.7.1.41
PI Interface for RDBMS 3.24.6.36
PI Interface for UFL 3.6.7.144
PI API 2018 Patch 2
PI System Explorer 2018 SP3 Patch 4
PI Vision 2022 Patch 1
Page |3
Table of Contents
1. PI System Basics ..................................................................................................... 5
1.1 What is a PI System? ..................................................................................... 5
1.2 A typical PI System architecture .................................................................. 7
1.3 Understanding PI Points ............................................................................... 8
1.4 Directed Activity – Search for PI Points using SMT ................................... 9
1.5 Using the Tag Search ..................................................................................10
1.6 Solo Exercise – Use the Tag Search ..........................................................11
1.7 Directed Activity – View PI Point data using PI Vision ............................12
1.8 Writing Time in the PI System ....................................................................14
2. PI Interface Management ......................................................................................20
2.1 PI Connectors and PI Adapters ..................................................................20
2.2 Understanding important IT Concepts ......................................................21
2.3 Define the role of a PI Interface ..................................................................23
2.4 Solo Exercise – Choose a PI Interface .......................................................24
2.5 Common PI Interfaces .................................................................................26
2.6 Define the components of a PI Interface ...................................................26
2.7 Define the PI Interface Configuration Utility .............................................27
2.8 Directed Activity – Manage an existing PI Interface with the PI ICU ......28
2.9 Define the relationship between PI Point Attributes and PI Interface
configuration ................................................................................................30
2.10 PI Interface installation methodology ........................................................32
2.11 Group Questions – PI Interface architecture ............................................33
2.12 Install and configure a PI Interface for OPC DA .......................................35
2.13 Troubleshooting Exercise ...........................................................................56
2.14 Digital tags ....................................................................................................56
2.15 Configuring a reliable PI Interface..............................................................59
2.16 Group Questions – Preventing data loss ..................................................59
2.17 Defining the PI Buffer Subsystem ..............................................................61
2.18 Monitor the health of the PI Interface.........................................................73
2.19 Troubleshooting Exercise ...........................................................................74
3. Data Archive Management ....................................................................................75
3.1 Define the role of the Data Archive ............................................................75
3.2 Describe the Data Archive subsystems ....................................................76
3.3 Data Flow through the Data Archive ..........................................................78
3.4 Understanding Exception and Compression ............................................87
3.5 Data Archive Files ........................................................................................94
3.6 Managing Archive Files ...............................................................................96
3.7 Manage Tuning Parameters ......................................................................102
3.8 Connections to PI Data Archive ...............................................................104
3.9 Manage Data Archive Backups.................................................................105
3.10 Troubleshooting Exercise .........................................................................111
4. Asset Framework Management ..........................................................................112
4.1 Define the role of the Asset Framework ..................................................112
4.2 Define assets and attributes .....................................................................116
4.3 PI System Explorer ....................................................................................118
4.4 Directed Activity – Organizing your PI Points into AF Assets ..............122
4.5 Solo Exercise – Building Assets from Templates using PI Builder ......125
4.6 Directed Activity – Take advantage of your asset model in PI Vision ..128
4.7 Components of PI Asset Framework .......................................................130
4.8 Data Flow when using the Asset Framework ..........................................131
4.9 AF architecture ...........................................................................................133
4.10 Manage Asset Framework Backups ........................................................133
4.11 Troubleshooting Exercise .........................................................................136
5. PI System Security Management .......................................................................137
5.1 Securing a PI System ................................................................................137
5.2 Describe the ports used for PI System communication ........................139
5.3 Authentication vs. Authorization..............................................................143
5.4 Asset Framework Security ........................................................................144
5.5 Data Archive Security ................................................................................148
6 Monitoring a PI System .......................................................................................168
6.1 Monitoring Tools ........................................................................................168
6.2 Group Questions – What should I monitor? ...........................................169
6.3 Stale and Bad Points .................................................................................171
7 Troubleshooting a PI System .............................................................................172
7.1 Message Logs ............................................................................................172
7.2 Where to look for answers ........................................................................175
8 Final Exercise.......................................................................................................176
8.1 Final Exercise – Monitor you PI System ..................................................177
8.2 Final Exercise – Import data from text files ............................................180
8.3 Final Exercise – Import data from an SQL Server ..................................183
Page |5
1. PI System Basics
Objectives
• Describe the components of the PI System
• Describe a PI Point
• Find and view PI Point data using System Management Tools
• Find and view PI Point data using PI Vision
• Explain absolute and relative time in the PI System
• Translate and create PI Time expressions.
• Explain how the Data Archive handles Times Zones and DST, and future data.
• PI Server
o Data Archive: Stores the data
o Asset Framework: Organizes and enhances the data
In this course, we will be working in a Virtual Learning Environment. Below is a diagram of our PI
System architecture:
1.3 Understanding PI Points
Any data that has a changing value over time can be collected and stored in the Data Archive.
In a process, this could be:
• The temperature in a tank
• The volumetric flow through a pump
• The speed of a propeller
These changing values all represent streams of data.
PI Points, also referred to as PI Tags, are what define the data streams stored in the Data Archive.
Whenever a PI System administrator wants to collect a new stream of data, he or she must create
a PI Point.
PI Point attributes are what define the PI Point. They have multiple different functions, including:
• Specifying how to collect data at the data source
• Defining which PI Interface is responsible for collecting the data
• Describing the data stream so users can search for it
There can be more than 50 different attributes defining a PI Point. Here are a few key attributes:
• Name: The name of the PI Point, which must be unique within the Data Archive.
• Description: A free text field attached to a PI Point, often used to enter a human friendly
description of the PI Point. For example, a temperature point might be TC365674A.pv
and the descriptor could be ‘Reactor 65 Operating Temp’. Note that PI Points are not
required to have a Description.
• Point Type: This attribute defines the type of data that is stored in the Data Archive.
• Point Source: This attribute commonly specifies which PI Interface is collecting the data
for the PI Point.
Note: We will continue our discussion of PI Point Attributes in the section “Define the
relationship between PI Point Attributes and PI Interface configuration”
Page |9
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps
at the same time. You may play a game or hold a quiz. Your instructor
will have directions.
Activity Objectives
PI System users can use a variety of different programs to interact with the PI System.
As a PI System administrator, one of the applications you will use most is “System Management
Tools”. It is used by PI System administrators for a variety of management tasks. You will learn
how to use System Management Tools (SMT) throughout the duration of the training.
In this directed activity, we will use SMT to search for PI Points and display current data for those
PI Points.
Approach
Step 6 : To remove all the PI Points from the list, use the “Remove All” button
What uses of the “Current Values” tool of SMT can you come up with, from a PI System
administrator’s perspective?
____________________________________________________________________________
____________________________________________________________________________
_________________________________________________________________________
1.5 Using the Tag Search
The Tag Search functionality is similar in all PI System programs, such as SMT and other
visualization tools. In SMT, the tag search function is used in the “Data”, “Points” and “IT Points”
tabs. Users are able to search for PI Points by specifying values for various PI Point attributes.
Here are a few tips and tricks related to using the Tag Search.
Using the PI Point Name (Tag Mask)
If your organization has a standard, convenient naming convention, or if you are very familiar with
the PI Points in your plant, then it will be very easy to search for PI Points by their name. However,
some people do not have that luxury.
Using the Descriptor
If the Descriptor attribute is always used when creating a PI Point, then the Descriptor is a good
attribute to use when searching for PI Points. The downside to searching by Descriptor is that it
can be resource intensive.
Using the Point Source
For a PI System administrator who is familiar with the PI System, searching by Point Source can
be extremely helpful, as it allows you to bring up a list of all of the points that are associated with
a specific PI Interface, and therefore a specific data source.
Wildcards
Remember that wildcards can be used in any of the above searches.
Use * to replace any number of characters like in this example:
flow* = flow_meter1, flow_meter2, flow_meter3, flowrate_pump1, flowrate_pump2
Use ? to replace one character like in this example:
flow_meter? = flow_meter1, flow_meter2, flow_meter3
Exercise Objectives
• Familiarize yourself with the Tag Search
Problem Description
As a PI System administrator, you will be using the Tag Search to answer questions about the
current state of your PI System using System Management Tools.
Approach
1. How many PI Points have been created for “Reactor 1” so far?
3. Search for all PI Points. Do we have a single naming convention for our PI Points?
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps at
the same time. You may play a game or hold a quiz. Your instructor will
have directions.
Activity Objectives
In order to learn how to administer a PI System, it is important to understand the point of view of
a PI System user. A popular PI System visualization tool is “PI Vision”. PI Vision allows users to
access PI System data through a web browser, and rapidly create ad-hoc displays to view their
data.
In this directed activity, we will be simulating the experience of a PI System user searching for the
last 12 hours of Reactor 1 temperature data using PI Vision.
Approach
As a PI System user, you want to see a trend of the temperature in Reactor 1 for the past five
hours.
Step 1 : From PISRV01, click on the “PI Vision” bookmark that you can find on the desktop.
Step 2 : On the PI Vision homepage, select the “New Display” button in the upper-right hand
corner:
Step 3 : When using PI Vision to search for PI Points, we can either use the PI Point name
or description. In the upper left-hand corner, search “reactor 1 temperature”.
Step 4 : Drag and drop the PI Point onto the display. This creates a trend symbol. Resize the
trend as needed.
P a g e | 13
Step 5 : On the lower left-hand and right-hand corners of the display, we see the start and
end times of the trend:
Click on the start time and change the text from “*-8h” to “*-12h”.
Step 6 : Click on the save icon at the top right of the display, and name your display
“Reactor 1 Temperature”
Now imagine that the Descriptor had not been filled out for this PI Point. How could the user find
the correct data? In chapter 4, we will see how a PI System administrator can build a user-friendly
PI System using the Asset Framework.
1.8 Writing Time in the PI System
The Data Archive stores data that changes with time, known as time-series data.
As we saw in the previous directed activity, when users request data from the PI System, they
need to know how to request the specific time, or time range, for the data they want to see.
• Relative Time: An expression that signifies a date and time relative to the current date
and time.
When to use it: When you want to create a dynamic view of your data, which can be
used to view data in real-time, or re-used on a periodic basis to create periodic reports.
Example: A user is creating a report that summarizes the weekly production totals. By
using relative time expressions, the user will be able to re-use this report every week.
A fixed time expression is an expression which includes a date, and optionally a time. If the time
is omitted, midnight is assumed.
Expression Meaning
23-aug-12 15:00:00 3:00 p.m. on August 23, 2012
25-sep-12 00:00:00 (midnight) on September 25, 2012
The PI System can interpret many different formats for fixed time. In the event of an ambiguous
input, the Windows Region and Language settings of the computer where the PI Visualization
Tool is installed take precedence. For example:
These expressions are used to signify a date and time relative to the current time. PI System time
expressions might include:
• Only a reference time, such as "y"
• Only a time offset, such as "+3h"
• A reference-time with a time offset, such as "y+3h"
Reference-time abbreviations
A reference-time abbreviation represents a specific time relative to the current time
* Current time.
t today 00:00:00 (midnight) of the current day
y yesterday 00:00:00 (midnight) of the previous day
sun sunday 00:00:00 (midnight) on the most recent Sunday
mon monday 00:00:00 (midnight) on the most recent Monday
tue tuesday 00:00:00 (midnight) on the most recent Tuesday
wed wednesday 00:00:00 (midnight) on the most recent Wednesday
thu thursday 00:00:00 (midnight) on the most recent Thursday
fri friday 00:00:00 (midnight) on the most recent Friday
sat saturday 00:00:00 (midnight) on the most recent Saturday
00:00:00 (midnight) on the current day and month in
YYYY
year YYYY
00:00:00 (midnight) on the Dth day of month M in the
M-D or M/D
current year
00:00:00 (midnight) on the DDth day of the current
DD
month
Time-unit abbreviations
A time-unit abbreviation represents a specific unit of time, which can be used to define an offset.
Abbreviation Time-unit
s second
m minute
h hour
d day
w week
mo month
y year
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 field where you enter the expression:
• For a start time, the reference-time is the current clock time.
• For an end time, the reference-time is the start time.
• For a single time stamp, the reference-time is the current clock time.
Rule 1. You should only include a single time offset in an expression. Including multiple offsets
can lead to unpredictable results. For example, the following time expressions should be
avoided:
*+1d+4h
t-1d+12h
Rule 2. To define a time offset you must include a valid value with any time unit. Only for
seconds, minutes or hours, you can specify a fractional value. You cannot specify fractional
values for other time units.
Rule 3. A fixed timestamp consists of the fields of Year, Month, Day and Time (hours, minutes
and seconds). If any of these fields are not specified in the PI time expression, the following
values will be assumed by default:
• If Month is not specified, then the default value would be Current Month.
• If Year is not specified, then the default value would be Current Year.
1.8.5 Group Exercise – Translate relative time expressions
Exercise Objectives
• Translate relative time expressions into their meaning
• Create relative time expressions
• Use relative time expressions in PI Vision
Problem Description
Translate the relative time expressions below into their meanings:
Expression Meaning
* - 30m
y + 8h
T
Y
Thu
Tuesday – 2d
18
y-2y
Expression Meaning
Today at 6:00 AM
Monday at 6:30 am
12 hours ago
The first day this month
The beginning of the year
7:00 am yesterday
15 minutes ago
Use your knowledge of PI System time abbreviations to trend data on your “Reactor 1
temperature” display:
1.8.6 How Does the PI System Adjust for Time Zones and DST?
Data Archive version 2015 introduced the capability of storing “future data” in the Data Archive.
Future data is data with a timestamp in the future. The Data Archive can now store data within a
time range of January 1970 through January, 2038.
How might future data be useful? For example, if you have forecasting software which predicts
the production of your plant, you can save this data in a “future” PI Point on the Data Archive. As
you collect the actual production data in another PI Point, you can compare the two in real-time.
When creating a PI Point, a “Future” attribute determines whether the PI Point is created as a
“historic” or “future” PI Point. After creation, a PI Point can never be switched from one to the
other. Therefore, you never over-write your future data with historic data, the two datasets are
always kept separate.
To request data for a future timestamp in a tool like PI Vision, you can enter the same type of
expressions as discussed in the previous sections (using fixed time, or relative time). Some
example expressions are:
Expression Meaning
Objectives
• Define the role of a PI Interface
• Select the correct PI Interface for a given data source
• Discuss the variety of architecture possibilities
• Describe the PI Interface Configuration Utility
• Create a PI Point for an existing PI Interface
• Describe PI Interface installation and configuration methodology
• Install and configure a new PI Interface for OPC DA instance
• Create a PI Point using SMT
• Create a PI Point using PI Builder
• Describe PI Buffering
• Explain data flow through the PI Interface node
• Configure and validate PI Buffering
This chapter will focus solely on PI Interfaces as they are still most common application for data
collection.
You can find examples of PI Connector installation and PI Adapter installation in our YouTube
channel.
P a g e | 21
A Windows Domain is a Windows computer network where all the users and computers are
registered in a central database, called the Active Directory. The computer on which the Active
Directory runs is called the Domain Controller.
Resources on the domain (e.g., databases) can take advantage of the Active Directory to manage
user security.
2.2.3 Port
The Windows Command Prompt is the command-line interface of a Windows Operating System.
It can be used to issue commands to the Operating System in the form of successive lines of text.
The Windows Command Prompt application name is cmd.exe.
A server or an application is the program that performs certain actions. A client is a utility to interact
with this program. For example, Google servers search the worldwide web for certain words. We
use our web browsers to request and see the results. An example from PI System is PI Data
Archive and PI System Management Tools (PI SMT). PI Data Archive is an application that
consists of several components that receives, stores and delivers data. We use PI System
Management Tools to configure PI Data Archive. We can configure PI Data Archive from a remote
machine using PI SMT.
OSIsoft has released over 450 different PI Interfaces that collect data from a wide variety of data
sources. Almost anything that generates time-series data can be a data source, including web
pages, relational databases, and other PI Systems. However, typically, data from a plant’s
process is collected from DCS, PLC and SCADA systems. All these systems can send data over
a network but do so using a wide variety of communication protocols. The PI Interface can be
thought of as a translator. It reads data from a data source and translate what it reads into a
language the Data Archive can understand.
Note: With a few exceptions, the Data Source is not designed or published by OSISoft.
No matter which PI Interface is used, here are the steps it will perform when collecting data:
Step 1 :Reads from the data source
Step 2 :Timestamps the data (or ensures the data received is stamped at the source)
Step 3 :Formats the data
Step 4 :Applies Exception filtering
Step 5 :Sends the data to the Data Archive
Note: We will continue our discussion of Exception filtering in the section “Understanding
Exception and Compression”
2.4 Solo Exercise – Choose a PI Interface
Exercise Objectives
• Select the correct PI Interface for a given data source
Problem Description
You are a PI System administrator of a brand new PI System. The plant manager gives you a list
of data sources from which he wants to collect data. For each data source, find the appropriate
PI Interface.
Werum Pas-X
Schneider PML
3710ACM
Johnson Controls
Metasys System
A web page
Approach
With over 300 active PI Interfaces to choose from, and countless possible data sources in your
plant, selecting the correct PI Interface can be a daunting task. OSIsoft provides a tool on its
Technical Support website to help PI System administrators make their choice.
Note: Sometimes, this tool will not find any PI Interface for the data source entered. However,
this does not mean that it is impossible to collect data from this source. Often, connecting to and
reading from the data source requires knowledge of the data structure and format. You will need
to use the data source manufacturer’s documentation. If you need help deciding on a PI Interface,
contact our Technical Support team through the customer portal: my.osisoft.com
2.5 Common PI Interfaces
As we saw in the previous exercise, some of our PI Interfaces are designed for a specific data
source, while others are built using standard communication protocols. Below is a list of our most
popular PI Interfaces.
1. PI Interface for OPC DA
Collects real-time data from OPC Servers using the OPC DA standard, arguably the most
common communication protocol in the industrial automation industry.
2. PI Interface for Universal File and Stream Loading (UFL)
Collects real-time, historic or future data from ASCII files (e.g. txt, csv xml files, etc.), serial
ports and POP3 email servers. The PI Interface can be configured to collect data no matter
the format of the data in the source file, making it one of our most versatile interfaces.
3. PI Interface for RDBMS
Collects real-time, historic or future data from any Relational Database Management
System that supports ODBC drivers (e.g. Microsoft SQL Server, Oracle Database, IBM
Informix, etc.)
4. PI Interface for Modbus Ethernet PLC
Collects real-time data from PLCs that use the Modbus communication protocol
5. PI to PI Interface
This PI Interface is used to send real-time, historic or future data from one Data Archive
to another. A typical application of this PI Interface is to collect data from plant-level Data
Archives to a centralized corporate Data Archive.
• PI Interface executable: This is the executable file that will run and perform the operations
to collect data from the data source.
• PI Interface instance batch file: Although the executable performs all of the operations,
it needs instructions, such as (1) which data source to collect from, (2) which Data Archive
P a g e | 27
to send to, etc. A batch file will contain all of these instructions. Since you could have
multiple data sources, you can create multiple batch files, and hence multiple instances of
the PI interface running on a single node.
• Windows Service running PI Interface instance: In order for an instance of the PI
Interface to run automatically when the computer starts, and run in the background, a
Windows Service is created.
Note: Once the PI ICU is used to configure a batch file, the contents of this file are written to a
database on the Data Archive called the “Module Database” (MDB), which stores configuration
information for the Data Archive. This allows you to recover the configuration of your PI Interface
instance. However, if a batch file is manually edited, the PI ICU will throw a warning message.
2.8 Directed Activity – Manage an existing PI Interface with the PI ICU
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps at
the same time. You may play a game or hold a quiz. Your instructor will
have directions.
Activity Objectives
On our PI System, we have an existing instance of the PI Interface for Performance Monitoring.
This interface is used to collect data from machine PIAF01 about its performance.
In this directed activity, we will familiarize ourselves with the PI ICU by loading this instance and
editing its configuration.
Approach
Step 1 : Log on to PIAF01. Run the program “PI Interface Configuration Utility”
Step 2 : In the “Interface” drop down list, select “PIPerfMon1”. Note the “Point Source” on the
General tab:
____________________
Step 3 : Log on to PISRV01. In SMT, load all of the PI Points with this Point Source under
Data > Current Values. Note the speed at which the data is updating by pressing the
“Start Updating” button
Step 4 : On PIAF01, in the PI ICU, edit scan class #1 to 1 (1 second) by right-clicking on the
scan class. Choose “Apply” and restart the interface using the restart button in
the upper-left corner of the window.
P a g e | 29
Step 5 : Return to SMT. How has your change affected the speed at which the data is
updating?
Step 6 : Return to PI ICU. Make a change to the Point Source, choose “Apply” and restart the
interface.
Step 7 : Return to SMT. How has your change affected the data, and why?
Location 1 Typically, this field is used for the interface instance ID. In
this case, the unique combination of the point source +
interface id is what links a PI Point to its PI Interface
instance.
Scan Include the PI point in the list of points to scan (always set
to ON)
.
Whenever possible, copy and paste the instrument tag information directly
Tip into SMT or PI Builder from the data source, to avoid typos.
The most common cause of new PI Points not receiving data is an incorrect configuration of the
PI Point attributes according to the data source of PI Interface instance configuration. This
problem can be diagnosed by reading the messages in the PI Message log during startup. This
will be covered later in the chapter.
For a complete list of PI Point attribute definitions, see "PI Points" in the PI
Data Archive documentation.
P a g e | 31
2.10 PI Interface installation methodology
Every time a new PI Interface needs to be used for data collection, the following PI Interface
installation methodology should be employed:
These first 8 steps are the basic steps required to start collecting data. However, a few
additional steps are needed to ensure reliable data collection in a production environment:
As we saw in the previous exercise, the data source is almost never on the same computer as
the Data Archive. That being said, there are several possible PI Interface architectures:
• Architecture A: The data source, the PI Interface and the Data Archive are all installed
on separate machines.
• Architecture B: The data source and the PI Interface are installed on the same machine.
• Architecture C: The PI Interface is installed on the Data Archive server.
As a group, discuss the advantages, disadvantages and example application for each
architecture:
C
P a g e | 35
We chose an OPC DA Server as the data source for this class because it is the most common
data source among our customers, making the PI Interface for OPC DA our most widely used
interface.
OPC DA is a standard communication protocol developed for the industrial automation industry.
As previously discussed, automation systems communicate using a wide-variety of different, often
proprietary protocols. This makes communication between different systems very difficult. To
solve this problem, multiple vendors got together and developed a series of platform-independent
standards called OPC (Open Platform Communication). OPC DA is the standard for real-time
data collection.
There are two required software components when communicating using an OPC standard: the
OPC Server and the OPC Client. The OPC Server is a software application that exposes data
from a data source in the OPC standard. The OPC Client is a software application that consumes
data from an OPC Server, and translates it to a different format. The PI Interface for OPC DA is
an OPC Client. The OPC Server is a non-OSIsoft application developed by another company.
Note: We will discuss the OPC UA standard in the chapter “PI Connector Management”.
P a g e | 37
2.12.2 Directed Activity – Install the PI Interface for OPC DA and the PI ICU
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited
to watch what the instructor is doing or perform the same steps at the same
time. You may play a game or hold a quiz. Your instructor will have
directions.
Activity Objectives
Complete steps 3 and 4 from the PI Interface installation methodology we outlined in this chapter.
Approach
Part 1 – Install the PI ICU and the PI Interface for OPC DA
Step 1 : On PIINT01, navigate to the folder C:\Class Folder\Install Kits
Step 2 : Right-click on the installation kit “PIICU_x.x.xx.xx_.exe” and select “Run as
administrator”.
Step 3 : Complete the steps in the installation wizard.
Step 4 : Repeat steps 2 and 3 with the following installation kits:
a. OPCInt_ReadOnly_x.x.x.xx_.exe
b. PIAPI-xxxx-for-Windows-Integrated-Security_x.x.x.xx_.exe
Note: The first install kit installs the Read-only version of the PI Interface for OPC DA. This version
does not have the ability to write data back to the OPC Server. The read-only version is strongly
recommended as an inherently safer technology that also simplifies compliance with security
policy.
The second install kit installs the PI API for Windows Integrated Security. Although the PI OPC
Interface comes with the PI API, this version is more secure. We will continue our discussion of
PI API security in the section “PI System Security Management”.
Part 2 – Validate that the PI Interface node can communicate with the Data Archive server over
the network
Step 1 : We will first test to see whether network packets can travel from the PI Interface node
to the Data Archive Server. On PIINT01, run the command prompt and use the ping
command to test the connectivity to PISRV01.
Step 2 : Next, we will test to see whether network packets can travel from the Data Archive
Server to the PI Interface node. On PISRV01, run the command prompt and use the
ping command to test the connectivity to PIINT01.
Step 3 : Data sent to the Data Archive uses TCP port 5450. The final test is to verify whether
that ping port is open on the Data Archive Server. On PIINT01:
a. Run the Windows Powershell application
b. Run the following command:
(new-object net.sockets.tcpclient PISRV01, 5450).connected
If port 5450 is open, you will receive the message
True
If port 5450 is blocked, you will receive an error message:
Note: We will continue our discussion of the PI API and PI SDK protocols in the section “PI System
Security Management”.
The PI System is responsible for reliably collecting and storing data. However, there is not much
the PI System can do if data is not available at the data source. This is one of the most common
issues with newly installed PI Interfaces, so it is important to validate data availability before
moving on to PI Interface configuration.
When the data source is an OPC DA Server, OSIsoft provides a tool for this step, called the PI
OPC Client Tool, which is installed with the PI Interface for OPC DA. In the section “What is an
OPC DA Server?” we explained the concepts “OPC Server” and “OPC Client”. The PI OPC Client
Tool is an OPC client published by OSIsoft, designed to allow users to view data on the OPC
Server, without collecting it.
Of course, the PI OPC Client Tool is not the only OPC Client that can be used to view data. Most
OPC Server vendors include an OPC Client with the installation of the OPC Server. It is also
recommended to test the availability of data on the OPC Server using this vendor-specific OPC
Client.
2.12.4 Solo Exercise – Using the PI OPC Client Tool
Activity Objectives
Complete step 5 from the PI Interface installation methodology we outlined in this chapter:
Step 5 : Validate that data is available on the data source for the PI
Interface to read
Approach
Part 1 – Validate that you can connect to the OPC Server
Step 1 : From PIINT01, run the program “PI OPC Client Tool”
Step 2 : In the top left corner, the field with “Localhost” is reserved for the address of the
computer node where the OPC Server is installed. Since the OPC Server is
installed locally, we will keep “Localhost” and connect by pressing the “Connect to
node” button.
Step 3 : A list of OPC Servers will appear under the “OPC Servers” field. Select
OPCSample.OpcDa20Server.1 and click on the “Connect to OPC Server” button.
Step 4 : If the connection is succesful, you should see a good server status under the
“Server Status” field. The Server Current State should be “RUNNING”
Part 2 – Validate that OPC Tags that are available on the OPC Server
Step 5 : Click the “Add Group” button . In the “Add Group” dialog, click “Create”.
“Add Selected” under the OPC Tags. They should now be in the “Added Tags”
field. Click “OK” on the lower right corner of the Window.
Note: This step does NOT add PI Points to the PI Interface, it simply adds OPC Items to the
OPC client window so we can view the data.
Step 10 : You should now have returned to the main PI OPC Client window, with the tags
you selected listed under Group1. To verify the current value of these tags, click
Note: We will use the PI OPC Client Tool again when configuring PI Points for the PI Interface for
OPC DA
2.12.5 Ensuring proper authentication and authorization of the PI Interface on the Data
Archive
The last step before configuring our PI Interface instance will be to ensure that the PI Interface:
• Has permission to connect to the Data Archive application
• Has permission to carry out its task once connected, which is to write data to the
appropriate PI Points on the Data Archive.
Although we will review PI System security in depth in a later chapter, it is important to perform a
brief overview now, in order to properly configure our PI Interface.
2.12.6 Directed Activity – Create a PI Mapping for the PI Interface for OPC DA
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited
to watch what the instructor is doing or perform the same steps at the same
time. You may play a game or hold a quiz. Your instructor will have
directions.
Exercise Objectives
Complete step 6 from the PI Interface installation methodology we outlined earlier in this chapter:
Approach
We will be creating two PI Mappings that will allow your PI Interface to connect to the Data
Archive.
OSISoft recommends using designated Windows Service Accounts to run PI System services
that communicate over a network. Before starting, you made a request to your IT department to
create a Service Account:
• PISCHOOL\svc-PIInterface (password: student)
Step 1 : Before we begin, let’s see what happens when a PI API connection is made without
the proper security.
a. From PIINT01, run the command prompt as the user “svc-PIInterface”.
i. On the taskbar, hold the “Shift” key then right-click the command prompt
and select “Run as different user”.
ii. Enter the username “PISCHOOL\svc-PIInterface” and the password
“student”
b. Navigate to the directory C:\Program Files (x86)\PIPC\bin
Hint: type “cd %pihome%\bin”
c. Run the command apisnap PISRV01. What response do you get?
Step 2 : First, we will create the PI Identity, the “access badge” our PI Interface needs to
connect to the Data Archive. Log on to PISRV01, open SMT, and navigate to
Security > Identities, Users, & Groups
a. You should be on the “PI Identities” tab. Click the “New…” button at the top
left.
b. In the “Identity” field, enter the name “PI Interfaces & PI Buffers”. Click “Create”
Step 3 : Now, we will assign permissions to the PI Identity. Navigate to Security > Database
Security.
a. Double-click on the “PIPOINT” table
b. Click “Add” and select the identity you just created, then click “OK”
c. Under “Permissions”, select both “Read” and “Write”, then click “OK”
Step 4 : Finally, we need to associate the service accounts IT created to the PI Identity we
just created. Navigate to Security > Mappings & Trusts. You should arrive on the
“Mappings” tab.
b. Click on the ellipses next to the “Windows Account” field. “From this
location” should be PISCHOOL.INT. Enter the name svc-PIInterface, and click
OK.
c. Click on the ellipses next to the “PI Identity: field. Select the PI Identity “PI
Interfaces & PI Buffers”
d. Click Create
2.12.7 Directed Activity – Configure a new instance of the PI Interface for OPC DA
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
Complete step 7 from the PI Interface installation methodology we outlined earlier in this chapter:
Approach
Step 1 : From PIINT01, Run the PI ICU
Step 2 : Select the “Create new Interface Instance from .EXE” button on the upper-left
corner of the window.
Note: Every PI Interface installation comes with an example batch file called XXX.bat_new. New
PI Interface instances can also be created by loading this example file in the PI ICU using the
“Create new Interface Instance from .BAT file” button . This default batch file includes a
common configuration, which can speed up the PI Interface configuration process. Choosing the
.EXE method allows you to fully configure the PI Interface from scratch.
b. Click the “Add a scan class” button and create a scan class with a 5 second
frequency.
As we learned earlier in the chapter, the Location4 attribute of a PI Point assigns
the point to one of the PI Interface scan classes. The scan frequency of the scan class
determines the rate at which the data is updated. The format of the scan frequency is as
follows:
hh:mm:ss.##,
hh:mm:ss.##
where the following rules apply:
• the time before the comma represents the frequency
• the time after the comma represents an offset from midnight
• hh is hours
• mm is minutes
• ss is seconds
• ## is hundredths of seconds (01 to 99).
• If hh and mm are omitted, the scan period is assumed to be in seconds. For example, a
scan frequency of 00:01:00,00:00:05 is equivalent to 60,5.
The following tables show some example of scan classes and their result:
b. Press the “View Current PI Message Log continuously” button , then hit the start
button to run the Windows Service.
c. In the PI Message Log Window, you should see the following messages:
This message means that the PI Interface was successfully able to connect to the
OPC Server
This message means that no PI Points have been created with the Point Source
of the PI Interface, so no data will be collected. This will soon change when we
add PI Points in the upcoming exercises.
The last step required for data collection is the creation of PI Points for the PI Interface. As
previously discussed, the PI Point configuration is unique to each PI Interface. This is due to the
diversity of data sources that PI Interfaces can collect from.
Often, data can be requested in multiple different ways from a single data source. This is the case
for OPC DA Servers. PI System administrators may choose to collect data in different ways for
different PI Points from the same OPC DA Server. There are four different ways to define PI
Points for the PI Interface for OPC DA:
Polled
For polled points, the PI Interface polls the OPC Server at regular intervals defined by the scan
class frequency.
Advise
For advise points (referred to as read on change in the OPC Standard), the PI Interface requests
that the OPC Server send it a new value whenever the OPC Server itself receives a new value
and updates its cache. This way, the PI Interface does not have to constantly poll the OPC Server
(less network traffic) and does not collect duplicate values from the OPC Server.
Often the Advise method of reading data is the most efficient and best
Tip performing.
Event (Trigger)
When an event point is created, it is associated with a trigger PI Point on the Data Archive (this
trigger can be any PI Point). Whenever the value of the trigger point changes, the Data Archive
informs the PI Interface, which requests that the OPC Server read directly from its data source
and send it a new value.
Output
Output points read a separate PI Point and write the value out to the data source (the PI Interface
is not being used for data collection in this case). The intention of this feature is not to take over
the control system. Customers often use the results they get from input points to perform
calculations which are written back to output points. As of version 2.6.3.5, there is a Read-Only
version of the PI Interface for OPC DA that prevents the use of output points. It is also possible
to disable this feature in the PI interface for OPC DA version earlier than 2.6.3.5
When creating PI Points for the PI Interface for OPC DA, the following rules should be applied
1. The Location3 PI Point attribute determines the PI Point Type:
Location3 Type
0 Polled or Event
1 Advise
2 Output
2.12.9 Solo Exercise – Create a PI Point for the PI Interface for OPC DA using SMT
Exercise Objectives
Begin step 8 from the PI Interface installation methodology we outlined earlier in this chapter:
You will create your first PI Point using the Point Builder tool of SMT.
Approach
Step 1 : On PISRV01, open SMT and navigate to the tool Points > Point Builder.
Step 2 : Create your first PI Point, which will store the Bearing Temperature of Pump1. You
will need to fill out the following attributes:
Attribute Value
Name Pump1.BearingTemp
Descriptor
[optional]
Eng Units
[optional] (check
the beginning of
the chapter)
Point type
Point source
Location1
Location2
Location3
Location4
Location5
Instrument Tag
Step 3 : Verify whether your newly created PI Point is getting data. It can take up to 2 minutes
for a running PI Interface to detect the new PI Point. While you are waiting, watch
the PI Message Log window on PIINT01. When the PI Point is created, you should
see the following messages:
tag Pump1.BearingTemp (XX) is added to the Interface
Hint 1: To find more information on how to configure the PI Point attributes, see "PI point
configuration for PI Interface for OPC DA" in the PI Interface for OPC DA User Guide. You can
access the documentation at these locations:
• Customer Portal: https://my.osisoft.com
• Documentation: https://docs.aveva.com
Hint 2: The Instrument Tag corresponds with the OPC Item ID. These can be viewed using the
PI OPC Client Tool, using the same procedure outlined in the directed activity “Using the PI OPC
Client Tool”.
OPC Item
IDs
“
P a g e | 53
2.12.10 Directed Activity – Create remaining PI Points for the PI Interface for OPC DA
using PI Builder
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
Complete step 8 from the PI Interface installation methodology we outlined in this chapter:
Approach
When creating PI Points for the PI Interface for OPC DA, a functionality of the PI OPC Client Tool
can be used to facilitate the PI Point creation process. OPC Items can be added to groups on the
PI OPC Client Tool. A csv file can then be generated which is specifically designed to be used to
export PI Points using PI Builder.
Step 3 : Click the “Add Group” button . In the “Add Group” dialog, click “Create”.
Step 6 : You should now have returned to the main PI OPC Client window, with the tags
you selected listed under Group1. On the toolbar at the top of the window, select
File > Save As
Step 7 : In the Save Configuration window, click on the ellipses button next to the “Enter
file Name for .csv file” field and chose the desktop as the file location
Step 8 : Change the Point Source to “OPC-PIINT01”, then select “Save”
Step 2 : Open the file with Excel. You should see the following columns in Excel:
Select(x)
Tag
instrumenttag
pointtype
location1
location2
location3
location4
location5
pointsource
The PI Point attributes instrumenttag, pointtype, location2, location5 and
pointsource have all been set correctly by the PI OPC Client Tool according to the
OPC Item that was added to the group. We now only have to make minor
modifications to this spreadsheet before publishing the PI Points to the Data
Archive.
Step 3 : We want all of our PI Points to be Advise points in scan class 1. Change “location3”
to 1 and “location4” to 1 for all PI Points
Step 4 : Change the “Tag” column to give the PI Points appropriate names.
Hint: You can use the following procedure:
i. Copy-paste the “instrumenttag” column into the “Tag” column.
ii. Select the “tag” column.
iii. Use the shortcut Ctrl+H to open the “Find and Replace” dialog.
iv. Replace the slash characters (/) with periods (.).
v. Replace the “Sample Process.” string with an empty field.
This should give you the naming convention PumpX.DataName
Step 5 : The Pump1.BearingTemp PI Point was already created. Therefore, simply remove
the “x” in the “Select(x)” column, since we will not be publishing this PI Point.
Step 6 : Browse to the PI Builder tab in the Excel ribbon. . Notice we are connected to the
default Data Archive “PISRV01”
Step 12 : Search for all of your Pump PI Points, select them and his “OK”
Step 13 : On the “Select Object Types and Column Headers”, select the “Required
Columns”, the “Description” and “engunits” columns, then “OK”
Step 14 : Edit the description and engunits column for each of the PI Points. Hint: Use copy-
paste and find-replace (Ctrl+H) to speed up the process!
Step 15 : Publish your changes. This time, select edit mode “Edit Only”.
receive 1 it means device is under maintenance. In such cases, digital states can be utilized to
make the values more user-friendly.
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps at
the same time. You may play a game or hold a quiz. Your instructor will
have directions.
Activity Objectives
We have created 5 Status tags. The meaning of these are as shown in the table above. Create a
digital state and assign these tags to it.
Approach
Step 1 : On PI System Management Tools, go to Points > Digital States. Click on the Add
button:
Step 2 : Create a new set called Pumps and assign values as shown above. Save the set.
You do not have to type anything into State column, it will be populated automatically.
Step 3 : Open Excel, go to PI Builder > PI Points and click on Find PI Points.
Step 4 : Search for Pump status tags, select all of them and click OK. How can you find all of
them using a single query?
Step 5 : We would like to change the point type and assign a new set to these tags. Therefore,
select only these columns and click OK.
Step 6 : Change the cells as shown below and publish your changes using “Edit only” mode.
Step 7 : Check the values of your status tags using Data>Current Values.
P a g e | 59
Questions
For each of the scenarios below, determine whether it is possible to avoid data loss, and
determine which OSIsoft functionality can be used to prepare for each.
Is it possible to prevent data loss: ☐ Yes ☐ No Which steps can be taken to prepare for this
scenario:____________________
Is it possible to prevent data loss: ☐ Yes ☐ No Which steps can be taken to prepare for this
scenario:_____________________
Is it possible to prevent data loss: ☐ Yes ☐ No Which steps can be taken to prepare for
this scenario:____________________
P a g e | 61
The PI Buffer subsystem is an OSIsoft application installed with every PI Interface. Once
configured, it buffers data on the PI Interface node. A good analogy for the PI Buffer Subsystem
is a reservoir.
Under normal operation, when the valve to the Data Archive is open, data simply passes through
the reservoir. When the valve closes (i.e. The Data Archive is down, or the network is down), as
the PI Interface continues to collect data, this data will start accumulating in the reservoir.
When the valve opens again (the Data Archive, or network, are restored), the data will flush out
of the reservoir and be sent to the Data Archive.
Note: There is another, older OSIsoft buffering service called the API Buffer Server. The PI Buffer
Subsystem is the best option for most environments. The API Buffer Server should only be used
if (1) the PI Server receiving the buffered data is older than version 3.4.375 and (2) the PI Interface
runs on a non-Windows platform.
2.17.2 How does the PI Buffer Subsystem work?
Note: Exception and Compression are mechanisms by which data is filtered, so that only
meaningful data is kept in the Data Archive. The PI Interface is responsible for Exception. The PI
Buffer Subsystem marks events as either Snapshot Only (i.e. get rid of this value when a new
one comes in) or To Be Archived (store this value). The Data Archive then treats the data
accordingly. We will continue our discussion of the compression algorithm in the following chapter.
P a g e | 63
Note: PI SDK and AFSDK applications write data directly into the PI Buffer subsystem’s snapshot
table, and so the first step above is skipped.
2.17.3 Directed Activity – Configure Buffering
In this part of the class you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited
to watch what the instructor is doing or perform the same steps at the same
time. You may play a game or hold a quiz. Your instructor will have
directions.
Activity Objectives
Complete step 9 from the PI Interface installation methodology we outlined in this chapter:
OSIsoft recommends using designated Windows Service Accounts to run PI System services that
communicate over the network. Before starting, you made a request to your IT department to
create a Service Account:
• PISCHOOL\svc-PIBuffer (password: student)
Approach
Part 1 – Configure the PI Buffer Subsystem
Step 1 : From PIINT01, run the PI ICU. Navigate to Tools > Buffering.
Step 2 : Select “Yes” to continue with the PI buffer subsystem configuration wizard
P a g e | 65
Step 4 : You should see the Data Archive “PISRV01” and the PI Interface name we
configured earlier. Check the box and click “Next”.
Step 5 : This step ensures that the PI Buffer Subsystem will the granted the correct security
on the Data Archive.
i. The default service account for the PI Buffer Subsystem is
NT Service\pibufss. This account has more privilege on the local computer
than is needed. Before proceeding, we will change this service account to
our dedicated domain account. Click on “Change” next to
“NT Service\pibufss”
ii. Select “Use Windows account”. Enter the account “PISCHOOL\svc-PIBuffer”
with password “student”. Click on “Next”.
P a g e | 67
iii. When you return to the security test window, the test will fail again. Why?
Because we did not create a PI Mapping. This means PI Data Archive is not
expecting the user PISCHOOL\svc-PIBuffer. We will create the PI Mapping
we need to authenticate on the Data Archive. Go to PISRV01 and create a
new PI Mapping for PISCHOOL\svc-PIBuffer
iv. Once you return to the Data Archive Security window, click “Retry”. This time
it should work because PI Data Archive is expecting this user.
Step 6 : You can now select the Buffer Queues location. For this environment set the
location to E:\OSIsoft\Buffering. If possible, it is strongly recommended to
separate the buffer queue from the OS drive in order to avoid failure on the interface
node by filling the main drive.
Step 7 : The last window will run a verification on the status of the PI Buffer Subsystem. If
there is no errors, you can exit the installation wizard.
Step 8 : Once the installation wizard completed and closed the Buffering Manager window
will open showing the status and statistics of the PI Buffer Subsystem. To re-open
this window from the PI ICU, navigate to Tools > Buffering.
Step 9 : Interface should automatically show that the buffering status is on. If not, click on
the butten below to enable buffering from the PI ICU general tab.
To buffer data from a PI Interface, the PI Buffer Subsystem must start before all the
PI Interfaces on the machine. Since both are run using Windows Services, it is
possible to configure a dependency on the PI Buffer Subsystem.
You can verify the configuration by navigating to the PI ICU > Service tab and
verifying the “Dependencies” field. The PI ICU will automatically detect if a
dependency on PIBufss is missing. Notice PIBufss is added to the interface service
dependencies when we select “yes.”
P a g e | 69
Exercise Objectives
• See the PI Buffer Subsystem in action
Problem Description
Now that you have configured the PI Buffer Subsystem, you will test it and see its
mechanism in action
Approach
Step 1 : From PISRV01, create a PI Vision display showing the data from one of your Pumps
for the last 15 minutes. Rename your display “Pump Data”.
Step 2 : From PIINT01, open the Buffering Manager and validate that the PI Buffer
Subsystem is healthy. (You can also use the pibufss -qs command from the previous
directed activity)
Step 3 : In this step, we will simulate a network disruption. On PIINT01, open command
prompt as administrator and run the command pibufss -bc stop (this manually tells
the PI Buffer Subsystem to stop sending data).
Step 4 : Watch the “events in queue” grow in the Buffering Manager or the first command
prompt dialog you opened.
Step 6 : Once a few minutes have gone by, run the command pibufss –bc start to re-establish
the connection.
Step 7 : Check the Buffering Manager and your PI Vision display once again.
P a g e | 73
OSIsoft recommends that, at minimum, the following UniInt Health Points be created:
1. Heartbeat: This PI Point indicates whether or not the interface is running. The heartbeat
point is updated continuously unless the interface is shut down or in a deadlock situation.
As long as the interface is running, the value of the point cycles incrementally from 1 to
15. The heartbeat point does not indicate whether the interface is connected to or
collecting data from a data source.
2. Device Status: This PI Point contains information about communication between the
interface and the data source. During normal operation, it contains the value GOOD,
indicating that the interface is communicating properly with the data source. Otherwise,
the point contains a string indicating status, formatted as follows:
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps at
the same time. You may play a game or hold a quiz. Your instructor will
have directions.
Activity Objectives
Complete steps 10 from the PI Interface installation methodology outlined in this
chapter.
Approach
Step 1 : On PIINT01, run PI ICU and browse to UniInt > Health Points
Step 2 : Right-click on the following Health Points and select “Create”:
a. Heartbeat
b. Device Status
c. IORate
d. Scan Class Scans Skipped.sc1
Step 3 : On PISRV01, using SMT, verify whether these Health Points are
receiving data
Note: We will continue our discussion of UniInt Health Points in the chapter “Monitoring a PI
System”.
Objectives
The Data Archive has multiple other roles, including security, licensing, and backup management.
3.2 Describe the Data Archive subsystems
The Data Archive is composed of multiple “subsystems” which manage different tasks. These
subsystems are Windows Services.
There are two ways of verifying the status of Data Archive subsystems on PISRV01:
Step 1 : Using System Management Tools:
a. Run SMT
b. Navigate to Operation > PI Services
Question
Associate the following Data Archive subsystems with their role, listed in the table below.
PI Network Manager: _____
PI Message Subsystem: _____
PI License Manager: _____
PI Update Manager: _____
PI Base Subsystem: _____
PI Snapshot Subsystem: _____
PI Archive Subsystem: _____
PI Backup Subsystem: _____
1 Stores and serves the data after it comes out of the snapshot subsystem. Data
consists of multiple time-stamped measurements for each data point. Values
represent on/off, pressures, flows, temperatures, set points, and so on.
2 Maintains the Point Database, Digital State Table, and configuration databases
for authentication. Hosts the PI Module Database.
3 Maintains license information for Data Archive and all connected applications.
4 Records status and error messages for Data Archive in a log file.
7 Stores the most recent event for each point, applies compression, sends data
to the event queue, serves snapshot events, and sends updates for client
applications to PI Update Manager.
When PI System visualization tools (e.g., PI Vision) request “snapshot” data, the data they receive
comes directly from the snapshot table, before compression is applied.
2) Event queue (pimq0000.dat): This file is very similar to the buffer queue file on the PI
Interface node, discussed in the previous chapter. During normal operation, it simply acts
as a tank through which data flows from the PI Snapshot Subsystem to the PI Archive
Subsystem. However, if there is a problem with the PI Archive subsystem (e.g. it is too
busy responding to other requests), data will start accumulating in this tank.
3) The memory write cache: This cache, which is stored in memory rather than the hard
drive, was designed to minimize the number of writes to disk, thus improving performance.
By default, the PI Archive subsystem flushes the cache every 5 minutes defined by the
tuning parameter ‘Archive_SecondsBetweenFlush’.
4) Archive files (xxx.arc): These are the files on disk where the archive data for each PI Point
is stored. We will continue our discussion of archive file management in later in this
chapter.
3.3.1 Directed Activity – Inspect Snapshot table statistics
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
Approach
There are two ways of inspecting the snapshot table statistics:
Method 1 – Using System Management Tools
Step 1 : On PISRV01, run SMT, and navigate to Operation > Snapshot and Archive Statistics
Step 2 : At the top of the page, change the radio button to show only Snapshot statistics
P a g e | 81
This command will post the snapshot table statistics every 5 seconds. The left column displays
the current statistics, and right column indicates the change in statistics since the last refresh.
Press “Ctrl + C” to exit from the snapshot statistics. Some important statistics are:
• Snapshot events: Number of events being held in the snapshot table
• Out of Order Snapshot Events: Events that have passed through the snapshot table
which were older than the current snapshot. A large number of OOO events can cause
performance issues
3.3.2 Directed Activity – Inspect Event Queue Statistics
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
Learn how to monitor the event queue:
Approach
Step 1 : From PISRV01, run the command prompt, and navigate to the folder C:\Program
Files\PI\adm
Hint: type “cd %piserver%\adm”
Step 2 : Run the command piartool –qs
This command will post the Event Queue statistics every 5 seconds. Important statistics include:
• The current event queue file name and location are printed in the first line.
• Total Event Reads and Total Event Writes: Reads and writes from the event queue file.
These numbers should be increasing by the same amount. If the reads are increasing and
the writes are not, this could indicate a problem. Contact OSIsoft technical support.
• Number of event queue files: Under normal operation, this should be 1. If the number of
reads exceeds the number of writes, the event queue will fill up, and a new event queue
file will be created. Again, this indicates a potential issue.
P a g e | 83
3.3.3 Directed Activity – Inspect the archive statistics
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps
at the same time. You may play a game or hold a quiz. Your instructor
will have directions.
Activity Objectives
Learn how to monitor archiving:
Approach
There are two ways of inspecting the archive table statistics:
Method 1 – Using System Management Tools
Step 1 : On PISRV01, run SMT, and navigate to Operation > Snapshot and Archive Statistics
Step 2 : At the top of the page, change the radio button to show only Archive statistics
P a g e | 85
This command will post the Archive statistics every 5 seconds. Important statistics include:
• Archiving Flag: This flag indicates whether data is being archived:
0: Data is not being archived
1: Only historic data is being archived
2: Only future data is being archived
3: Historic and future data is being archived
For Data Archive 2012 and earlier, a value of 1 is healthy. For Data Archive 2015 and
later, a value of 3 is healthy. An unhealthy Archiving flag indicates an issue. Contact
OSIsoft Technical Support.
• Out of Order Events: Events which are older than the last value written to the archive. A
large number of OOO events can cause performance issues for the PI Archive Subsystem.
P a g e | 87
As we’ve discussed in the previous sections, Exception and Compression are mechanisms by
which data is filtered, so that only meaningful data is kept in the Data Archive. Exception is applied
by the PI Interface, and Compression is applied by the Snapshot Subsystem.
So why do we bother with them? Why not keep all the unfiltered data in the Data Archive? Look
at the three graphs below. They show very similar information with different level of details. What
could impact our decision about the level of detail that we want to see?
You can go to our YouTube learning channel and watch the video about Exception and
Compression.
3.4.2 How does Exception work?
Exception works by removing values that are not changing with time or values whose change is
insignificant and below the instrument’s accuracy threshold. For example an interface that reads
an instrument accurate to within ±0.5, and receives the following values: 1.5, 1.7, 1.6, 1.5, will
only store the 1.5 value and show a straight line after that, because all changes were below the
instrument’s accuracy threshold, and can therefore be considered noise.
The exception mechanism uses a simple deadband algorithm to determine whether to
send events to the Data Archive. For each PI Point, the following PI Point attributes
determine the deadband:
1) ExcDev (or ExcDevPercent) determines how much a point's value needs to change
before the PI Interface sends it to the Data Archive
2) ExcMax sets a limit on how long the PI Interface can go without reporting a value to
Data Archive. After the ExcMax time period, the PI Interface sends the next new value to
Data Archive, regardless of whether the new value is different from the last reported
value
3) ExcMin sets a limit on how frequently the interface can report values. For example, if
you want the interface to wait a full ten minutes before reporting a new value to Data
Archive, then you would set the ExcMin attribute to 600 seconds.
ExcMax
Temperature
C ExcDev
A
D E
B
ExcDev
Time
In the illustration above, which values will be sent to the Data Archive?
Answer:
P a g e | 89
B
Temperature
A
C
Time
Of the two trend lines you just drew, which trend is more accurate?
3.4.3 How does compression work?
Compression works by removing data that is not meaningful, i.e. data that is not
required to accurately reproduce the original data from the data source in a trend.
But isn’t everything meaningful?
Not necessarily. For example, consider the following simplified illustration. Which
values would you require to accurately represent the data over time?
CompDev
E
CompDev
D
F
Temperature
CompMax
Time
In the above illustration, which value(s) will be sent to the PI Server?
Answer:
Compression is determined by the following PI Point attributes:
CompDev or CompDevPercent determine how much a point's value needs to change
for Data Archive to save it.
CompMin and CompMax control how often Data Archive saves a new value for a
particular point. (This is similar to the ExcMin and ExcMax attributes in exception
reporting.)
https://customers.osisoft.com/s/knowledgearticle?knowledgeArticleUrl=KB00699
Often you will experience a situation where one of the following conditions will be true:
You are watching a trend and you can see many values, but when the trend is, refreshed most of
them disappear.
Before:
After:
This is completely normal behavior and what you are witnessing is the results of compression
being applied. In this case, the ProcessBook trend is receiving updates from the snapshot table.
However, it only keeps these snapshot values in its local cache for a short period of time. When
the trend is refreshed, ProcessBook must query the Data Archive again, and receives data directly
from the archive files, where compression has been applied.
Question
Determine a strategy for setting Exception and Compression settings for your PI Points.
What would be appropriate for your PI System?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
_____________________________________________________________
3.5 Data Archive Files
You may have noticed that, when using PI System command line utilities, and when opening PI
System files, we have used two directories:
• PIPC (environment variable %pihome%): This is the directory where all PI System
clients are installed. PI System clients are applications that connect to the Data Archive
(PI Interfaces, visualization tools, etc.). There is a 32-bit PIPC folder for 32-bit applications,
and a 64-bit PIPC folder for 64-bit applications (%pihome64%)
• PI (environment variable %piserver%): This is the directory where the Data Archive is
installed, and where all Data Archive files and utilities reside.
Approach
Examine the directories under the C:\Program Files\PI folder:
Questions
1. Where are the start and stop files for the Data Archive? _______________________
2. Where is the license file? ___________________
3. Where is piartool.exe? ______________________
P a g e | 95
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps at
the same time. You may play a game or hold a quiz. Your instructor will
have directions.
Activity Objectives
Learn how to properly start and stop the Data Archive
Approach
Part 1 – Stop the Data Archive
Step 1 : On PISRV01, run Windows Explorer.
Step 2 : Navigate to the C:\Program Files\PI\adm folder.
Step 3 : Find the file pisrvstop.bat. Right-click on this file and select “Run as administrator”.
Step 4 : In the command line window that has opened, observe how each subsystem is shut
down in a specific order. If the server is restarted without running this file, the
subsystems might not shut down in the right order. It is good practice to always use
this file to stop the Data Archive before restarting the server.
Note: You might also notice that the file pisrvsitestop.bat is invoked at the beginning of the
script. It is recommended never to edit the pisrvstop.bat file directly. You can add additional
commands in the pisrvsitestop.bat file instead.
Step 5 : Go to PIINT01 and open Buffering Manager. Buffering should show a warning and
the “events in queue” should increase.
To speed up the process, create “Data Archive Start” and “Data Archive
Tip Stop” icons on your computer desktop pointing to the appropriate batch file.
3.6 Managing Archive Files
In this chapter, we learned how data flows through the Data Archive, and eventually ends up in
files called “archive files”. One of the important tasks of a PI System Administrator is to properly
manage these files.
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps
at the same time. You may play a game or hold a quiz. Your instructor
will have directions.
Activity Objectives
Learn how to use System Management Tools to browse your archive files
Approach
Step 1 : On PISRV01, run SMT
Step 2 : Browse to Operations > Archives. Notice that you have two tabs: Historic and Future
P a g e | 97
Historic vs Future
Since the introduction of Data Archive 2015, two different types of archive files are available:
historic archives and future archives. Historic archives store data for non-future PI Points, while
future archives store data for future PI Points. Only future archive files (and thus future PI Points)
can accept data which is more than 10 minutes in the future.
Data in future archives is never mixed or interchanged with data in historic archives. When time
passes and future data moves into the past, it is still stored in the same future archives.
Step 3 : Right-click on one of the historic archive files and select “Properties”. Fill out the
properties below:
Type: ___________________________
State: ___________________________
Status: __________________________
Step 4 : Right-click on one of the future archive files and select “Properties”. Fill out the
properties below:
Type: ___________________________
State: ___________________________
Status: __________________________
Registered vs Unregistered
In order for the Data Archive to access the data in an archive, the archive must be registered
(often referred to as “mounted” in other systems). Archive files can be registered and unregistered
using System Management Tools. The registered archives can be located on any drive available
to the Data Archive, as long as there is enough bandwidth to retrieve data.
The Primary Archive should always live on the Data Archive. Older “full”
Tip archive files are used less frequently and can be migrated to a storage
device.
Step 5 : Take note of the archive file directories for the historic and future archives. In
windows explorer, browse to the location of this file. You will notice that each
archive file is accompanied by a second file with the file extension .ann.
When formulating an archiving strategy, the following best practices should be followed:
Archive sizing
Versions of the Data Archive prior to Data Archive 2012 had a default historic archive size of
256MB. Since the release of Data Archive 2012, the default historic archive size is determined
automatically on installation. The following strategy is used to determine the archive size, and is
the official recommendation
• (Physical Memory in MB) ÷ 3 OR 3 × (Licensed Point Count)/1024 MB (whichever is
smaller)
• Rounded down to nearest power of 2
• No less than 256MB, and no more than 10,240MB
After the original installation, during automatic archive file creation, the size of the new primary
archive file will be identical to the current primary archive. The tuning parameter
Archive_AutoArchiveFileSize can be used to change the archive file size for the next archive
shift.
Additional recommendations
OSIsoft also recommends the creation of 2 empty historic archive files.
P a g e | 101
Exercise Objectives
Learn how to change the archiving parameters using SMT
Problem Description
You were just given the role of PI System Administrator at your company. The PI System at your
company was installed a long time ago, and was recently upgraded. After reviewing the current
archiving configuration in place, you decide to make the following changes:
1. Currently, the historic archive files are stored on the C drive. You decide to move these to
a new dedicated drive (E:\).
2. Currently, the archive file size is set to the default of older versions of the Data Archive,
256MB. For new archives, change this file size 512 MB
3. Create 2 empty archives for emergencies.
Try to devise a strategy to accomplish these tasks on your own, before using the Step-by-step
approach below.
Approach
Part 1 – Changing the default auto-archive settings
Step 1 : Run SMT. Navigate to Operation > Tuning Parameters > Archive Tab
Step 2 : Change the value of Archive_AutoArchiveFileRoot to E:\PIArchives\PISRV01
Step 3 : Change the value of Archive_AutoArchiveFileSize to 512 MB
Step 4 : Force an archive shift. Navigate to Operation > Archives. Press the “Force an archive
shift” button
Step 5 : On PISRV01, open a command prompt and navigate to the “C:\Program
Files\PI\adm” directory. Run piartool –al to see the progress of archive shift
Step 6 : Make sure your new archive was created automatically with the correct name, size
and location
Part 2 – Move the existing archives to the new location
Step 7 : In SMT, navigate to the Operation > Archives. On the “Historic” tab, select all the
archives that are located in the C:\PI\arc directory
Step 8 : Unregister the archives using the “Unregister selected archive” button . Note:
Unregistered archive will still show up in SMT until you click the refresh button .
Step 9 : Now that the archive files are unregistered, we can move them to the new location.
Copy-paste the archive files to E:\PIArchives. Whenever moving archive files (.arc),
ensure to move the corresponding annotation files (.ann)
Step 10 : Since we just copied the file, the account running the PI Archive Subsystem does
not have correct access to it. We can give access using the file properties. But we
need to do this for each file and we need to know what the minimum access to
provide is. Instead, we can use a command that will give correct access to all the
accounts on all the relevant folders.
a. Run the command prompt as administrator. Navigate to the directory C:\Program
Files\PI\adm. Hint: type “cd %piserver%\adm”
b. Run the following command:
pidiag -updateFolderSecurity
Step 11 : Back in SMT, press the “Register an archive” button . Select all of the archives
that you moved.
Part 3 – Create empty archives
Step 12 : In SMT, navigate to the Operation > Archives. Press the “Create a new archive”
button .
Step 13 : Create two empty archives with no defined start time or end time
Questions
For the tuning parameters below, answer the following questions:
• What is the purpose of this tuning parameter?
• What are the defaults?
• Under what conditions do you think you would have to alter the values?
• What considerations would you have in resetting this?
1. EnableAudit
2. Archive_LowDiskSpaceMB
3. Snapshot_EventQueuePath
Exercise Objectives
OSISoft recommends using PI Mappings instead of PI Trusts. Therefore, we would like to find
all the application that use PI Trusts. We will see how to move from PI Trusts to PI Mappings in
the PI Security chapter.
Approach
Step 1 : From PISRV01, open PI SMT and go to Operations > Network Manager Statistics.
Step 2 : Using the column Trusts, find all the applications that are using PI Trusts. Note them
down
Application(s):______________________________________________________________
Trust name(s): _____________________________________________________________
IP(s):_____________________________________________________________________
Two of these connections are from PISRV01. Do you know what are these applications? If not,
ask your instructor.
Given our new insights, it is now possible to imagine all the ways our Data Archive might be in
danger.
3.9.1 Group Activity – Why backup?
Activity Objectives
Describe the importance of data backups
Questions
Your instructor will give you a couple of minutes. Document below:
• Scenarios that you can think of where you would need a backup of your data
• The types of data you feel would be critical
• Some elements of a disaster recovery plan that are key
Your instructor will then lead a discussion on your answers.
The Data Archive has a service called the PI Backup Subsystem. This service can be used to
create a local “backup” of specific Data Archive files.
OSIsoft recommends that you perform nightly backups of your Data Archive, using the two-step
backup strategy:
The two-step backup
The Data Archive files are copied to a local “PI Backup” folder. This folder is then copied to an
external storage device, usually using a 3rd party application.
P a g e | 107
Note: There are two other possible backup strategies which are not officially recommended or
supported by OSIsoft:
1. Taking a direct VSS backup of the Data Archive Server using 3rd party backup
software
2. If the Data Archive is running on a Virtual Machine, taking a child VM snapshot
If your company choses to implement either of these two alternatives, you will be responsible for
validating your backup and restore procedures. Neither method should be selected without
conducting extremely thorough testing and verification. For more information on the potential
pitfalls of these backup strategies, please consult
https://customers.osisoft.com/s/knowledgearticle?knowledgeArticleUrl=KB00659.
Note: If the AF Database is installed on the Data Archive, on a SQL Server Express edition, the
AF Database (PIFD) is also backed up. We will continue our discussion of AF Server backups in
the following chapter.
The PI Backup subsystem takes incremental backups of the Data Archive. This means that,
when a backup is performed, only files which have been modified since the last backup are copied
to the PI Backup directory. Thus, resources are not wasted on overwriting files which have not
changed.
2. Set up a daily Windows Scheduled Task that runs the incremental Data Archive
backup to the same PI Backup folder.
b. Take a backup of the entire Data Archive server using a third party software
Note: For new installations of the Data Archive, the first incremental backup is a full backup.
Therefore, step 1 is not necessary. For upgraded or moved Data Archives, step 1 is necessary.
P a g e | 109
Exercise Objectives
Configure a daily backup of the Data Archive
Approach
Part 1 – Establish a baseline backup
Step 3 : From PISRV01, run the command prompt. Navigate to the directory C:\Program
Files\PI\adm. Hint: type “cd %piserver%\adm”
Step 4 : Run the following command:
piartool -backup E:\PIBackup -type FULL -arcdir
Step 5 : Validate that the PI Backup worked.
a. Open the E:\PIBackup folder.
i. Look at the files that were copied
b. Run SMT. Navigate to Operation > Backups. Take note of the type and status of
the backup.
Note: It is also possible to track your backups using PI Performance Monitor points. OSIsoft
recommends that you monitor the following Windows performance counters for PI Backup
Subsystem:
Last Backup Failed: Will be 1 if the last backup failed; otherwise, it will be 0.
Backups Started: Should increase by 1 every night if you have a nightly backup task installed.
Note that if the pisitebackup.bat or a third-party backup of your backup directory fails, this will
not be reflected in the Performance Counters.
P a g e | 111
A Data Archive Backup can be restored to an existing Data Archive, or to a brand-new computer.
Common reasons for restoring a backup include:
• Recovering from a server hardware failure
• Establishing a development server based on a production server
• Moving the Data Archive to a new server
Do not hesitate to contact OSIsoft Technical Support for assistance during this process.
For specific steps on how to restore a Data Archive see "Restore a backup
to an existing Data Archive" or “Restore a Data Archive backup to a new
computer” in PI Server 2018 SP3 User Guide.
Objectives
This is where the Asset Framework comes in. It presents PI System users with an alternative,
human friendly view of the data. The data is organized such a way that a brand new PI System
user can instantly recognize their process, and easily find the data they are looking for.
Enhancing the data
The only type of PI System data we’ve talked about so far is time-series data, i.e. data that
changes often with time. However, there is a lot of static data that can be important for data
consumers to access, such as:
• Material properties
• Manufacturer information
• Geographical information
This static data might be sitting in various Excel spreadsheets, relational databases, websites,
etc. Normally, it would be a pain for users to hunt down and gather this data in one place.
Once again, this is where the Asset Framework comes it. This static data can be made readily
available to PI System users in an organized, human friendly view, by importing or linking the data
to the Asset Framework.
P a g e | 115
Some users might not be satisfied with raw (static and time-series) data. Often, the raw data
needs to be manipulated in order to make it meaningful. Here are a few examples:
• From raw voltage and current measurements, an engineer at a Transmission &
Distribution company might want to view a list of all trips, disturbances and outages.
• From raw flowmeter and tank sensor data, a Chief Operations Officer might want to see
the production totals for each of his plants, in real-time.
• From raw stack emission measurements, a plant manager might want to be notified
automatically when environmental regulations are being broken.
Each of these requests can be met using PI System functionality build on top of the Asset
Framework.
4.2 Define assets and attributes
As its name implies, the Asset Framework is made up of a framework of assets. So what is an
asset?
An asset is a logical or physical component of a process, under which data can be grouped. In
the Data Archive, we have PI Points for which we are collecting streams of data. For example, we
might be collecting:
• The temperature of a tank
• The speed of the tank’s agitator
• The level of the tank
In the Data Archive, there is no relationship between these individual PI Points, even though, in
reality, they are all related to the same piece of equipment. In the Asset Framework, these streams
of data can be grouped under a “Tank” asset. These data streams are referred to as “attributes”
of the tank asset, and are linked to the PI Point where the data is collected.
The assets in the Asset Framework are organized in a hierarchy. Continuing from our previous
example, our tank asset might belong to one of our plants, the Montreal plant. We could therefore
create an asset for the Montreal plant, and one of the Montreal plant’s child assets would be the
tank above. In this case, the “Montreal” asset is a logical component of our process.
P a g e | 117
So what benefit do we get from organizing our data into a hierarchy of assets?
1. A human friendly view of the data
As we saw in the previous chapter, the data is now organized, which makes it easy for us
to find, understand and consume.
2. The relationships between assets provide additional opportunities
By defining the relationship between the Montreal asset and the equipment that belongs
to the Montreal plant, we can extract additional information for the data. For example, if
for each piece of equipment, we are collecting the power consumption, we can easily
obtain the total power consumption of our Montreal plant.
3. A way to compare similar assets
If I have multiple plant assets in my asset framework, I can compare the power
consumption for each plant. If I create a report analyzing my tank performance, I can apply
this same report to all of my tanks. As we will see later in this chapter, the use of templates
when creating similar assets makes our work reusable and scalable.
In Asset Framework terminology, an “asset” and an “element” are synonyms.
Note: Before the release of the Asset Framework, a Data Archive component called the
“Module Database” (MDB) was used to create asset hierarchies under which PI Points could be
organized. The MDB still exists, and continues to store configuration information for several PI
System applications, such as the PI Interface Configuration Utility.
Some applications also continue to use the asset hierarchy built in the MDB, such as PI ACE
and PI Batch. In order to continue using these applications, while also taking advantage of the
Asset Framework, the Data Archive provides a mechanism for synchronizing the Module
Database with the Asset Framework. For more information, consult the PI MDB to AF 2015
Transition Guide.
4.3 PI System Explorer
PI System Explorer, or sometimes referred to as PSE or AF Client, is the AF user interface that
allows users to view and configure the asset hierarchy. It also has a rich range of features, making
it the configuration and management tool for AF, PI Notifications, PI Event Frames and Asset
Analytics.
The major components of the PSE are shown in the following:
the PI Notifications feature is installed, MyPI, Notifications, and Contacts also appear in 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 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:
• Elements: Elements (or assets) can be organized in several hierarchies. Users can drill
down the element hierarchy to find the element of interest.
• Event Frames: An event frame is any event, defined by a start time, an end time and a
context. Event Frames can represent downtime events, process and environmental
excursions, batch processing steps or any other events important to your organization.
• Library: This is a collection of objects that can be re-used throughout the AF hierarchy.
Types of objects that appear in the Library include Categories, Element Templates,
Enumeration Sets, Reference Types, and Tables.
• Units of Measure (UOM): The UOM database provides automatic handling of simple
conversions between units of measure for attributes of the same UOM class.
• Analyses: This section provides a summary of all analyses (e.g. calculations) configured
on the current AF database. It allows you to perform administrative tasks like starting,
stopping and backfilling analyses.
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.
Configuration Panel
This panel is used to configure properties associated with attributes such as attribute references,
UOM and values for static attributes.
Viewer
This is the primary work area. Use it to create and edit elements, attributes, templates, tables,
contacts, notifications, analyses, and so forth. When configuring attributes through the Viewer,
the Configuration Panel comes into view allowing you to make configuration changes.
For more information see Using PI System Explorer (PI System Explorer
User Guide).
4.3.1 Connecting to a AF Server to view the Element Hierarchy
AF stores the asset framework objects (elements, templates, and so on) in AF databases. You
can have multiple AF databases in AF, although you can connect to only one at a time. In PSE,
you can see which AF server you are connected to and its list of databases by selecting the
Database button in the upper left corner.
The Select Database dialog box will appear and show you which AF server you are connected to
(the drop down along the top).
Once connected to the desired AF server, you can select the database from associated databases
list.
P a g e | 121
You are invited to watch what the instructor is doing or perform the same steps
at the same time to explore the different concepts presented in this chapter or
section.
Problem Description
A data reference is a mechanism that allows you to get an AF attribute value from external data.
Using PSE, let’s identify the types of data references available for AF attributes.
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
• Create a database in AF
• Create an element in AF
• Create a child element in AF
• Create PI Point data reference attributes in AF
• Convert an existing element to an element template
Problem Description
You have a set of pumps connected to your PI OPC Server and generating data. (You have
already configured the PI points for these pumps).
You will create an AF hierarchy for these pumps, and link your PI points to the corresponding AF
attributes.
Approach
Step 1. On PISRV01 or PIAF01, run PI System Explorer
Step 2. Go to the Select Database dialog.
Step 3. Select the database ‘Pump Assets’ and click ‘OK’
Step 4. In the bottom left corner, make sure you have selected ‘Elements’.
Step 5. On the ‘Elements’ symbol, right-click and choose ‘New” > ‘New Element’.
Step 6. Click ‘Ok’ on the dialog that appears.
Step 7. In the ‘General’ tab of the element you just selected, change the name to ‘Pumps’.
Step 8. In the left pane, right-click on ‘Pumps’ and choose ‘New Child Element’.
Step 9. In the ‘General’ tab of the new element, change the name to ‘Pump1’.
Step 10. While clicked on ‘Pump1’ in the left pane, choose the ‘Attributes’ tab.
Step 11. Right-click on ‘Pump1’ in the left pane, and choose ‘New’ > ‘New Attribute’.
Step 12. Name the attribute: BearingTemp and click ‘OK’
Step 13. In the right-pane, change the Default UOM to ‘degree Celsius’, and change the
Data Reference to PI Point.
Step 14. Click the ‘Settings’ button below the data reference.
P a g e | 123
Step 15. Choose the magnifying glass next to Tag Name and do a search for your Pump1
Bearing Temperature point. Select this point and click ‘Ok’.
Step 16. Click the green check mark at the top to save your work, your current PI System
Explorer screen should look similar to the figure below.
Step 17. Add five more attributes and name them: OilPressure (UOM=kPa), Status
(UOM=none, pay attention to the pop-up when you select the tag Pump1.Status),
OutputFlowRate (UOM=m3/h), FlowRate (UOM=m3/h) and PumpSpeed
(UOM=rpm). Link these five attributes to their corresponding Pump1 points.
Step 18. When you are finished creating these elements, click on the ‘Check-In’ button
above . On the dialog that appears choose ‘Check-In’. Your structure
will be similar to the figure below.
Step 19. Now that you have the Pump1 element complete, right-click on ‘Pump1’ and
choose Convert > Convert to Template.
To make the template more applicable to other pumps, we are going to use
substitution parameters within the point name reference.
Step 20. In the Substituted field, replace the substitution parameters according to the
naming convention of your pump PI points. As an example, for the point
Pump1.BearingTemp, I can use the fact that the name of my element is Pump1
and the name of my attribute is BearingTemp thus %Element%.%Attribute%.
When applied to an element, it will replace the ‘%Element% field with the value in
the element name and the %Attribute% by the attribute name.
We will see this happen when we do some bulk creation of attributes.
P a g e | 125
Exercise Objectives
• Create an element using a pre-configured template in PI System Explorer
• Create an element using a pre-configured template in PI Builder
Problem Description
In a previous exercise, you created Pump1, and created a template for your pump
assets. Now, let’s see how this template can be used when creating the remaining
pumps.
Approach
Method 1 – Using PI System Explorer
Step 1. Run PI System Explorer and go to your ‘Pump Assets’ database.
Step 2. In the Elements section, right click on ‘Pumps’ and choose ‘New’ >‘New Child
Element’.
Step 3. Choose the ‘Pump Template’ and click ‘OK’.
Step 4. An element with the name “Pump2” should have been created. If not, change the
name of the element to “Pump2”
Step 5. Verify the attributes of Pump2. They should have automatically been populate and
linked to the ‘Pump2’ PI Points.
Step 8. Click on the arrow below ‘Elements’ in the ‘Retrieve’ section and choose ‘Browse
Elements’.
Step 9. Choose ‘Pump2’.
Step 10. Clear all the checks and then select Template, under Element. Then select ‘OK’.
Step 11. Copy the imported rows 2 times so you have 3 rows populated.
Step 12. In the first row, change ‘Pump2’ to ‘Pump3’, in the second row change ‘Pump2’ to
‘Pump4’, and in the third row change ‘Pump2’ to ‘Pump5’. Your resulting
spreadsheet should look like this:
Step 13. Make sure the ‘Selected(x)’ column has an ‘x’ for all three rows.
P a g e | 127
In this part of the class, you will perform a learning activity to explore
the different concepts presented in this chapter or section. You may be
invited to watch what the instructor is doing or perform the same steps
at the same time. You may play a game or hold a quiz. Your instructor
will have directions.
Activity Objectives
• Create a pump display using PI Vision, which takes advantage of the pump database
you built in the previous exercise
Approach
Now that your pump data has been organized in the Asset Framework, you can create a display
which takes advantage of the contextual data you have provided.
Step 1 : From PISRV01, open the web browser “Edge”.
Step 3 : On the PI Vision homepage, select the “New Display” button in the upper-right hand
corner.
Step 4 : In the asset pane in the top-left hand corner, Drill down into your “Pump assets”
database using the arrow
Step 6 : Make sure the trend symbol is selected . Drag and drop both the Bearing
Temperature and Pump Speed attributes.
P a g e | 129
Step 7 : Select the radial gauge symbol . Drag and drop the Oil Pressure.
Step 8 : Select the value symbol . Drag and drop the Status.
Step 10 : At the top of the display, you will find a drop-down menu with “Pump 1”. Select a
different pump from the menu. Notice how the data on your display changes to reflect
the pump selected in the drop-down menu.
4.7 Components of PI Asset Framework
The Asset Framework is made up of the following software components:
• The AF Application Service (a Windows Service)
• The PIFD Database (a Microsoft SQL Server database)
These components do not need to be installed on the same computer. The PIFD database must
be installed on a computer which hosts a Microsoft SQL Server. SQL Server Express editions are
supported.
Applications communicate with the Asset Framework by making requests to the AF Application
Service using AFSDK. The AF Application Service then retrieves information stored in the PIFD
Database, and sends it back to the AF Client.
Given that PIFD is a SQL Database, the majority of the maintenance tasks are typical SQL Server
Administrator tasks. Most large enterprises will have database administrators, and it will be their
job to manage the PIFD database. However, for smaller PI System implementations, it is possible
that no PI System administrators have prior SQL knowledge. There are SQL Server administration
classes offered by Microsoft and a very large number of certified organizations.
A good place to begin would be by visiting the Microsoft SQL Server Learning Center at:
https://www.microsoft.com/en-ca/server-cloud/support/learning-center/learning-center.aspx
In the rest of this chapter, we will cover important Asset Framework administration tasks.
Do not make changes to the PIFD database manually using any sort of SQL
Tip management or scripting tool.
P a g e | 131
C. Table lookup data reference (when the table is stored in a separate relational database)
For data references of type “Table Lookup”, the data is stored in a table. If this table is
imported into the Asset Framework, a single connection is made (see scenario A).
However, the table might be linked to a separate database. If this is the case, the AF
Application Service will make the request to this external database directly, and return the
result to the PI Visualization Tool. Thus, the AF Application Service needs read access to
the data on the external database. If you also want to restrict access to the data based on
the end-users credentials, Kerberos Delegation must also be configured. We will continue
our discussion on security in the next chapter.
P a g e | 133
4.9 AF architecture
The Data Archive, the AF Application Service and the SQL Server (hosting the PIFD database)
can all be installed on the same server, or on different servers. The choice of architecture will
depend primarily on the size of the implementation. Below are a few examples of common
architectures:
A. Small PI System
For systems with few assets (10,000 or less) and low-to-moderate number of PI
Points (25,000 or fewer), the recommended architecture is a single server hosting
the Data Archive, the AF Application service and a SQL Server Express.
All of the changes made to the Asset Framework since the original installation are contained within
the PIFD database. Therefore, the PIFD database is the only file which needs to be backed up.
The specific backup mechanism will depend on the AF architecture, as well as the SQL Server
edition.
A. SQL Server Express edition
For SQL Server Express editions, the PIFD database is backed up by a script called
afbackup.bat (located under the %pihome64%\AF\sql directory).
The default name of a SQL Server Express instance is .\sqlexpress. If your SQL Server
instance is named differently, you will have to manually edit the afbackup.bat script.
Under the "SET SQLINSTANCE" line, enter the name of the instance (e.g. SET
SQLINSTANCE=.\mysqlserver)
Non-Express editions of the SQL Server come with the SQL Server Agent, a Windows
Service that executes scheduled administration tasks, or “jobs”. In this case, AF will
automatically install and schedule a nightly backup job at 3:15 AM.
The nightly backup job should be modified to change the backup directory to a separate
physical volume. The default path is the Backup folder where SQL Server is installed
4.10.2 (Optional) Solo Exercise – Manage the AF Backup
Activity Objectives
• Review the AF Backup configuration
• Change the default directory of the AF Backup
• Run a AF Backup
Approach
Step 1. On PIAF01, create a new folder in C:\\PIBackup\AF and give
‘NT Service\SQLSERVERAgent’ write access to it.
Step 2. Run the program “SQL Server Management Studio”
Step 3. Connect to SQL Server instance PIAF01
Step 4. This is a SQL Server Enterprise edition. Therefore, the backup is being performed
by the SQL Server Agent as a job. In the object explorer, expand “SQL Server Agent”
then “Jobs”
Step 5. Right click on the job “OSIsoft Backup (PIFD)” and select “Properties”.
Step 6. On the General tab, verify the last time the job was executed: _______________
Step 7. On the Steps tab, select the “Backup” step and click “Edit”
Step 8. Change the output path of the PIFD backup. We want to backup this database to
C:\PIBackup\AF\
Hint: You will need to change the end of the command to
@outpath = N'C:\PIBackup\AF\';
Step 9. Close the Job Properties window.
Step 10. Right click on the job “OSIsoft Backup (PIFD)” and select “Start Job at Step…”
Step 11. Once the backup job completes successfully, verify that the backup file: $$PIFD.bak
exists in the directory.
Objectives:
Note: AF Mappings were introduced in AF version 2015. Previously, authorization was assigned
directly on active directory users and groups.
P a g e | 139
The following table lists the ports used for communication with PI System applications
Port From To
Note: The ports listed above are used for PI System process data and configuration data flows.
Infrastructure such as AD authentication and backend database connections may require
additional ports. For an exhaustive list of ports, refer to KB01162 – Firewall Port Requirements.
P a g e | 141
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
Approach
Step 1. On PISRV01, in PI Vision, open your “Pump Overview” display
Step 2. On PIINT01, run your PI Message Logs.
Hint: Run the PI ICU and click on the “View current PI Message Log continuously”
button .
Step 3. On PISRV01, run the program “Windows Defender Firewall”
Step 4. You should see that all firewalls (Domain, Private and Public) are off. We will enable
all three Firewalls.
a. On the left menu, click on “Turn Windows Defender Firewall on or off”
b. Change the Firewall state to “On”. Inbound connections should be blocked by
default.
Step 5. Watch what happens on your “Pump Overview” display. What has happened to your
data?
Step 6. Validate your hypothesis. On PIINT01:
a. Check the PI Message Logs. Is your PI Interface throwing an error?
b. Run the Windows Powershell application
c. Run the following commands:
(new-object net.sockets.tcpclient PISRV01, 5450).connected
Step 7. On PISRV01, in the application Windows Defender Firewall, click on Advanced
settings in the left menu, select “Inbound Rules”
AF version 2.7 and later uses a security model like the one used in Data Archive. This model
relies on integrated Windows security for authentication but provides its own authorization to AF
objects using AF Identities and mapping.
AF identities control read, write, delete and various other permission on AF components. Each
AF object (shown in the illustration below) has an associated security descriptor as well as a type
(Elements, Notifications, etc.). Each object of the same type belongs to a collection. Finally, each
collection has an associated security descriptor that contains access permission information.
Security descriptors for some collections are configured for the entire server (Contacts, identities,
Mappings, etc.) while others can be configured for specific databases (Elements, Event Frames,
Notifications, etc.).
P a g e | 145
Note: A user MUST HAVE read permission on an AF database to be able to read any object
within it. Same principle goes for write permission and modifying an object. Note, if you grant
access at the database level, that access does not inherit down to the contained objects.
There is one exception: a user with “admin” rights on the “Server” objects will have unlimited
access to everything in the server, regardless of the ACLs of the server’s objects.
When an AF object or collection is created, a default set of access permission is assigned, based
on the access permissions that are set on the parent. However when you change permission on
the parent, the following Child Permission settings can be used:
Option Description
Do not modify child permissions Prevents access permissions that have been
set for the current object or collection from
being replicated to child collections and
objects in the AF hierarchy.
This option is the default when the connected
AF server is running 2.5 and earlier versions.
Update child permissions for modified identities For each selected item on the Items to
Configure list in the Security Configuration
window, replicates the access permissions
for all child collections and objects for each
identity on the Identities list whose access
permissions have been modified. This option
is the default when the connected AF server
is running 2.6 and later versions. This option
is not available when the connected AF
server is running 2.5 and earlier versions.
Replace child permissions for all identities For each selected item on the Items to
Configure list in the Security Configuration
window, replaces all child permissions for
every identity on the Identities list with the
parent access permissions.
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
• Familiarize yourself with AF security
• Modify AF security from an existing database
Problem Description
In order to maximize the AF experience, you want to create a AF Identity that will be used by all
of your regular users. This identity should have read on the Pump Assets database and should
also have the permission to create and modify only elements.
Approach
1. Open PI System explorer and click on the Database icon on top left of your screen.
2. In the select Database section right click on your database name and select security.
Step 1. In the Identities section, Add a new identity named “PI AF Regular Users” and map
it to the RegularUsers Windows group
P a g e | 147
Step 2. We can now add the Read permission to the “Regular Users” Identity. With all the
items selected under “Items to Configure”, select only Read and Read Data
access for “Regular Users”. Select the child permission Replace child
permissions for all identities and click on Apply.
Step 3. The last step is to add the Write permission to the Element section. In order to
have write permission to an object in a database, the AF Identity “Regular Users”
needs to have write access to the database.
Step 4. Under “Items to Configure”, uncheck all the items except “Database” and
“Elements”. Then, select the identity “Regular Users”, and add Write permission.
Finally, select Replace child permissions for all identities and click on Apply.
Step 5. Now go ahead and test if your AF security modifications worked by right-clicking
the PI System Explorer icon on the task bar and selecting “run as a different user”.
Run as the user “pischool\Joe” (password: ITPROSpwd01!) who is a member of the
group “RegularUsers” .
5.4.5 Exercise – Your Database Security
Exercise Objectives
• Edit the Security for your Pump Asset database
Problem Description
You would like to configure the security of your Pump Asset database. The first thing that should
be done is to restrict the access to the database so that only the Windows users you have added
can read the database.
The engineers (Engineers Windows group) should have access to create and modify all the
elements and analysis of the database but not the templates.
The supervisors (Supervisors Windows group) would like to be informed of any problem with the
pumps. In order to do so they would need to be able to create PI Notifications on the Database.
As for the operators (Operators Windows group), they only need to be able to view the elements
and attributes already build in the database.
Approach
Step 1. Start by creating the AF Identities needed and mapped those to the corresponding
Windows account
Step 2. Next step would be to modify the AF security of your database in order to respect
the security definition defined in the Problem Description
Step 3. Test the AF security by right clicking the PI System Explorer icon and selecting run
as a different user. For the following user are you able to:
- Secure authentication:
o Upgrading to PI API For Windows Integrated Security on an interface
machine.
o Disabling PI Trusts on PI Data Archive.
- Secure authorization:
o Disabling PIWorld identity.
o Providing minimum access to users and applications
5.5.1 Authentication
1Requires the following versions or later: PI Data Archive 2015, PI Buffer Subsystem 4.4, PI AF SDK 2015, PI SDK 2016 and
PI API 2016 for Windows Integrated Security
The following conditions must be true to use PI Mappings:
• The application must connect with PI AFSDK (any version), PI SDK version 1.3.6 or
later or the PI API for Windows Integrated Security (version 2.0.1.35 and later,
released in 2016)
• The connecting application is running on a Windows operating system
If these conditions cannot be met, a PI Trust should be used for authentication.
2. PI Trusts
PI Trusts should NOT be used unless it is not possible to authenticate using Windows Integrated
Security. The most common scenario is PI Interfaces and other applications running on non-
Windows Operating Systems
Note: Prior to 2016 release of the PI API for Windows Integrated Security, any applications using
the PI API, such as PI Interfaces, could not use PI Mappings. Now, almost all PI Interface nodes
can be upgraded to the new security model, regardless domain or workgroup configuration. For
more information, see KB00354 - Supported Windows Security Configurations in Domains and
Workgroups for the PI Data Archive
The PI Trust authentication method works by comparing the connection credentials of the
connecting application to the credentials saved in PI Trusts. If the credentials match, the
connection is allowed. No login is required by the application.
PI Trusts are created from System Management Tools, from Security > Mappings & Trusts >
Trusts Tab, by pressing the arrow next to the New… button and selecting the advanced option:
It is not necessary to fill in all of the information in this Window. OSISoft recommends that you fill
out PI Trusts using the 2+ Trust convention. This means you need to enter the following:
• The IP Information:
The Network Path (Host name or fully qualified domain name of the computer)
OR
The IP Address and a NetMask of 255.255.255.255.
• The Application Information
The application name. Applications that connect through the PI API send an
identifier called an application process name, or procname. This is a four-character
string with an E appended. For example, the procname for the PI Perfmon interface
is PIPeE.
3. Explicit Login
The final authentication method, Explicit Login, is not recommended in any scenario. It only exists
for backwards compatibility purposes. Using this method, users login to the Data Archive directly
using a PI User and a password.
Activity Objectives
• Describe requirements for Windows Integrated Security
Approach
For each of the following statements, circle MYTH or FACT. You will review each statement
together as a class.
1. Windows Integrated Security (WIS) cannot be used if the PI Interface is in a workgroup
and the Data Archive is in a domain
MYTH Fact
Explanation:
MYTH Fact
Explanation:
P a g e | 153
3. WIS cannot be used if the Data Archive and the PI Interface reside in separate, untrusted
domains
MYTH Fact
Explanation:
MYTH Fact
Explanation:
5.5.3 Authorization
There are three types of security objects that grant authorization on the Data Archive: PI Identities,
PI Users and PI Groups. All three represent a set of access permissions on the Data Archive.
1. PI Identities
It is recommended to use PI Identities when configuring PI Mappings and PI Trusts. They
cannot be used with Explicit Login, since there is no password associated with a PI
Identity.
2. PI Users
PI Users can be used when configuring PI Mappings and PI Trusts. Each PI User is
associated with a password, and therefore can be used with Explicit Login
authentication. PI Users are still supported for backwards compatibility, and the standard
built-in accounts, piadmin and pidemo, are still provided.
Piadmin is the default “god user” and should not be used in any PI Mapping
Tip or PI Trust for security purposes. The only valid use of piadmin is disaster
recovery.
3. PI Groups
PI Groups can be used when configuring PI Mappings and PI Trusts. In the past, PI
Groups were used for grouping together PI user accounts and providing them with the
same access permissions. This can now be accomplished by mapping Windows Groups
to PI Identities using PI Mappings. PI Groups are still supported for backwards
compatibility, and the standard built-in groups, piadmins and piusers, are still supported.
Note: The PIWorld Identity is a special PI Identity created by default during the Data Archive
installation. This identity is granted by default to any user connecting to the Data Archive. By
default, the PIWorld Identity has read access to all PI Points.
To limit the read access to all PI Points granted by the PI World Identity, two solutions are
available: (1) Disable the PI World Identity or (2) remove the PI World Identity from the database
security access control lists.
P a g e | 155
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
So far, we have seen how a connection can be authenticated (using PI Mappings, PI Trusts or
Explicit Login), and what gives them authorization (PI Identities, PI Users or PI Groups). However,
what permissions can you get once you obtain authorization?
The Data Archive has a variety of resources to which you can control access. These resources
include PI Points, modules, archive configuration, backups, batches, audit trails, and so on. We
refer to those PI resources as secure objects.
For each secure object, you can define which PI Identities (or PI Users or PI Groups) have read
and/or write access. This security setting is stored in an access control list (ACL).
For example, let’s say you have the following three PI Identities:
The “Read-only users” PI Identity should view the tuning parameters of the Data Archive, but
should not be able to edit them. The “Administrators” and “Power Users” on the other hand, should
have write access to the tuning parameters. The ACL for the tuning parameters should therefore
be:
Administrators:A(r,w) | Power Users:A(r,w) | Read-only users:A(r)
Activity Objectives
• Explore the default settings of the Database security table
• Explore the default security settings of a PI Point
Approach
Your instructor will give you a few minutes to complete the answers and then will facilitate
a discussion.
Part 1 – Open SMT. Navigate to Security > Database Security.
1. What are the 2 default security settings for all the objects in the DB Security table?
2. Why would no read access be given to PIWorld for some of the tables?
Part 2 – Examine the security settings for the point Sinusoid in Point Builder (SMT > Points >
Point Builder).
4. What is the default security setting for the PI Point? What determines the default security
for PI Points?
5. Describe what you think the difference is between Data Security and Point Security
Exercise Objectives
• Create PI Identities that will be mapped to Windows Users and Groups
• Configure point security for data access
Problem Description
You have many users requiring access to your PI System, but they all require different levels of
access to different PI Points. Therefore, you want to grant access to the Data Archive and its
resources based on user roles.
You have three domain groups:
1. Engineers
2. Operators
3. Supervisors
You need to create a security structure that enforces the following business rules:
• The point OSIsoftPlant.Production is a sensitive calculation and it should
only be visible to the Supervisors group.
• The pressure sensor on Mixing Tank 2 is broken, so the data is being entered
manually by the operators. Therefore, the Operators group needs write access
to the data for PI Point VPSD.OSIsoftPlant.PL2.MXTK2.Pressure. It should
be readable by anyone.
• The Engineers group needs to be able to edit the attributes of all of the OSIsoft
Plant PI Points (with the exception of OSIsoftPlant.Production, which they
should not be able to see).
Approach
Step 1. Map the three domain groups to the default PI Identities PIEngineers, PIOperators,
PISupervisors
Step 2. Edit the Database Security and PI Point Security according to the rules above
Step 3. Test your security rules. To run SMT as a different user, hold the Shift key, then
right-click SMT in the task bar and select “Run as different user”.
P a g e | 159
1. Logon as Homer and try to search for the point OSIsoftPlant.Production. What result
do you get? As Homer, write data to PI Point OSIsoftPlant.PL2.MXTK2.Pressure using
SMT > Data > Archive Editor. Does it work?
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
• Create a PI Identity for PI Interfaces and for PI Buffers with least privileges.
Problem Description
In chapter 2, we installed and configured a PI Interface for OPC DA. We created a single identity
called “PI Interfaces & PI Buffers”. Now, we want to tighten our security even further, by creating
two PI Identities that gives them the minimum required privileges to the PI Interface and PI Buffer
Subsystem on the Data Archive. Our knowledge base article Seven best practices for securing
your PI Server, outlines the most secure configuration as follows:
Step 7. Load all the PI Points with point source “OPC-PIINT01” in Excel using PI Builder.
Make sure to select the security attributes when importing the PI Points.
Exercise Objectives
You have an interface that is running on PIAF01. Please have a look on its operation and identify
what improvements we can make in terms of reliability and security.
Approach
Identify what are the possible improvements.
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
• Make the interface more reliable by enabling buffering and creating health tags.
Approach
First, we need to make sure that security is set up in PI Data Archive for PI Buffering. What
happens if we enable buffering before setting up access?
PIInterfaces PISCHOOL\svc-PIInterface
PIBuffers PISCHOOL\svc-PIBuffer
PI Interface and PI Buffer will be running under these accounts. This means they should get the
correct PI Identities when connecting using PI Mapping. We do not need to test this, as it is
working on PIINT01. But we need to ensure that these PI Identities have access to all tags that
are coming from this machine.
Step 2. Load all the PI Points with point source “PERF-PIAF01” in PI SMT > Point Builder.
Do the PIInterfaces and PIBuffers identities do not have the correct access on
these tags. So, fix it for one of the tags.
Step 3. Load all the PI Points with point source “PERF-PIAF01” in Excel using PI Builder.
Make sure to select the security attributes when importing the PI Points.
Step 4. Edit the ACL in the datasecurity and ptsecurity column. If you edited a single tag
on PI SMT in Step 2, just copy the security settings from that tag to other tags.
a. Give the “PIInterfaces” identity read access to ptsecurity
b. Give “PIBuffers” identity write access to datasecurity
Step 5. Publish your PI Point security changes.
Step 6. (Optional) You also have PI Analysis Service that is sending data to PI Data
Archive from this machine. Once the PI Buffering is enabled, it will also start
sending data through PI Buffering. What do you think will happen? How can we
ensure that data flow is not affected?
Keep the buffer files in C drive. What could be the risk associated with this?
Step 8. Confirm that the data is flowing through PI Buffer Subsystem. How did you
confirm?
P a g e | 165
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
Part 1 – Upgrade the PI API to the PI API for Windows Integrated Security
Step 1. Log on to PIAF01
Step 2. In the folder C:\Class Files\Install Kits, run the program “PIAPI-2018-for-Windows-
Integrated-Security_x.x.x.xx_”. You may be prompted to reboot the computer.
Step 3. When the install finishes and the computer restarts, make sure the PI Buffer
Subsystem and PI Interface services are running.
If you have a machine that is in another domain/workgroup, you will need to use Windows
Credential Manager to be able to use Windows Integrated Security. This video on our YouTube
channel shows the procedure step-by-step.
5.5.10 The “Security Slider”
You can disallow specific methods of authentication to your Data Archive. This is controlled by
the Security Settings plug-in in SMT (Security > Security Settings).
You should set the slider to a minimum of explicit logins disabled. This should not impact you at
all if you avoid using piusers and pigroups. The new installations will have this configured by
default.
If you want to set the security slider all the way to the top, you need to ensure
Tip that none of the active connections to the Data Archive use PI Trusts. A good
way of checking is by using Network Manager Statistics in SMT. The
connections using PI Trusts will be indicated in the “Trust” column.
P a g e | 167
Exercise Objectives
• Disable PI Trusts on PI Data Archive.
Problem Description
Now that we ensured that all the connections are using PI Mappings, we can disable PI Trusts on
the PI Data Archive. This means that all the connections will have to use Windows Integrated
Security
Step 1. Check if all the connections are using PI Mappings using Network Manager
Statistics.
Step 2. Disable PI Trusts using Security Slider. Save the setting.
Step 3. Stop and start PI Data Archive.
Step 4. Check if all your PI Points are updating. Which tags are not updating? Why? How to
fix them?
6 Monitoring a PI System
Objectives:
• Browse for Stale and Bad Points
• Build Health Points for interfaces
• Use PI Notifications to monitor PI System
• Create displays and building dashboards for PI System monitoring
Questions
On interface server:
___________________________________________________________________
On PI AF Server:
___________________________________________________________________
Other applications:
___________________________________________________________________
Activity Objectives
In our PI System, we have an existing PI Interface for Performance Monitoring on
PIAF01 that monitors some basic Performance Counters. We also monitor an interface
using Health Tags.
Questions
3. Are these elements using a template? How do you think this will help if we decide to
monitor other servers or interfaces?
P a g e | 171
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section. You may be invited to
watch what the instructor is doing or perform the same steps at the same time.
You may play a game or hold a quiz. Your instructor will have directions.
Activity Objectives
• Define a Stale point
• Define a Bad point
• Search for Stale and Bad points
Approach
Step 1 : On PISRV01, run SMT and navigate to Data > Stale and Bad Points
Step 2 : Click on the “Search” button to find Stale points (from 4 hours to 365 days) and
all tags with a System digital state
Step 3 : How might you approach addressing these points? What questions should you ask?
7 Troubleshooting a PI System
• On a PI Interface node: PI ICU > Press the “View Current PI Message Log
continuously” button
• On all computers, you can use the command line utility pigetmsg.exe
Step 1 : Open a command prompt window
Step 2 : Change the directory to pi\adm or pipc\adm
Step 3 : Type pigetmsg –f to view the logs continuously
Step 4 : For more filtering options, type pigetmsg –?
2. Event Logs
Event Logs are the centralized logs on a Windows machine. There are two different types
of logs:
• Windows Logs: These logs includes all important events on the operating system,
split up into the following categories: Application, Security, Setup, System and
Forwarded Events.
• Applications and Services Logs: These logs are specifically for applications,
with each application writing to its own log.
PI System applications write to the Windows Application Log, and sometimes to a
dedicated log under Applications and Services.
It’s also a good idea to look at the other Windows logs (Security, System) if you suspect
an issue might have occurred at the operating system level.
Applications that write to these logs:
• AF Application Service
• Data Archive Subsystems (occasionally)
How to access these logs:
Step 1 : Run the application “Event Viewer”
Step 2 : To access the Windows Application log, browse to Windows Log >
Application. Look at the “Source” column to find messages written by PI
System applications. You can also use the filter functionality of Event
Viewer.
Step 3 : To access a specific application’s log, browse to Application and Services
Logs, then find the name of your application (e.g. AF)
3. PIPC Logs
These logs are only used by older, PI API based applications. You should only need to
access these logs if you are running older software.
Applications that write to these logs:
• PI Interfaces with a UniInt version earlier than 2.5.0.x
• PI API based applications
How to access these logs:
• On a PI Interface node: PI ICU > Press the “View current pipc.log continuously”
button
• Open the file PIPC\dat\pipc.log
P a g e | 175
Exercise Objectives
• Install another interface to collect data from a different data source.
• Consult other resources (documentation, YouTube channel) to complete the installation.
Problem Description
You have three options in this exercise:
1. Collect performance data from servers and applications using PI Interface for Performance
Monitoring (PerfMon).
2. Collect data from text files using PI Interface for Universal File and Stream Loading (UFL).
3. Collect data from SQL Database using PI Interface for Relational Database (RDBMS).
P a g e | 177
Exercise Objectives
• Install and Configure a PI Interface for Performance Monitor on PIINT01 to collect
performance data.
• Create AF Elements and Attributes for the newly monitored objects and organize these
elements in a logical hierarchy.
• Create a PI Vision Display to monitor your PI System in real time.
Problem Description
You are the new PI System Administrator at Stark Industries. You want to monitor your PI System
to make your life easier. There is already a database for this, and you need to add other servers
and applications to this database.
In case you are stuck with a step, feel free to contact TechSupport (your instructor☺). Note that
they will require some information from you to understand the issue. Check the previous page on
what they might ask.
Approach
Step 1 : On PIINT01, install the PI Interface for Performance Monitor. Here is the
documentation you should follow. This should be a simple installation.
a. Installation kit is in C:\Class Files\Installation Kits\PIPerfMon)_x.x.x.x.exe
Step 2 : Configure an instance to collect local Performance Counters. Make sure to follow
documentation closely.
a. Set Point Source as PERF-PIINT01 and interface ID as 1
b. Use scan frequency of 5 seconds
c. Run the service as PISCHOOL\svc-piinterface (password: student). Hint: Do not
skip the part of the documentation starting with “On the target machine, open
lusrmgr…...”
Step 7 : Create a PI Vision display to monitor the servers and another display to monitor
interfaces.
P a g e | 179
a. Make use of PI Vision Collections: after creating a display that shows everything
for one element, select everything and click on “Convert to Collection”. This should
replicate to all similar elements
Bonus tasks:
1. Create a new instance of the PI PerfMon interface on PIINT01 to collect Performance
Counter data from PISRV01 remotely. Note that you do not need to install the PI Perfmon
interface on PISRV01.
2. Add this machine and the new instance to the AF hierarchy.
8.2 Final Exercise – Import data from text files
Exercise Objectives
• Install and Configure a PI Interface for Universal File and Stream Loading (UFL)
Problem Description
You have some data about your pumps that is being exported to some folders on your interface
machine. Your task is to collect data from text files located in these folders and then create
attributes for the new data in your AF template..
Approach
Part 1 – Collect data from C:\Class Files\Data\Exercise1 folder. These files contain the current
that each pump has.
Step 1 : On PIINT01, install the PI Interface for Universal File and Stream Loading (UFL).
This should be a simple installation. You can watch the second video in our YouTube
playlist for installation.
a. Installation kit is in C:\Class Files\Installation Kits\UFL_x.x.x.x.exe
Step 2 : Check the data files and configure new tags for PI UFL interface.
a. Tagname = PumpX.Current
b. Point Source = UFL-PIINT01.
c. PointType = Int16
d. Location1 = 1
e. Location4 = 1
Step 3 : Configure and instance of the UFL interface to collect data from Exercise1 folder.
You can follow the documentation or the YouTube playlist.
a. Set Point Source as UFL-PIINT01 and interface ID as 1
b. Use scan frequency of 30 seconds
c. Run the service as PISCHOOL\svc-piinterface (password: student).
d. Go to folder C:\Program Files (x86)\PIPC\Interfaces and provide full access for the
user PISCHOOL\svc-piinterface
P a g e | 181
e. For configuring the INI file, follow the steps in the YouTube video. Note that the
timestamp format is different in the video.
f. Once done, run the interface. Check PI Data Archive to see if data is updating.
Step 4 : Create a new attribute in your Pump element template for Current information. UoM
is Ampere (A).
Part 2 – Collect data from C:\Class Files\Data\Exercise2 folder. These files contain efficiency
data coming from a third-party application.
Step 1 : Check the data files and configure new tags for PI UFL interface.
a. Tagname = PumpX.Efficiency
b. Point Source = UFL-PIINT01.
c. PointType = Int16
d. Location1 = 2
e. Location4 = 1
Step 2 : Configure and instance of the UFL interface to collect data from Exercise1 folder.
You can follow the documentation or the YouTube playlist. This time the ini file will
be a bit more complicated, so take your time to understand the logic behind it.
a. Set Point Source as UFL-PIINT01 and interface ID as 2
b. Use scan frequency of 30 seconds
c. Run the service as PISCHOOL\svc-piinterface (password: student).
d. For configuring the INI file, watch the YouTube video to understand the logic. Note
that the timestamp format is different in the video.
Step 3 : Create a new attribute in your Pump element template for Efficiency information.
UoM is percent (%). Confirm that you are getting data for both attributes.
P a g e | 183
Exercise Objectives
• Install and Configure a PI Interface for Relational Database Management Systems (RDBMS)
• Note that this exercise requires basic level of understanding of SQL.
Problem Description
Collect data from tables in SQL database on PIAF01.
Approach
Part 1 – Collect data from DATA.dbo.POWER table. This table shows total power consumption for
all the pumps.
Step 1 : On PIINT01, install the PI Interface for Relation Database Management Systems
(RDBMS). This should be a simple installation.
a. Installation kit is in C:\Class Files\Installation Kits\RDBMSPI_x.x.x.x.exe.
b. Once asked, reboot the machine.
Step 2 : Configure and instance of the RDBMS interface to collect data from Power table.
You can follow the documentation or YouTube video (note that you will need to skip
the part about security between 2:45-6:15).
a. Set Point Source as RDBMS-PIINT01 and interface ID as 1
b. Use scan frequency of 30 seconds
c. Run the service as PISCHOOL\svc-piinterface (password: student).
d. Do not forget to create a DSN for PIAF01.
Step 3 : Configure a new tag for PI RDBMS interface using PI System Management Tools.
Watch this video to configure the SQL query.
a. Tagname = Pumps.Consumtion
b. Point Source = RDBMS-PIINT01
P a g e | 185
c. PointType = Float32
d. Location1 = 1
e. Location4 = 1
f. ExDesc = Write a similar query after watching the video given above. Do you think
you need to provide an ORDER BY clause in your query?
g. Check data on PI Data Archive. Do you see historical data? How can you import
all the historical data?
Step 4 : Create a new attribute on Pumps element on AF to see the total Power. UoM is watt.
Part 2 – Collect data from DATA.dbo.PUMPS_EFFICIENCY table. This table shows efficiency for
each pump.
Step 1 : Configure and instance of the RDBMS interface to collect data from Power table.
You can follow the documentation or YouTube video (note that you will need to skip
the part about security between 2:45-6:15).
a. Set Point Source as RDBMS-PIINT01 and interface ID as 2
b. Use scan frequency of 30 seconds
c. Run the service as PISCHOOL\svc-piinterface (password: student).
Step 2 : Configure new tags for PI RDBMS interface. Watch this video to configure the SQL
file.
a. Tagname = PumpX.Efficiency
b. Point Source = RDBMS-PIINT01.
c. PointType = Float32
d. Location1 = 2
e. Location3 = depends on your query. Please refer to the video above.
f. Location4 = 1
g. Instrumenttag = sql file you created.
Step 3 : Create a new attribute in your Pump element template for Efficiency information.
UoM is percent (%).