Configuring A Simple PI System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Configuring a Simple PI System

© 2020 OSIsoft, LLC. All rights reserved.


OSIsoft, LLC
1600 Alvarado Street
San Leandro, CA 94577

All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.

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.

U.S. GOVERNMENT RIGHTS

Use, duplication or disclosure by the US Government is subject to restrictions set forth


in the OSIsoft, LLC license agreement and/or as provided in DFARS 227.7202, DFARS
252.227-7013, FAR 12-212, FAR 52.227-19, or their successors, as applicable.

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.

© 2020 OSIsoft, LLC. All rights reserved.


Contents
Lesson 1 - Installing and Configuring PI Data Archive ............................................................................ 4
Supported Operating Systems ............................................................................................................... 4
Lesson 3 - Installing and Configuring a PI Interface .............................................................................. 12
What is an OPC DA Server?.............................................................................................................. 15
Install the PI Interface for OPC DA and the PI ICU......................................................................... 16
Lesson 4 – Understanding Importance of Buffering .............................................................................. 20
What is the PI Buffer Subsystem?...................................................................................................... 20
Lesson 5 - Creating and Managing PI Points ......................................................................................... 32
Point Class........................................................................................................................................... 33
Point Type ........................................................................................................................................... 33
One tool that may be used to build and edit points is Point Builder in PI SMT. ............................. 33
Another tool tool best suited to bulk build and edit points is PI Builder.......................................... 33
Lesson 6 - Troubleshooting a PI System .................................................................................................. 35

© 2020 OSIsoft, LLC. All rights reserved.


Lesson 1 - Installing and Configuring PI Data Archive

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

Pre-installation Checks
It is critical that you perform the pre-installation checks. If you neglect this step in some
cases you will get an error, and in others, the installation will stop.

• Log on as Administrator (or with administrative privileges). The installer must be


either the administrator or member of the local Administrators group. In addition,
the account must have write permission to MS SQL Server. Validate that the user
has the correct permissions.
• Always check the PI Data Archive Server operating system clock when installing
any PI System. Ensure the clock on each machine has the correct time and it is in
the correct time zone. In your work environment, all clocks should be synchronised
from a network time source. Changing the clock after installation will cause
problems.
• Update Windows. A properly updated Windows Operating System will have the
required prerequisites. If you require any prerequisite components, you will need
to install them before the installation proceeds.
• Install Microsoft SQL Server. The version you use is your choice. You now should
know the pros and cons of each of the available offerings.
• Obtain your PI Server License File. Download the file from the OSIsoft Customer
Portal https://my.osisoft.com; an explanation is forthcoming.

Supported Operating Systems

Starting with PI Data Archive 2016, only 64-bit version is available and requires a 64-bit
Operating System. For production systems, PI Data Archive version 2018 SP3 or higher can
be deployed on the following Microsoft Windows Server operating systems, in decreasing
order of recommendation:

• Windows Server 2019 – all editions; in both Full and Core installations

© 2020 OSIsoft, LLC. All rights reserved.


• 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

License File Activation (For reference only – already completed on PISRV1)


A License File must be generated before the PI Data Archive server is installed. The OSIsoft
Customer Portal allows you to generate your site-specific PI Server license file. This license
file controls which applications can run on the PI Data Archive Server and displays running
parameters, such as the point count limit.

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.

© 2020 OSIsoft, LLC. All rights reserved.


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 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.

Consult the License PI Data Archive section of the PI Server


Installation and Upgrade Guide for full details.

Install the PI Server (For reference only – already completed on PISRV1)

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.

© 2020 OSIsoft, LLC. All rights reserved.


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.

© 2020 OSIsoft, LLC. All rights reserved.


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.

© 2020 OSIsoft, LLC. All rights reserved.


5. For PI Data Archive section select the License Directory and Data Directories

• License Directory to D:\PI Install Kits\Training License


• Historical Archives to E:\PIArchives
• Future Archive to E:\PIArchives\future
• Event Queues to E:\PIEventQ

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

