Working with OSIPI

The OSIPI transport is used to send  tag data (point data) to the OSIPI Data Archive product. This data could be sourced from device drivers in the local node or could be sent from remote nodes using TR50. This feature is used by equipment manufacturers and end users to gather operational data for analysis using analytical tools provided by OSIPI. 

Prerequisites

The following are the prerequisites

  • You have installed and configured an OSIPI Data Archive product 
  • You are familiar with the following OSIPI tools:
    • PI System Management Tools
    • PI SQL Commander 
  • You have installed the OSIPI JDBC Driver product on the same node as the Enterprise Gateway for Windows product.
  • You have installed a valid license for the OSIPI transport.

Supported Configuration

The OSIPI JDBC Driver product can be installed either on the same node as the OSIPI Data Archive or on a remote node that has network access to the OSIPI Data Archive via the OSIPI Data Access Server (DAS) component. The OSIPI transport has only been verified in a configuration where the OSIPI JDBC driver is installed on the same node as the OSIPI Data Archive. 

Enable the OSIPI transport type

The steps to enable the OSIPI transport support are:

  1. Locate the OSIPI JDBC driver which should be present in your OSIPI JDBC Driver installation folder. The name of the driver is PIJDBCDriver.jar.
  2. This file needs to be copied to the staging/systems/jar folder of the Enterprise Gateway node.
  3. Enable the OSIPI transport feature, you will need a valid Enterprise Pro or Enterprise Advanced license for the node is required. For more information, see Licenses.
  4. Restart the Enterprise Gateway.
    A similar set of steps are shown for the MySQL transport support on Enabling MySQL support. You can refer to that page for step by step instructions on enabling the JDBC driver. Once you complete the above steps, you will be able to see the OSIPI transport in your DB Type drop-down.

Define an OSIPI transport 

While Creating the database transport you need to enter or select the OSIPI specific parameters as follows:

S.No. Parameter Definition
1 DB Name The host name of the OSIPI Data Archive server.
2 DB Type Select OSIPI.
3 Host The IP address or host name of the OSIPI Data Archive server.
4 Port Enter a the port number that will be used by the JDBC driver to access the OSIPI DAS.
5 User The user id of the database user.
6 Password The password associated with this account.
7 Extended Attributes If you have problems connecting to the OSIPI DB then you need to define the Extended Attributes. To define the Extended Attributes:
  1. Click on the Extended Attributes
  2. Click Add
  3. Add Property: ProtocolOrder
  4. Enter the Value:NetTcp:<port_number>, Https/Soap:<port_number>
  5. From the Type drop-down select string
  6. Click Add
  7. Click Ok

For more information on Creating the database transport, see Creating the database transport.

Define OSI transport maps 

Tag data is inserted into the OSIPI Data Archive by executing a SQL Insert into either the picomp or picomp2 interface tables in the piarchive schema of the OSIPI Data Archive. The table to be used depends on the tag data type as configured in the OSIPI Data Archive Points database. 

Supported SQL operations, datatypes and features

The OSIPI Transport uses a JDBC driver to interact with the OSIPI Data Archive. The following SQL operations that are available to be selected from the Action pick list are either not supported by the OSIPI Data Archive or result in an error when executed. 

  • Batch Insert
  • Select with Delete
  • Select with Update
  • Stored Procedure

The primary use case is inserting data to the picomp or picomp2 tables. You could use other SQL operations that are not listed above to interact with the OSIPI Data Archive, however product support for the use of these operations is limited. 

The following OSIPI Data Archive data types are not supported

  • Blob
  • Timestamp

The DB transport's Logical Unit of Work feature and the corresponding Logical Unit of Work trigger actions for an OSIPI transport are not supported.

You need to create a transport map for each tag data type you will be working with. The detailed steps of defining a transport map can be referenced here Transport map for a database transport.

Integer data transport map

This section describes the interface table and the fields of the transport map that are required to be mapped for the Int16 and Int32 PI Integer data types.  When defining the transport map, you will need to select the piarchive schema and the picomp2 table. 

The fields that are required to be mapped are described below:

Column Description
tag The tag name defined in the OSIPI Data Archive Points database.
time The timestamp associated with this tag data.
value The integer value of the data.

Float data transport map

This section describes the interface table and fields of the transport map that are required to be mapped for the  Float16, Float32, Float64 OSIPI Float data types. When defining the transport map, you will need to select the piarchive schem and the picomp table.

The fields that are required to be mapped are described below:

Column Description
tag The tag name defined in the OSIPI Data Archive Points database.
time The timestamp associated which this tag data.
value The float value of the data.
If you are working with a Float32 tag make sure that the input variable datatype is set to Float8.

Boolean data transport map

This section describes the interface table and fields of the transport map that are required to be mapped for the Digital OSIPI datatype, which translates to a Boolean datatype. When defining the transport map you will need to select the piarchive schema and the picomp table. 

The fields that are required to be mapped are defined below 

Column Description
tag The tag name defined in the OSIPI Data Archive Points database
time The timestamp associated with this tag data
status This is a negative integer value that represents the encoded value of the boolean state. You will need to work with your OSIPI Data Archive Administrator to determine the negative value that needs to be provided for a boolean true or false.

String data transport map

This section describes the interface table and fields of the transport map that are required to be mapped for the OSIPI String datatype. When defining the transport map you will need to select the piarchive schema and the picomp table. 

The fields that are required to be mapped are described below:

Column Description
tag The tag name defined in the OSIPI Data Archive Points database.
time The timestamp associated with this tag data.
svalue The string value of the data.

Define a trigger referencing the transport maps

The following figure shows an example of a trigger referencing a transport map defined for an OSIPI Transport.