Jump to content
  • Accessing PI Data in Spotfire

    This article explains what the OSISoft PI System does and how Spotfire can access the data for further processing and analysis.

    What is OSISoft PI System?

    OSISoft Data Archive or sometimes called the PI system is a set of tools to collect and organize time series data from different data sources. This data will be accessed later on using tools like Spotfire for further processing and analysis. Some use cases include

    • Seasonal trends analysis
    • Causality study
    • Variables modeling and prediction
    • Process optimization

    here is a schema that explains different components of the OSISoft tools and how are they connected to each other.


    Connect to PI Data Archive in Spotfire

    Spotfire PI Connectors provide two ways to connect to OSISoft data:

    Using the GUI connector

    • From the + sign in Spotfire left panel choose (Other --> OSISoft PI Server Tag Data)


    Once you select Tag Data, the connection GUI will show as below:


    Fill in the details and make sure you use the suitable authentication method, click Connect and move to the Tag Selection tab.

    In this tab you select the tag/tags you need to include in your query, wild cards are allowed here, for example, we want to look for tags that have power production. Once the search is complete, simply select the tags and click Add to include them in the query.


    Once adding tags is complete, click on the Data Retrieval tab. 

    In this tab you specify how you want to bring your data, options in Retrieval Mode  are:

    • Actual Values ? returns only actual recorded data points. This mode can only be used with Tags that return numerical data.
    • Interpolated Values ? returns data interpolated to produce the requested number of points. This mode can only be used with Tags that return numerical data.
    • Plot Values ? returns data enhanced to look good on a chart plot.
    • Snapshot ? returns the current Snapshot value of the Tag data.
    • Total, Average, Minimum, Maximum, StdDev, PopulationStdDev, Count, PercentGood ? these options calculate values for each summary.

    More details about the Data Retrieval can be accessed through the PI Connector manual

    Once everything is complete, click OK  and Spotfire will create a new data table for the query.

    Using Custom data function

    Using data functions in OSIPI is a great way to have more control over how you pull the data from Data Archive and also give more flexibility to dynamically change and update query parameters. Custom data functions can be accessed via Tools----> Create Tag Details View and the custom data function dialogue will appear as below:



    • Server: OSIPI Server name
    • Username, Password, Encrypted, Domain, Authmode: Leave them unchanged if you have set up your mode to be Windows Integrated.
    • Tag Name:  PI Tags that needed to be queried from the database, user can use custom expressions, and Spotfire tables to provide a list of tags. For instance, you can upload an excel sheet that has all the needed tags and use that as input.
    • Retrieval Mode: Similar to the option explained above, it's basically choosing how you want to bring the data
    • Calculation Basis: Defaulted to Time Weighted and can be changed to be event-based. 
    • Summary Duration: The aggregation window the OSIPI should use to prepare the data (Default is the 60s)
    • Start/End time: There are several useful ways to use a wildcard to set a specific start/end time. Consult the OSIPI manual for more details.

    Connect to Asset Framework (AF) server in Spotfire

    Using the GUI connector

    Using the GUI of the AF connector in Spotfire is pretty straightforward.


    The AF GUI dialogue box will open:


    • If you are using Windows Auth. you don't need to fill in the username and password. 
    • Click connect and move to the Elements and Attributes tab


    • This is the most important dialogue in AF GUI.
    • Left side is where you choose the elements that you want to query (Motors, Pumps, etc) no tags are selected here. Say we want to include only motors from the specific station in this query then all you need to select these elements and press the down arrow to include it
    • Right side is where you select your parameters for these elements, say we want to bring all the values for the current variable for all the motors, then all you need to select the variable and press the down arrow to include it
    • Click Ok and check the resulting table

    Below is a sample table of the output.


    You can see that only selected Elements and Parameters were brought as tags, you can then join this table to your tag data table and use it as a filtering feature.

    For more information, watch this session of Dr. Spotifre as we go through the OSIPI connector in Spotfire in detail.


    User Feedback

    Recommended Comments

    There are no comments to display.

  • Create New...