© 2020 OSIsoft, LLC. All rights reserved.


7. Select the gMSA accounts:
• PI AF Application Service: PISCHOOL\SVC-PIAF$
• PI Analysis Service: PISCHOOL\SVC-PIANALYT$
• PI SQL DAS (RTQP Engine): PISCHOOL\SVC-PIRTQP$

8. Click Next to the Summary page and start the installation.


9. If MS Excel page pops up, click on Install button to install PI Builder plug-in.
10. After the installation is complete manually stop the PI Data Archive by executing
the script %PISERVER%\adm\pisrvstop.bat.
The installation created PI System folder in Windows Start Menu with a list of selected
applications. Find out what they are used for…

© 2020 OSIsoft, LLC. All rights reserved.


_________________________________________________________________

_________________________________________________________________

_________________________________________________________________

_________________________________________________________________

© 2020 OSIsoft, LLC. All rights reserved.


Lesson 3 - Installing and Configuring a PI Interface

Video: OSIsoft: Configuring a Simple PI System Online Course - Installing and


Configuring a PI Interface

Common PI Interfaces
As we saw in the previous exercise, some of our PI Interfaces are designed for a specific
data source, while others are built using standard communication protocols. Below is a
list of our most popular PI Interfaces.
1. PI Interface for OPC DA
Collects real-time data from OPC Servers using the OPC DA standard, arguably
the most common communication protocol in the industrial automation industry.
2. PI Interface for Universal File and Stream Loading (UFL)
Collects real-time, historic or future data from ASCII files (e.g. txt, csv xml files, etc.),
serial ports and POP3 email servers. The PI Interface can be configured to collect
data no matter the format of the data in the source file, making it one of our most
versatile interfaces.
3. PI Interface for RDBMS
Collects real-time, historic or future data from any Relational Database
Management System that supports ODBC drivers (e.g. Microsoft SQL Server,
Oracle Database, IBM Informix, etc.)
4. PI Interface for Modbus Ethernet PLC
Collects real-time data from PLCs that use the Modbus communication protocol
5. PI to PI Interface
This PI Interface is used to send real-time, historic or future data from one Data
Archive to another. A typical application of this PI Interface is to collect data from
plant-level Data Archives to a centralized corporate Data Archive.

© 2020 OSIsoft, LLC. All rights reserved.


Define the components of a PI Interface
Once a PI Interface has been installed and configured on a computer, it consists of the
following components:

• PI Interface executable: This is the executable file that will run and perform the
operations to collect data from the data source.
• PI Interface instance batch file: Although the executable performs all of the
operations, it needs instructions, such as (1) which data source to collect from, (2)
which Data Archive to send to, etc. A batch file will contain all of these instructions.
Since you could have multiple data sources, you can create multiple batch files,
and hence multiple instances of the PI interface running on a single node.
• Windows Service running PI Interface instance: In order for an instance of the PI
Interface to run automatically when the computer starts, and run in the
background, a Windows Service is created.

Tip Checking the services snap-in (services.msc) is a great way of


identifying all of the PI Interfaces instances that are running on a single
PI Interface node.

© 2020 OSIsoft, LLC. All rights reserved.


Define the PI Interface Configuration Utility
The PI Interface Configuration Utility (ICU) is a Graphical User Interface (GUI) that PI
System administrators use to create and configure the PI Interface instance batch files
and services.
The PI ICU will only configure batch files and services located on the computer where it
is installed (it cannot be used to configure remote PI Interfaces).

Install and configure a PI Interface for OPC DA


Now that we are familiar with the PI Interface installation methodology, we can install
and configure a new PI Interface to collect data in our Virtual Learning Environment. We
will be doing so in the directed activities and exercises throughout the remaining sections
of this chapter, by following the steps outlined in the section “PI Interface installation
methodology”
Our data source is an OPC DA Server installed on PIINT01 (therefore, we are using
architecture B from the previous group discussion). This OPC DA Server exposes real-time
data from 5 pumps in our process. Our goal will be to collect this process data and store
it in the Data Archive. We will be installing our PI Interface on PIINT01. Since we have
already chosen our PI Interface and our architecture, we have completed steps 1 and 2
of the installation methodology.

