Example

This example Application demonstrates how to read a list of assets (Elements) for the pump asset class (Element Category) from an OSIsoft PI AF Database using the OSIsoft PI Connector.

You can download the files here to try it out for yourself - adjusting the steps to use your own OSIsoft PI credentials.

Refer to configuration to understand all configuration options of this Connector.

Step 1: Add the Connection

From the Properties blade of the widget to which the OSISoft PI Connector will be linked, a data grid in our example, select the Data Source tab.

Click the plus icon next to the Data Source, then the plus icon next to Connection, and select the OSISoft PI Connector.

Step 2: Configure Authentication

Enter a name for the Connection. In this case, set the name to OSISoft PI Connector v1.0

Enter the authentication credentials: the Web API URL, Username, and Password.

Step 3: Configure Configuration

Set the Server, Database, Lookup Type, Template, and click Save.

We've used the dcd001testasst Server, XMPRO Integration Testing Database, an Element List Lookup, and the CFPumpDev Template.

Step 4: Use the Connection

Select the Connection that was just created, enter the Data Source name, and select the entity to read. Save the Data Source.

In this case, set the name to OSISoft PI Connector and the entity to Element List.

Note that the primary key is auto-populated once the entity is selected.

Step 5: Use the Data Source

Select the Data Source we just added.

Click the pencil icon next to Parameters. In the Parameters blade, enter a value for the Category. Click Apply and save the Application.

Step 6: Results

Click the Launch button and view the results. Observe that the assets (Elements) for the specified pump asset class (Element Category) are returned from OSIsoft PI.

Files

See the Import, Export, and Clone - XMPro article for steps to import an Application.

Last updated