PI System Architecture Planning and Implementation
PI System Architecture Planning and Implementation
PI System Architecture Planning and Implementation
Implementation Course
Version 2020
PI System Basics
OSIsoft, LLC
1600 Alvarado Street
San Leandro, CA 94577
OSIsoft, the OSIsoft logo and logotype, Managed PI, OSIsoft Advanced Services,
OSIsoft Cloud Services, OSIsoft Connected Services, OSIsoft EDS, PI ACE, PI
Advanced Computing Engine, PI AF SDK, PI API, PI Asset Framework, PI Audit
Viewer, PI Builder, PI Cloud Connect, PI Connectors, PI Data Archive, PI DataLink,
PI DataLink Server, PI Developers Club, PI Integrator for Business Analytics, PI
Interfaces, PI JDBC Driver, PI Manual Logger, PI Notifications, PI ODBC Driver, PI
OLEDB Enterprise, PI OLEDB Provider, PI OPC DA Server, PI OPC HDA Server, PI
ProcessBook, PI SDK, PI Server, PI Square, PI System, PI System Access, PI
Vision, PI Visualization Suite, PI Web API, PI WebParts, PI Web Services, RLINK
and RtReports are all trademarks of OSIsoft, LLC.
All other trademarks or trade names used herein are the property of their respective
owners.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any
form or by any means, mechanical, photocopying, recording or otherwise, without the written
permission of OSIsoft, LLC.
Page 1
PI System Architecture, Planning and Implementation Course
Table of Contents
1. PI System Basics ...................................................................................................10
1.1 Course structure ..........................................................................................10
1.2 Why PI? (What problem are you trying to solve?)...................................10
1.3 What is the PI System? ...............................................................................11
1.4 PI Time Syntax..............................................................................................14
6. PI Interfaces ...........................................................................................................55
6.1 The PI Interface Defined ..............................................................................55
6.2 Directed Activity – Preparing to Install PI Interfaces ...............................56
6.3 Directed Activity – Validating communication between the PI Data
Archive Server and the PI Interface ...........................................................57
Page 2
PI System Basics
7. PI Points .................................................................................................................79
7.1 What is a PI Point? .......................................................................................79
7.2 Directed Exercise – Data Types..................................................................81
7.3 Directed Activity – Point Attributes ...........................................................82
7.4 Creating and Managing PI Points ...............................................................84
7.5 PI Point Attributes and PI Interfaces ..........................................................85
7.6 Polled, Advised or Output Points ...............................................................87
7.7 Exercise – OPC Points ................................................................................88
7.8 Digital State Sets ..........................................................................................91
7.9 Exercise – Create a Digital State Set and Point ........................................93
7.10 PI Builder ......................................................................................................94
7.11 Exercise – PI Builder ...................................................................................95
8. PI Vision ..................................................................................................................98
8.1 PI Vision Architecture ..................................................................................98
8.2 PI Vision Data Flow ......................................................................................99
8.3 Addresses, Application Pools, Services and Local Groups .................100
8.4 Hardware and Software Requirements ....................................................101
8.5 Kerberos Delegation ..................................................................................102
8.6 IIS Application Server preparation ...........................................................107
8.7 Directed Activity – PI Vision Installation .................................................108
8.8 Directed Activity – PI Vision Configuration .............................................113
Page 3
PI System Architecture, Planning and Implementation Course
Page 4
PI System Basics
Page 5
PI System Architecture, Planning and Implementation Course
User manuals and other materials used in class can be downloaded from
https://my.osisoft.com. Login to an OSIsoft customer portal account is required.
Page 6
PI System Basics
Software Version
PI Data Archive 2018 SP3 (3.4.430.460)
PI System Management Tools 2018 SP3 (3.6.3.41)
PI Collective Manager 2018 SP2 (1.4.3.2)
PI Asset Framework Server 2018 SP3 (2.10.6.195)
PI Asset Framework Client 2018 SP3 Patch 1 (2.10.7.283)
PI Buffer Subsystem 2018 SP2 (4.8.0.18)
PI Interface Configuration Utility 1.5.0.7
PI Interface for OPC DA 2.6.15.3
PI Interface for Random Simulator 3.5.0.2
PI Interface for RampSoak Simulator 3.5.0.2
PI Data Collection Manager 2.5.19.0
PI Connector Relay 2.5.19.0
PI Connector for OPC UA 2.0.1.33
PI Vision 2019 (3.4.0.7)
PI ProcessBook to PI Vision Migration Utility 2019 (1.0.0.3)
PI SQL Data Access Server (RTQP Engine) 2018 SP3 (1.7.19246.2)
PI Reference Library
PI Server Installation and Upgrade Guide
Explains how to install, upgrade or restore a PI Data Archive and PI Asset
Framework.
PI Data Archive Introduction to System Management Guide
Provides information on how to manage the many aspects of a PI Data Archive.
PI Data Archive Reference Guide
The PI Data Archive Reference Guide provides a reference for the PI Data Archive
command line utilities. It also discusses PI Data Archive database files, performance
counters, and messages.
PI Data Archive Security Configuration Guide
This manual explains how to set up Windows Integrated Security on PI Data Archive
servers, how and when to create PI Mappings and PI Trusts, and how to improve PI
Data Archive security.
Page 7
PI System Architecture, Planning and Implementation Course
It discusses built-in Data Archive Identities and provides a table of access permissions
required for performing different PI Data Archive tasks, as well as access permissions
required by specific PI products.
PI Data Archive System Management Guide
This book provides detailed instructions for configuring, maintaining, and
troubleshooting your PI Data Archive. It also discusses other PI components that are
relevant to Data Archive system management. These include PI Interfaces as well as
client tools that can be used to manage your PI System.
PI Data Archive Applications User Guide
PI Data Archive Applications are a set of processing tools that help you get more out
of your data by automating specific processes.
PI Asset Framework Client Installation and Upgrade Guide
Explains how to install or upgrade PI AF Clients such as PI System Explorer or PI
Builder MS Excel plug-in.
PI Builder User Guide
Provides instructions how to use the functions of PI Builder MS Excel plug-in like
creating, editing or deleting PI Points or Asset Framework structure.
PI System Explorer User Guide
Provides guidance through all functionalities of PI System Explorer application.
PI Interface for OPC DA User Guide
Provides detailed information about this specific interface and describes all
configuration options. Important document to set up the interface correctly.
DCOM Configuration Guide
Helps with configuration of DCOM security between PI Interface for OPC DA and
remote OPC Server.
PI Connector Administration User Guide
Explains the architecture, installation and configuration of PI Connector Relay and PI
Data Collection Manager and how to register the PI Connectors to start data collection.
PI Vision Installation and Administration Guide
Provides guidance how to install, configure and administer PI Vision for administrators.
PI Vision User Guide
Explains functionalities of PI Vision for user and how to build the visualization display.
Page 8
PI System Basics
Terminology change
OSIsoft is revising its terminology to reflect the growth of the PI System from its original single-
server architecture. In the revised terminology, PI Data Archive refers to the component that
stores time-series data (formerly called PI Server), and PI Server refers to both PI Data
Archive and PI Asset Framework. This document uses the revised terminology.
Page 9
PI System Architecture, Planning and Implementation Course
1. PI System Basics
Page 10
PI System Basics
The PI System collects, stores, and manages data from your plant or process. You connect
your data sources to one or more Data Collection computers. In turn, the Data Collection
computers get the data from your data sources and send it to the PI Data Archive. The PI
Asset Framework (PI AF) server is one method of accessing the PI Data Archive server, and
there may be other PI and non-PI servers. Users request data from the PI AF Server or PI
Data Archive for display in the client tools.
Generally, the parts involved in a PI System are:
Page 11
PI System Architecture, Planning and Implementation Course
• From PI Connector (2nd gen) the data is sent to PI Connector Relay and from it the
data is forwarded to PI Data Archive and PI AF. PI Connector (2nd gen) configuration is
managed via PI Data Collection Manager.
• Data is read from the PI System (PI Data Archive and/or PI AF server) by any
component of the PI Visualization Suite, such as PI ProcessBook, PI DataLink or PI
Vision.
The PI architecture may be very simple. Some customers have as few as one interface or
connector feeding data to a PI Data Archive server. Everyone reads the PI Data Archive for
their data.
More complex systems may include PI AF, PI Notifications, PI Asset Analytics, PI Event
Frames, browser tools, redundancy and failover.
PI Server = PI Data Archive + PI Asset Framework
Page 12
PI System Basics
In this class, each student has a virtual environment consisting of five servers:
PISRV02 – Pre-installed PI Data Archive for the secondary member of PI Collective, pre-
installed PI ProcessBook and PI DataLink and Web Server (IIS). PI Vision will be installed.
PIINT02 – Pre-installed PI Interface for OPC DA for failover. PI Connector Relay and PI Data
Collection Manager will be installed.
PIDC – Domain Controller. This server will not be touched during the class.
Page 13
PI System Architecture, Planning and Implementation Course
Fixed Time: An expression that signifies a specific date and time. Used when you want to
save a view of your PI System data for a specific time in history.
Example: A user is creating a report that analyses an equipment failure event which occurred
on the 25th of July 2013 at 11 am, so 25-Jul-2013 11:00:00 AM
Reference Time: An expression that signifies a date and time relative to the current date and
time. Used 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 creates a report that summarizes weekly production totals. By using relative
time expressions, the user will be able to re-use this report every week, so define a start date
of “Monday” meaning start the report from last Monday.
Both Fixed Time and Reference Time can be used with Time Offsets; Time Offsets can be
used alone.
A fixed time expression is an expression which includes a date, and optionally a time.
When the time component is omitted, Midnight is assumed. And midnight occurs at the
beginning of the day, not the end.
Expression Meaning
5-jan-92 12:34 12:34 p.m. on January 5, 1992
25-sep-12 00:00:00 (midnight) on September 25,
2012
The PI System interprets 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.
Page 14
PI System Basics
Use the first three letters as an abbreviation for any day of the week and any month of the year.
For example:
Expression Meaning
thu 00:00:00 (midnight) on the most recent Thursday
MAR 00:00:00 (midnight) on the current day in March of
the current year
Time Offset
When specifying PI time use specific abbreviations that represent time units. These are used
in constructing Time Offsets as in the table.
Page 15
PI System Architecture, Planning and Implementation Course
Page 16
PI System Basics
Rules to Remember
Rule 1: You can only include a single time offset in an expression. Including multiple offsets
can lead to unpredictable results. For example, the following time expressions are not valid:
*+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:
Page 17
PI System Architecture, Planning and Implementation Course
Objectives
• Describe the PI System components
• Categorise users
• Examine data in the PI Data Archive and the PI AF Server
• Explain where each component can fit into your Enterprise
• List the pros and cons of the various client tools
In this section, you will investigate your users and the data they require and develop an
understanding of the IT network topology required to support them.
Page 18
PI System Environment Architecture
The PI System environment may be expanded to become a system like that represented
below:
Important: The PI System environment does not start with the system – it starts with the users
and what they need from their data.
Page 19
PI System Architecture, Planning and Implementation Course
In this part of the class, you will perform a learning activity to explore the different
concepts presented in this chapter or section. Your instructor will have
directions.
Activity Objectives
• Describe the PI System components
• Define the purpose of each component
Approach
Using the image on the previous page, answer the following questions:
Page 20
PI System Environment Architecture
Pros Cons
Thick
PI DataLink
Thin
PI Vision
Page 21
PI System Architecture, Planning and Implementation Course
Because of the differences in the rate of change of data, it is appropriate to store the data in
different ways.
• Real time & future data is best stored in a database that allows for fast storage, fast
retrieval and automatic compression such as the PI Data Archive.
Page 22
PI System Environment Architecture
• Slow changing or static data may be better stored in relational databases structures,
or the asset centric elements found in the PI Asset Framework (PI AF) database.
• Calculated data may be stored in the PI Data Archive or derived as required in the PI
AF database with PI Asset Analytics.
Numeric data stored in the PI Data Archive may be compressed to compact the historian, and
to facilitate data retrieval. All data stored in the historian is kept in files called archives. When
the CEO requests data, the structure of the archives facilitates the rapid retrieval of that data.
On the other hand, data in the PI AF can be:
• Stored in the associated relational database.
• Derived as required from attributes and elements (PI Asset Analytics) and stored back
into PI Data Archive, or
• Passed through from the PI Data Archive historian.
Page 23
PI System Architecture, Planning and Implementation Course
Page 24
PI System Environment Architecture
The PI System Explorer (PSE) is a tool used to see AF data. It connects to one AF database
at a time. In general, OSIsoft recommends the use of one AF database for your entire asset
framework. However, depending on your application, you may need multiple databases:
• Within a single company, different departments may prefer their own unique databases
to handle their needs.
• A company with a database that handles current operations may have a second
database for testing purposes. Modifications implemented in the future are made and
tested on a testing database before transferring the structure to the production
database.
PI AF requires a Microsoft SQL Server instance available at the time of installation. PI AF
supports all SQL Server editions. Express edition can be installed on a shared computer,
together with PI AF and/or PI Data Archive software, or on a remote computer. MS SQL Server
Express edition comes with a free license. Scalability limitations make it more suitable for small
to medium-size installations.
With PI Connectors, the structure on the data source is replicated to the PI AF automatically.
Since PI Server 2018 unified installer, PI AF server is NO longer a required prerequisite for PI
Data Archive server installation.
Page 25
PI System Architecture, Planning and Implementation Course
Page 26
PI System Environment Architecture
• Ensure the network between the data source and the PI Data Archive and PI AF
servers is configured.
• Ensure the data source is working.
• Install and configure the appropriate PI Interface or PI Connector (1st gen).
• Or install PI Connector (2nd gen), PI Connector Relay and PI Data Collection Manager
which is used for PI Connector (2nd gen) configuration.
• Create and configure points as required on the PI Data Archive for PI Interface.
• Check that the points are receiving data.
Page 27
PI System Architecture, Planning and Implementation Course
3. PI System Planning
Objectives:
• Discuss Highly Available Systems
• What you need to get through firewalls
• Service accounts preparation
To ensure the integrity of your PI environment steps must be taken to implement backups,
redundancy and high availability of the all components.
Page 28
PI System Planning
the points from PI Data Archive and do not store the point parameters in a local disk file, thus
do not need connection to PI Data Archive or PI AF Server to be able to start. Therefore, we
can say they always run in “Disconnected Startup”
Each PI Interface or PI Connector (1st gen) manual has comprehensive details of how to
implement failover.
There is currently NO FAILOVER support for PI Connector (2nd gen) and PI Connector Relay.
You want to use what is most secure, easy to configure, and provide for minimal Maintenance.
That is why we suggest using Windows Active Directory security. It is something that you
probably have now in your domains and can easily accommodate the PI System. We call this
Windows Integrated Security.
To connect to the PI AF SQL database OSIsoft recommends that you use Windows
authentication because it is more secure than SQL Server authentication. Objects and their
effective permissions are based on the Windows user identity. The permission sets for all users
Page 29
PI System Architecture, Planning and Implementation Course
are stored as Windows security descriptors associated with certain types of objects and
collections within PI AF.
The PI System is consistent with, and best supported by, implementation in a corporate
network secured computing environment. This usually includes:
• Domain security for users, directories, and applications
• Router security including router-based firewalls
• Antivirus programs and regular operating system patches
• Controlled access by remote parties
Fixed IP addresses are usually applied to interface computers and server computers, while
DHCP IP addresses is the norm for user clients. PI System is usually implemented in domains
and all data communications to PI System are through TCP/IP response packets. However, PI
System data can be accessed without joining the domain since file access in the PI Data
Archive server from any remote computer is unnecessary. PI Server’s lookup server name can
be entered into the Domain Name Server associated with its fixed IP address. PI System can
stand alone, sharing no files and inaccessible by anyone except the local computer
administrator and users. This access can be provided by remote terminal client services.
• Install the server in a secured area with a locked door.
• Have uninterruptible power supply and air conditioning.
• Have unique passwords for both the local administrator and the piadmin PI user.
• Have a screen saver, which locks out idle sessions and requires password re-entry.
• Do not use the PI Server computer to access the Internet via a browser. Instead,
download the required files on another computer and transfer them by flash drive or
other media.
• Do not install client software (Microsoft Office, PI ProcessBook, etc.) on your server.
This will encourage the server’s use as a client and is not recommended.
Page 30
PI System Planning
In order to plan where things will “live” in your Enterprise it is important to understand how
connections are made to the various parts of the PI System.
Page 31
PI System Architecture, Planning and Implementation Course
3.4.1 Introduction
Although introduced in Windows Server 2012, the Group Managed Service Account (gMSA)
still has low adoption within the enterprises. This section will highlight the benefits of gMSAs
and how to create and configure them within the domain.
Built-in accounts such as NetworkService or LocalSystem have decent password
management, are simple to use, and can easily run a service or an Application Pool. However,
outside the machine boundary, they take on the identity of their host machine
(COMPUTERNAME$). This limits their usefulness outside the machine itself, as granting
access to a computer object inevitably gives access to all other built-in identities on the
computer (and all the services they're running!).
Many companies use standard domain accounts instead, but these accounts suffer from very
poor password management (entropy, expiration/resetting, maintenance). Moreover, standard
domain accounts' passwords are inevitably exposed to both users (who need to regularly
interact with the passwords - typing or copy/pasting) and computers (passwords are stored
locally).
gMSAs combine the best of both worlds:
• Automatic password management with secure & centralized storage
• gMSA's password is calculated on-demand by Domain Controller’s Key Distribution
Service (KDS)
• Automatic password changes are done periodically.
• In contrast to passwords used by standard domain user accounts, gMSA passwords
are not stored locally on computers nor exposed to users.
The main reasons why the gMSA is not widely adopted could be:
• Creation, configuration and maintenance of gMSA can only be done via PowerShell.
There is no GUI in Active Directory Users and Computers that would allow you to create
the accounts. You will only see them once created.
• gMSA denies interactive logon. The application of gMSA is limited only to Windows
Services.
Page 32
PI System Planning
• Not all PI System applications accept gMSA during installation. But there are
workarounds described in the exercises how to implement it.
Creating the KDS Root Key is done via the PowerShell command:
If (-Not (Get-KdsRootKey)) {
Add-KdsRootKey }
By default, it takes 10 hours until the KDS Root Key is in effect (to provide sufficient time to
replicate the key in larger domains). However, in the course or test environment, it can be
forced to be effective immediately.
If (-Not (Get-KdsRootKey)) {
Add-KdsRootKey -EffectiveTime ((get-date).addhours(-10)) }
All subsequent gMSA accounts that will be used in this course were created by the same
command with appropriate -Name and -DNSHostName parameter.
PASSWORD is the Domain Group type Security where machine accounts are added. This
means, it is possible to use the gMSA account only on the servers which are members of this
group. Any other server is not allowed to retrieve the password from Domain Controller.
Page 33
PI System Architecture, Planning and Implementation Course
For more information, please see Microsoft Docs page Group Managed Service Accounts
Overview.
When specifying gMSA identity (always with “$” symbol in the end, same as for computer
account) in Services Manager snap in or in IIS Manager, simply type in the name of the account
and leave the password box blank:
After the Log On account of a Service is set to gMSA, the Log On tab will be permanently
unavailable (greyed out). To fix this, open an elevated Command Prompt and execute:
Page 34
PI System Planning
Here is the short summary how gMSA can be applied to PI System applications:
Managed Service Account is an older type of account than Group Managed Service Account.
It was introduced in Windows Server 2008 R2. It is working on a similar principle as gMSA,
but it has limitations such as MSA account is bound only to one computer and it cannot be
used on other computers. It cannot be shared in clustered services and in load-balanced
services in a web farm.
Page 35
PI System Architecture, Planning and Implementation Course
4. PI Server Requirements
Objectives:
• Define the hardware requirements of the PI Data Archive
• Define the hardware requirements of the PI AF Server
• Describe the virtualization support for the PI System
For PI Data Archive, PI AF server, and Microsoft SQL Server, one or more Microsoft Windows
compatible computers, with a 64-bit operating system is required.
Page 36
PI Server Requirements
For best performance and improved security, OSIsoft recommends that you install MS SQL
Server on a different computer from PI Server. If you plan to install MS SQL Server on the
same node as the PI Data Archive, the SQL Express Edition should be installed so that the
MS SQL Server does not compete with system resources of the PI Server. The MS SQL
Express Edition is limited to using only a single physical CPU and 1 GB of RAM.
It is recommended that the PI AF server and PI Data Archive server be installed on different
computers if:
• PI AF server will use time-series data from multiple PI Servers
• PI AF server is configured for high availability (such as a load balanced PI AF server,
PI AF servers connected to a mirrored MS SQL Server, or PI AF servers connected to
clustered MS SQL Servers).
The number of required computers depends on the size and complexity of the PI System. The
size of a PI System depends on the number of PI points and the number of units (elements) of
equipment (such as mixers, tanks, or meters or whatever else you have added into the asset
database).
A simple, small system will have the PI Data Archive, the PI AF Server and MS SQL Server
(the free MS SQL Server Express may be used) installed on the same hardware (or virtualised)
server, as shown below:
For distributed systems with large workloads and point counts, and with multiple PI Servers or
PI Data Archive Server collectives that link to a central PI AF database, OSIsoft recommends
that you install PI Data Archive Server collectives with two PI AF Servers with a Network Load
Balancer over them, and Microsoft SQL Server on separate, redundant computers to achieve
the best level of performance and scalability. This type of system is depicted below:
Page 37
PI System Architecture, Planning and Implementation Course
Page 38
Installing the PI Server
Objectives
• Review the pre-installation check list
• Describe the steps to obtain a License File
• Know the installation steps of PI Server
• Become familiar with the directory structure of PI Data Archive (PI folder)
• Start and stop the PI Data Archive server
• Windows Server 2019 – all editions; in both Full and Core installations
• Windows Server 2016 – all editions; in both Full and Core installations
• Windows Server 2012 R2 – all editions; in both Full and Core installations
• Windows Server 2012 – all editions; in both Full and Core installations
Page 39
PI System Architecture, Planning and Implementation Course
When the license file is generated, view the PI Server Manifest to verify the server details.
In order to generate license file, a Machine Signature File (MSF) is required. The PI Server
install kit is capable to generate the MSF by itself, you must copy the install kit to a local disk
on the PI Data Archive Server computer and then run the kit.
The kit will generate the MSF file to Documents folder of user running it.
i.e. C:\Users\<username>\Documents
If the PI Data Archive Server is on a virtual machine (VM), run the utility on the VM. If you
generate the MSF on the wrong computer (on your laptop, for example) then the license
activation file will match the laptop computer. If you install PI Data Archive Server on a different
computer or VM, the server will not run as expected. The license file must be present during
the installation. It can be on a flash drive, CD, or any media that can be read by PI Data Archive
Page 40
Installing the PI Server
Server during installation. The setup program copies the license file to the %PISERVER%\dat
directory during installation; the original file will no longer be used.
Page 41
PI System Architecture, Planning and Implementation Course
Archives are sized with at least 2KB for each point in the system. If your PI Data Archive will
have 5,000 points or less, then you can safely use the default value (currently 256MB). The
default archive size is 3 KB x the total number of points rounded to the nearest power of 2 with
a minimum of 512MB and maximum of 10GB, as per the following:
Select a size so that at least 2 archive files can fit in the Windows File System Cache
(FSC). This is because mostly the PI Data Archive Server will write/read from the 2-3 most
recent archive files. The FSC can use all the RAM on 64-bit systems. The following guidelines
for memory apply:
Page 42
Installing the PI Server
In this part of the class, you will perform a learning activity to reinforce
the concepts presented in this section.
Activity Objectives
• Understand the necessary information to install PI Server. In other words: Read the
Manual! (RTM)
Approach
Answer the following questions as a group:
1. Name the supported MS SQL Server versions.
2. At what stage will the PI Server installation install the MS SQL server?
Page 43
PI System Architecture, Planning and Implementation Course
Exercise Objectives
• Install the PI Server and related services and features on PISRV01
Description
You are ready to begin the PI System installation.
You should have validated the prerequisites and Microsoft SQL Server, have the install kit and
license file, and performed all the computer checks (clock, etc.) You did, didn’t you?
Approach
1. In the installation folder, you will find the PI Server installation kit.
2. Right-click and “Run as Administrator”. After the Welcome screen, where you can
deselect the participation in PI System Customer Experience Improvement Program
there is a feature selection screen where we check the components we would like to
install. Select all except PI Notifications Service.
Page 44
Installing the PI Server
3. Select the installation directories for 64-bit and 32-bit PIPC folders and PI Data Archive
Directory. In our case it is:
• D:\Program Files\PIPC
• D:\Program Files (x86)\PIPC
• D:\Program Files\PI
Important Note: Since unified installation kit PI Server 2018, the fresh installation of PI Data
Archive by default no longer installs these subsystems:
- PI AF Link Subsystem
- PI Alarm Subsystem
- PI Performance Equation Scheduler
- PI Batch Subsystem
If you wish to install those components, you switch to Individual Features section and tick the
box. For upgrade from previous versions of PI Data Archive those components remain.
Page 45
PI System Architecture, Planning and Implementation Course
Since PI Server 2018 SP3, these PI Interfaces are no longer part of the installation kit:
- PI Interface for Performance Monitor
- PI Interface for Ping
- PI Interface for SNMP
- PI Interface for TCP Response
- PI Interface for Random Data Simulator Data
- PI Interface for RampSoak Simulator Data
Removing the PI Interfaces for Random and RampSoak Simulator Data from PI Server
installation kit, eliminates default PI Points (SINUSOID, SINUSOIDU, CDT158, CDM158,
CDEP158, BA:LEVEL.1, BA:TEMP.1, BA:CONC.1, BA:ACTIVE.1 and BA:PHASE.1) from
being installed, therefore NO PI POINTS ARE PRESENT on PI Data Archive after the
installation.
4. Select the SQL server provided. In our case PISRV01\SQLEXPRESS. Keep the checks
that AF SQL Database scripts will be installed and executed. Ensure the MS SQL
Server service is started before installation.
5. For PI Data Archive section select the License Directory and Data Directories
Page 46
Installing the PI Server
In Archive settings you can modify the size for historical archives to lesser size than
precalculated size (viz. chapter Archive Sizing)
6. At the RTQP Engine page, keep the default port 5465. For SSL certificate select the
only available certificate PI RTQP Engine
Page 47
PI System Architecture, Planning and Implementation Course
10. After the installation is complete manually stop the PI Data Archive by executing the
script %PISERVER%\adm\pisrvstop.bat.
11. Open Services Manager and switch NT Service\pinetmgr account for gMSA
PISCHOOL\SVC-PIDA$ for PI Network Manager service
12. How do you start the PI Data Archive? _____________________________________
The installation created PI System folder in Windows Start Menu with a list of selected
applications. Find out what they are used for…
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
Page 48
Installing the PI Server
Activity Objectives
Approach
Prior the version PI Server 2018 SP3, when the PI Data Archive was installed, it came with a
sample interfaces called the PI Interface for Random and PI Interface for RampSoak Simulator
Data. The interfaces do just that. They produce configurable continuous streams of random
data – sine waves, sawtooth or random noise. Those interfaces are used for trainings and
simulations.
Since PI Server 2018 SP3 they are not installed automatically, thus no default simulation PI
Points.
We will create those PI Points a little bit later in the course.
In this activity connect to your newly installed PI Data Archive and determine whether all
subsystems have started and there are no errors in PI Message Log.
Note: The first time the PI SDK is installed anywhere, a default PI Data Archive is needed.
Therefore, even if you have never configured a PI Data Archive server, at least one server
should appear in your PI Connection Manager.
Page 49
PI System Architecture, Planning and Implementation Course
The PI System Management Tools (PI SMT) is the tool most used by PI
System Administrators. It allows a person with the correct credentials to
perform any action.
Using the PI SMT on the same computer as the PI Data Archive server will
Tip most likely give you unlimited access. Use with caution.
Once connected there are several ways to determine the status of the Data Archive system.
• Search the message log files for any errors (under Operations → Message Logs)
Page 50
Installing the PI Server
Page 51
PI System Architecture, Planning and Implementation Course
For further information on any of these tools access the HELP in each tool or visit
http://livelibrary.osisoft.com
Page 52
Installing the PI Server
PI servers, data collection computers, and client computers should all have their time zones
and times set correctly and synchronized. As the PI clients and PI Data Archive know what
time zone, they are in, so data can be viewed in either Server Time or Client Time. This is
determined by a setting in the client tool.
Note: It is important that all the computers involved in collecting data (PI Data Archive, data
collection computers, etc.) have their operating system clocks set correctly.
For most current PI Interfaces, events are sent to the server with UTC timestamps. All PI
Connectors and PI Connector Relay are sending the events with UTC timestamp too. If the PI
Interface time is more than ten minutes ahead of the PI Data Archive, the PI Data Archive
cannot handle the time difference and discards the data; it is considered a future event.
Automatic DST changes will not cause a problem when all computers observe the same rules.
That is, either all computers change their clocks twice a year at the same time or they do not.
Note: Situations where some computers change their clocks when others do not can cause
data loss.
Page 53
PI System Architecture, Planning and Implementation Course
To verify that the DST rules, run pidiag -tz command in the \PI\adm folder in Command Prompt
to check the time zone and DST transitions table of your PI Data Archive. If you anticipate
backfilling data into the archives from years in the past, you will need to get a replacement
localhost.tz for your time zone file from the OSIsoft’s Customer Portal site by going to PI Server
downloads and expanding the Other section.
Note: To check all the DST changes from year 1970 up to year 2038 run the command:
pidiag –tz –sys -dump. This will list all dates when DST occurs (if DST is applied).
Page 54
PI Interfaces
6. PI Interfaces
Objectives:
• Define a PI Interface
• Identify the basic components of the PI Interface installation
• Discuss the variety of architecture possibilities
• Describe how to connect PI Interfaces in a secure way
• Install and configure PI Interface
• Configure the basic PI Interface parameters
• Create and validate the default PI points for PI Random and RampSoak Interfaces
PI Interface for Random and RampSoak Simulator Data do not connect to any data
source, they are the data source themselves.
Page 55
PI System Architecture, Planning and Implementation Course
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section.
Activity Objectives
Normally before you begin PI Interface installation, you would identify your data source. Since
we are in a training environment, we will use an OPC DA Simulator. It has been configured to
generate a set of sample data from simulated pumps.
You will install the PI Interface for OPC DA on the same computer as the data source – in this
case the OPC DA Server Simulator, along with simulation interfaces Random and RampSoak.
The OPC server we use is made available by the OPC Foundation as the
download "OPC Data Access 3.00 Binaries". These files are available at
http://www.opcfoundation.org/. Search for "OPC DA Sample Binaries."
Consult the OPC Foundation web site for details if you wish to obtain a copy.
Fill in the following architecture diagram with the IP Addresses of your machines:
Page 56
PI Interfaces
Install the PI ICU and PI API for Windows Integrated Security software
and validate the connection.
Activity Objectives
• Validate the connection between PI Interface and PI Data Archive server.
Approach
What does ICU stand for?
1. Install the PI ICU software on PIINT01. This will give you the required software to test
the connection. You will be asked to fill the default PI Data Archive name and for the
directories for the application system files.
Page 57
PI System Architecture, Planning and Implementation Course
Note: PI API for Windows Integrated Security should replace the previous PI API versions that
rely upon PI Trusts or explicit logins for authentications. With PI API for WIS Windows
authentication becomes the only supported authentication model for PI API-based
applications, such as PI Interfaces on the node where it was installed.
Windows Integrated Security is a more secure authentication model than PI Trusts for
authenticating users!
3. After installation, verify the connection to the PI Data Archive using the command
prompt apisnap utility (located at %PIHOME%\bin) that validates the PI API
connection to the PI Data Archive.
Page 58
PI Interfaces
These tests fail. What do you think you will need, based on earlier discussions, to
connect? – think security!
5. On PISRV01, open PI SMT and navigate to Security → Mappings & Trusts plug-
in and select Mappings tab.
6. Right-click on blank canvas and select New Mapping or click on icon.
7. Insert PISCHOOL\Student01 as Windows Account. Click on to resolve
Windows SID. This is a verification, that the account exists.
8. Insert piadmins as PI Identity and click on Create.
9. Run the apisnap utility again for PI API connection and PI Connection Manager for
PI SDK connection to verify connection is possible.
Page 59
PI System Architecture, Planning and Implementation Course
PI API for
PI Mapping
WIS
Windows Users
PI Interface PI Identity
DBSecurity PI Point
Previous
PI API
PI Trust
Previous PI API versions used a protocol that only sends the IP Address and an encoded
application name in its communication. PI Trusts should be based on those parameters.
The application name used in the connection for PI Interfaces is an encoded phrase that takes
the first four letters of the interface name and the capital letter “E”. The best way to verify this
is to start the interface and watch the denied connection in the PI Data Archive using the
Message Log plug-in of the PI SMT.
For example, the PI Interface for Random Simulator Data will use the phrase RandE.
PI API for Windows Integrated Security is using the Windows authentication protocol.
Page 60
PI Interfaces
Trusts should follow the OSIsoft Field Service Technical Standard “2+
Tip convention”. That is, a PI Trust to the PI Interface based on IP
Address AND the executable name. You want to create Trusts
SPECIFIC to the executable that is connecting to PI. It is not safe
practice to map trusts to the piadmin user.
Some may find the Wizard confusing because understanding when to use a “PI API
Application” or “PI SDK application on a Windows NT based OS” might not be intuitive.
Select Advanced instead of Wizard. This presents all the options in one dialog box.
Page 61
PI System Architecture, Planning and Implementation Course
In this part of the class, you will perform a learning activity to explore the
different concepts presented in this chapter or section.
Activity Objectives
• Explain IP Address Filter for a PI Trust
Approach
In the PI Trust mechanism, if you use IP Address you must specify a Netmask. However, the
relationship between IP Address and NetMask in the PI Trust database is the same as the
relationship between network destination and net mask in a TCP/IP routing table. Any valid
subnet and IP address combination is supported. If you use this mechanism to allow access
to all addresses in a subnet, you must set the bits corresponding to your subnet to zero.
2. How would you construct a trust specifically for the machine with IP Address
192.168.10.54?
Page 62
PI Interfaces
Several architectures are possible with PI Interfaces. Examples are shown below:
• Architecture A: The Data Source and PI Interface are installed on the same
machine with stand-alone PI Data Archive.
• Architecture B: The Data Source, PI Interface and PI Data Archive are all
installed on separate machines.
• Architecture C: PI Interface is installed on the PI Data Archive server
Having seen the above recommendations, what would you say was the least difficult
configuration?
Page 63
PI System Architecture, Planning and Implementation Course
As a group, discuss the advantages, disadvantages and example application for each
architecture:
Before you install and configure the PI Interface, make sure that the clocks on the Data
Collection machine and PI Data Archive machine are relatively close. They do not have to be
exact.
PI Interface that is more than 30 minutes “off” the server clock will not
Tip run, and data for Real-time data points with a timestamp more than
10 minutes into the future will be discarded!
It does not matter so much that your computers obey DST, if the servers and your PI Interfaces
are configured the same way and observe the same rules!
Page 64
PI Interfaces
Activity Objectives
• Install the PI Interface for OPC DA, PI Interface for Random and PI Interface for
RampSoak Simulator Data on PIINT01 and identify the PI Interface components.
Approach
Almost every PI Interface has at least four components that are installed on the data collection
computer (many PI Interfaces have additional files – refer to the manual for details).
The location is always:
%PIHOME%\Interfaces – for 32-bit PI Interfaces
%PIHOME64%\Interfaces – for 64-bit PI Interfaces
The images below illustrate the basic components for the PI Interface for OPC DA. Write the
functions next to the icons.
________________________________________________________________
Page 65
PI System Architecture, Planning and Implementation Course
In this part of the class, you will learn the common PI Interface switches
Activity Objectives
• Learn the PI Interface startup file switch syntax.
Approach
Navigate to the unconfigured startup batch file “OPCInt.bat_new” for the PI Interface for OPC
DA. Edit the file to open it in Notepad. The elements in the startup file are parameters or
“switches.”
1. What does the /HOST parameter mean? What formats are acceptable?
4. What is the /F parameter used for? What formats are acceptable? What is an
“offset” and why is it used?
Page 66
PI Interfaces
Page 67
PI System Architecture, Planning and Implementation Course
Questions
Which of the following scan classes may collect data at a different time to the others?
/f=5,10
/f=00:00:05, 00:03:05
/f=5,0
/f=00:00:05
A scan every 15 seconds with no preference on when the first scan is done.
Page 68
PI Interfaces
Activity Objectives
• Describe the reasons why the PI Interface Documentation is critical to the proper
installation and configuration of PI Interface.
Approach
In computing, many applications can be installed without the documentation getting in your
way. This does not apply to PI Interfaces.
Navigate to and open the PI Interface for OPC DA Documentation. Go through the document
sections and describe where key information can be found. Answer the following questions:
1. Will the interface run on a Windows 7 platform?
Page 69
PI System Architecture, Planning and Implementation Course
The PI Interface Configuration Utility (PI ICU) is simply a GUI for editing
the startup batch file.
One thing to keep in mind is that the PI ICU READS from the PI Module Database but also
WRITES to the PI Interface startup batch file, as well as updating the MDB entry.
If you use the PI ICU to edit an interface startup file, do not edit the
Tip startup file manually afterwards – PI ICU will report MDB and start up
batch file are not in sync.
This also means you will need to run the PI ICU under the user that has write access to the
PI Module Database on PI Data Archive, which piadmins PI Identity by default has.
Page 70
PI Interfaces
Exercise Objectives
• Configure the PI Interface for OPC DA with PI ICU on PIINT01
• Start the interface as a Windows service.
Problem Description
You need to set up the PI Interface for OPC DA to collect data. An OPC Data Simulator
(OPCSample.OpcDa20Server.1) is installed on your computer.
Approach
• Use the PI OPC Client Tool to find your OPC Server.
• Configure the PI Interface for OPC DA with the OPC server name and test the setup.
The following walk through shows you what needs to be done.
Before you start:
Set the security for PI ICU and PI Interface on the PI Data Archive, use PI System Management
Tools (PI SMT) to:
1. Create new PI Identity PI Interfaces and map it to the PISCHOOL\SVC-PIINT$ gMSA.
2. Create new PI Identity PI Buffer and map it to the PISCHOOL\SVC-PIBUFFER$ gMSA
(Important for PI Buffering and PI Security chapters).
You cannot search for gMSA in PI SMT in order to map it to PI Identity. Service Accounts
object is missing from the Object Types list. You must type the account name with “$” directly
to Windows Account field.
3. Modify the Database Security in PI-SMT and add the PI Interfaces and PI Buffer
identities to the following tables: PIPOINT with Read & Write access. (Note: The PI
Security concept will be discussed in a separate chapter)
Use PI Interface Configuration Utility (PI ICU) to configure the PI Interface for OPC DA:
4. Open PI ICU.
5. Open the PI Interface for OPC DA start-up file with the PI ICU. You are looking for the
OPCINT.BAT_NEW file located at the %PIHOME%\Interfaces\OPCInt folder.
Page 71
PI System Architecture, Planning and Implementation Course
6. Select the PISRV01 from the drop-down list. Now you are ready to configure the PI
Interface
Page 72
PI Interfaces
Hint: Obtain the name of the OPC Server Name by using the PI OPC Client Tool. The
PI OPC Client Tool is installed with the OPC Interface and is found in Start Menu under
PI System → PI OPC Client Tool. Or click on List Available Servers button, however
this may not work all the time based on DCOM settings.
Page 73
PI System Architecture, Planning and Implementation Course
UniInt is short for Universal Interface. It is reusable code integrated in many of OSIsoft’s
interfaces to include generic functions such as establishing a connection to the PI Data Archive
computer and monitoring the PI Point database for changes. This section is applicable to most,
though not all interfaces. For most of the PI Interfaces the option Write Status to Tags on
Shutdown is selected here, but for PI Interface for OPC DA it is ignored, and it is set in the
OPCInt plug-in -> Data Handling section.
9. Recommended is also check the option Include Point Source in the header of log
messages.
10. Use PI ICU to create the interface Windows service. PI ICU is not capable to create PI
Interface Windows Service under gMSA. Therefore, keep the default
NT Service\opcint1 account and hit Create button. Close PI ICU.
Page 74
PI Interfaces
11. Open Services Manager find PI-opcint1 service and switch the NT Service\opcint1
account for PISCHOOL\SVC-PIINT$ gMSA.
12. Open PI ICU again, select opcint1 from drop-down list and select Service section. The
gMSA is now applied.
Page 75
PI System Architecture, Planning and Implementation Course
When starting the interface, check for errors in the log file.
On buffered data collectors, you will want the PI Interface to be dependent on the PI Buffer
Subsystem (PIBuffss). This will assure that the buffer starts before the PI Interface, because
if PI Interface starts before the PI Buffer Subsystem it will start sending values to the PI
Data Archive directly, thus bypassing the buffer.
You will create the points collected by this PI Interface in the next chapter.
Page 76
PI Interfaces
Exercise Objectives
• Configure the PI Interface for Random Simulator Data and PI Interface for RampSoak
Simulator Data.
• Create the predefined default PI Points using PI Builder
• Verify the values are updating.
Problem Description
You utilize the knowledge gained in the previous exercise to set up the PI Interfaces for
Random and RampSoak Simulator Data on PIINT01. Then you create the predefined PI
Points for those interfaces and verify the values are updating.
Approach
1. Add new interface from BAT file in PI ICU. Locate the RANDOM.BAT_NEW file at
%PIHOME64%\Interfaces\Random directory as PI Interface for Random Simulator
Data is 64-bit application, unlike 32-bit PI Interface for OPC DA.
2. In General section keep the “R” point source and Interface ID blank. Edit first scan
class from 00:00:30 to 00:00:05
3. In random interface section check Fill time gaps with data.
4. In UniInt section check Include Point Source in the header of log messages.
5. In Services section create service under default NT Service\random1 account.
6. User Services Manager to switch it for gMSA PISCHOOL\SVC-PIINT$.
7. Re-open PI ICU to see the gMSA was applied and start the service.
8. Check the local PI Message Log and Operations → Network Manager Statistics
in PI SMT for RandE application.
10. On PISRV01 open Exercise Files folder from the desktop shortcut and open MS
Excel file Default PI Points for Random and RampSoak.xlsx.
Page 77
PI System Architecture, Planning and Implementation Course
11. What all those columns mean will be explained in the next chapter PI Points. Right
now, we only need to create them quickly. Switch to PI Builder tab and define Data
Server to be PISRV01.
12. This enables the Publish button:
13. Hit it and from Publish Options dialog select Create Only and click OK
15. Click on the Tag Search icon to open Tag Search dialog.
16. Keep the fields as default (“*”) and click on Search button to search for all available
tags. Then click on Select All and OK.
17. All tags should have values. Click on play button for automatic value updates.
Page 78
PI Points
7. PI Points
Objectives
• Define a PI Point
• Describe the different point types
• Describe the basic point attributes
• Build and edit points with Point Builder
• Describe a digital state set
• Create a digital state set
• Create digital state points
• Build and edit points with the PI Builder add-in to Excel.
• Connect the OPC data to PI points
For more information see "PI Point Classes and Attributes" in PI Data
Archive System Management Guide.
Note: Some industries and customers use the term “tag.” In the PI system, point, tag and
data stream are synonymous.
Page 79
PI System Architecture, Planning and Implementation Course
The Point Class is simply the name for a defined set of point attributes. The PI Data Archive
is pre-configured with the point classes you will need. The typical PI System has no need for
additional point classes.
All points are based on the Base point class. However, these points do not have the complete
set of attributes required to collect data via an interface. Although points created by PI
Connectors are of Base point class
The Classic point class contains all the Base point class plus all the attributes required by
the interface to connect to the data source and collect data.
The PI Data Archive, designed to collect and store time-series data, can store almost any
data type.
There is no absolute when selecting point type but matching the PI point type with the data
type on the source is usually a good start. For example, if the data source indicates that the
data collected is a REAL32 then you would most likely use Float32 (a 32-bit floating-point
value).
The PI Float16 is not a real data type – it was made up for the PI Server.
Tip It is actually a floating-point value scaled to a 16-bit integer. Developed
decades ago, when disk space was scarce and expensive, you should
not use this point type unless you have a specific reason to do so.
Page 80
PI Points
You are invited to interact with the instructor to explore the different
concepts presented in this section.
Problem Description
Identify the measurement that can be associated with each data type.
Example: Float32: ___pressure in bars UOM___
The table below lists the common PI Data Types. List another few example to the point type in
the second column.
Digital
Int16
Int32
Float32
Float64
String
Now do the reverse and think about what data types would be appropriate for the
following measurements:
switch position
Batch ID
operator comments
calculation results
conveyor load
Page 81
PI System Architecture, Planning and Implementation Course
Activity Objectives
• Describe the Point Attributes for a Classic point
Approach
You may need to use the documentation for this exercise.
Use the table on the next page.
Match the attribute description to the attribute name for selected Point Attributes for the
CLASSIC point class.
Each person will research attributes and match the proper description.
When you are done with the exercise, the instructor will go through each attribute to review
them.
To complete the activity, you can use "Base Class Point Attributes” and
“Classic Class Point Attributes" in PI Data Archive System Management
Guide.
Page 82
PI Points
N. Attribute N. Description
1 CompDev A Flag set to ON (1) for a point to be archived. Set to OFF (0) to stop
archiving of a point.
Flag se to ON (1) to apply compression algorithm to a point. Set to
2 Span B
OFF (0) to record every values in the archive.
3 Zero C Deviation for compression algorithm in engineering units.
4 ExcDev D Specifies the name of the digital state set associated with the tag.
5 Shutdown E Controls the format of numeric values on screens and in reports.
6 Archiving F Describes the units of the measurement.
Provides additional information. Some interfaces use it to encode
7 Location1 G
additional configuration information.
8 Future H Specification of a deviation for exception-reporting.
Maximum time for compression. Duplicate values are archived if
9 ExcMax I
the elapsed time exceeds the value.
10 DigitalSet J Associates a tag with an interface or PI application
Records a time-stamped event to a tag when the archive was shut
11 ExcMin K
down.
Minimum time for exception-reporting. For interface points the
12 EngUnits L
value should be 0.
The difference between the top of the range and the bottom of the
13 Compressing M
range. Required for all numeric data type points.
Defines how numeric values are interpolated. Flag se to OFF (0)
14 PointSource N
for values as continuous signal. Set to ON (1) for discrete values.
15 CompMax O Used by some interfaces as the tag in the external system.
Maximum time for exception-reporting. Duplicate values are
16 Location4 P
archived if the elapsed time exceeds the value.
17 InstrumentTag Q Specifies the interface ID for most of the interfaces.
Flag set to ON (1) for a point to receive values with future
18 Step R
timestamps. Set to OFF (0) for a point to receive historical values.
19 ExDesc S Specifies the scan class number for most of the interfaces.
Indicates the lowest values possible. Required for all numeric data
20 DisplayDigits T
type points.
Page 83
PI System Architecture, Planning and Implementation Course
One tool that may be used to buld and edit points is Point Builder in PI SMT.
The Point Builder plug-in for PI SMT is a graphical tool that allows the user to create and edit
PI points. This tool allows the system manager to set the attributes for each point individually
during PI point creation and allows you to edit them afterward. Some attributes are system
assigned and cannot be changed.
It is possible to rename a point while preserving the historical data associated with it. It is also
possible to delete a point; in which case the associated archived data is no longer accessible!
Page 84
PI Points
Listed below are the common point attributes and how they are commonly used.
ALWAYS consult the interface manual!
Future Data If defined as ‘Allow’ it means that events with time stamps
in the future may be stored.
Point Source Must match the value set in the interface configuration.
See the /PS parameter in the interface start-up file.
Scan Include the PI point in the list of points to scan (always set
to ON)
.
Instrument Tags are often case sensitive. Copy and paste this
Tip information directly into PI SMT Point Builder or MS Excel PI Builder
from the PI OPC Client Tool when possible.
Page 85
PI System Architecture, Planning and Implementation Course
The most common cause of malfunctioning new points is incorrect mapping of PI point
attributes to the data source or the interface configuration.
The PI Data Archive accepts data with timestamps up until January 2038. January 1970 is the
past limit for all points.
In order to store future data, a point must be created with the “Stored Values” point attribute
set to 1, or ‘Future data’. By default, the “Stored Values” attribute is set to 0 (Real-time data).
This cannot be modified after a point has been created. Points with the attribute set to 0 will
reject data with timestamps more than 10 minutes into the future.
Generally speaking. Future points should be used when storing data that is not collected
sequentially in chronological order. For example, process or operational data should be kept
in historical points because it is measured and collected in real time. On the other hand,
forecasts and predictive data over an arbitrary time range are suited for future points.
Data for all future points is stored in separate archive files. Future data never moves to the
historical archive files even after the future data ages into the past. The archive files for future
points will be created automatically as data is written to the points and are resized dynamically.
Each future archive has an initial size of 1 MB and grows dynamically, and the duration of the
archive is always one calendar month. If neither the initial size nor the duration is desirable,
archives can be manually created and registered.
Page 86
PI Points
Polled
For polled points, the interface sends an asynchronous refresh call for the group (points of the
same scan class). This is often the most common method for reading data and is supported
by virtually every interface.
Advise
Advise points “listen” for new events. For Advise points (referred to as read on change in the
OPC Standard), the data source sends data whenever a new value is read into the server’s
cache. Not all interfaces support the Advise method.
Often the Advise method of reading data is the most efficient and best
Tip performing.
Caution: Do not mix advised points and polled points in the same group (i.e. scan class).
Some interfaces do not tolerate this and will not function correctly.
Output Points
Output points read a separate PI Point and write the value out to the data source. These often
reference calculation points which values are calculated by PI Analysis Service and are
performing a calculation that cannot be performed on the data source. Only several interfaces
support bi-directional data.
PI Interfaces capable writing value to data source, such as PI Interface for OPC DA or PI
Interface for Modbus Ethernet, are published in two editions: Read Write a Read Only.
With Read Only edition, the function of writing values to data source is disabled due to security
reasons.
Page 87
PI System Architecture, Planning and Implementation Course
Exercise Objectives
• Build PI OPC Points.
• Validate PI OPC points are collecting data from an OPC server.
Problem Description
You have a set of Pumps connected to your OPC Server generating data. (You have already
configured your PI Interface for OPC DA).
You need to create points in the PI Data Archive.
Approach
Use the PI OPC Client Tool (installed with the PI Interface for OPC DA) on PIINT01 to examine
your OPC Server. You should notice that there is a series of pumps. Each pump has points
associated with it, collecting simulated data.
Page 88
PI Points
Use the PI Interface for OPC DA User Guide and the information contained in the PI ICU to
configure the points for the first pump only. DO NOT build the Status point just yet. Pay
attention to the Location codes (1,3,4); and the relationship between the PI point attribute
Instrumenttag and the OPC ItemID.
1. Use PI OPC Client Tool Add Item dialog window to add Items of Pump1 to the Added
Tags list as in the screenshot above. Useful to copy the Item ID.
2. On PISRV01 in PI SMT Points → Point Builder define the necessary point attributes.
The naming syntax you use will be: <Pump#>.<Tag Name>
Page 89
PI System Architecture, Planning and Implementation Course
a. General Tab:
• Name: Pump1.OilPressure
• Descriptor: Oil Pressure for Pump 1
• Point Source: OPC
• Point Type: Float32
• Eng Units: kPa
b. Archive Tab:
• Zero: 0
• Span: 1000
c. Classic Tab:
• Location 1: 1
• Location 3: 1
• Location 4: 1
• Instrument Tag: Sample Process/Pump1/OilPressure
3. Create the point by clicking on Save icon.
4. Repeat the procedure for the other tags except Status. Keep the same Point Source,
Point Type, Location 1, Location 3 and Location 4 as for Pump1.OilPressure point. For
other attributes use the following table:
Eng
Name Description Zero Span Instrument Tag
Units
Main bearing
Pump1.BearingTemp temperature °C 0 100 Sample Process/Pump1/BearingTemp
for Pump 1
Flow rate for
Pump1.FlowRate m3/h 0 600 Sample Process/Pump1/FlowRate
Pump 1
Output flow
Pump1.OutputFlowRate rate for m3/h 0 1000 Sample Process/Pump1/OutputFlowRate
Pump 1
Pump speed
Pump1.PumpSpeed rpm 0 3000 Sample Process/Pump1/PumpSpeed
for Pump 1
5. Go to Data → Current Values. Add created points to the list. Use Point Source:
OPC as the filter. Verify all the points are updating.
Use the PISDKUtility message facility to see the points as they are
Tip recognized by the PI Interface for OPC DA – or the ‘View PI Message
Log Continuously’ icon in the PI ICU. It will show if the point was picked
up properly by the interface.
Page 90
PI Points
PI Points of type Digital are used to store data values that have discrete states exemplified
above. Example of typical states are Open/Closed for a valve or On/Off for a switch. While the
user is interested in the actual state, PI Data Archive stores this information as an integer. This
integer is then associated with a Digital State Set; a grouping of these states. Whenever the
value is requested, PI Data Archive retrieves the integer value, does a lookup in the Digital
State Set, and then presents the associated text value.
Digital Sets are kept in a common table for all points of type Digital to access. The Digital State
Set must exist prior to the creation of the digital point. When defining a point use the DigitalSet
attribute to store the associated Digital Set name. The digital states are case preserving, but
not case sensitive, so you can refer to them with upper and lower case, but any display will
show the configured upper or lower case. There is a large default set called System that
contains system error messages and other information. All points, including non-digital points,
can receive and archive a state from the System digital states set (Shutdown, PtCreated, Over
Range, Under Range, I/O Timeout, etc.).
Do not edit the SYSTEM set on your PI System!
Page 91
PI System Architecture, Planning and Implementation Course
To create a new Digital Set, select the Server then the New icon in the menu bar. You can
also right click and select Add Set from the pop-up menu. A new table will appear with two
columns. These columns are State Number and State Name. The State Name field
corresponds to the states of the data source and is manually entered, although is a facility for
importing digital states. The State Number field corresponds to the integer that PI System will
store in the archive for that digital state. This field is populated automatically, starting at a value
of 0 and increasing by 1 from there. Once you have fully entered all your digital states,
remember to save the new digital states by clicking on the Save icon in the toolbar.
Note: Additions and edits to Digital Sets are immediately available on the PI Data Archive.
However, most client applications, including PI SMT, cache the Digital Sets. This means
that you may have to exit and restart the client application for any changes to be visible.
Page 92
PI Points
Exercise Objectives
• To create a digital state set and point.
Problem Description
A new controller has been installed in your plant, and the
OPC Data server, for which you configured PI Interface State Name State Number
for OPC DA in an earlier exercise, is collecting its data.
It has digital points. Stopped 0
Approach
1. On PISRV01 open the PI SMT and navigate to Points → Digital States plug-in.
2. Create new Digital State Set called PumpStatus.
3. Fill the State Names according the table above.
4. Save it and restart PI SMT. Why? ________________________________________
5. Navigate to Points → Point Builder plug-in.
6. Create a new point with the following attributes:
a. General Tab: Name: Pump1.Status; Description: Status of Pump 1; Point
Source: OPC; Point Type: Digital; Digital Set: PumpStatus
b. Classic Tab: Location 1: 1; Location 3: 1; Location 4: 1; Instrument Tag:
Sample Process/Pump1/Status
c. Archive Tab: Keep defaults. Step attribute greyed out? Why? _____________
7. Save the configured PI Point.
8. Wait for the PI Interface to start collecting data for the new point.
9. Check the updates in Data → Current Values plug-in.
Page 93
PI System Architecture, Planning and Implementation Course
7.10 PI Builder
The PI Builder is an add-in to Microsoft Excel. The spreadsheet format is convenient when
viewing and editing in bulk, with a row for each point or element and a column for each attribute.
The tool best suited to bulk build and edit points is PI Builder
Like every powerful tool, PI Builder can save you a lot of time, or do a
Tip lot of damage if not used carefully. Be careful!
Notice that the Delete action is not enabled by default. There is no “undelete” for a point. If
you delete a point by accident, you cannot get their history back. The history is
inaccessible or lost. Entire systems have been deleted by accident.
It is recommended that you only enable Delete when you need to; be extremely careful when
using it. Turning the point attribute SCAN to OFF is a better alternative.
OSIsoft recommends that you export only attributes that have been changed; that is, remove
any unchanged columns. If you don’t do this, then all the attributes are exported, not only those
that have changed.
Moreover, only export the points (rows) that are new or that you have changed.
Page 94
PI Points
Exercise Objectives
• Create points in bulk using the PI Builder
• Modify points in bulk using the PI Builder
Problem Description
Create the remaining points of Pump2 to Pump5 for the PI Interface for OPC DA without
tedious necessity of using the PI SMT Point Builder plug-in.
Approach
1. On PIINT01 open PI OPC Client Tool. Connect to OPCSample.OpcDa20Server.1
2. In Add Item window in Server Browsing section check Flat and hit List.
3. In total 30 items are listed. Select all items for Pump2 to Pump5 (Selected Items: 24)
and click Add Selected button and OK.
4. On main menu toolbar go to File → Save As… and select the destination folder for
TagList.csv file (for example Desktop). We do not care about the opcint.bat file.
Page 95
PI System Architecture, Planning and Implementation Course
9. From Select Object Types and Column Headers check only the following attributes:
a. General: Description, digitalset, engunits, pointsource, pointtype
b. Archive: scan, span, zero
c. Classic: instrumenttag, location1, location2, location3, location4, location5
10. All other attributes are not needed and should be unchecked. Except Required
Columns as expected cannot be unchecked.
11. Open a new sheet in MS Excel, select Data tab and from section Get External
Data click on From Text button.
12. Load the TagList.csv file you copied from PIINT01.
13. In Text Import Wizard on Step 2 select Comma as delimiter and finish the
wizards with default settings.
14. Copy the instrumenttag column from Sheet2 to Sheet1 and append it to the
instrumenttag column there to rows loaded for Pump1.
15. Using the replace all function (CTRL+H) replace “Sample Process/” with “NULL”
and then replace “/” for “.” in Tag column to have point names according the
naming syntax <Pump#>.<Tag Name> and again copy to Sheet1 Name column
and append.
16. In Sheet1 replicate the values from columns ObjectType, pointsource, scan,
location1, location2, location3, location4 and location5 to the rest of the rows. (You
can use the double-click on the lower right corner of the cell )
Page 96
PI Points
17. For engunits, span and zero the values are repeating for each pump. Select the all
rows for Pump1 in those columns and copy and paste below 4 times.
18. The same goes for Description column only there you must modify the pump
number (CTRL+H).
19. Copy PumpStatus in digitalset to Status tag rows for Pump2 to Pump5. You PI
points configuration is now complete.
20. Click on (x) Select All button to select all rows, but then deselect rows
for Pump1 as those tags already exist.
21. Hit Publish and select Create Only option. Save the file.
22. In PI SMT Data → Current Values load the created tags and verify the values are
updating.
You may choose to use the PI Points for OPC DA Int – Pumps.xlsx spreadsheet provided in
the Exercise Files directory, to create the PI Points if falling behind or due to time constrains.
DO NOT PROCEED beyond this point until all points are collecting data. Many of the remaining
course exercises depend on this exercise.
Page 97
PI System Architecture, Planning and Implementation Course
8. PI Vision
Objectives
• Describe PI Vision architecture
• Introduce Kerberos Delegation
• Install and configure PI Vision
• Install PI ProcessBook to PI Vision Migration Utility
• Create a simple display in PI Vision
1. Clients are individual PI Vision users accessing PI System data. PI Vision is supported
by most modern browsers on a wide variety of devices, including tables and phones
running iOS or Android operating system.
Page 98
PI Vision
2. PI Vision IIS Application Server provides the execution environment for PI Vision.
The application server handles all application operations between users (clients) and
PI Data Archive servers, PI AF servers, MS SQL Server and PI Web API.
3. PI Web API provides cross-platform, multi-user programmatic access to PI System
data
4. PI Web API Crawler enables the search functionality of PI Vision by periodically
crawling the registered servers for metadata and creating a search index.
5. PI Vision SQL Database on MS SQL Server stores user display settings and
definitions. Display definitions include such data as a display name and display owner,
symbols on the display, user permissions etc.
OSIsoft recommends that PI Vision uses the SAME MS SQL Server that PI AF uses.
Otherwise, you can either install MS SQL Server on the same computer as PI Vision IIS
application server or you can use a dedicated MS SQL Server installation.
OSIsoft strongly recommends that the PI Data Archive server(s) and PI AF server(s) be in the
SAME DOMAIN as PI Vision IIS Application Server and MS SQL Server hosting the PI Vision
SQL Database
Page 99
PI System Architecture, Planning and Implementation Course
2. Symbol creation triggers a request for PI System data, which PI Vision IIS Application
Server relays to PI Data Archive or PI AF. When PI System data returns to the client,
the symbols are populated with data values.
An IIS application pool is a pool - i.e. a collection - that houses applications on IIS. Each
application pool consists of a process called w3wp.exe that runs on the server machine.
PI Vision installation creates three application pools:
• PIVisionAdminAppPool runs the Administration website
• PIVisionServiceAppPool runs the main PI Vision application website
• PIVisionUtilityAppPool runs the PI ProcessBook to PI Vision Migration Utility website.
The applications pools run under Windows service accounts that have appropriate access
permissions across the PI System.
Page 100
PI Vision
PI Vision installation creates four local groups on PI Vision IIS Application Server:
• PI Vision Admins: Members of this group are granted access to the PI Vision
Administration website https://<WebServer>/PIVision/Admin.
• PI Vision Users: Members of this group are granted access to the main PI Vision
application website https://<WebServer>/PIVision.
• PI Vision Utility Users: Members of this group are granted permission to use PI
ProcessBook to PI Vision Migration Utility to migrate PI ProcessBook displays to
native PI Vision displays.
• PI Web API Admin: Members of this group are granted permissions to access PI Web
API search indexes website
https://<WebServer>/piwebapi/admin/search/database.html.
The requirements for the software on the machine the PI Vision IIS Application Sever are:
• Microsoft Windows Server 2012 64-bit and later, incl. Server Core versions
• Microsoft Information Services (IIS) 8.0 and later
• Microsoft .NET Framework 4
The following table show the recommend hardware sizing based on the number of users
(clients) connecting to the PI Vision IIS Application Server at the same time:
CPU: # of Cores 4 4 8
RAM (GB) 6 12 24
PI Vision requires MS SQL Server 2014 or above. All editions (Express, Standard, Enterprise)
are supported.
Page 101
PI System Architecture, Planning and Implementation Course
PI Vision clients need to use web browsers that are HTML5 compatible:
• Microsoft Internet Explorer 11
• Microsoft Edge 44 and later
• Google Chrome 76 and later
• Mozilla Firefox 69 and later
• Safari 11 and later
Simply speaking, in order to view data from PI Data Archive and PI AF in PI Vision, client’s
(user’s) account must authenticate not only to PI Vision IIS Application Server, but also to PI
Data Archive and PI AF. PI Vision IIS Application server needs to forward (delegate) client’s
credentials to PI Data Archive and PI AF for authentication. This is called a Double Hop
scenario.
Kerberos Double Hop is a term used to describe our method of maintaining the client's
Kerberos authentication credentials over two or more connections. In this fashion we can
retain the user’s credentials and act on behalf of the user in further connections to other
servers.
It works in 5 steps:
Step 1 – Client provides credentials to domain controller and it returns a Kerberos ticket to the
client.
Kerberos ticket confirms the client credentials are validated and client is authorized to receive
a service ticket. Service ticket provides access to application services.
Page 102
PI Vision
Step 2 – Client uses the Kerberos ticket to request a service ticket from domain controller to
connect to PI Vision IIS Application Server.
Step 3 – Client connects to PI Vision IIS Application Server and provides both Kerberos and
service tickets.
Step 4 – PI Vision IIS Application Server uses the client’s Kerberos ticket to request a service
ticket, so PI Vision IIS Application Server can connect to PI Data Archive \ PI AF.
Step 5 – PI Vision IIS Application Server connects to PI Data Archive / PI AF using the client’s
credentials.
Page 103
PI System Architecture, Planning and Implementation Course
These types of delegation are configured for the service that delegates to other services. In
our case, PI Vision service (PIVisionServiceAppPool) delegates to PI Network Manager
service of PI Data Archive and PI AF Application Service.
Setting up the delegation requires access to the Active Directory Users and Computers on the
Domain Controller and Domain Admin privileges.
Setting up Kerberos delegation is described in PI Vision Installation and Administration Guide
in chapter “Enable Kerberos delegation using a custom PI Vision service account” or in
OSIsoft Live Library.
If standard Domain User Accounts are used for the services all four types of delegation can
be configured.
If Group Managed Service Accounts (gMSA) are used for the services only Resource-
Based Constrained Delegation is possible. This is case of PISCHOOL environment.
RBCD configuration can only be done via PowerShell. To setup the delegation for the account
of the service we need to delegate to -PrincipalsAllowedToDelegateToAccount parameter
is used. In our case for the PISCHOOL\SVC-PIDA$ and PISCHOOL\SVC-PIAF$ gMSA.
Set-ADServiceAccount -Identity SVC-PIDA -PrincipalsAllowedToDelegateToAccount
DELEGATION
Set-ADServiceAccount -Identity SVC-PIAF -PrincipalsAllowedToDelegateToAccount
DELEGATION
DELEGATION is the Domain Group type Security where PISCHOOL\SVC-PIWEB$ gMSA is
member of.
Page 104
PI Vision
A service principal name (SPN) is a unique identifier of a service instance. SPNs are used
by Kerberos authentication to associate a service instance with a service logon account. This
allows a client application to request that the service authenticate an account even if the client
does not have the account name. Without the SPN the client cannot receive the Service ticket
and Kerberos delegation is not possible.
To configure delegation for PI Vision the SPNs must be registered for these services:
• PI Network Manager for PI Data Archive running under PISCHOOL\SVC-PIDA$
• PI AF Application Service for PI AF running under PISCHOOL\SVC-PIAF$
• PI Web API and PI Web API Crawler services and IIS PIVisionServiceAppPool,
PIVisionAdminAppPool, PIVisionUtilityAppPool application pools for PI Vision that will
be running under PISCHOOL\SVC-PIWEB$
The SPN name format for host-based service is composed of two elements:
<service class>/<host>
<service class>: A string that identifies the general class of the service. For example,
“SqlServer”. In general, this can be any string that is unique to the service class. Be aware
that the SPN syntax uses a forward slash (/).
• PIServer is service class of PI Network Manager service of PI Data Archive
• AFServer is service class of PI AF Application Service
• HTTP is service class for web applications using HTTP or HTTPS protocol such as PI
Vision, PI Web API and PI Web API Crawler.
<host>: The name of the computer on which the service is running. It can be FQDN or
hostname.
SPN can be registered from any machine which is a member of the domain by user with
appropriate permissions (such as Domain Admin or any user who was granted permissions)
To register an SNP use command line tool SETSPN in elevated command prompt and the
following syntax:
setspn -s <service class>/<host> <domain>\<service account>
It is a good practice to register SPN for both <host> identifiers: hostname and FQDN.
Page 105
PI System Architecture, Planning and Implementation Course
To verify the SPNs are registered correctly use SETSPN -L <domain>\<service account>.
setspn -L PISCHOOL\SVC-PIDA$
setspn -L PISCHOOL\SVC-PIAF$
setspn -L PISCHOOL\SVC-PIWEB$
PI Data Archive and PI AF are capable to register the SPNs by themselves if their service
account is granted the permissions using this PowerShell command:
$gMSA = Get-ADServiceAccount -Identity SVC-PIDA
dsacls $gMSA.DistinguishedName /G "SELF:RPWP;servicePrincipalName"
$gMSA = Get-ADServiceAccount -Identity SVC-PIAF
dsacls $gMSA.DistinguishedName /G "SELF:RPWP;servicePrincipalName"
For more detailed information about Service Principal Names beyond the scope necessary
for this course visit Microsoft Docs.
Page 106
PI Vision
After Web Server (IIS) role is installed Internet Information Services (IIS) Manager is in Start
Menu → Windows Administrative Tools.
If the Web Server is dedicated only to PI Vision application, then it is possible to install it to
the Default Web Site, but if the Web Server is shared with other web applications, third-party
or OSIsoft’s PI Manual Logger Web and RtReports Generator, it is recommended to install PI
Vision to the dedicated website.
For new website it is necessary to assign bindings and
their ports. HTTP protocol has default port 80 and HTTPS
default port 443. If those ports are taken by another
website, they can’t be used, and different port number
must be assigned. Any other number must be specified in
URL address.
Page 107
PI System Architecture, Planning and Implementation Course
Exercise Objectives
• Install PI Vision and PI Web API
• Install PI ProcessBook to PI Vision Migration Utility
Problem Description
Kerberos delegation is set up and IIS application server is prepared. Install and configure
PI Vision on PISRV02, so you will be able to visualize data from PI points that you created
previously.
Approach
1. On PISRV01 open PI SMT and navigate to Security → Identities, Users & Groups
and create new PI Identity and call it PI Vision. Map it to the PISCHOOL\SVC-
PIWEB$ gMSA.
2. Navigate to Security → Database Security and assign Read Access to PI Vision
identity in following tables: PIDBSEC, PIMAPPING, PIPOINT and PIUSER.
3. On PISRV02 run PI Vision install kit located in PI Install Kits folder.
4. In PI Web API install section keep the default selection and location and click Next.
5. On the next screen where you can choose the location of search indexes keep the
default path %ProgramData%\OSIsoft\WebAPI and click Next.
Page 108
PI Vision
6. On the next screen confirm the option Create and use “PI Web API Admins” group
click Next and Install.
7. Installation of PI Web API is complete and click Finish. Do not continue with PI Vision
installation, because this will open PI Web API Admin Utility to finish the PI Web API
configuration.
8. Uncheck the participation in PI System Customer Experience Improvement Program.
Click Next.
9. The PI Web API configuration is stored in PI AF Configuration database. Click on
Connect button to test connection to PISRV01 AF server. Connection to PI AF must
be verified to enable Next button.
10. PI Web API listen for HTTPS traffic on communication port. Keep the default port 443
and adding a firewall exception. Click Next.
Page 109
PI System Architecture, Planning and Implementation Course
11. Because the certificate was already assigned to HTTPS binding in PIVision website
configuration in IIS Manager it is now pre-selected. Otherwise the selection is done
here. If no certificate is available, Self-signed certificate will be created. Click Next.
12. Next screen is the PI Web API and PI Web API Crawler services account selection. PI
Web API Admin Utility is not capable to accept gMSA. Logon test will fail. Keep the
selection of default NT Service\piwebapi and NT Service\picrawler accounts.
13. For PI Web API Crawler keep the default URL https://pisrv02.pischool.int/piwebapi.
Click Next.
Page 110
PI Vision
14. The final screen is the summary before the changes are applied. Check Accept all the
configurations and click Next.
15. Configuration is now stored with custom accounts. To apply gMSA click Finish to close
the PI Web API Admin Utility.
16. Open Services Manager and locate PI Web API and PI Web API Crawler services and
switch default accounts for gMSA PISCHOOL\SVC-PIWEB$. Do no restart them!
17. Changed the account in Services Manager is not enough for PI Web API. The change
must be applied to the PI AF Configuration database. In order to do this, run PI Web
API Admin Utility located in Start Menu → PI System folder again.
18. Keep clicking on Next. In account selection for PI Web API and PI Web API Crawler
services gMSA are now selected.
19. On summary page again check to accept all the configurations and click Next to apply.
After all jobs complete successfully click Finish.
20. Now continue with PI Vision installation. Click Next and acknowledge compliance.
21. PI Vision install kit installs missing Windows features if necessary. Keep the “Install
missing Windows features now” checked and click Continue and OK.
Page 111
PI System Architecture, Planning and Implementation Course
25. Once the installation is complete. Click Finish and then agree with computer reboot.
26. After logging back close the installation dialog and run PI ProcessBook to PI Vision
Migration Utility install kit from PI Install Kits folder.
27. Keep the default location %PIHOME% (D:\Program Files (x86)\PIPC). Click Next →
Install → Finish.
28. Verify the installation by running the utility from newly created desktop shortcut.
Page 112
PI Vision
Exercise Objectives
• Configure PI Vision after installation
• Create a simple display to visualize data from default or Pumps PI points
Problem Description
PI Vision is installed, but you are not done yet. Finnish the configuration in IIS Manager and PI
Vision Admin website. For verification created a simple display to visualize the data from PI
Points.
Approach
1. On PISRV02 open PI SDK Utility and add PISRV01 PI Data Archive server to the list.
2. Open IIS Manager from Start Menu. Expand the menu and select Application Pools.
3. Right-click on PIVisionAdminAppPool and go to Advanced Settings.
4. From Process Model section select Identity and click on […]
5. Select Custom account and click Set…. Insert PISCHOOL\SVC-PIWEB$ gMSA and
confirm.
Page 113
PI System Architecture, Planning and Implementation Course
7. To apply the new identity the Application Pools must be recycled by right click →
Recycle or Stop and Start.
8. Expand Sites and PIVision website in navigation tree. Click on PIVision application.
From Management section at the bottom, select Configuration Editor.
Page 114
PI Vision
10. Set usAppPoolCredentials from False to True and hit Apply in Actions pane.
13. Select Data Servers tab. Click on Test Connection for PISRV01. After green check
mark check Allow and click on Save. Do not allow PISRV02 as it is not necessary
now.
14. No configuration necessary in Asset Servers tab now as we do not have any AF
Database available, yet.
15. On the Overview page there should be only green check marks . Pay attention to
the “Indexed?” column. PI Web API Crawler must build search indexes. Depending
on the size of the PI System (# of PI points, AF elements and attributes) the process
can take from seconds up to ten or more minutes.
16. To check the status of the process, enter URL
https://pisrv02.pischool.int/piwebapi/admin/search/database.html.
Page 115
PI System Architecture, Planning and Implementation Course
17. Configuration is now complete. To test everything works access PI Vision from client
machine to have the Kerberos double hop scenario. Use PIINT02. Enter URL
https://pisrv02/pivision to the web browser.
18. From the PI Vision main page create new display . Search for any PI
points, either default points or Pumps points an place differrent object to the canvas.
Verify you can see values.
19. Save the display using by clicking on Save and name it as you like.
Page 116
Data Flow
9. Data Flow
The PI Data Archive stores data in the form of events. Each event has a value and a
timestamp that indicates what time the value was collected.
PI Interfaces collect data from the data sources and typically use exception reporting, meaning
that they pass significant events on to the PI Data Archive and discard the rest. If the buffering
service is configured on the data collection node, then the events go through the buffering
service. If the interface node cannot connect to the PI Data Archive, the PI Buffer Subsystem
service holds the data until the PI Data Archive connection is restored.
Page 117
PI System Architecture, Planning and Implementation Course
PI Connectors (1st Gen & 2nd Gen) collect data and timestamps from the data sources, but they
do not timestamp the data and do not perform the exception reporting. All PI Connectors have
their own internal buffering which is separate from buffer for PI Interfaces. PI Connector’s buffer
is capable of buffering information for PI point and AF asset creation.
PI Connectors (2nd Gen) do not connect directly to PI Server but send data to PI Connector
Relay which has another internal buffering, same type as PI Connector and values are then
forwarded to PI Server.
Page 118
Data Flow
Exception reporting uses a simple dead band algorithm to determine whether to send events
to the PI Data Archive. For each point, you can set exception reporting specifications that
create the dead band. The PI Interface ignores values that fall inside the dead band.
The dead band is expressed as a deviation and is applied equally in positive and negative
manner. There is also a maximum time applied.
As mentioned earlier, PI Connectors do not perform exception reporting.
ExcMax
Temperature
C ExcDev
A
D E
B
ExcDev
Time
In the above illustration, values A, E, and F are reported to the PI Data Archive. Value A is the
last reported value, values B, C, D and E fall within the exception dead band, but value F falls
outside the dead band, so the interface reports value F and the its previous value, in this case,
E.
These exception parameters are set on a per point basis.
Note 1: Some PI Interfaces do not support exception reporting. You know enough by now to
check the documentation.
Page 119
PI System Architecture, Planning and Implementation Course
Questions
1. Why would we apply an Exception Maximum (ExcMax)?
3. Give at least one valid reason why you would turn OFF exception processing for a point.
9.5 Snapshot
The Snapshot Table is simply the “current” or most recent value for each point in the PI Data
Archive.
The Snapshot Subsystem populates this table and performs the Compression Algorithm
Calculation. (As it will be explained later, in PI Buffer Subsystem for PI Interfaces, compression
is performed back on the data collection machine).
When a new value is received, it is compared to the previous value.
• If that value indicates that the previous value passes compression, then the previous
value is sent on and the new value is retained as the new “current” value.
• If that value indicates that the previous value fails compression, then the previous value
is discarded, and the new value is retained as the new “current” value.
The Data → Current Values plug-in in PI SMT is the view of that snapshot table.
Page 120
Data Flow
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.
Activity Objectives
• Determine which events from PI Interface will make it to the Snapshot in PI Data
Archive.
Approach
Consider the following attribute values for a PI point:
ExcDevPercent 2%
ExcMax 180 seconds
Span 200 units
Zero 0 units
The current snapshot received in the PI Data Archive for this point is:
Value: 70.3 Timestamp:10:00:00
Which of the following values collected by the PI Interface pass the exception test?
10:01:00 67.1
10:02:00 71.4
10:03:00 70.1
10:04:00 68.2
10:05:00 66.0
10:06:00 65.8
10:07:00 64.2
10:08:00 60.0
10:09:00 63.1
Page 121
PI System Architecture, Planning and Implementation Course
9.7 Compression
The point of compression testing is to store just enough data to reproduce the original data
from the data source, within the limits of accuracy required. It is up to the user to decide the
limits of accuracy.
The compression process applies a deviation in a similar manner to exception except that it
considers the slope of the data.
In the following illustration, all the events fall around the same straight line. In a simple case
like this, there is no need to store all the points on the line. If you store just two points, you can
recreate the point value for any other time, with the accuracy of ±CompDev.
CompDev
E
CompDev
D
F
Temperature
CompMax
Time
The same principle applies to compressing real-world data. PI Data Archive uses a
sophisticated compression algorithm to determine which events it needs to keep in order to
provide an accurate data history. The CompDev and CompMax attributes allow you to control
the granularity of the compression algorithm.
Like the exception parameters, these compression parameters are also set on a per point
basis.
Page 122
Data Flow
If you create a point in PI Data Archive and do not specify values for
Tip exception and compression specifications, the default values will be
used. This should be avoided because the exception and compression
values for each point should correctly reflect the desired point values.
PI Connectors create points with the default values, which can be
changed later, but exception attributes are ignored.
If you turn exception and compression off, you may adversely affect the performance of the
system by archiving many more values than necessary. For example, a valve scanned every
few seconds. With no exception or compression, the value of OPEN would be recorded
thousands of times unnecessarily. While disk space is cheap, the more limiting factor is the
speed of retrieval. Disk latency and network bandwidth limitations may impede performance
when retrieving data
As a starting point recommendation for these settings, we recommend setting the compression
deviation (CompDev) to the minimum change measurable by the instrument. The exception
deviation (ExcDev) should be set to half of the compression deviation. It is important to note
that these are only starting point recommendations and you should inspect your data for the
desired resolution. In some cases, it may be advisable to turn off exception and compression
entirely. To achieve this, set the exception deviation (ExcDev) and the exception maximum
(ExcMax) to 0. Turn off compression directly (Compressing set to Off), although it is
recommended to leave compression On, and Compdev at 0. If set properly, PI Data Archive
will archive values that reflect an accurate change in the device, without wasting space on
duplicating values or losing meaningful values.
Page 123
PI System Architecture, Planning and Implementation Course
9.9 PI Archives
The data tables that the PI System stores data in files that are called “Archives.”
Archives have the following characteristics:
• Starting from PI Data Archive 2015, Archives are either Historical or
Future
• Historical Archives are fixed sized files
• Future Archives are dynamical sized files
• Archives must be registered
• The PI Data Archive only writes current values to one file at a time
• Historical Archives are sequential in time
• An archive has all the data for every point in the system for the period
bounded by its start and end times.
• Each archive has an associated Annotation file
When you create historical archives, they are created of a fixed size and the memory is
allocated upon creation to minimize the potential of fragmentation on disk.
You have the option of creating dynamic archives. Dynamic archives are files that grow as they
are filled. Dynamic archives should only be used for backfilling purposes.
Full fixed archive file will automatically become dynamic when you backfill data.
When you create future archives, they are created with an initial size of 1MB. If the data stored
in that archives ever exceed 1MB the future archive grows dynamically to store the extra data.
Archives Must Be Registered
For PI Data Archive to access the data in an archive, the archive must be registered (often
referred to as “mounted” in other systems). The archives can be located on any drive available
to PI Data Archive, if there is adequate bandwidth. But OSIsoft recommends to store archives
on local drives and use network drives only for backup or as a location for the oldest archives.
Future Archives with non-sequential data
Future archives are optimized for non-sequential data unlike real-time data stored in the
historical archives. This way future archive is only created when necessary.
Every future archive file has a pre-determined time range of 1 month but can be created
manually for longer period.
Page 124
PI Buffer Subsystem
Objectives
• Describe PI Buffer Subsystem
• Configure PI Buffer Subsystem
• Validate the functionality of PI Buffer Subsystem
Throughout this section, you will refer to various sections in the Buffering
User Guide. Please open this document.
Unless you have a specific reason why you do not want to preserve
Tip your data, you should always configure buffering for PI Interface!
PI Buffer Subsystem (pibufss) runs as an automatic Windows service under either a Local
System or custom service account, which is a recommended option.
Page 125
PI System Architecture, Planning and Implementation Course
There are three buffers used to process events: two memory buffers and a file buffer.
Depending on the amount of data being buffered, the buffering process can be in one of three
states. Initially, it uses a single memory buffer. When that fills, it switches to using dual memory
buffers. When these buffers become full, it switches to using dual memory buffers and a file.
There are three distinct stages in the PI Buffer Subsystem data that flows from the PI Interface
to the PI Data Archives. These stages are:
Page 126
PI Buffer Subsystem
Exercise Objectives
• Configure Buffering on PIINT01
• Validate data are being buffered
Problem Description
If the PI Data Archive is shut down or disconnected from the network, you need to have data
buffering installed and configured on the data acquisition computer to avoid data loss.
1. Open Local Users and Group (type lusrmgr.msc in Start Menu) and add
PISCHOOL\SVC-PIBUFFER$ as a member to the PI Buffering Administrators group.
Page 127
PI System Architecture, Planning and Implementation Course
Approach
To enable buffering on a data collector, follow these steps. (Buffering is also configured
through entries in piclient.ini files located in both %PIHOME%\dat and %PIHOME64%\dat
directories.)
4. The next step asks to define the account for PI Buffer Subsystem Service. As gMSA
PISCHOOL\SVC-PIBUFFER$ was defined prior configuration in Services Manager, it
is already filled in so just click Next.
Page 128
PI Buffer Subsystem
5. Buffering Manager runs the security test to access PI Data Archive, which is now
granted as gMSA was mapped to PI Buffer identity previously in PI Interfaces exercise.
Click Next.
6. Select the Buffer Queue location. For this environment set the location to D:\PI Buffer.
OSIsoft strongly recommends not having the buffer queue on the same drive as the
OS to avoid failure on the interface node by filling up the main drive.
Page 129
PI System Architecture, Planning and Implementation Course
7. The last window will run a verification on the status of the PI Buffer Subsystem. If
there are no errors, exit the installation wizard.
8. Once the installation wizard completed and closed the Buffering Manager window will
open showing the status and statistics of the PI Buffer Subsystem.
9. Restart PI ICU to show the new field Buffering status in General tab. It should be On.
10. Data should go through the PI Buffer Subsystem as configuration wizard also restarts
the PI Interfaces services to start after PI Buffer Subsystem service.
Page 130
PI Buffer Subsystem
Activity Objectives
Validate that PI Buffer Subsystem is collecting data. Watch the PI Vision display.
Approach
1. Open the PI Vision display created in PI Vision chapter in browser on PIINT01.
2. Validate that you are buffering data from the previous directed activity. Open command
line and navigate to directory %PIHOME64%\bin. Use command pibufss –cfg. If you
see state SendingData then events are flowing through.
3. Disconnect the PI Buffer Subsystem by command pibufss –bc stop from PI Data
Archive.
4. Monitor the buffer queue with pibufss –qs.
In the screenshot above you can see that the Events in Queue are increasing.
Page 131
PI System Architecture, Planning and Implementation Course
In the screenshot above you can see that the number of Events in Queue is now zero and the
queued data were flushed. When there are no events queued, Total Event Writes and Total
Event Reads counters need to match.
8. PI Vision display trend object has been backfilled.
Page 132
PI Buffer Subsystem
9. In the Buffering Manager, the buffering statistics update automatically in order to show
the Global Buffering Status, the estimated buffer capacity, the events in queue, and
the total events sent in real time:
In the screenshot above the global buffering status has Warning icon. Total Events Sent
counter is not increasing but Events in Queue counter is.
Page 133
PI System Architecture, Planning and Implementation Course
11. PI AF Tools
Objectives
• Introduce the PI System Explorer
• Describe elements and attributes
• Build elements and templates
• Build elements with the PI Builder add-in to Excel.
What is an Asset?
The PI Asset Framework (PI AF) Server is a part of the PI System. It contains assets or
“metadata” usually organized according to the assets containing the attributes monitored. PI
AF can be helpful to users of the PI Data Archive who know the assets but are not familiar with
attribute nomenclature. With assets, data can be located without understanding the technical
details of each piece of equipment.
Properly configured assets are helpful in finding all the SCADA points associated with a
specific piece of equipment, as well as non-SCADA information such as serial numbers,
maintenance dates and/or calculations associated with an asset.
PI AF allows you to base similar objects on a single template. Templates define a set of base
attributes for all the objects that use that template. Create the template once and you can
create as many elements based on the template as are needed.
Modifying a template results in the change automatically propagating to all elements based on
that template.
Page 134
PI AF Tools
Page 135
PI System Architecture, Planning and Implementation Course
PI AF Analysis consists of an expression that performs a calculation, and the scheduling for
its execution. It takes existing values as inputs to produce new outputs, new calculated values
or event frames. You can specify attributes from anywhere in your PI AF hierarchy as inputs
to an analysis.
Every analysis is associated with an element or, preferably, with an element template. You can
save analysis outputs by mapping them to attributes on that element or element template.
Three types of analysis are available:
• Expression
• Rollup
• Event frame generation
• SQC
As indicated previously PI AF can be used for asset-based calculations. In the AF Help file
is a list of Data Reference Functions that can be utilised. The calculations can be one
formula or a sequence of calculations and can have many input attributes. Calculations may
be derived that use PI point data, and both internal and external table data, as well as static
attribute data.
Your instructor will coach you if you need assistance during the
activity.
Exercise Objectives
• Explore features of AF
• Implement an asset hierarchy
• Build a PI Vision display upon Asset hierarchy
• The goal of the exercise is to build a meaningful PI AF structure and build a display
based on the asset hierarchy shown.
Exercise Description
PI AF allows the definition of consistent representations of organization assets and equipment
and uses these representations in simple or complex analyses that yield actionable
information.
Page 136
PI AF Tools
Without PI AF, displaying the data from five pumps in PI Vision may require five different
displays, if referencing PI Points directly. With the usage of Element Template in PI AF, only
one display need be created.
Approach
1. Use the PSE on PISRV01 to create a new database within the AF environment. Select
Database, New Database and enter a database name, ‘Pumps’, Select the database
just created.
2. Create an element named “Site Pumps”, precisely.
3. Right-click on ‘Site Pumps’ element to create Child Element of “Site Pumps” and name
it Pump1
4. Start adding attributes according the following description:
5. Status attribute creation displays a message, that Enumeration Set was not found.
Enumeration set in PI AF is like Digital State Set in PI Data Archive. Click Yes.
Page 137
PI System Architecture, Planning and Implementation Course
12. Check that all values are correct. And Check In the changes.
Page 138
PI AF Tools
16. Create new Elements from Pump template for Pump2 and Pump3.
17. When you use the template, it will automatically associate the correct PI points with
the attribute. Why does this work?
18. Keep PSE opened and open MS Excel. Select PI Builder tab. In
Connections → Database select Pumps AF database.
19. Click on Elements and select Find Elements from drop-down list
to open Element Search dialog window.
20. Select Pump template from Template drop-down list and hit
Search. Select one of the pumps.
21. In Select Object Types and Column Headers deselect all options
and only keep Required Columns and from Element section pick
just Template.
22. Add new rows Pump4 and Pump5 to column Name.
23. Replicate values in columns Parent, ObjectType and Template and unselect first
row, till it looks like this:
Page 139
PI System Architecture, Planning and Implementation Course
28. We need to add our Pumps AF database to PI Vision configuration. Open the PI Vision
Administration (https://pisrv02/pivision/admin) and in Overview page locate Asset
Servers/Databases Allowed section.
29. Click on Manage Configuration and tick the box next to Pumps database and hit Save
button
30. To be able to search for Elements and Attributes in PI Vision, PI Web API Crawler must
build an index of the added Pumps database. Open the Search Service Administration
page (https://pisrv02.pischool.int/piwebapi/admin/search/database.html) and wait until
the index is built.
Page 140
PI AF Tools
35. Because our Pumps elements are based on the same Element template, PI Vision
automatically recognizes it and enables option to switch between assets, therefore one
display can show data from all our Pumps.
Page 141
PI System Architecture, Planning and Implementation Course
12. PI Connectors
Objectives
• Introduction to PI Connectors, PI Connector Relay and PI Data Collection Manager
• Difference between PI Connectors (1st Gen) and PI Connectors (2nd Gen)
• Get to know the OPC UA standard
• Configuring the PI Connector for OPC UA (2nd Gen).
PI Connectors are the new generation of applications that simplify the process of adding new
data to the PI System by scanning data sources and discovering data items. Data streams are
then auto configured on the PI Server. There is no need to manually create PI Points during
initial setup or in the future. The PI Connector (1st Gen) or PI Connector Relay does this for
you by continually monitoring the source. A reference model is built in the PI AF server acting
as a mirror image of the data source.
The main differences between PI Interfaces and PI Connectors are summarized in the
following table:
Page 142
PI Connectors
The PI Connectors (1st Gen) are standalone applications that are responsible for the whole
data collection operation. Browsing data sources for PI points and asset hierarchy creation
information, collecting data, sending them to PI Data Archive and PI AF and running buffering
operations. Configuration is done directly with connector its own administration web-based
user interface.
The PI Connectors (2nd Gen) do not connect to PI Server directly, but values are sent through
middle-ware PI Connector Relay application. PI Connector configuration and administration is
done via PI Data Collection Manager application and not directly on it.
Page 143
PI System Architecture, Planning and Implementation Course
This architecture provides more security to the isolated control network. Communication
between PI Connector, PI Connector Relay and PI Data Collection Manager is processed over
secured HTTPS and AMQPS protocols connections using X.509 certificates instead of
Windows Integrated Security that would require domain trusts or usage of windows credential
manager.
Note: Always consult PI Connector user guide to determine the architecture. Whether it is
a standalone 1st generation connector or 2nd generation that requires PI Connector Relay
and PI Data Collection Manager. It cannot be determined from connector version. Version
1.x does not always mean 1st generation architecture. For example, the first PI Connector
for oBIX 1.x version was already released for 2nd generation architecture.
PI Connector Relay
PI Connector Relay is a connector component that relays data coming from a PI Connector to
the PI System. The PI Connector sends a generalized representation of the assets and real
time measurements that it collects from the data sources to PI Connector Relay. PI Connector
Page 144
PI Connectors
Relay creates elements, event frames in PI AF servers, and PI points in PI Data Archive. PI
Connector Relay can send data that comes from PI Connectors to multiple PI Systems.
Administration
A PI Connector or PI Connector Relay must first be registered before it can be administered
by the PI DCM and participate in data collection. After registration, PI Connector and Relay
initiate the connection to PI DCM. If the connection is allowed, PI DCM uses the connection to
remotely administer the PI Connector and PI Connector Relay. PI DCM cannot initiate a
connection. Administration communication occurs over port 5672 on PI DCM host.
Data Collection
PI Connectors and Relays must be registered with PI DCM and routed in data flow path to
participate in data collection. PI Connector establishes a connection and sends data to port
5671 on PI Connector Relay host. The data flow is one-directional, but protocol control
messages are sent by the PI Connector Relay when responding to the PI Connector.
12.1.5 Security
Types of connections
• HTTPS
Service web-based user interfaces and listen for registration requests. HTTPS port is
configurable. The X.509 certificate associated with the HTTPS port is self-signed and
created during installation of PI Connector, PI Connector Relay and PI DCM along with
port configuration.
• AMQPS
AMQPS is a secure version of the AMQP (Advanced Message Queuing Protocol).
AMQPS connections process administration message and forward data from PI
Connector to PI Connector Relay. The AMQPS connections are secured using self-
signed X.509 certificates created when PI Connector, PI Connector Relay or PI DCM
are installed. The certificate used by an AMQPS connection is different from the
certificate associated with HTTPS connection and has unconfigurable port. 5671 for PI
Connector Relay and 5672 for PI DCM.
Local Groups
Installation of PI Connector (2nd Gen), PI Connector Relay and PI DCM creates two local
groups:
• PI Connector Administrators
Members of this group are allowed to access the administration web-based interfaces
of PI Connector, PI Connector Relay and PI DCM. Perform administrative tasks and
configuration.
• PI Trusted Installers
Members of this group are allowed to register PI Connector to PI DCM and in PI DCM
confirm the PI Connector registration and register PI Connector Relay.
Page 145
PI System Architecture, Planning and Implementation Course
PI Connectors and PI Connector Relay are inherently capable of buffering data whenever data
flows from one process boundary to another. Buffering is always on and is not user
configurable. There are no separate processes associated with buffering. Each connector and
relay processes themselves buffers the data. Configuration for buffering is limited to specifying
the folder during setup to determine where data is buffered.
Buffering to PI System servers (PI Data Archive and PI AF) includes time-series values, tag
creation, and asset creation events.
Note: PI Connector Relay’s buffering is now PI Collective aware. PI Connectors (1st Gen)
buffering is not. But the PI Collective pickup is not automatic when Destination server is
already configured. It has to be removed and added again in PI Data Collection Manager.
It is possible to modify the PI AF structure that is generated by the PI Connector Relay, but
with several limitations and only a few actions allowed.
Unsupported modifications:
- Deleting element templates created by PI Connector Relay
- Renaming element templates created by PI Connector Relay
- Deleting template attributes crated by PI Connector Relay
- Renaming template attributes created by PI Connector Relay
- Changing data type of attributes created by PI Connector Relay
It is possible to modify selected point attributes after they are created by PI Connector Relay.
- Modification of the compression settings attributes
- Modification of PI Point security settings
- Attributes like Step, Scan, Archiving, Span, Zero, Typical Value
Page 146
PI Connectors
Exercise Objectives
Use minimum privileged accounts and set the security on PI Server. Install the PI Connector
Relay and PI Data Collection Manager.
PI Connector Relay and PI Data Collection Manager require permissions according the
following table:
PIUSER Read
PIPOINT Read
PIREPLICATION Read
PIUSER Read
Page 147
PI System Architecture, Planning and Implementation Course
3. In Identities tab do a right-click on blank space, select New Identity and enter name PI
Connector Relay. Switch to Mappings tab and click on Add and map it to
PISCHOOL\SVC-PIRELAY$ gMSA.
4. Repeat the procedure for PI Data Collection Manager AF identity mapped to
PISCHOOL\SVC-PIDCM$ gMSA.
5. Back in PI AF Servers window, right-click on PISRV01 and select Security. From Items
to Configure select only PI AF Server. Click on Add and select both AF Identities: PI
Connector Relay and PI Data Collection Manager. After adding them to the list, assign
just Read permissions to both.
6. From Child Permissions select Do not modify child permissions and confirm settings.
Page 148
PI Connectors
7. Open the security settings for Pumps database. Keep all items selected. Add PI
Connector Relay AF identity and check Read/Write and Read/Write Data
permissions (it automatically selects Read, Write, Read Data, Write Data).
8. Add PI Data Collection Manager AF identity and check Read and Read Data. Keep
Update child permissions for modified identities.
Page 149
PI System Architecture, Planning and Implementation Course
Approach
1. On PIINT02 in the PI Install Kits folder, run the PI Connector Relay installation kit.
2. As mentioned, PI Connector Relay and PI Data Collection Manager are using AF SDK,
therefore PI AF Client is always bundled within their installation kit.
3. Fill the information about the Asset Server (PI AF) – PISRV01
4. Only PI AF SDK .NET 4 is necessary be installed. No other components are required,
but PSE provides GUI access to AF SDK Connection Manager, therefore install it too.
5. In PI Connector Relay port configuration keep default port 5460 and Check Availability.
Click Next.
Page 150
PI Connectors
15. Verify the installation by accessing the PI Data Collection Manager and PI Connector
Relay pages. Open Google Chrome and insert URL https://piint02:5460/admin/ui to
access PI Connector Relay page and https://piint02:5461/ui to access PI Data
Collection Manager.
16. In PI Data Collection Manager add PI Connector Relay by clicking on the plus symbol
in Relays column and fill the Relay Settings:
• Name: PIINT02 Relay
• Address: PIINT02
Page 151
PI System Architecture, Planning and Implementation Course
• Port: 5460
• User Name: PISCHOOL\Student01 and password.
17. In Destinations column click Add Destination and fill Destination Settings:
• Name: PI Server
• PI Data Archive Address: PISRV01
• AF Server Address: PISRV01
18. Save Settings. Click on PI Server and select Data tab.
19. Publish Location Pumps AF database is selected, but publish location is in root. Click
on Edit Destination Data Settings at the bottom.
Page 152
PI Connectors
21. Keep the selections Create root element and Prefix points checked and Save
Destination Data Settings.
22. Click on PIINT02 Relay in Relays column. A check box appears next to the destination
PI Server.
24. And click on Safe Configuration button at the bottom. In Summary page click Save
and Start All Components.
25. PI Connector Relay is now connected to the destination PI Server, but with Warning
message as there is currently no PI Connector configured, which will be done PI
Connector for OPC UA configuration exercise.
Page 153
PI System Architecture, Planning and Implementation Course
OPC UA servers on a network are defined by a server endpoint. A Server Endpoint is a physical
address that allows clients to access one or more services provided by a server. Server
endpoint is specified by its URL string.
Beside standard URLs e.g. HTTP or HTTPS, OPC Unified Architecture uses its own scheme
opc.tcp. The endpoint has then the following syntax:
opc.tcp://<OPCUAServerHost>:<port>
Page 154
PI Connectors
PI Connector for OPC UA copies contextual and time-series data from OPC UA servers to PI
Data Archive and PI AF Servers. Static OPC UA variables are mapped to AF elements and
attributes, dynamic variables are converted to PI Points. Before starting, users have an option
to browse the whole OPC UA address space and select manually, or by using a query, what
they want to have replicated to PI System.
PI AF templates, elements, their attributes, and PI points are created automatically based on
the information obtained from browsing the OPC UA address space. Data from OPC UA
variables is read through subscriptions. The connector supports the Data Access (DA) and the
Historical Data Access (HDA) parts of the OPC UA specification.
PI Connector for OPC UA 2.x does NOT support a direct upgrade from
version 1.x! If you are upgrading your PI Connector for OPC UA 1.x version
follow the procedure in section Upgrade to version 2.x in PI Connector for
OPC UA User Guide.
Page 155
PI System Architecture, Planning and Implementation Course
Generic mode
Default mode and the closest one to how PI Connector for OPC UA 1.x worked. The most
significant difference is that the filtering is no longer based on OPC UA object types. Users
have the option to filter manually or using a query to select the actual OPC UA objects. Hence
the filter file, known from version 1.x of this connector, is no longer needed.
PCS7 mode
The PCS7 mode was included to enable users to run this connector also with SIMATIC
OpenPCS 7 UA servers, for which they previously needed a separate connector (PI Connector
for Siemens SIMATIC PCS7). The main differences compared to Generic mode are how the
PI AF structure is built, and how the static and dynamic variables are recognized.
TagsOnly mode
In this mode, users have the option to reference a .csv file with a list of NodeIds and several
other optional columns. Only those OPC UA variables, which have their NodeIds listed in the
file, will be subscribed for changes and will consequently forward events to the PI System. In
this mode, no PI AF hierarchy is created.
ISA95 mode
In this mode, the connector makes a few assumptions described in more details in connector’s
user guide about where to search for information in OPC UA address space for AF templates
to create PI AF hierarchy and how to name them, unlike in Generic mode.
For more details consult the PI Connector for OPC UA User Guide
Page 156
PI Connectors
Exercise Objectives
Install the PI Connector for OPC UA.
Description
This exercise will guide you through the PI Connectors installation.
Approach
1. On PIINT01 in PI Install Kits directory locate PI Connection for OPC UA install kit and
run it.
2. In port configuration keep the default port 5460 and Check Availability. Click Next.
3. As for PI Connector Relay and PI Data Collection Manager, PI Connector install kit
does not accept gMSA. Use PISCHOOL\PIDummy (pass: pidummy) instead and
Validate. Click Next.
4. Select D:\PI Buffer directory for buffer files location instead of default
%ProgramData%. Click Next and Install.
5. Add PISCHOOL\Student01 to the PI Connectors Administrators local group.
Page 157
PI System Architecture, Planning and Implementation Course
6. Click Add More Users and add PISCHOOL\SVC-PICON$ gMSA to the PI Connectors
Administrators and PI Trusted Installers local groups.
7. Remove PISCHOOL\PIDummy from the groups and add PISCHOOL\Student01 also
to PI Trusted Installers.
10. Verify the installation by accessing PI Connector for OPC UA page. Open Google
Chrome and insert URL https://piint01:5460/ui.
Page 158
PI Connectors
Follow the instructor to guide you through the configuration settings until
the asset structure and points are created
Activity Objectives
• Use the OPC UA Client Tool to verify the connection to the OPC UA Server and
browse the structure and obtain Root Node ID
• Register PI Connector for OPC UA to PI Data Collection Manager
• Configure PI Connector for OPC UA via PI Data Collection Manager
• Verify the asset structure and points were created after configuration
Approach
1. Verify the KEPServer EX 5.17 OPC UA Server services are running on PIINT01.
Page 159
PI System Architecture, Planning and Implementation Course
PI Connector for OPC UA must browse the entire OPC UA server address space for the first
time. This may take a long time for OPC UA Servers with complex address space containing
thousands of items and variables. But for data selection it is possible to narrow it down to only
specific part of that address space, by defining the Root Node ID in PI Connector’s data source
settings. It is a unique combination of Namespaceindex (ns) and Identifier (s) in syntax
ns=<index#>;s=<string>
Page 160
PI Connectors
8. To present only Simulation Examples address space section for data selection, Node ID:
ns=2;s=Simulation Examples will be used in PI Connector configuration.
Note: There are several OPC UA Clients from different vendors. In some of them, you need
to put together the Node ID using the Namespaceindex and Identifier. Some can display
the Node ID directly in ns=<index>;s=<string> form.
This is the validation of the updating variables on OPC UA Server. Now to configuration of PI
Connector for OPC UA.
Page 161
PI System Architecture, Planning and Implementation Course
13. Click on Save Configuration at the bottom and in Summary window select Save and
Start All Components.
14. PI Connector is now connected to PI Connector Relay, but it is missing the Data Source.
Click on OPC UA PI Connector and in Connector Details select Data tab and Add Data
Source.
15. Fill the Data Source Settings:
• Name: KEPServerEx
• Description: Site Pumps
• Mapping Type: Generic
• Discovery or Server Endpoint URL: opc.tcp://PIINT01.PISCHOOL.INT:49320
• User Name and Password: <blank>
• Root NodeIds: ns=2;s=Simulation Examples
16. Click Discover Available Endpoints and from drop-down list that appeared select
[SignAndEncrypt:Basic128Rsa15:Binary]and Save.
17. Select OPC UA connector and in Data tab click on Discover Data Source Contents.
Message window pops up to inform that entire address space will be browsed, and it can
take a long time. Agree and continue.
PI Connector and OPC UA Server exchange certificates, but they do not trust each other
certificates right-away. Thus, the error message in Message Log in Diagnostics tab for PI
Connector: “Error encountered while running discovery task for data source”
To make PI Connector and OPC UA server trust each other certificates, perform following
tasks:
Page 162
PI Connectors
Note: OPC UA servers from various vendors have different ways to trust PI Connector’s
certificate. You must consult the OPC UA server manual.
21. Back in PI Data Collection Manager, click again Discover Data Source Content. The
error is now gone and Select Data button is enabled. Click on it.
This opens data selection window. There it is possible to select data manually from address
space tree (the selection is limited by Root Node ID specification in PI Connector Data
Source configuration) or build queries for selection.
22. To select all our Site Pumps there are two options:
a. Build a query using New Selection Query button. For example, like this:
Page 163
PI System Architecture, Planning and Implementation Course
23. Both options return result 38 of 104 object selected and 30 PI Tags will be created.
Click Next to continue to Tag Name Configuration.
24. Instead of Automatic Tag Name Configuration select Custom and then Export tag
naming worksheet.
25. Open it on server with MS Excel (PISRV01 or PISRV02) and copy Automatic Name
column to Custom Name column. Using Replace function (CTRL+H) remove the
prefix “KEPServerEx.2.Simulation Examples.” from tall tags. Save the file.
26. Back in PI Data Collection Manager Import the edited worksheet.
27. Click Check Tag Names to check whether tags with same names do not already
exist in PI Data Archive.
28. Click Next to go to Summary page. There are two options how future changes can be
handled:
Page 164
PI Connectors
Notify me so I can specify what content to include and exclude: If this option is selected,
when new assets are discovered, the notification count in the upper-right area of the
screen updates. From any page in PI Data Collection Manager, click the notification count to
view notifications and then click the notification to go to the data selection screen, where you
can update your data selection queries as needed.
Use these selections as rules to automatically update destinations: As with previous
option, when the data source structure changes, the existing data selection query runs, and
any new elements and assets that are found withing the query are automatically added.
However, no notifications are posted, so you must manually check the structure for changes.
30. Open PSE and Pumps AF database to verify the structure exists and values are
updating.
Page 165
PI System Architecture, Planning and Implementation Course
1. What other type of data can be buffered by PI Connectors and PI Connector Relay
internal buffer beside time-series data?
Page 166
PI Security
13. PI Security
Objectives
• Describe the function of the PI License in the connecting logic
• Describe how users connect
• Describe the security implications of working on the server box
• Describe the ACL syntax and how access is granted
• Create and manage PI Identities
• Configure PI mappings
• Configure PI database security
• Configure PI point security
• Configure PI security settings slider
For the PI System to be useful people must be able to get critical data to make decisions.
In this chapter addresses the methods and best practices for allowing users proper access to
their data on PI Data Archive. PI AF security is not covered in this chapter.
Page 167
PI System Architecture, Planning and Implementation Course
Caution: Do we do not recommend using PI Users and PI Groups as they are less secure
than PI Identities.
Having logged into the computer via corporate windows account, the CEO is automatically
authenticated on PI Data Archive or PI AF. To accomplish this, PI System uses mapping of
users’ active directory group to a PI Identity or AF Identity. The identity specifies the read/write
permissions for accessing both configuration settings and data on PI Data Archive and on PI
AF.
You can use the Operation → Licensing plug-in in PI SMT to view your
license statistics.
Even though it is not used, a connection will always check with the PI License Subsystem
while connecting.
Page 168
PI Security
Application
You should avoid using the native PI Users and PI Groups in your
Tip security scheme. They require explicit login with username and
password, and they are inherently insecure and should be used only in
legacy systems. Also avoid using PI Trusts for applications.
Each connecting user or application is associated with a PI Identity and that PI Identity has
permissions explicitly granted by an ACL.
Page 169
PI System Architecture, Planning and Implementation Course
An Access Control List (ACL) string defines the access permissions for that entry.
Choices are “read” and/or “write.”
The syntax is:
Identity1:A(r,w) | Identity2:A(r)
Where Identity1 can read and write and Identity2 can only read.
You will apply the ACL in general in two places: Database Security or PI Point attributes.
In the Database Security table, you grant access to data structures on a global level. You can
also apply access permissions on a point-by-point basis.
Note: You must have WRITE access to the PIPOINT database to create new points. You do
not need this privilege to edit the configuration or data of the points once created. That access
is controlled on PI point security level (point security and data security attributes).
The table below lists the common database tables used for user access:
Database Controls…
PIPOINT Top-level access to Points, Points Classes and Attribute Sets. Editing
existing PI points can be provided through the PI point security
configuration on a point-by-point basis.
Page 170
PI Security
Activity Objectives
• Determine how security is applied
Approach
Open PI SMT. Examine the Security → Database Security table. Also, examine the security
settings for the point SINUSOID in Point Builder.
2. Why would no read access be provided for PI World identity for some of the tables?
3. What is the default security setting for the PIModules database table?
4. What scenarios can you think of that would require different settings for PI Point
security?
5. One table allows PIWorld write access. Which one is it, and why would it be
configured that way?
Page 171
PI System Architecture, Planning and Implementation Course
Ideally, you will have one PI Identity for each Active Directory Group of
Tip users, you will use to access the PI System. And PI Identity for service
account of applications requiring same level of access.
The PIWorld identity represents the Everyone concept of Windows; it specifies the rights of
non-explicit users or groups. All authenticated PI Server users automatically get the access
permissions defined for PIWorld (in addition to any other access permissions they have been
granted).
By default, PIWorld is granted read access to most PI Server databases and objects. You can
change the access permissions granted PIWorld, but you cannot delete this identity. The
PIWorld identity cannot be used in a mapping or a PI Trust.
You can disable PIWorld. If you do that, then users no longer get PIWorld access along with
their explicitly granted access permissions. This is a recommended action for fresh
installations of PI System. This can be risky for PI System upgrades. You might be relying on
PIWorld access in several places without knowing it.
PI User piadmin is a “GOD” local user that have unrestricted access to whole PI Data Archive,
no matter is it is defined in database or PI point ACL. Avoid mapping piadmin to Windows user
or service account.
Page 172
PI Security
Exercise Objectives
• Set Database Security that all applications are accessing PI Data Archive using
Windows Integrated Security
• Assign minimum permissions
• Edit PI Points ACL’s in Point Security and Data Security attributes using PI Builder
• Disable PI Trusts using PI Security Slider
• Disable PIWorld access
Problem Description
Security was configured during different PI System applications installations. But some PI
Identities do not have the least possible privileges, they are connecting via PI Trust or PIWorld
identity is utilized. Your assignment is to tight the PI Data Archive security so no PI Trusts are
used for connection and PIWorld for authentication and therefore they can be disabled. And
service accounts have only the minimum privileges assigned necessary for their functionality.
Approach
1. Examine Network Manager Statistics plug-in in PI SMT if there is any connection using
PI Trust. There should be PIAnalysisProcessor.exe application connection under
piadmin using local !Proxy_127! PI trust.
2. Create a new PI Identity PI Analysis and map it to PISCHOOL\SVC-PIANALYT$ gMSA
used for PI Analysis Service.
3. Assign this PI Identity to PIDS and PIPOINT databases ACL with Read permissions.
No need to assign it to any existing PI Points. PI Analysis Service needs be assigned only
in PI Points it writes calculations results into.
4. Restart PI Analysis Service in Services Manager and check Network Manager
Statistics again. It is now connected using WIS under PI Analysis identity and there is
no PI Trust utilized.
Now it is possible to disabled usage of PI Trusts using the “Security Slider” in Security →
Security Settings. In a good security environment, you will set the slider to a minimum of
explicit logins disabled, which is also a default setting after PI Data Archive installation. This
should not affect you at all if you avoid using PI Users and PI Groups.
5. Move the security slider to the top position and hit Save. As informed, you need to
restart PI Base Subsystem to apply the change.
Page 173
PI System Architecture, Planning and Implementation Course
Now when PI Trusts are disabled, let’s focus on the permissions for different applications.
PI Vision, PI Connector Relay and PI Data Collection Manager and PI Analysis identities
have all assigned proper permissions on Database Security level. PI Buffer and PI
Interfaces identities are only defined in PIPOINT database ACL with Read and Write
permissions. This is not necessary as neither PI Buffer Subsystem nor PI Interface create
PI points.
6. Remove the Write access for PI Buffer and PI Interfaces identity from PIPOINT
database.
For the PI point level security, the settings depend if PI Interface is also using output points
and if PI Buffer Subsystem is in place (as it should be at every data collection node) as it is
shown in the table below:
Why? ________________________________________________________
Page 174
PI Security
There are 3 groups of PI points with different ACL’s. 3 internal points which should not be
modified, PI points created by PI Connector Relay and then PI points for Random,
RampSoak and OPC DA interfaces.
8. Use Filter from MS Excel Data tab to select the ACL group of default PI points
(Random and RampSoak interfaces) and Pumps points for PI Interface for OPC DA.
The combination is the same for point and data security attributes:
piadmin: A(r,w) | piadmins: A(r,w) | PI Interfaces: A(r,w) | PI Buffer: A(r,w) | PIWorld: A(r)
9. Modify the security of the tag in the first row:
Data Security:
piadmin: A(r,w) | piadmins: A(r,w) | PI Buffer: A(r,w) | PI Vision: A(r) | PI Analysis: A(r)
Point Security:
piadmin: A(r,w) | piadmins: A(r,w) | PI Interfaces: A(r) | PI Buffer: A(r) | PI Vision: A(r) |
PI Analysis: A(r)
10. Apply the new security settings to the rest of the filtered rows and Publish the changes
in Edit Only mode.
Not really necessary to edit the security of PI points created by PI Connector Relay as PI
Vision identity is already included. You may remove the PIWorld, PI Buffer and PI
Interfaces identities from data and point security as they do not access these points.
Now it is possible to disable the PIWorld identity.
11. Open PIWorld identity properties and check Identity is disabled.
In Network Manager Statistics the PIWorld identity is still present assigned identities for
connected applications and we need to remove it.
To force applications to reconnect, PI Data Archive can be put into standalone mode which
closes all connections beside PI Data Archive subsystems.
12. Open CMD, navigate to %PISERVER%\adm and use command piartool -sys -
standalone on and then piartool -sys -standalone off.
Page 175
PI System Architecture, Planning and Implementation Course
Problem Description
You have many users requiring access to your PI System, but they all have different tasks to
do that require different levels of access to the points. Therefore, you want to grant access to
the PI Data Archive and its resources-based user roles.
You need to create a security structure that enforces the following business rules:
• The point BA:LEVEL.1 is a sensitive financial calculation and its data should only
be visible to the plant Supervisors (PI Supervisors Identity).
• The BA:CONC.1 point needs to be able to be written to by your Operators (PI
Operators Identity). It can be read by anyone.
• Your engineers (PI Engineers) need to be able to edit the attributes of all of the
BA:* points (BA:ACTIVE.1, BA:CONC.1, BA:LEVEL.1, BA.PHASE.1,
BA:TEMP.1).
• The point BA:ACTIVE.1 should only be visible for plant Engineers group. No one
else should not be able to find the point.
Page 176
PI Security
Approach
Map the Domain Groups to the PI Identities according the table in Problem Description section.
Add PIEngineers, PIOperators and PISupervisors identities to the PIPOINT database ACL with
Read access.
Why it is necessary? _________________________________________________________
Use the following table to write down the security settings for each “BA.:” point:
PI point Point sec. Data sec. Point sec. Data sec. Point sec. Data sec.
BA:ACTIVE.1
BA:CONC.1
BA:LEVEL.1
BA:PHASE.1
BA:TEMP.1
Test your security rules. Here are some suggestions (you may need to log off and on between
tests, as different users or use Right Click, ‘Run as Different User’ on PI SMT):
1. Log on as someone not in the Supervisors group and try to search for the point
BA:LEVEL.1. What result do you get?
2. Log on as someone not in the Engineers group and try to edit a point. What result do
you get?
3. Test the operator access to BA.CONC.1 with PI SMT Data → Archive Editor. Can she
add or change data in any other point?
4. Log on as someone not in the Engineers group and search for point BA:ACTIVE.1.
Can you find it?
Page 177
PI System Architecture, Planning and Implementation Course
Objectives
• Reiterate the components of a small PI system
• Provide further information on the more complex PI systems
Above, the PI Interface / PI Connector (1st Gen) / PI Connector (2nd Gen) with PI Connector
Relay are running as a service on the same computer as the source of the data. As the data
is collected, it is transferred in a timely manner to the PI Server. The users then request data
from the PI AF and/or PI Data Archive Server as required. Tools such as PI ProcessBook or
PI Vision will sign up for updates, so that any new data arriving at the PI Data Archive server
is displayed on the client as it is received. There is no need for manual refreshing of the
displays.
Page 178
Adding Power to the PI System Environment
Page 179
PI System Architecture, Planning and Implementation Course
The PI High Availability (HA) design provides for multiple PI Data Archives, each acting as an
independent storage for the time series data. These PI Data Archives function as a unit called
a collective. A PI Collective has two types of servers:
• Primary - the main server in a collective where configuration changes are made
• Secondary - the remaining servers in a collective
These servers automatically adopt configuration changes made on the primary but
receive data from the data source individually via a technique called N-way buffering,
explained later.
There are several high availability (HA) options for PI AF, both for the Microsoft SQL Server
that hosts the PI AF database (PIFD) and for the PI AF application server itself.
MS SQL Server options:
• AlwaysOn Availability Group (preferred option)
• Clustered
• Mirrored
• Transactional Replication (with AF Collective)
The preferred and recommended option currently is to use the Network Load Balancer over
set of PI AF servers. Those PI AF servers have redundant SQL back-end that is using of the
options (preferred AlwaysOn Availability Group, Clustered SQL server or Mirrored SQL
servers).
Page 180
Adding Power to the PI System Environment
For the overview of Always On Availability Groups for MS SQL Server, see the article
https://msdn.microsoft.com/en-us/library/ff877884
Page 181
PI System Architecture, Planning and Implementation Course
Page 182
Adding Power to the PI System Environment
PI AF Collective is not a recommended solution now as applications that require writes to the
AF Configuration database (PI Asset Analytics and PI Notifications), or applications that write
Event Frames will NOT work when the PI AF Collective primary server is unavailable, as
secondary AF Collective members are Read-Only.
For additional details see High Availability options for PI AF knowledge article.
Page 183
PI System Architecture, Planning and Implementation Course
The PI Interface buffering service writes time-series data directly to all members of the
collective, buffering data temporarily for those unable to receive data for a period. This
mechanism assures that time-series data stored in each current archive is an exact duplicate
of the other current archives in the collective.
The PI Connector and PI Connector Relay buffering is internal and installed with it. No
configuration is necessary. Many PI Interfaces and several PI Connectors (1st Gen) incorporate
failover mechanisms that allow for redundant data collectors. If one copy of the PI Interface or
PI Connector (1st Gen) shuts down, then another will take over the data collection.
PI Connectors (2nd Gen) and PI Connector Relay do not support failover.
PI Visualization Suite (PI Vision, PI ProcessBook, PI DataLink) can automatically switch from
the PI Data Archive server to any of the replicated servers in the event connection to current
member is unavailable; guaranteeing that all clients always have read-access to PI System
data.
It is possible to combine data from widely distributed PI System sites to a corporate PI System.
This allows corporate access to designated data on the distributed site PI Collectives without
interfering with the site servers.
Many companies do not have only one PI Server, especially global companies. One potential
architecture creates a PI Server for each site and a central PI Server that collects aggregated
data from each site. Either each site can have its own PI AF server or use centralized PI AF
that serves multiple PI Data Archives.
Page 184
Adding Power to the PI System Environment
The PI-to-PI Interface allows the aggregation of this data by copying data from one PI Data
Archive and making it available on another server. When a corporate PI Data Archive is
connected via the PI-to-PI Interface to remote site PI Data Archives, then required site data
(such as KPIs) can be presented (with history) at the corporate level. Dissemination of selected
data from the remote sites via the corporate PI System to corporate users becomes possible.
The PI System Connector has similar functionality, but more advanced.
• It reads the PI AF structure from a source PI AF server and sends the objects to a
destination PI AF server.
• All PI points referenced within the PI AF object structure and their data are also
collected from the source PI Data Archive and sent to the destination PI Data Archive.
• The PI System Connector continually monitors changes on the source PI AF database
objects and reflects those changes to the destination PI AF database.
• The PI Point data is initially backfilled to the destination and then monitored for current
data changes.
PI Cloud Connect allows the quick, easy and secure exchange PI System data between
companies. Instead of providing a spreadsheet or a VPN connection for every vendor or
business partner that you work with, a connection via PI Cloud Connect is available to publish
PI System data. To select the data you want to share, and just who you want to share it with.
Your suppliers can then make a connection to PI Cloud Connect and subscribe to the data
feed that you control.
Some vendors may already have a PI System today. If you want to exchange data with a
vendor who does not currently have a PI System, OSIsoft has a way to deliver on-prem (on-
premises) software based on subscription licensing and pricing.
Page 185
PI System Architecture, Planning and Implementation Course
The PI System Access family of products is designed to support the implementation of custom
applications on top of the PI System. PI System Access supports the integration of PI System
data with other applications and business systems such as Microsoft Office or SQL Server,
Enterprise Resource Planning systems (ERPs), reporting and analytics platforms, web portals,
geospatial and maintenance systems, just to name a few.
The PI System Access suite covers a wide range of use cases in various environments,
programming languages, operating systems and infrastructures.
Page 186
High Availability
Objectives:
• Describe the components of High Availability
• Create a High Availability PI Collective
• Implement PI Interface Failover
• List the limitations of PI High Availability
High Availability requires three (3) components all working together to function properly.
These components are:
• PI Interface / PI Connector (1st Gen) failover and/or N-Way buffering;
• PI Data Archive servers collective;
• PI Client application failover.
Buffer
PI Interface / PI Data
PI Connector (1st Gen) Archive
Data End
Source User
Buffer
PI Interface / PI Data
PI Connector (1st Gen) Archive
Page 187
PI System Architecture, Planning and Implementation Course
15.3 Constraints
The PI HA mechanism was designed to function in a situation where the servers and interfaces
are all contained within the same domain, and that the domain has a coherent structure. By
coherent structure, we are implying a functioning domain controller with reliable DNS
resolution.
In addition, to have proper initialization of the secondary nodes, there needs to be Windows file
copy access between the servers. Open the related TCP ports. Consult Appendix A to get more
details.
At the buffering level, data is replicated. Any data sent to the PI Data Archive from a source
other than a buffer mechanism is not replicated, only written to a single server. The same
situation arises with applications designed to read and write to a single server. Currently these
include:
• Performance Equations,
• Totalizer points,
• PI Batch Generator,
• Any custom manual data entry applications that do not use the PI SDK or AF SDK.
• PI SDK and AF SDK applications can take advantage of PI SDK or AF SDK buffering.
15.4.1 License
A license file will be required. The license file will have to acknowledge at least one
secondary server. The license must be obtained against the Primary PI Data Archive.
Make sure the license supports PI Collectives. Validate this be checking the license information
in PI SMT under Operation → Licensing. Select Resources from the dropdown and expand
pilicmgr.MaxSecondaryNodeCount The Amount Left should be greater than “0”.
Page 188
High Availability
When the PI Collective is formed the license of primary PI Data Archive is copied to all
secondary members. Functionality of secondary member of PI Collective is restricted
therefore there is no check against machine signature stored in the license.
If PI Data Archive is licensed for PI Collective, the production license already goes bundled
with temporary license which is used for soon to be secondary PI Data Archive installation.
If the upgrade to High Availability is done after some time when there is a single PI Data
Archive in production, the license needs to be updated to allow PI Collective creation.
OSIsoft strongly recommends that all members of PI Collective are all the same version of PI
Data Archive. Different version may result into unexpected errors and behavior.
Short time version difference for example, during upgrade procedure should not be an issue.
Page 189
PI System Architecture, Planning and Implementation Course
Exercise Objectives
Learn how to create a collective using the PI Collective Manager
Exercise Description
You need to form a collective by combining two existing PI Data Archives.
Approach
1. PI Data Archive of the same version as on PISRV01 is pre-installed on PISRV02.
2. Add the future secondary member in the primary server’s PI Connection Manager in
PI SDK Utility on PISRV01 and verify connection.
Page 190
High Availability
4. Select File → Create New Collective which opens a collective creation wizard.
5. Agree with verification of valid backup and PI Interface machines configuration. Click
Next.
6. Select that primary member is An existing server that contains data, because there
are already applications connecting to PI Data Archive like PI Interfaces, PI
Connectors, PI Buffer and PI Clients. A newly installed server should be selected only
with fresh installation as this option creates a new PI Data Archive GUID will affect
already configured PI Interfaces, PI Clients etc. Click Next.
7. On the next page select PISRV01 to be the Collective Primary. You may add
description. Click Next.
8. Select PISRV02 from drop-down list as secondary server and click Add, then Next.
9. Keep all archives selected in the list that will be copied to secondary server and click
Next.
10. PI Collective Manager will create temporary backup that will be copied and restored on
PISRV02. You may select the location and if you want the backup to be deleted after
copying. Keep the defaults and click Next.
11. On the next page you can click on Review all settings where it is possible to change
descriptions or name the PI Collective. Click Next.
This starts PI Collective creation procedure. PI Collective Manager will:
I. Code the collective creation.
II. Backup the primary server.
III. Shutdown the secondary server.
Page 191
PI System Architecture, Planning and Implementation Course
Page 192
High Availability
Exercise Objectives
Learn how to test N-Way buffering.
Exercise Description
Look at the pump point data on the secondary server coming from PI Interface for
OPC DA Is it being updated? Why?
Look at the pump point on the secondary server coming from PI Connector for
OPC UA through PI Connector Relay. Is it updating?
Approach
1. If the connector’s points are not updating on secondary server, open PI Data Collection
Manager and click on destination PI Server. In Configuration tab should be expanding
field , which shows Manage Collective Members section:
3. Restart PI Connector Relay. Click on the Relay. In Configuration tab click on next
to Edit Settings button. Stop the Relay and then Start it. Refresh the browser.
4. If this does not help, then remove the destination PI Server in Configuration tab by
clicking on and Delete. Then add the destination PI Server again. It picks up the
collective configuration and start updating values on secondary server.
5. On PIINT01 use pibufss –cfg to verify the connections to the PI Data Archives or use
the Buffering Manager from the PI ICU.
6. Use pibufss –ss (Compression and buffer statistics) to check the amount of data going
to the PI Data Archive servers.
7. Break the connection between the data collection node and PI Data Archives using the
standalone mode (%PISERVER%\adm>piartool -sys -standalone on) and use
pibufss -qs to show the accumulation of data in the buffer or see the Buffering
Page 193
PI System Architecture, Planning and Implementation Course
Manager.
8. In PI Data Collection Manager error is displayed only if the connection to primary PI
Data Archive is interrupted:
9. To check the buffer statistics for PI Connector Relay, click on Relay. Go to Diagnostics
→ Buffer Statistics. Messages (same as events in PI Buffer Subsystem statistics) are
increasing.
10. Restore the connection between data collection node and the PI Data Archives
(%PISERVER%\adm>piartool -sys -standalone off) and verify that buffered data is
sent to the servers. Errors such are those should resolve to show a screen shot like:
Page 194
High Availability
Exercise Objectives
Preparation for PI Interface failover exercise.
Problem Description
You need a second, identical PI Interface for the failover scenario. This interface connects to
the OPC server remotely which requires a DCOM configuration.
Approach
The PI Interface for OPC DA, like many applications, is a COM application. The PI OPC
Interface communicates with the OPC Server (data source) through the COM layer. When the
applications are running on different machines, they must use DCOM – in this instance COM
over TCP/IP.
DCOM does not support gMSA in all configuration, but there is workaround again. One option
is to change the gMSA account of the interface service for a standard user account and map
this account to PI Interfaces identity on PI Data Archive. But we would like to keep the gMSA
to authenticate to PI Data Archive.
There is a standard PISCHOOL\PIInterface (pw: piinterface) account prepared to use it as
identity for OPC DA server instance which is necessary to configure in DCOM for remote
connection.
To configure the DCOM settings you must perform the following steps:
1. Switch off Windows Firewall completely on PIINT01 and PIINT02 servers.
2. On the node with OPC DA server (PIINT01), open Local Users and Groups (type
lusrmgr.msc into Start Menu) and add PISCHOOL\SVC-PIINT$ into Distributed COM
Users group
3. Open Component Services console by typing dcomcnfg.exe into Start Menu.
4. Go to Computers → My Computer → DCOM Config and find OPC Data Access 2.05a
Sample Server. Right-click and select Properties.
5. At General tab set Authentication Level to Connect.
6. At Location tab select Run application on this computer (this option may be greyed
out, in this case leave it be)
Page 195
PI System Architecture, Planning and Implementation Course
7. At Security tab select Customize for Launch and Activation Permissions and Access
Permissions. Click Edit and add the Distributed COM Users local group and allow all
permissions.
10. Apply the settings and go to the server with remote PI Interface for OPC DA (PIINT02).
Page 196
High Availability
See the “DCOM Configuration Guide” for more information on DCOM setup.
Page 197
PI System Architecture, Planning and Implementation Course
As you already know gMSA is denied interactive logon, meaning it is not possible to simply
open application with “Run as…” command.
To open PI OPC Client under gMSA it is necessary to use PsExec.exe Windows SysInternal:
4. This opens a new CMD window that is now running under PISCHOOL\SVC-PIINT$.
That you can verify in Task Manager:
9. Type PIINT01 instead of Localhost and repeat all the steps until you verify you can
read values.
Page 198
High Availability
PI ICU, PI Interface for OPC DA and PI Buffer Subsystem are already installed on PIINT02.
PISCHOOL\SVC-PIBUFFER$ has already been assigned to the service and it is a member
of local PI Buffering Administrators group.
1. Finnish the buffering configuration. Open PI ICU, go to Tools → Buffering to open
Buffering Manager. Continue with configuration.
2. The PISCHOOL\SVC-PIBUFFER$ gMSA is pre-filled. Click Next.
Page 199
PI System Architecture, Planning and Implementation Course
3. Select the location for buffer queue file the same as on PIINT01 D:\PI Buffer. Then
Next.
4. The buffering configuration is complete but as there is no PI Interface configured yet,
there is no PI Data Archive server in the list in Buffering Manager. Go to File → Add
Data server… and insert PISRV01 and confirm.
5. After authentication test our PI Collective is added to the list.
6. In PI ICU add new interface instance. Point it now to PISRV02. Keep the same Point
Source and Interface ID and Add
7. Configure the interface the same as on PIINT01. This means same scan classes in
General tab and settings in different sections. In OPC Server definition it is now
PIINT01::OPCSample.OpcDa20Server.1.
8. Again, create the interface windows service under default NT Service\OPCInt1 account
and switch it for PISCHOOL\SVC-PIINT$ gMSA in Services Manager. Restart PI ICU.
9. Stop the interface on PIINT01 and start the interface on PIINT02.
10. Verify the PI Points are updating. This means the DCOM connection to remote OPC
DA Sever is working properly.
Keep only one interface running as failover has not been configured, yet. Otherwise
there will be DUPLICATED values in PI Data Archive!
Page 200
Failover Defined
16.1.1 Phase 1
Phase 1 UniInt Failover uses the data source itself to synchronize failover operations and
provides a hot failover, no data loss solution when a single point of failure occurs.
Page 201
PI System Architecture, Planning and Implementation Course
For this option, the data source must be able to communicate with and provide data to two
interfaces simultaneously. Additionally, the failover configuration requires the interface to
support outputs – data is written back to the data source. This is something that many SCADA
engineers view with apprehension, and as such is not recommended.
16.1.2 Phase 2
Phase 2 UniInt Failover uses a shared file to synchronize failover operations and provides for
hot, warm, or cold failover.
The Phase 2 hot failover configuration provides a no data loss solution for a single point of
failure like Phase 1. However, in warm and cold failover configurations, you can expect a small
period of data loss during a single point of failure transition.
Page 202
Failover Defined
Page 203
PI System Architecture, Planning and Implementation Course
Exercise Objectives
Implement PI Interface-level failover.
Exercise Description
You have a working PI Interfaces on PIINT01 and PIINT02. You need to make them work
together so when one fails the other takes over. For PI Interfaces configure PHASE 2 HOT
Failover.
Approach
Failover ID for each interface must be unique and each interface must know the Failover ID
of its backup interface.
Select the Synchronization File Path and File to Use for Failover.
5. Select the HOT type of failover.
Page 204
Failover Defined
Ensure that the username assigned in the Log on as: parameter in the Service section of
the PI ICU is a user that has read and write access to the folder where the shared file will
reside.
6. Enter the UNC \\PIINT01\Failover into the Synchronization File Path field
All other command line parameters (beside the /HOST) for the primary and secondary
interfaces must be identical.
Page 205
PI System Architecture, Planning and Implementation Course
When the UFO PI Points are created, their security ACL in Point Security and Data Security
attributes will copy the ACL of PIPOINT database where PI Interfaces and PI Buffer identities
only have Read access. We need to provide the Write access to PI Buffer identity on Data
Security. And remove unnecessary PI Identities from the ACL.
9. Use PI Builder MS Excel add-in. Search for points using tag mask: *UFO*. Load only the
security attributes.
10. Modify the Data Security ACL as it is below:
piadmin: A(r,w) | piadmins: A(r,w) | PI Interfaces: A(r) | PI Buffer: A(r,w) | PI Vision: A(r)
11. Modify the Point Security ACL as it is below:
piadmin: A(r,w) | piadmins: A(r,w) | PI Interfaces: A(r) | PI Buffer: A(r) | PI Vision: A(r)
12. Replicate to all UFO points and publish the changes in Edit Mode.
In order to test that failover is working correctly you will have to have a properly running
interface and then start the second. You should see that interface start and become the
“Backup.”
Then you can stop the “primary” interface and you should see the change reflected in each
log file
Page 206
Failover Defined
Exercise Description
Test the system to make sure all the failover and redundancy solutions are working.
Approach
Perform any or all the following actions:
1. Build a new display in PI Vision with objects displaying the point updated by PI Interface
for OPC DA.
2. Using the PI SMT tool, add a random point to the collective by copying CDT158 to CDT69
on the primary server. Returning to PI Vision, failover as necessary until you are
connected to the secondary server. Use PI Search to verify that CDT69 exists on your
secondary server.
• Is your PI Vision trend active? Did it switch connections again? Did the Primary PI Data
Archive lose data while it was down, or did the buffer work?
• Check %PIHOME%\bin\pibufss -qs on the primary interface computer (the one that has
that status in the active points) – is the data for the Secondary Server queuing?
• Try to add another Random point. Can you do it?
• Check the PI Collective Manager on the primary server – what does it show?
• Restart the Secondary PI Data Archive
• Use PI SMT – did the Secondary Server pickup your new Random point? Did the buffer
work for the Secondary PI Data Archive such that you did not lose data?
Page 207
PI System Architecture, Planning and Implementation Course
• Did the other interface pick up data collection properly? Do you have updates in PI
Vision?
• Do the Interface Status and Heartbeat points look appropriate?
• Check the PI Message logs on the interface computers using the PISDKUtility
• Check pibufss -qs on the secondary interface (now with the primary status). Is it
processing data for both servers?
• Restart the primary interface and check for a good start.
Lastly, restart the Backup Interface. Validate that both PI Data Archives and both PI
Interfaces are running correctly.
Page 208
Final Exercise (Optional)
Exercise Objectives
• Demonstrate your new skills
• Configure new instance of PI Interface for OPC DA for another OPC DA server
• Build and test PI points for the new interface instance
• Add new data source for PI Connector for OPC UA
• Build PI AF elements and create templates
• Connect data archive points to PI AF element attributes
• Show element data in PI Vision display
Problem Description
Your company had added a new production line in your plant and installed a new OPC DA
Server on PIINT02 that collects data about the new line from DCS.
Your success in working with the PI System at your facility has put you right at the top of the
list of people to implement the new system. Use the skills learned this week to implement
this PI System, from interface to displaying the data to your users.
Fortunately, the facility is small. There are 2 units, each with a few elements as can be seen
from the diagram below. Unfortunately, the process control people were less than helpful
when naming the instrument tags and they may not match your PI AF and point
nomenclature.
Page 209
PI System Architecture, Planning and Implementation Course
After your success, company added another line with 2 boilers. Boilers measurements are
stored in the newly implemented OPC UA Server on PIINT01. With the skills you have just
learned about PI Connectors, you should be able to add this new data source to the PI
Connector configuration and let it build the PI Points and structure in PI AF for you.
Approach
Alone or in collaboration with others:
• Explore the new OPC DA Server on PIINT02 using PI OPC Client
• Configure new instance of PI Interface for OPC DA on PIINT02
• Build and test the PI points for PI Interface for OPC DA
• Explore the new OPC UA Server on PIINT01 using UA Expert
• Add a new Data Source for PI Connector for OPC UA and let it create new PI Points
and AF structure via PI Data Collection Manager
• Build PI AF elements for OPC DA points
• Build a simple PI Vision display
17.1 Preparation
Record the machine information in the following table:
PI Server PISRV01
Page 210
Final Exercise (Optional)
OPC DA Server on PIINT02 is already running. Server address for PI Interface for OPC DA
configuration is PIINT02::OPCSample.OpcDa20Server.1
OPC UA Server on PIINT01 is running only interactively and it must be started manually. In
the Start Menu click on UaDemoServer tile which starts the server and display endpoint URL:
opc.tcp://PIINT01:4841
17.2 Configuration
Create a new instance of PI Interface for OPC DA on PIINT02 to connect locally to OPC DA
server to avoid DCOM.
Connect to the OPC UA server using UA Expert client tool. Use [None]:[None]:[Binary]
security and browse the structure and drill down to reach the fbBoiler1 and fbBoiler2 items.
Write down the NodeID of MAIN: _______________________________ to be used as Root
Node in Data Source configuration in PI Data Collection Manager.
Page 211
PI System Architecture, Planning and Implementation Course
DO NOT FORGET to define the Point and Data Security for the PI Points. Remember
the PIPOINT database ACL setting!!!
Page 212
Final Exercise (Optional)
Finished!
Plenty of drawing space below…
Page 213
PI System Architecture, Planning and Implementation Course
Page 214
Appendix A: Complex Architectures
Page 215
PI System Architecture, Planning and Implementation Course
Page 216
Appendix A: Complex Architectures
Page 217
PI System Architecture, Planning and Implementation Course
Page 218
Appendix A: Complex Architectures
Page 219
PI System Architecture, Planning and Implementation Course
You will have to open certain network ports for the applications to communicate.
The following ports may need to be opened on a firewall to allow access to the PI System or
other associated services. Taken from Firewall Port Requirements knowledge article on
Customer Portal
5460 TCP PI SQL DAS HTTP explicit login endpoint for PI SQL DAS 1.3.3 and
earlier
Page 220
Appendix B – Ports
5671 TCP PI Integrator for BA PI Integrator for Business Analytics outgoing data
(required only for Microsoft Azure IoT Hub or Microsoft
Azure Event Hub)
5671 TCP PI Connector Relay AMQPS using X.509 certificate. Data is sent from the
connector to the relay on this port. All communication
is encrypted.
5672 TCP PI Data Collection AMQPS using X.509 certificate. Connectors and
Manager Relays use this port for communication to the PI Data
Collection Manager. This port must remain open.
Page 221
PI System Architecture, Planning and Implementation Course
Page 222
Appendix C – Abbreviations
MS Microsoft
MSA Managed Service Account
ODBC Open Database Connectivity
OLE Object Linking and Embedding
OLEDB Object Linking and Embedding Database
OPC A&E OPC Alarms & Events
OPC DA OPC Data Access
OPC HDA OPC Historical Data Access
OPC UA OPC Unified Architecture
OPC Open Platform Communication (or OLE for Process Control)
OS Operating System
OSI Oil Systems Incorporated (former name of OSIsoft)
PCN Process Control Network
PI Plant Information
PIFD PI Foundation Database
PLC Programmable Logic Controller
RDBMS Relational Database Management System
RTQP Real Time Query Processor
SCADA Supervisory Control and Data Acquisition
SDK Software Development Kit
SMB Server Message Block
SMTP Simple Mail Transfer Protocol
SNMP Simple Network Management Protocol
SPN Service Principal Name
SQL Structured Query Language
SSL Secure Socket Layer
TCP Transmission Control Protocol
TLS Transport Layer Security
UDP User Datagram Protocol
UFL Universal File Loader
UFO UniInt Failover (Universal Interface Failover), not the
UOM Unit of Measurement
Page 223