© 2020 OSIsoft, LLC. All rights reserved.


What is an OPC DA Server?

We chose an OPC DA Server as the data source for this class because it is the most
common data source among our customers, making the PI Interface for OPC DA our
most widely used interface.
OPC DA is a standard communication protocol developed for the industrial automation
industry. As previously discussed, automation systems communicate using a wide-variety
of different, often proprietary protocols. This makes communication between different
systems very difficult. To solve this problem, multiple vendors got together and developed
a series of platform-independent standards called OPC (Open Platform
Communication). OPC DA is the standard for real-time data collection.
There are two required software components when communicating using an OPC
standard: the OPC Server and the OPC Client. The OPC Server is a software application
that exposes data from a data source in the OPC standard. The OPC Client is a software
application that consumes data from an OPC Server, and translates it to a different
format. The PI Interface for OPC DA is an OPC Client. The OPC Server is a non-OSIsoft
application developed by another company.

Note: We will discuss the OPC UA standard in the chapter “PI Connector
Management”.

© 2020 OSIsoft, LLC. All rights reserved.


Install the PI Interface for OPC DA and the PI ICU

Activity Objectives
Complete steps 3 and 4 from the PI Interface installation methodology we outlined in this
chapter.

Step 3 : Install the PI Interface and the PI ICU


Step 4 : Validate that the PI Interface can communicate with the Data
Archive

Approach
Part 1 – Install the PI ICU and the PI Interface for OPC DA
Step 1 : On PIINT01, navigate to the folder C:\Course Folder\Install Kits
Step 2 : Right-click on the installation kit “PIICU_x.x.xx.xx_.exe” and select “Run as
administrator”.
Step 3 : Complete the steps in the installation wizard.
Step 4 : Repeat steps 2 and 3 with the following installation kits:
a. OPCInt_ReadOnly_x.x.x.xx_.exe
b. PIAPI-xxxx-for-Windows-Integrated-Security_x.x.x.xx_.exe

Note: The first install kit installs the Read-only version of the PI Interface for OPC DA. This
version does not have the ability to write data back to the OPC Server. The read-only
version is strongly recommended as an inherently safer technology that also simplifies
compliance with security policy.

The second install kit installs the PI API for Windows Integrated Security. Although the PI
OPC Interface comes with the PI API, this version is more secure. We will continue our
discussion of PI API security in the section “PI System Security Management”.

Part 2 – Validate that the PI Interface node can communicate with the Data Archive
server over the network
Step 1 : We will first test to see whether network packets can travel from the PI
Interface node to the Data Archive Server. On PIINT01, run the command
prompt and use the ping command to test the connectivity to PISRV01.
Step 2 : Next, we will test to see whether network packets can travel from the Data
Archive Server to the PI Interface node. On PISRV01, run the command
prompt and use the ping command to test the connectivity to PIINT01.

© 2020 OSIsoft, LLC. All rights reserved.


Step 3 : Data sent to the Data Archive uses TCP port 5450. The final test is to verify
whether that ping port is open on the Data Archive Server. On PIINT01:
a. Run the Windows Powershell application
b. Run the following command:
(new-object net.sockets.tcpclient PISRV01, 5450).connected
If port 5450 is open, you will receive the message
True
If port 5450 is blocked, you will receive an error message:

Part 3 – Testing the two PI System connection protocols


