1.
PI-OPC API
Interface
9.1.PI Interface detailed design
The main functions of these Interfaces are:
•
To provide an OPC
communications custom interface between the OPC Server (TRF and Al AIN) and the
OSISoft Plant Information (PI) system.
• To
provide buffering capability to prevent data loss in case the PI server failed
to archive data due to unavailability or loss of communication.
• PI OPC
Interface needs to be installed and configured on all OPC interface machine. PI
OPC interface failover will be configured as per OSIsoft standard through a
shared file.
• The
Interface configuration utility is used to configure the PI OPC Interface &
its failover. Screenshots attached in this section are the sample screens. PI
OPC interface installation will be placed in installation document.
Here
are the steps of configuring PI OPC Interface using PI ICU:-
a. Open ICU - > Go to Interface - > New
Windows Interface Instance from Exe… as shown in below screenshot.

The
following Window will appear:

b. Browse to Interface executable OPCInt.exe
from
“…\PIPC\Interfaces\OPCInt
folder”
Select PI Server, specify
name of Interface instance, Point Source, Interface ID as shown below

Click on “Add”. Interface
instance will get added in PI ICU, add Scan classes as shown

c. Go to OPCInt tab, Enter OPC Server node name
and click on List Available Servers, then select the OPC Server name from the
dropdown list.

d. Go to Health Points tab, Create following
UniInt Interface Monitoring points
-
Heartbeat
-
Device Status
-
IO Rate
Right click the row for a particular Health Point to bring up the
context menu then Click Create to create the Health Point for that particular
row.
Go to IO Rate tab, Create IO Rate tag for the Interface.
e. Go to Service tab, Create PI OPC Interface
Service, save the configuration.

f. Now Go to Tools - > Buffering, Enable
buffering with PI Buffer Subsystem as shown in below screenshot.

g. Go to Buffering Settings, Specify Event queue
path as per the below screenshot. This is the path where buffer files will be
saved.
h. Go to Buffered Servers, select both primary
and secondary server

i. Set Startup type of PI Buffer Subsystem
Service as Auto, Click Apply - > OK. Now buffer configuration is completed.

j. Now Start PI OPC Interface service.

k. Check PIPC log file. Interface should start
successfully and collecting date.
9.2. PI OPC interface Failover Configuration
9.2.1. Failover configuration on Interface Node -1
Step 1: Verify non-failover interface operation. Check the data in PI Server.
Data should start archiving through PI OPC interface. Now stop the interface
through PI ICU.
Step 2: Configure the Shared File
·
The shared file will reside
on the OPC Interface Node system.
·
Setup a file share and make
sure to assign the permissions so that both Primary and Backup interfaces have
read/write access to the file.
·
Shared file is
“OPCInt_0_1.dat” shall be stored on one of the existing OPC Interface machines.
Step 3: Configuring UniInt Failover Startup
Parameters with PI ICU.
Use the Failover section of the Interface
Configuration Utility (ICU) to enable UniInt failover and select Phase 2
Failover as marked in Red in below screenshot.

Once you enable UniInt failover, PI OPC
Interface instance configured on that Interface node (i.e. Node - 1) will
automatically populated with Failover ID
# 1 as marked in Blue in above screenshot.
Click on browse as shown in below screenshot to select the other PI OPC Interface
instance to configure in failover with Failover
ID # 2.

Once clicked on browse which will show the list of all available interface instances with
current interface instance, select PI OPC Interface instance configured on
Interface node 2
Click OK. PI OPC Interface instance configured
on Interface node (i.e. Node - 2) will be populated with Failover ID # 2 as shown in below screenshot.

Select type of failover i.e. UFO Type as
“HOT”, Click on browse and select the synchronization file path (For example: \\aafrtdb2gw\E$\Shared File\OPCInt_O_1.dat)
to use for Failover configuration.

Step 4: Creating the UniInt Failover Control and Failover State Tags.
Configure five PI tags for the interface: the
Active ID, Heartbeat 1, Heartbeat2, Device Status 1 and Device Status 2. You
can also configure two state tags for monitoring the status of the interfaces.
The ICU can be used to create the UniInt
Failover Control and State Tags. To use
the ICU Failover page to create these tags simply right click any of the
failover tags in the tag list and select the “Create all points (UFO Phase 2)” menu item as shown in below
screen.

Once clicked on “Create all points (UFO Phase 2)” menu item following screen will
appear, click on Yes.

This will successfully create Digital Set ‘UFO_State’ on PI Server as shown in
below screenshot. Click OK.

Once the failover control and failover state
tags have been created the Failover page of the ICU should look similar to the
illustration below.

9.2.2. Failover configuration on Interface Node -2
Step 1: Verify non-failover interface operation. Check the data in PI Server.
Data should start archiving through PI OPC interface. Now stop the interface
through PI ICU.
Step 2: Configure the Shared File
·
Shared file is “.dat” file.
For e.g. in this scenario file server used is “GHOCPIMSAPP1”, having shared
folder as “Shared File” in E: drive. So Synchronization file path
for Failover configuration will be as follows:-
“\\aafrtdb2gw\E$\Shared File\OPCInt_O_1.dat” Where “OPCInt_O_1.dat”
is the shared .dat file.
Step
3: Configuring UniInt Failover Startup
Parameters with PI ICU.
·
Use the Failover section of
the Interface Configuration Utility (ICU) to enable UniInt failover and select
Phase 2 Failover as marked in Red, Also this interface instance must define it’s
failover ID as 2 , (/UFO_ID=2) and
the other interface Failover ID as 1 (/UFO_OtherID=1)
in its ICU failover configuration screen as shown below.

·
Click on browse as shown in below screenshot to select
the other PI OPC Interface instance to configure in failover.

·
Once clicked on browse,
will get the list of all available interface instances with current interface
instance, select PI OPC Interface instance configured on Interface node 1.
Click OK.
·
Following screen will
appear, Click OK.

·
PI OPC Interface instance
configured on Interface node (i.e. Node - 1) will be populated as shown in
below screenshot.

·
Select type of failover,
and select the synchronization file path and file to use for Failover
configuration as shown in below screenshot.

Note:
·
SDK
member on backup interface node will be pointing to the Secondary server
·
As UniInt Failover Control and
Failover State tags are already created in PI Server while configuring
failover on Interface node - 1, you will see status as “Created” in Failover
page of the ICU on Interface node - 2.