There are two connection protocols that can be used to connect to the Data Archive:
The older PI API and the newer PI SDK. PI Interfaces are typically built to use the PI API
when sending data. Newer PI System software, such as the PI ICU, are built to use the PI
SDK. Therefore, both need to work correctly on a PI Interface node. We will now verify
whether we can connect to the Data Archive from the PI Interface using these protocols
Step 1 : First, we will test a connection using the PI SDK.
a. Run the PI SDK Utility (AboutPI-SDK)
b. In the pane on the left side of the window, select “Connections”
c. In the second pane on the left, you should see the Data Archive name
“PISRV01”. Click the checkbox next to the name.
d. If the connection is successful, you should see your username and
“connected as” in the “Connected User” Field.

© 2020 OSIsoft, LLC. All rights reserved.


Step 2 : Finally, we will test the PI API protocol
a. Run the command prompt
b. Navigate to the directory C:\Program Files (x86)\PIPC\bin
Hint: type “cd %pihome%\bin”
c. Run the command apisnap PISRV01
d. If the connection is successful, you should see the message:

e. Enter the tagname “sinusoid”. Do you get a value?

Note: We will continue our discussion of the PI API and PI SDK protocols in the section “PI
System Security Management”.

© 2020 OSIsoft, LLC. All rights reserved.


Validating the availability of data on the OPC DA Server

The PI System is responsible for reliably collecting and storing data. However, there is not
much the PI System can do if data is not available at the data source. This is one of the
most common issues with newly installed PI Interfaces, so it is important to validate data
availability before moving on to PI Interface configuration.
When the data source is an OPC DA Server, OSIsoft provides a tool for this step, called
the PI OPC Client Tool, which is installed with the PI Interface for OPC DA. In the section
“What is an OPC DA Server?” we explained the concepts “OPC Server” and “OPC
Client”. The PI OPC Client Tool is an OPC client published by OSIsoft, designed to allow
users to view data on the OPC Server, without collecting it.
Of course, the PI OPC Client Tool is not the only OPC Client that can be used to view
data. Most OPC Server vendors include an OPC Client with the installation of the OPC
Server. It is also recommended to test the availability of data on the OPC Server using this
vendor-specific OPC Client.

© 2020 OSIsoft, LLC. All rights reserved.


Lesson 4 – Understanding Importance of Buffering

Video: OSIsoft: Configuring a Simple PI System Online Course - Setting up


Buffering on an Interface Node

Defining the PI Buffer Subsystem

What is the PI Buffer Subsystem?

The PI Buffer subsystem is an OSIsoft application installed with every PI Interface. Once configured,
it buffers data on the PI Interface node. A good analogy for the PI Buffer Subsystem is a reservoir.

Under normal operation, when the valve to the Data Archive is open, data simply passes through
the reservoir. When the valve closes (i.e. The Data Archive is down, or the network is down), as the
PI Interface continues to collect data, this data will start accumulating in the reservoir.

When the valve opens again (the Data Archive, or network, are restored), the data will flush out
of the reservoir and be sent to the Data Archive.

© 2020 OSIsoft, LLC. All rights reserved.


Note: There is another, older OSIsoft buffering service called the API Buffer Server. The PI Buffer
Subsystem is the best option for most environments. The API Buffer Server should only be used if (1)
the PI Server receiving the buffered data is older than version 3.4.375 and (2) the PI Interface runs
on a non-Windows platform.

How does the PI Buffer Subsystem work?


The PI Buffer Subsystem runs as a Windows Service.
The PI Buffer Subsystem does not just buffer data from a PI Interface. It can actually buffer data
from any application (OSIsoft or custom-built) which is writing data to a Data Archive.
When the PI Buffer Subsystem has been configured, instead of writing data directly to the Data
Archive, PI API applications (such as PI Interfaces) write the data to a “shared memory buffer”.
The PI Buffer Subsystem performs the following steps:
1) Reads data from the shared memory buffer and transfers it to its “snapshot table”
2) From the snapshot table, marks the data for compression
3) Writes the data to a memory-mapped buffer queue file
4) Reads data from the buffer queue and sends it to the Data Archive

Note: Exception and Compression are mechanisms by which data is filtered, so that only
meaningful data is kept in the Data Archive. The PI Interface is responsible for Exception. The PI

© 2020 OSIsoft, LLC. All rights reserved.


Buffer Subsystem marks events as either Snapshot Only (i.e. get rid of this value when a new one
comes in) or To Be Archived (store this value). The Data Archive then treats the data
accordingly.

The files involved in this process are:


1) Shared memory buffer: The location in memory where PI Interfaces write data. When this
location is full, data is written to a file on disk called APIBUF_<Data Archive name>.dat
2) Snapshot table (pibufmem_<GUID>.dat): This table holds the most recent value received
for all buffered PI Points.
3) Buffer queue file (pibufq_<GUID>.dat): This is the file that acts as our “tank”. The default
size of this file is 32 MB. When the file becomes full, a second file is created. When this file
becomes fill, a third file is created. This will continue until the PI Interface node runs out of
disk space.

Note: PI SDK and AFSDK applications write data directly into the PI Buffer subsystem’s snapshot
table, and so the first step above is skipped.

© 2020 OSIsoft, LLC. All rights reserved.


Configure Buffering

Activity Objectives

Complete step 9 from the PI Interface installation methodology we outlined in this chapter:

Step 9 : Configure buffering with the PI Buffer Subsystem

OSIsoft recommends using designated Windows Service Accounts to run PI System services that
communicate over the network. Before starting, you made a request to your IT department to
create a Service Account:
• PISCHOOL\svc-PIBuffer (password: student)

Approach
Part 1 – Configure the PI Buffer Subsystem
Step 1 : From PIINT01, run the PI ICU. Navigate to Tools > Buffering.

Step 2 : Select “Yes” to continue with the PI buffer subsystem configuration wizard

Step 3 : Select “Continue with configuration”.

© 2020 OSIsoft, LLC. All rights reserved.


Step 4 : You should see the Data Archive “PISRV01” and the PI Interface name we configured
earlier. Check the box and click “Next”.

Step 5 : This step ensures that the PI Buffer Subsystem will the granted the correct security on
the Data Archive.
i. The default service account for the PI Buffer Subsystem is LocalSystem. This
account has more privilege on the local computer than is needed. Before
proceeding, we will change this service account to our dedicated domain
account. Click on “Change” next to “LocalSystem”

© 2020 OSIsoft, LLC. All rights reserved.


ii. Select “Use Windows account”. Enter the account “PISCHOOL\svc-PIBuffer”
with password “student”. Click on “Next”.

© 2020 OSIsoft, LLC. All rights reserved.


iii. Once you’ve returned to the security test window, we will create the PI
Mapping we need to authenticate on the Data Archive. Click on “Browse…”
in the PI Identity field, and select the identity we created earlier called “PI
Interfae & PI Buffers”, then click “OK”.

iv. Once you return to the Data Archive Security window, click “Create”. You
should now have a green checkmark on this page. Click “Next”.

© 2020 OSIsoft, LLC. All rights reserved.


Step 6 : You can now select the Buffer Queues location. For this environment set the location
to E:\OSIsoft\Buffering. If possible, it is strongly recommended to separate the buffer
queue from the OS drive in order to avoid failure on the interface node by filling the
main drive.

Step 7 : The last window will run a verification on the status of the PI Buffer Subsystem. If there
is no errors, you can exit the installation wizard.

© 2020 OSIsoft, LLC. All rights reserved.


Step 8 : Once the installation wizard completed and closed the Buffering Manager window
will open showing the status and statistics of the PI Buffer Subsystem. To re-open this
window from the PI ICU, navigate to Tools > Buffering.

Step 9 : Each interface must be configured individually to enable buffering from the PI ICU
general tab.

In order to buffer data from a PI Interface, the PI Buffer Subsystem must start before
all the PI Interfaces on the machine. Since both are run using Windows Services, it is
possible to configure a dependency on the PI Buffer Subsystem.

You can verify the configuration by navigating to the PI ICU > Service tab, and
verifying the “Dependencies” field. The PI ICU will automatically detect if a
dependency on PIBufss is missing. Notice PIBufss is added to the interface service
dependencies when we select “yes.”

© 2020 OSIsoft, LLC. All rights reserved.


Part 2 – Validate buffering
A very important troubleshooting tool is how to verify whether data is truly buffering on our PI
Interface node. Since version 4.3 of the PI Buffer Subsystem, this task has been made much easier
with the introduction of the “Buffering Manager” GUI. Since this tool is not available with older
versions, we will demonstrate how to verify the buffering status in both scenarios

Method 1: Buffering Manager


Step 1 : From PIINT01, Run the PI ICU. From the top of the window, select Tools > Buffering
Step 2 : In the Buffering Manager, the buffering statistics update in real-time to show the
Global Buffering Status, the estimated buffer capacity, the events in queue, and the
total events sent in real time:

© 2020 OSIsoft, LLC. All rights reserved.


To confirm that events are flowing through the buffer, make sure that the “total
events sent” is increasing. The buffering manager will also report issues such as low
disk space, important error messages, etc.

Method 2: Command line utility pibufss


Step 1 : From PIINT01, run a command prompt, navigate to the directory C:\Program
Files\PIPC\bin
Hint: type “cd %pihome%\bin”
Step 2 : Run the command pibufss -cfg
This command will show you the overall buffering status.

© 2020 OSIsoft, LLC. All rights reserved.


Step 3 : Run the command pibufss -qs
This command will show you the statistics of the buffer queue file. A healthy buffer
queue will have reads and writes from this file.

Step 4 : To stop the statistics, press Ctrl+C

© 2020 OSIsoft, LLC. All rights reserved.


Lesson 5 - Creating and Managing PI Points

Video: OSIsoft: Configuring a Simple PI System Online Course - Creating and


Managing 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

What is a PI Point?
A PI point is a unique storage point for data in the PI Server.

For more information see "PI Point Classes and Attributes" in PI Data Archive
System Management Guide.

Some examples are:


• A flow rate from a flow meter (would use floating point [also known as float, real] data)
• A DCS controller’s mode of operation (may use digital or discrete data)
• The batch number of a product (can use one of float, integer, or string data)
• Text comments from an operator (using string [character] data)
• The result of a calculation (float or integer data)
• Memory % usage in a server (uses floating point data)

Note: Some industries and customers use the term “tag.” In the PI system, point, tag and data
stream are synonymous.

© 2020 OSIsoft, LLC. All rights reserved.


Point Class

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 of the attributes required by the
interface to connect to the data source and collect data.

Point Type

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).

Creating and Managing PI Points with SMT


There are many ways to create points in the PI Server. Throughout the course, we will show
you the most common.

One tool that may be used to build 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.

Another tool tool best suited to bulk build and edit points is 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.

PI Builder requires the spreadsheet to have the following layout:


• The attribute names are listed in the top row.

© 2020 OSIsoft, LLC. All rights reserved.


• The point names are listed in the second column.
• Each point has its attributes listed under the headings in the top row, one
point per row.
• Select a point row by putting X in the first column. Import or export
operations are performed on these selected points only.

PI Point Attributes and PI Interfaces


Remember the statement, “always reading the documentation manual”? Each interface
can use point attributes in a different manner. That is why each interface documentation
specifies what point attributes are used and how.

Listed below are the common point attributes and how they are commonly used.
ALWAYS consult the interface manual!

Instrument Tag Name of the point/location in the source data system.


Often it must match the data source exactly!

Extended Descriptor Place for detailed query instructions.

Future Data If defined as ‘Allow’ it means that events with time stamps
in the future may be stored.

Exception Specifications Defines a significant change in value.

Point Source Must match the value set in the interface configuration. See
the /PS parameter in the interface start-up file.

Location1 Typically, the Location1 field is used for the interface


instance number (/ID)

Location4 Typically, the field is the scan class number. (/f)

Scan Include the PI point in the list of points to scan (always set to
ON)

© 2020 OSIsoft, LLC. All rights reserved.


Lesson 6 - Troubleshooting a PI System

Message Logs
The first step in troubleshooting is always the same: check the message logs! All PI System
software write messages to log files. It is therefore important to learn which log files to
check, and how to read them.
1. PI Message Logs
Also known as the “SDK Logs”, these are the logs of all applications based on the
PI SDK. There is one PI Message log per computer where an SDK application is
installed. The logs are managed by the PI Message Subsystem.
Applications that write to this log:
• Data Archive subsystems
• PI Interfaces (UniInt version 4.5.0.x and later)
• PI Client applications
How to access these logs:
• On the Data Archive: SMT > Operations > Message Logs
• On all computers with PI-SDK 1.4.0 and greater:
Step 1 : Run the program “PISDKUtility”
Step 2 : In the left pane, select Tools > Message Logs
Step 3 : Set the filters to obtain messages (start time, severity, etc.)
Step 4 : Click on “Get Messages”

© 2020 OSIsoft, LLC. All rights reserved.


• On a PI Interface node: PI ICU > Press the “View Current PI Message Log
continuously” button
• On all computers, you can use the command line utility pigetmsg.exe
Step 1 : Open a command prompt window
Step 2 : Change the directory to pi\adm or pipc\adm
Step 3 : Type pigetmsg –f to view the logs continuously
Step 4 : For more filtering options, type pigetmsg –?
2. Event Logs
Event Logs are the centralized logs on a Windows machine. There are two different
types of logs:
• Windows Logs: These logs includes all important events on the operating
system, split up into the following categories: Application, Security, Setup,
System and Forwarded Events.
• Applications and Services Logs: These logs are specifically for applications,
with each application writing to its own log.
PI System applications write to the Windows Application Log, and sometimes to a
dedicated log under Applications and Services.
It’s also a good idea to look at the other Windows logs (Security, System) if you
suspect an issue might have occurred at the operating system level.
Applications that write to these logs:
• AF Application Service
• PI Analysis Service
• Data Archive Subsystems (occasionally)
How to access these logs:
Step 1 : Run the application “Event Viewer”
Step 2 : To access the Windows Application log, browse to Windows Log >
Application. Look at the “Source” column to find messages written
by PI System applications. You can also use the filter functionality of
Event Viewer.
Step 3 : To access a specific application’s log, browse to Application and
Services Logs, then find the name of your application (e.g. AF)

© 2020 OSIsoft, LLC. All rights reserved.


3. PIPC Logs
These logs are only used by older, PI API based applications. You should only need
to access these logs if you are running older software.
Applications that write to these logs:
• PI Interfaces with a UniInt version earlier than 2.5.0.x
• PI API based applications
How to access these logs:
• On a PI Interface node: PI ICU > Press the “View current pipc.log
continuously” button
• Open the file PIPC\dat\pipc.log

Where to Look for Answers

© 2020 OSIsoft, LLC. All rights reserved.


So you found an error message, now what? There are a few resources you can use to
translate that message and find your solution:
1. Search for a Solution on the Tech Support website
(https://techsupport.osisoft.com/Troubleshooting/)
This solution search crawls all of our online resources, including product
documentation, Knowledge Base (KB) articles, PI Square forum discussions,
Known Issues, and more.
2. Search the PI Live Library (https://livelibrary.osisoft.com)
This is an online repository of OSIsoft documentation. It contains all of the up to
date administration and user guides for our products.
3. Ask the community on PISquare (https://pisquare.osisoft.com)
4. Contact OSIsoft Tech Support! (https://my.osisoft.com)
When contacting Technical Support, always make sure to have the following
information on hand:
a. A clear description of the issue
b. Product and version information
c. A copy of the relevant message logs
d. Relevant screenshots, and if possible, steps to reproduce the issue
e. Urgency and Impact of this case
f. Your PI Server Serial Number (SMT > Operation > Licensing > InstallatonID)

© 2020 OSIsoft, LLC. All rights reserved.

You might also like