OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1....

68
OSIsoft PI Custom Datasource User Guide October 2016

Transcript of OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1....

Page 1: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource

User Guide

October 2016

Page 2: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

1. Introduction ............................................................................................ 5Key Capabilities ................................................................................................................. 6

Retrieving PI Tag Lists ................................................................................................. 6

Retrieving PI Tag Data ................................................................................................ 6Retrieving AF Elements, Metadata and Data ............................................................. 7

Retrieving Event Frame Data ...................................................................................... 7Work in any Spotfire Client ......................................................................................... 8

Secure Access ............................................................................................................. 8Application Building Features ..................................................................................... 9

2. Installation and Configuration .............................................................. 10Package Contents ............................................................................................................ 10System Requirements ...................................................................................................... 10Software Pre-Requisites .................................................................................................. 10Installation ....................................................................................................................... 10Installation – Web Player 6.5 and 7.0 .............................................................................. 11Installation – Automation Services 6.5 and 7.0 ............................................................... 11Spotfire Licenses ............................................................................................................. 12Validating the Installation ................................................................................................ 13

3. Retrieving A List Of OSIsoft PI Tags ..................................................... 14Configuration Dialog ....................................................................................................... 14Connection Details .......................................................................................................... 15Tag Search ....................................................................................................................... 15Data Retrieval .................................................................................................................. 16Data Validation ................................................................................................................ 16Data Returned ................................................................................................................. 17Resizing ............................................................................................................................ 17

5. Retrieving OSIsoft PI Tag Data ............................................................. 18Configuration Dialog ....................................................................................................... 18Connection Details .......................................................................................................... 19Tag List ............................................................................................................................ 19Data Retrieval .................................................................................................................. 19Data Validation ................................................................................................................ 20Data Returned ................................................................................................................. 21Resizing ............................................................................................................................ 21

Page 3: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

6. Retrieving OSIsoft AF Element & Attribute Metadata & Data .............. 22Configuration Dialog ....................................................................................................... 22Connection Details .......................................................................................................... 23AF Elements .................................................................................................................... 23AF Attributes ................................................................................................................... 24Data Retrieval .................................................................................................................. 25Data Validation ................................................................................................................ 25Resizing ............................................................................................................................ 26

7. Retrieving OSIsoft Event Frame Metadata & Data ............................... 27Configuration Dialog ....................................................................................................... 27Connection Details .......................................................................................................... 28AF Event Frames ............................................................................................................. 29Data Retrieval .................................................................................................................. 30Data Validation ................................................................................................................ 31Resizing ............................................................................................................................ 32

8. Using the OSIsoft PI Tag List Data Function ......................................... 33Edit Parameters Dialog ................................................................................................... 33Making Configuration Changes ...................................................................................... 35Example Use Cases ......................................................................................................... 35Input Parameters ............................................................................................................. 36

9. Using the OSIsoft PI Tag Data Function ................................................ 37Edit Parameters Dialog ................................................................................................... 37Making Configuration Changes ...................................................................................... 39Example Use Cases ......................................................................................................... 39Input Parameters ............................................................................................................. 40

10.Using the OSIsoft AF Attribute Data Function ..................................... 41Edit Parameters Dialog ................................................................................................... 41Making Configuration Changes ...................................................................................... 43Example Use Cases ......................................................................................................... 43Input Parameters ............................................................................................................. 44

11.Using the OSIsoft AF Event Frame Data Function ................................ 45Edit Parameters Dialog ................................................................................................... 45Making Configuration Changes ...................................................................................... 47

Page 4: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

Example Use Cases ......................................................................................................... 47Input Parameters ............................................................................................................. 48

12.Using the Password Encryption Tool .................................................... 49Controlling Access via Licenses ...................................................................................... 49

13.Using Windows Integrated Authentication with Web Player and Automation Services .................................................................................. 50

Using Explicit Username / Password Authentication ...................................................... 50Grant Access Using a PI Trust ......................................................................................... 50Run the Web Player and Automation Services processes under a specific account ...... 50

Appendix A - Data Columns Retrieved ...................................................... 52PI Tag List ........................................................................................................................ 52PI Tag Data ...................................................................................................................... 52AF Element Metadata ..................................................................................................... 53AF Attribute Metadata .................................................................................................... 53AF Attribute Data ............................................................................................................ 54AF Event Frame Metadata .............................................................................................. 55AF Event Frame Attribute Data ...................................................................................... 56

Appendix B – Data Function Input Parameters .......................................... 57PI Tag List ........................................................................................................................ 57PI Tag Data ...................................................................................................................... 59AF Element and Attribute Data ...................................................................................... 61AF Event Frame Metadata and Data .............................................................................. 64

Appendix C – Valid Date/Time Formats ..................................................... 66

Appendix D – Troubleshooting Guide ....................................................... 67No menu item to open data from OSIsoft PI or AF ........................................................ 67Error Message when opening data from PI or AF .......................................................... 67Error Message when opening a DXP file containing data from PI or AF ....................... 68Missing Method Error Message when retrieving data from PI or AF ............................ 68

Page 5: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 5 of 68

1. Introduction The PI System is a suite of software products that are used for data collection, historicizing, finding, analyzing, delivering, and visualizing. It is marketed as an enterprise infrastructure for management of real-time data and events. The term PI System is often used to refer to the PI Server but the two are not same. The PI System refers to all OSIsoft software products whereas the PI Server is the core product of the PI System.

The Field Connectivity Framework is a set of custom built TIBCO Spotfire® Extensions along with working samples that enable users to build interactive visualizations on top of data stored in one or more OSIsoft PI Systems.

The following custom components are currently provided:

• A set of TIBCO Spotfire® Custom Datasources that can read data and metadata from OSIsoft PI, AF and Event Frames into memory

• A set of TIBCO Spotfire® Custom Data Functions that allow dynamic data retrieval from all the above Datasources based on Marking, Document Properties or Scripts

• A Custom Tool to allow the encryption of passwords to be used in Data Function calls

This document will walk through the components, how to install them and how to use them.

Page 6: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 6 of 68

Key Capabilities

Retrieving PI Tag Lists

One of the most common tasks is to retrieve a list of PI Tags within one or more PI Systems.

This is provided via the Tag List Datasource which allows searching for PI Tags using multiple criteria and retrieving the list into Spotfire memory along with their metadata attributes.

Figure 1 : Retrieving a list of OSIsoft PI Tags

Retrieving PI Tag Data

Once one or more PI Tags have been identified the next objective is to retrieve time series data for those tags.

This is provided via the Tag Data data-source which allows searching for PI Tags across multiple PI Systems and retrieving their data for a specified time period.

Figure 2 : Retrieving PI Tag Data

Page 7: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 7 of 68

Retrieving AF Elements, Metadata and Data

The AF data-source allows the retrieval of lists of AF Elements along with their Attributes and Data across multiple PI Systems and AF Databases.

The hierarchy of AF Elements and AF Attributes is also retrieved to allow the construction of more complex analytic applications.

Figure 3 : Retrieving AF Data

Retrieving Event Frame Data

The Event Frame data-source allows the retrieval of lists of AF Elements along with their Attributes and Data across multiple PI Systems and AF Databases.

The hierarchy of AF Elements and AF Attributes is also retrieved to allow the construction of more complex analytic applications.

Page 8: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 8 of 68

Figure 4 : Retrieving Event Frame Data

Work in any Spotfire Client

Visualizations using any of the data-sources must be authored in Spotfire Analyst, but can then be consumed in Spotfire Analyst and/or Spotfire Consumer. They can also be used with Spotfire Automation Services to allow batch processing scenarios.

Secure Access

Wherever possible, the integrated security of OSIsoft PI System should be used to avoid the need for usernames and passwords. However, if absolutely necessary, passwords can be encrypted before being embedded in Analytic Applications.

Figure 5 : Password Encryption Tool

Page 9: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 9 of 68

Application Building Features

The Data Functions provided allow the dynamic retrieval of data based on Marking and Filtering changes along with IronPython Script execution. This allows powerful analytic applications to be constructed quickly and easily.

Page 10: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 10 of 68

2. Installation and Configuration

Package Contents The installation package consists of a zip file that contains the following folders:

— “ForSpotfireServer” - this folder contains the deployable modules for the package. These Spotfire Packages (SPK files) must be deployed onto the Spotfire Server by your System Administrator.

— “ForAutomationServices” – this folder contains the same files in a format ready to be copied to an Automation Services servers Bin folder for a Spotfire 6.5 or Spotfire 7.0 installation.

— “Documentation” - this folder contains this User Guide.

System Requirements The Custom Datasources can be used with Spotfire 6.5 and above. The minimum requirements for the specific version of Spotfire being used can be found at the Spotfire Support Site http://support.spotfire.com/sr.asp.

Software Pre-Requisites The Custom Data Source requires the OSIsoft Asset Framework Client Library Version 4.0 (2015) or newer to be installed. This software can be obtained via the OSIsoft Support website.

This applies to computers running Spotfire Professional / Enterprise Player and to the servers running the Spotfire Web Player and Spotfire Automation Services.

Installation The Custom Datasources are installed by adding the .SPK files from the “ForSpotfireServer” folder to a Spotfire Distribution on the Spotfire Server:

• SpotfirePS.Framework.OSIAFDataSource.spk• SpotfirePS.Framework.OSIAFDataSourceForms.spk• SpotfirePS.Framework.OSIPIDataSource.spk• SpotfirePS.Framework.OSIPIDataSourceForms.spk• SpotfirePS.Framework.OSIEncryptPassword.spk

This is the same process that is used for Hotfix installation. See the following section in the Spotfire Deployment and Administration Manual for more details:

• Page 10 - Deploying Spotfire Packages

Page 11: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 11 of 68

When Spotfire Analyst is next started it will prompt that updates are available and the packages will be downloaded.

Installation – Web Player 6.5 and 7.0 Note: This step is not required for Spotfire 7.5 and above.

Web Player Servers running Spotfire 6.5 or 7.0 will need to be updated using webupdate.bat. See the following sections in the Web Player Installation and Configuration Manual for more details:

• Section 4.2 Deploying Extensions and Upgrades

Installation – Automation Services 6.5 and 7.0 Note: This step is not required for Spotfire 7.5 and above.

For Spotfire Automation Services, copy the files from the folder “ForAutomationServices” into the “webroot\bin” folder under the Automation Services installation:

• SpotfirePS.Framework.OSIAFDataSource.dll• SpotfirePS.Framework.OSIPIDataSource.dll

Locate the file “AddIns.txt” in the “ForAutomationServices” folder and copy the contents: <AddInFullTypeName="SpotfirePS.Framework.OSIAFDataSource.DataSourceAddIn,SpotfirePS.Framework.OSIAFDataSource,Version=1.11.0.0,Culture=neutral,PublicKeyToken=ef33e7f75d4ca16b"/><AddInFullTypeName="SpotfirePS.Framework.OSIPIDataSource.DataSourceAddIn,SpotfirePS.Framework.OSIPIDataSource,Version=1.11.0.0,Culture=neutral,PublicKeyToken=ef33e7f75d4ca16b"/>

In the Automation Services “webroot\bin” folder locate the file “AddIns.xml”. Add the lines from “AddIns.txt” to the “AddIns.xml” file as shown: <?xmlversion="1.0"encoding="utf-8"?><!--ThisistheAddIns.xmlfilewhichmustbedeployedtogetherwiththeASassemblyintheAutomationServicesdirectory.--><AddInRegistryxmlns="http://www.spotfire.com/schemas/AddInRegistry1.0.xsd"SchemaVersion="1.0"><!--namespace,assembly--><AddInFullTypeName="Spotfire.Dxp.Automation.Framework.FrameworkAddIn,Spotfire.Dxp.Automation.Framework"/><AddInFullTypeName="Spotfire.Dxp.Automation.Tasks.BaseTasksAddIn,Spotfire.Dxp.Automation.Tasks"/>...<AddInFullTypeName="SpotfirePS.Framework.OSIAFDataSource.DataSourceAddIn,SpotfirePS.Framework.OSIAFDataSource,Version=1.11.0.0,Culture=neutral,PublicKeyToken=ef33e7f75d4ca16b"/><AddInFullTypeName="SpotfirePS.Framework.OSIPIDataSource.DataSourceAddIn,SpotfirePS.Framework.OSIPIDataSource,Version=1.11.0.0,Culture=neutral,PublicKeyToken=ef33e7f75d4ca16b"/></AddInRegistry>

Note: The text for the new entries should be on the same line without any line breaks.

Page 12: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 12 of 68

Spotfire Licenses There are multiple licenses that control access to the various Datasources and Data Functions.

Figure 6 : TIBCO Spotfire Licenses Available

The first group of Licenses determine which Datasources a user has access to:

• OSIsoft PI Tag List Datasource – allows retrieval of lists of PI Tags and their metadata

• OSIsoft PI Tag Datasource – allows retrieval of PI Tag data • OSIsoft PI AF Element Datasource – allows retrieval of AF Element data and

metadata

The second group of Licenses mirror the first set but control access to Data Functions associated with each Datasource:

• OSIsoft PI Tag List Data Function • OSIsoft PI Tag Data Function • OSIsoft PI AF Element Data Function • Users can be licensed for individual Datasources and individual Data Functions, but if

a user is licensed for a Data Function, they must also be licensed for the corresponding Datasource.

The final license controls access to a tool that allows the encryption of passwords that are to be used with any of the above Data Functions:

• OSIsoft Datasource Password Encryption Tool

Page 13: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 13 of 68

Validating the Installation Once the Datasource is correctly installed, licensed users should see additional options under the File Menu as shown below. Note the order of the items may vary on your system and is not important.

Figure 7 : File Menu Items for a Correct Installation

Users with the required license should also see an entry for the Password Encryption Tool under the Tools Menu as shown below.

Figure 8 : Tools Menu Items for a Correct Installation

Page 14: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 14 of 68

3. Retrieving A List Of OSIsoft PI Tags Select the File à Open From à OSIsoft® PI™ Tag List… menu item as shown:

Figure 9 : Opening a list of PI Tags from the Menu

Configuration Dialog The configuration dialog allows you to choose how to search for and retrieve a list of tags from the PI Server.

Figure 10 : Tag List Configuration Dialog

Page 15: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 15 of 68

When first opened the dialog controls are disabled with the exception of the “Connection Details” controls. Once a connection to a PI Server has been successfully created the “Tag Search” and “Data Retrieval” dialog controls become enabled.

Connection Details These controls allow you to choose how you will authenticate with the PI Server. There are 3 options:

Option Description Image

PI Server

In this mode you authenticate using a username and password setup directly on the PI Server. In this mode the domain option is not needed and is disabled.

Windows Explicit

In this mode you authenticate using a Windows Domain account that has been configured on the PI Server to have access. You will need to enter the Windows Account Username, Password and Domain.

Windows Integrated

In this mode you authenticate using your current Window Domain Account (the one you are logged in as). In this mode, all credentials fields are disabled.

Table 1 : Connection Options

After selecting the required connection mode and entering the required fields, press the “Connect…” button. If successful, the remaining dialog fields will be enabled. If the connection is unsuccessful, an error message will be displayed. For possible troubleshooting steps, see Appendix D.

Tag Search These fields allow you to specify the search criteria when retrieving the list of tags from the PI Server.

Page 16: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 16 of 68

• Name – return Tags whose Name match the specified search string. Asterisk * can be used as a wildcard.

• Search Descriptor as well – when checked, the same search that is specified in the Name field will be performed on the Descriptor field as well. So Tags that have a matching Name OR Descriptor will be returned.

• Point Source – return Tags whose Point Source definition matches the specified search string

• Data Type – return Tags of a particular Data Type or all Data Types. E.g. Float, Int32 etc.

• Point Class – return Tags with a particular Point Class or all Point Classes

The fields are ANDed together so selecting a particular Data Type and a particular Point Class will result in retrieving ONLY those Tags that have that Data Type AND the Point Class.

Data Retrieval These fields allow you to choose which attributes of the retrieved Tags to load into Spotfire and how many search results to return.

By default, the following Tag Attributes are always returned:

• Tag Name – the name of the Tag • Server – the OSIsoft PI Server that the Tag was retrieved from

Attributes can be added to the Selected Attributes list by selecting one or more entries and clicking on the “Add” button (single arrow facing right). Similarly items can be removed from the Selected Attributes list by selecting one or more entries and clicking on the “Remove” button (single arrow facing left).

Individual entries can also be added or removed by double clicking and all entries can be added or removed by clicking on the “Add All” (double arrow facing right) or “Remove All” (double arrow facing left) buttons.

The “Max No of Tags” field allows the search results to be truncated. Any number greater than 0 may be entered in this field.

Data Validation When the OK Button is pressed, data on the form is validated. In the event that a problem is found, a Red Exclamation Point will be placed next to the problem field. Click on this

Page 17: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 17 of 68

marker to see the description of the problem.

Figure11:ExampleValidationError-MissingPassword

Some possible problems are:

• The Username is missing for PI Server Authentication • The Password and/or Domain are missing for Windows Authentication • The “Max No of Tags” field is less than 1

Data Returned Spotfire will create a Data Table for the data returned by the Datasource. Depending upon you Spotfire settings a Spotfire Table or other visualization will be created.

The data columns returned are listed in Appendix A.

Resizing The Configuration Dialog can be resized using the resize handle in the bottom right hand corner of the dialog. As the dialog is resized, the Available Attributes and Selected Attributes list boxes will resize automatically to fit. Additionally a slider control exists just to the right of the Add and Remove Attributes buttons to allow the width of the list boxes to be manually adjusted.

Figure12:ResizingtheConfigurationDialog

Page 18: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 18 of 68

5. Retrieving OSIsoft PI Tag Data Select the File à Open From à OSIsoft® PI™ Tag Data… menu item as shown:

Figure13:OpeningPITagDatafromtheMenu

Configuration Dialog The configuration dialog allows you to choose a list of Tags to retrieve data for from the OSIsoft PI Server.

Figure14:TagDataConfigurationDialog

When first opened the dialog controls are disabled with the exception of the “Connection

Page 19: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 19 of 68

Details” controls. Once a connection to a PI Server has been successfully created the “Tag List” and “Data Retrieval” dialog controls become enabled.

Connection Details These controls allow you to choose how you will authenticate with the PI Server. There are 3 options:

Option Description Image

PI Server

In this mode you authenticate using a username and password setup directly on the PI Server. In this mode the domain option is not needed and is disabled.

Windows Explicit

In this mode you authenticate using a Windows Domain account that has been configured on the PI Server to have access. You will need to enter the Windows Account Username, Password and Domain.

Windows Integrated

In this mode you authenticate using your current Window Domain Account (the one you are logged in as). In this mode, all credentials fields are disabled.

Table 2 : Connection Options

After selecting the required connection mode and entering the required fields, press the “Connect…” button. If successful, the remaining dialog fields will be enabled. If the connection is unsuccessful, an error message will be displayed. For possible troubleshooting steps, see Appendix D.

Tag List These controls allow you to select one or more Tags to retrieve data for. Tags are added to the list by first searching for Tags on the PI Server and then adding one or more of the search results to the Tag List.

Data Retrieval These fields allow you to further control how data for the selected Tags is retrieved.

Page 20: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 20 of 68

• Retrieval Mode – the PI Server that the Tag was retrieved from. There are 4 options:

o Actual Values – returns only actual recorded data points. This mode can only be used with Tags that return numerical data.

o Interpolated Values – returns data interpolated to produce the requested number of points. This mode can only be used with Tags that return numerical data.

o Plot Values – returns data enhanced to look good on a chart plot. o Snapshot – returns the current Snapshot value of the Tag data.

• Number of Points – the maximum number of data points to retrieve for any one Tag

• Timezone – the timezone in which to return data value timestamps. Options are “UTC” for Co-ordinated Universal Time or “Local” for the timezone where the Spotfire client is running.

• Start Date/Time – the start of the date/time range to retrieve data. For examples of valid formats see Appendix D.

• End Date/Time – the end of the date/time range to retrieve data. For examples of valid formats see Appendix D.

Data Validation When the OK Button is pressed that data on the form will be validated. In the event that a problem is found, a Red Exclamation Point will be placed next to the problem field. Click on this marker to see the description of the problem.

Figure15:ExampleValidationError-MissingPassword

Some possible problems are:

• The Username is missing for PI Server Authentication • The Password and/or Domain are missing for Windows Authentication • The Tag List is empty • An invalid Start Date/Time has been entered • An invalid End Date/Time has been entered • The End Date/Time is earlier than the Start Date/Time

Page 21: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 21 of 68

• The “Actual Values” or “Interpolated Values” Retrieval Mode has been selected and the Tag List contains one or more Tags that return data that is not numerical.

Data Returned Spotfire will create a Data Table for the data returned by the Datasource. Depending upon you Spotfire settings a Spotfire Table or other visualization will be created.

The data columns returned are listed in Appendix A.

Resizing The Configuration Dialog can be resized using the resize handle in the bottom right hand corner of the dialog. As the dialog is resized, the Tag List listbox will resize automatically to fit. Additionally a slider control exists just to the bottom of the Add and Remove Tag buttons to allow the height of the list boxes to be manually adjusted.

Figure16:ResizingtheConfigurationDialog

Page 22: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 22 of 68

6. Retrieving OSIsoft AF Element & Attribute Metadata & Data Select the File à Open From à OSIsoft® PI Asset Framework™… menu item as shown:

Figure17:OpeningAssetFrameworkdatafromtheMenu

Configuration Dialog The configuration dialog allows you to:

• Select one or more AF Elements including the Element Parents • Select one or more AF Attributes • Decide whether to retrieve Attribute Data Values

Figure18:AssetFrameworkDataConfigurationDialog

Page 23: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 23 of 68

When first opened the dialog controls are disabled with the exception of the “Connection Details” controls. Once a connection to a PI System has been successfully created the remaining dialog controls become enabled and show any previously selected Elements and Attributes.

Connection Details These controls allow you to choose how you will authenticate with the PI System. There are 2 options:

Option Description Image

Windows Explicit

In this mode you authenticate using a Windows Domain account that has been configured on the PI System to have access. You will need to enter the Windows Account Username, Password and Domain.

Windows Integrated

In this mode you authenticate using your current Window Domain Account (the one you are logged in as). In this mode, all credentials fields are disabled.

Table 3 : Connection Options

After selecting the required connection mode and entering the required fields, press the “Connect…” button. If successful, the remaining dialog fields will be enabled. If the connection is unsuccessful, an error message will be displayed.

For possible troubleshooting steps, see Appendix D.

AF Elements These controls allow you to select one or more AF Elements and add them to the selection list.

Page 24: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 24 of 68

Highlight the required

Element and click the

“Down Arrow”

Clicking “OK” with just one or more Elements selected will return just the Metadata about those elements.

Appendix A lists the data returned in this mode of Operation.

AF Attributes These controls allow you to select one or more AF Attributes from different AF Elements and add them to the selection list.

Highlight the required

Attribute and click the

“Down Arrow”

Clicking “OK” with one or more Elements and one or more Attributes selected will check which Elements have an Attribute of the same Name (not ID) and return Metadata for the combined list of Attributes.

Page 25: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 25 of 68

For example, selecting the Attribute “Height” from one Element and then “Weight” from another and then selecting 10 Elements will create a combined list of Attributes (up to the maximum possible 2 x 10 = 20) and return the metadata for this combined list.

Appendix A lists the data returned in this mode of Operation.

Data Retrieval With one or more Elements selected and one or more Attributes selected, checking the “Retrieve Data” options means that instead of retrieving the Attribute metadata, the actual Data Values for the Attributes will be retrieved. The following additional parameters control what Data Values are retrieved:

• Retrieval Mode – the PI Server that the Tag was retrieved from. There are 4 options:

o Actual Values – returns only actual recorded data points. This mode can only be used with Tags that return numerical data.

o Interpolated Values – returns data interpolated to produce the requested number of points. This mode can only be used with Tags that return numerical data.

o Plot Values – returns data enhanced to look good on a chart plot. o Snapshot – returns the current Snapshot value of the Tag data.

• Number of Points – the maximum number of data points to retrieve for any one Tag

• Timezone – the timezone in which to return data value timestamps. Options are “UTC” for Co-ordinated Universal Time or “Local” for the timezone where the Spotfire client is running.

• Start Date/Time – the start of the date/time range to retrieve data. For examples of valid formats see Appendix D.

• End Date/Time – the end of the date/time range to retrieve data. For examples of valid formats see Appendix D.

Data Validation When the OK Button is pressed that data on the form will be validated. In the event that a problem is found, a Red Exclamation Point will be placed next to the problem field. Click on this marker to see the description of the problem.

Page 26: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 26 of 68

Figure19:ExampleValidationError-MissingStartDate/Time

Some possible problems are:

• No Elements have been selected • Data Retrieval has been checked but no Attributes have been selected • An invalid Start Date/Time has been entered • An invalid End Date/Time has been entered • The End Date/Time is earlier than the Start Date/Time • The “Actual Values” or “Interpolated Values” Retrieval Mode has been selected and

the Attribute List contains one or more Tags that return data that is not numerical.

Resizing The Configuration Dialog can be resized using the resize handle in the bottom right hand corner of the dialog. As the dialog is resized, the various controls will resize automatically to fit. Additionally two slider controls exist to allow the height and width of the controls to be manually adjusted.

Figure20:ResizingtheConfigurationDialog

Page 27: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 27 of 68

7. Retrieving OSIsoft Event Frame Metadata & Data Select the File à Open From à OSIsoft® PI Asset Framework™EventFrames… menu item as shown:

Figure21:OpeningEventFramedatafromtheMenu

Configuration Dialog The configuration dialog allows you to:

• Find and select one or more AF Event Frames • Retrieve all Attributes for the selected Event Frames • Decide whether to retrieve Attribute Data Values • Optionally extend the Event Frame data retrieval period

Page 28: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 28 of 68

Figure22:EventFramesDataConfigurationDialog

When first opened the dialog controls are disabled with the exception of the “Connection Details” controls. Once a connection to a PI System has been successfully created the remaining dialog controls become enabled and show any previously selected Event Frames and Attributes.

Connection Details These controls allow you to choose how you will authenticate with the PI System. There are 2 options:

Option Description Image

Windows Explicit

In this mode you authenticate using a Windows Domain account that has been configured on the PI System to have access. You will need to enter the Windows Account Username, Password and Domain.

Windows Integrated

In this mode you authenticate using your current Window Domain Account (the one you are logged in as). In this mode, all credentials fields are disabled.

Table 4 : Connection Options

Page 29: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 29 of 68

After selecting the required connection mode and entering the required fields, press the “Connect…” button. If successful, the remaining dialog fields will be enabled. If the connection is unsuccessful, an error message will be displayed.

For possible troubleshooting steps, see Appendix D.

AF Event Frames These controls allow you to find and select one or more AF Event Frames and add them to the selection list. Begin by entering a search string in the search box, or click on the dropdown to specify more advanced search criteria.

Figure 23 : AF Event Frame Search

Click on the Search button and the results of the search will be displayed.

Figure 24 : AF Event Frame Search Results

Clicking the “Down Arrow” will add the selected Event Frame to the list of items to be retrieved.

Page 30: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 30 of 68

Figure 25 : AF Event Frame Added to Retrieval List

Clicking “OK” with the “Retrieve Attribute Data” option unchecked will result in the retrieval of Event Frame, Element and Attribute for all the items in the Retrieval List.

Appendix A lists the data returned in this mode of Operation.

Data Retrieval With one or more Event Frames chosen, checking the “Retrieve Data” options means that instead of retrieving just metadata, the actual Data Values for each Event Frame Attribute will be retrieved.

The time period for the data retrieval will be the time period defined for each individual Event Frame.

The following additional parameters control how Data Values are retrieved:

• Retrieval Mode – the PI Server that the Tag was retrieved from. There are 4 options:

o Actual Values – returns only actual recorded data points. This mode can only be used with Tags that return numerical data.

o Interpolated Values – returns data interpolated to produce the requested number of points. This mode can only be used with Tags that return numerical data.

o Plot Values – returns data enhanced to look good on a chart plot. o Snapshot – returns the current Snapshot value of the Tag data.

Page 31: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 31 of 68

• Timezone – the timezone in which to return data value timestamps. Options are “UTC” for Co-ordinated Universal Time or “Local” for the timezone where the Spotfire client is running.

• Number of Points – the maximum number of data points to retrieve for any one AF Attribute

• Extend Date/Time – these options allow the start and end data retrieval settings for each individual Event Frame to be extended.

Data Validation When the OK Button is pressed that data on the form will be validated. In the event that a problem is found, a Red Exclamation Point will be placed next to the problem field. Click on this marker to see the description of the problem.

Figure26:ExampleValidationError–MissingNumberofPoints

Some possible problems are:

• No Event Frames have been selected • Data Retrieval has been checked but an invalid number of points has been selected • The “Actual Values” or “Interpolated Values” Retrieval Mode has been selected and

the Event Frame Attribute List contains one or more Tags that return data that is not numerical.

Page 32: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 32 of 68

Resizing The Configuration Dialog can be resized using the resize handle in the bottom right hand corner of the dialog. As the dialog is resized, the various controls will resize automatically to fit. Additionally a slider control exists to allow the relative height of the two list boxes to be adjusted.

Figure27:ResizingtheConfigurationDialog

Page 33: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 33 of 68

8. Using the OSIsoft PI Tag List Data Function In this mode, the Tag List Datasource described previously is used to dynamically retrieve a list of Tag details based on Marking selections, Document Property changes etc.

In order to setup this mode, you must have an existing DXP file open with an active visualization. Typically this would be the visualization that you would Mark to drive the Tag List retrieval but that is not always the case.

Right-click on the visualization and select the “Create Tag List View…” menu item:

Figure28:CreatingaPITagListDetailsVisualization

Edit Parameters Dialog This dialog allows you to specify the source of each parameter to be supplied to the Tag List Datasource.

Figure29:EditParametersDialog

Page 34: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 34 of 68

The following fields must be filled in:

• Name – this is a unique name that identifies the Data Function that will be created based on the parameter you enter. It will also be the name of the output Data Table that is created.

• Refresh function Automatically – if checked, then every time data within Spotfire changes that causes one or more of the Input Parameters to change then the Data Function will be executed and the Data Table contents replaced. If unchecked then the user will be alerted that a change is pending and will need to click on the Refresh icon to see the new data.

Figure 30 : Refresh Icon indicating that updated data is available

The Input Parameters are the same as those you entered on the Configuration Dialog in the previous section. Each parameter can be specified one of three ways:

• An expression – this expression can be a simple string or number or it can be a more complex expression created using the Spotfire Expression Editor. This allows for Document Properties to be specified as inputs.

• A Column – in this case the Datasource will retrieve a data row for each item in this column. Typically the Tag Name would be specified using this method, but other parameters can also be specified in this way. When a Column is chosen from the available columns in the DXP file, you can choose whether to use a Marking to limit the data retrieval to only Marked items or to return all items.

• None – the parameter will be empty

Page 35: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 35 of 68

Making Configuration Changes To make changes to the setup at a later time, use the “Edit”à”Data Function Properties” menu item to bring up the Data Function Properties dialog. From here, select the Data Function you created earlier and click on “Edit Parameters…”.

Figure31:MakingChangestoanexistingDetailView

Example Use Cases Some examples of how to use this functionality are:

• Driving Retrieval of a list of Tags from a Text Area that contains Property Controls that specify the Search criteria

o Document Properties would be mapped to each Property Control in the Text Area

NOTE: There is an issue with the Configuration Dialog in Spotfire 6.5 whereby the Input Handler is set to “None”, the “Value” column is empty and the “OK” button is disabled when the dialog is first opened. To workaround this issue, click on the correct Input Handler type when the dialog opens.

This issue is resolved in Spotfire 7.0 and Spotfire 6.5.2 Hotfix 9.

Page 36: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 36 of 68

o The Name Filter field would be an expression containing the value of the Document Property being controlled by the Search String Property Control

• The same principle can be applied to the “Search Descriptor”, “Point Source Filter”, “Data Type Filter”, “Point Class Filter”, “Attribute List” and “Num Points” fields

• Using the above configuration in conjunction with a Configuration Block to set the initial value of one or more document properties into a hyperlink that will open a visualization displaying a pre-defined list of Tags http://localhost/SpotfireWeb/ViewAnalysis.aspx?file=/PITagSearch&configurationBlock=PITag%3DSINUSOID%3B

Where %3D is html code for “=” and %3B is html code for “;”. So this example opens the Analysis File “PITagSearch” and sets the Document Property “PITag” to “SINUSOID”.

Input Parameters Appendix B lists the input parameter fields in greater detail and explains some special considerations required to understand how they drive behavior.

Page 37: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 37 of 68

9. Using the OSIsoft PI Tag Data Function In this mode, the Tag Data Datasource described previously is used to dynamically retrieve Tag Data based on Marking selections, Document Property changes etc.

In order to setup this mode, you must have an existing DXP file open with an active visualization. Typically this would be the visualization that you would Mark to drive the Tag Data retrieval but that is not always the case.

Right-click on the visualization and select the “Create Tag Details View…” menu item as shown:

Figure32:CreatingaPITagDataDetailsVisualization

Edit Parameters Dialog This dialog allows you to specify the source of each parameter to be supplied to the Tag Data Datasource.

Figure33:EditParametersDialog

Page 38: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 38 of 68

The following fields must be filled in:

• Name – this is a unique name that identifies the Data Function that will be created based on the parameter you enter. It will also be the name of the output Data Table that is created.

• Refresh function Automatically – if checked, then every time data within Spotfire changes that causes one or more of the Input Parameters to change then the Data Function will be executed and the Data Table contents replaced. If unchecked then the user will be alerted that a change is pending and will need to click on the Refresh icon to see the new data.

Figure 34 : Refresh Icon indicating that updated data is available

The Input Parameters are the same as those you entered on the Configuration Dialog in the previous section. Each parameter can be specified one of three ways:

• An expression – this expression can be a simple string or number or it can be a more complex expression created using the Spotfire Expression Editor. This allows for Document Properties to be specified as inputs.

• A Column – in this case the Datasource will retrieve a data row for each item in this column. Typically the Tag Name would be specified using this method, but other parameters can also be specified in this way. When a Column is chosen from the available columns in the DXP file, you can choose whether to use a Marking to limit the data retrieval to only Marked items or to return all items.

• None – the parameter will be empty

Page 39: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 39 of 68

Making Configuration Changes To make changes to the setup at a later time, use the “Edit”à”Data Function Properties” menu item to bring up the Data Function Properties dialog. From here, select the Data Function you created earlier and click on “Edit Parameters…”.

Figure35:MakingChangestoanexistingDetailView

Example Use Cases Some examples of how to use this drilldown functionality are:

• Driving data retrieval for one or more Tags based on Marking in a master visualization

o The Tag Name field would be specified as a Column and Limited By Marking • Driving data retrieval based on choosing a tag from a Property Control

NOTE: There is an issue with the Configuration Dialog in Spotfire 6.5 whereby the Input Handler is set to “None”, the “Value” column is empty and the “OK” button is disabled when the dialog is first opened. To workaround this issue, click on the correct Input Handler type when the dialog opens.

This issue is resolved in Spotfire 7.0 and Spotfire 6.5.2 Hotfix 9.

Page 40: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 40 of 68

o The Tag name field would be an expression containing the value of the Document Property being controlled by the Property Control

• Driving data retrieval based on the Retrieval Method being selected from a Property Control

o The Retrieval Mode field would be an expression containing the value of the Document Property being controlled by the Property Control

• The same principle can be applied to the “Num Points”, “Start Time” and “End Time” fields

Input Parameters Appendix B lists the input parameter fields in greater detail and explains some special considerations required to understand how they drive behavior.

Page 41: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 41 of 68

10. Using the OSIsoft AF Attribute Data Function In this mode, the AF Datasource described previously is used to dynamically retrieve Element metadata, Attribute metadata or Attribute Data based on Marking selections, Document Property changes etc.

In order to setup this mode, you must have an existing DXP file open with an active visualization. Typically this would be the visualization that you would Mark to drive the AF Data retrieval but that is not always the case.

Right-click on the visualization and select the “Create AF Element Details View…” menu item as shown:

Figure36:CreatingaPITagDataDetailsVisualization

Edit Parameters Dialog This dialog allows you to specify the source of each parameter to be supplied to the AF Data Datasource.

Figure37:EditParametersDialog

Page 42: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 42 of 68

The following fields must be filled in:

• Name – this is a unique name that identifies the Data Function that will be created based on the parameter you enter. It will also be the name of the output Data Table that is created.

• Refresh function Automatically – if checked, then every time data within Spotfire changes that causes one or more of the Input Parameters to change then the Data Function will be executed and the Data Table contents replaced. If unchecked then the user will be alerted that a change is pending and will need to click on the Refresh icon to see the new data.

Figure 38 : Refresh Icon indicating that updated data is available

The Input Parameters are the same as those you entered on the Configuration Dialog in the previous section. Each parameter can be specified one of three ways:

• An expression – this expression can be a simple string or number or it can be a more complex expression created using the Spotfire Expression Editor. This allows for Document Properties to be specified as inputs.

• A Column – in this case the Datasource will retrieve a data row for each item in this column. Typically the Tag Name would be specified using this method, but other parameters can also be specified in this way. When a Column is chosen from the available columns in the DXP file, you can choose whether to use a Marking to limit the data retrieval to only Marked items or to return all items.

• None – the parameter will be empty

Page 43: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 43 of 68

Making Configuration Changes To make changes to the setup at a later time, use the “Edit”à”Data Function Properties” menu item to bring up the Data Function Properties dialog. From here, select the Data Function you created earlier and click on “Edit Parameters…”.

Figure39:MakingChangestoanexistingDetailView

Example Use Cases Some examples of how to use this drilldown functionality are:

• Driving Attribute Value retrieval for one or more Elements based on Marking in a master visualization

o The Element ID field would be specified as a Column and Limited By Marking

NOTE: There is an issue with the Configuration Dialog in Spotfire 6.5 whereby the Input Handler is set to “None”, the “Value” column is empty and the “OK” button is disabled when the dialog is first opened. To workaround this issue, click on the correct Input Handler type when the dialog opens.

This issue is resolved in Spotfire 7.0 and Spotfire 6.5.2 Hotfix 9.

Page 44: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 44 of 68

• Driving data retrieval based on choosing Elements and Attributes from Property Controls

o The Element ID and the Attribute Name fields would be expressions containing the value of Document Properties being controlled by the Property Controls

• Driving data retrieval based on the Retrieval Method being selected from a Property Control

o The Retrieval Mode field would be an expression containing the value of the Document Property being controlled by the Property Control

• The same principle can be applied to the “Num Points”, “Start Time” and “End Time” fields

Input Parameters Appendix B lists the input parameter fields in greater detail and explains some special considerations required to understand how they drive behavior.

Page 45: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 45 of 68

11. Using the OSIsoft AF Event Frame Data Function In this mode, the Event Frame Datasource described previously is used to dynamically retrieve Event Frame metadata or Attribute Data based on Marking selections, Document Property changes etc.

In order to setup this mode, you must have an existing DXP file open with an active visualization. Typically this would be the visualization that you would Mark to drive the Event Frame Data retrieval but that is not always the case.

Right-click on the visualization and select the “Create AF Event Frame Details View…” menu item as shown:

Figure40:CreatinganEventFrameDetailsVisualization

Edit Parameters Dialog This dialog allows you to specify the source of each parameter to be supplied to the Event Frame Datasource.

Figure41:EditParametersDialog

Page 46: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 46 of 68

The following fields must be filled in:

• Name – this is a unique name that identifies the Data Function that will be created based on the parameter you enter. It will also be the name of the output Data Table that is created.

• Refresh function Automatically – if checked, then every time data within Spotfire changes that causes one or more of the Input Parameters to change then the Data Function will be executed and the Data Table contents replaced. If unchecked then the user will be alerted that a change is pending and will need to click on the Refresh icon to see the new data.

• Figure 42 : Refresh Icon indicating that updated data is available

The Input Parameters are the same as those you entered on the Configuration Dialog in the previous section. Each parameter can be specified one of three ways:

• An expression – this expression can be a simple string or number or it can be a more complex expression created using the Spotfire Expression Editor. This allows for Document Properties to be specified as inputs.

• A Column – in this case the Datasource will retrieve a data row for each item in this column. Typically the Tag Name would be specified using this method, but other parameters can also be specified in this way. When a Column is chosen from the available columns in the DXP file, you can choose whether to use a Marking to limit the data retrieval to only Marked items or to return all items.

• None – the parameter will be empty

Page 47: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 47 of 68

Making Configuration Changes To make changes to the setup at a later time, use the “Edit”à”Data Function Properties” menu item to bring up the Data Function Properties dialog. From here, select the Data Function you created earlier and click on “Edit Parameters…”.

Figure43:MakingChangestoanexistingDetailView

Example Use Cases Some examples of how to use this drilldown functionality are:

• Driving Attribute Value retrieval for one or more Event Frames based on Marking in a master visualization

o The Event Frame ID field would be specified as a Column and Limited By Marking

NOTE: There is an issue with the Configuration Dialog in Spotfire 6.5 whereby the Input Handler is set to “None”, the “Value” column is empty and the “OK” button is disabled when the dialog is first opened. To workaround this issue, click on the correct Input Handler type when the dialog opens.

This issue is resolved in Spotfire 7.0 and Spotfire 6.5.2 Hotfix 9.

Page 48: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 48 of 68

• Driving data retrieval based on choosing Event Frames and Attributes from Property Controls

o The Event Frame ID and the Attribute Name fields would be expressions containing the value of Document Properties being controlled by the Property Controls

• Driving data retrieval based on the Retrieval Method being selected from a Property Control

o The Retrieval Mode field would be an expression containing the value of the Document Property being controlled by the Property Control

• The same principle can be applied to the “Num Points”, “Extend Start Time” and “Extend End Time” fields

Input Parameters Appendix B lists the input parameter fields in greater detail and explains some special considerations required to understand how they drive behavior.

Page 49: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 49 of 68

12. Using the Password Encryption Tool This Tool allows you the creation of encrypted versions of OSIsoft passwords. These can be used within data functions when the Encrypted option is set to TRUE. This avoids the possibility of another Spotfire user being able to observe the original password either by viewing the inputs to the Data Function or observing the data lineage information for the Data Function.

To create encrypted passwords access the Password Encryption Tool using the Tools menu in Spotfire.

1. Enter the password to be encrypted into the first text box. 2. Enter the password a second time into the second text box. 3. Press the “Encrypt” button to display the encrypted password. 4. Press the “Close and Copy to Clipboard” button to close the dialog. The encrypted

password will be copied to the clipboard ready to be pasted into the Data Function parameter.

Controll ing Access via Licenses The menu item to access the Password Encryption Tool will only appear to users who have been granted the appropriate Spotfire License as described in the section “Spotfire Licenses” in Section 2.

Page 50: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 50 of 68

13. Using Windows Integrated Authentication with Web Player and Automation Services

When using the data source within Spotfire Analyst, and selecting “Windows Integrated” authentication mode, connections to PI Server or PI System are made using the account under which Spotfire Analyst is running. This is usually the Windows Login of the current user and allows a connection to be made without specifying any further credentials.

However, when using the data source within Web Player or Automation Services, the programs that run on the server do not run under a user account. Typically they run under a special Service Account that has limited privileges. Under these circumstances it is likely that a connection to a PI Server or PI System will fail without additional configuration.

The following sections detail some options that are available. Each of these is listed without merit. It is up to the user to choose the most appropriate choice for their particular requirements or constraints.

Using Explicit Username / Password Authentication Rather than rely on Windows Integrated Authentication, this option allows the username and password to be specified explicitly. The account specified must still have the permissions needed to access the PI Server or PI System.

To avoid passwords being stored in plain text, the Password Encryption tool can be used to specify the password in encrypted form.

Grant Access Using a PI Trust The PI Server provides a rich combination of methods to setup a Trust that include:

• User / Group • IP Address • Executable Name

For more information on setting up Trusts, consult the OSIsoft PI Server documentation.

Run the Web Player and Automation Services processes under a specific account This method involves changing the default user under which the Web Player and Automation Services executables run. The exact method varies depending on the version of Spotfire being used.

Page 51: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 51 of 68

• Spotfire 6.5 / 7.0 – change the user under which the IIS Web Applications for Web Player and Automation Services run

• Spotfire 7.5+ - change the user under which the Node Manager Service runs

Page 52: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 52 of 68

Appendix A - Data Columns Retrieved The following sections detail the columns of data retrieved for each Datasource and mode of operation.

PI Tag List A row of data is retrieved for each PI Tag. The following columns are created by default and additional columns of data type String will be created for each Tag Attribute in the Selected Attributes list.

Column Name

Spotfire Data Type Description

TagName String The Name of the Tag

Server String The OSIsoft PI Server the Tag was retrieved from

Table 5 : Default Columns

PI Tag Data A row of data is retrieved for each Value at a certain point in time for each PI Tag.

Column Name Spotfire Data Type Description

Server String The OSIsoft PI Server the Tag was retrieved from. TagName String The Name of the Tag. RetrievalMode String The Retrieval Mode used. NumericValue SingleReal The numeric value of this data point. Null if this data

point is invalid or Not A Number. TextValue String The text value of the data point. In some cases, can

contain error messages. Timestamp DateTime The time that this data point represents. Timezone String “Local” if the above Timestamp is displayed in Local

Time or “UTC” if the Timestamp is displayed in UTC Time.

Status String The Status of the data point. For a list of values see the OSIsoft AFValueStatus documentation.

IsGood String False if the data is bad else True if the data is good or questionable.

Page 53: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 53 of 68

AF Element Metadata A row of data is retrieved for each AF Element including Parent Elements.

Column Name Spotfire Data Type Description

ElementName String The Name of the AF Element ElementID String The ID (GUID) of the AF Element ElementParentName String The Name of the Parent AF Element ElementParentID String The ID (GUID) of the Parent AF Element Description String The Description of the Element in AF Type String The Type of the Element in AF Template String The Template of the Element in AF System String The PI System of the Element Database String The AF Database of the Element

Path String A path string describing the hierarchy to this Element from the owning Database

AF Attribute Metadata A row of data is retrieved for each AF Attribute.

Column Name Spotfire Data Type Description

ElementName String The Name of the AF Element containing this Attribute

ElementID String The ID (GUID) of the AF Element ElementParentName String The Name of the Parent AF Element ElementParentID String The ID (GUID) of the Parent AF Element AttributeName String The Name of the AF Attribute AttributeID String The ID (GUID) of the AF Attribute AttributeParentName String The Name of the Parent AF Attribute AttributeParentID String The ID (GUID) of the Parent AF Attribute Description String The Description of the Attribute in AF Type String The Type of the Attribute in AF UOM String The Unit Of Measure of the Element in AF PITag String The PI Tag associated with this Attribute System String The PI System of the Attribute Database String The AF Database of the Attribute

Path StringA path string describing the hierarchy to this Attribute from the owning Database through the Element Hierarchy

Page 54: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 54 of 68

AF Attribute Data A row of data is retrieved for each Value at a certain point in time for each AF Attribute.

Column Name Spotfire Data Type Description

ElementName String The Name of the AF Element containing this Attribute

ElementID String The ID (GUID) of the AF Element ElementParentName String The Name of the Parent AF Element ElementParentID String The ID (GUID) of the Parent AF Element AttributeName String The Name of the AF Attribute AttributeID String The ID (GUID) of the AF Attribute AttributeParentName String The Name of the Parent AF Attribute

AttributeParentID String The ID (GUID) of the Parent AF Attribute

RetrievalMode String “Actual Values”, “Interpolated Values”, “Plot Values” or “Snapshot”

NumericValue SingleReal If the Value retrieved is a Number then this field will be populated

TextValue String The Textual representation of the Tag Value. Null if the Status is Bad

Timestamp DateTime The UTC Timestamp for this Data Value

Timezone String“Local” if the above Timestamp is displayed in Local Time or “UTC” if the Timestamp is displayed in UTC Time.

Status String Good or Bad IsGood String “True” if status is Good, else “False” Description String The Description of the Attribute in AF Type String The Type of the Attribute in AF UOM String The Unit Of Measure of the Element in AF PITag String The PI Tag associated with this Attribute System String The PI System of the Attribute Database String The AF Database of the Attribute

Path StringA path string describing the hierarchy to this Attribute from the owning Database through the Element Hierarchy

Page 55: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 55 of 68

AF Event Frame Metadata A row of data is retrieved for each AF Attribute of each Event Frame.

Column Name Spotfire Data Type Description

EventFrameName String The Name of the this Event Frame EventFrameID String The ID (GUID) of this Event Frame EventFrameDescription String The Description of this Event Frame

EventFrameTemplate String The Name of the Template used to create this Event Frame

EventFrameParentName String The Name of this Event Frames Parent EventFrameParentID String The ID (GUID) of this Event Frames Parent StartTime DateTime The Start Time defined for this Event Frame EndTime DateTime The End Time defined for this Event Frame AttributeName String The Name of the AF Attribute AttributeID String The ID (GUID) of the AF Attribute AttributeParentName String The Name of the Parent AF Attribute AttributeParentID String The ID (GUID) of the Parent AF Attribute Description String The Description of the Attribute in AF Type String The Type of the Attribute in AF PITag String The PI Tag associated with this Attribute System String The PI System of the Attribute Database String The AF Database of the Attribute

Path StringA path string describing the hierarchy to this Attribute from the owning Database through the Element Hierarchy

Page 56: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 56 of 68

AF Event Frame Attribute Data A row of data is retrieved for each Value at a certain point in time for each AF Attribute or each Event Frame.

Column Name Spotfire Data Type Description

EventFrameName String The Name of this Event Frame EventFrameID String The ID (GUID) of this Event Frame EventFrameDescription String The Description of this Event Frame

EventFrameTemplate String The Name of the Template used to create this Event Frame

EventFrameParentName String The Name of this Event Frames Parent EventFrameParentID String The ID (GUID) of this Event Frames Parent StartTime DateTime The Start Time defined for this Event Frame EndTime DateTime The End Time defined for this Event Frame AttributeName String The Name of the AF Attribute AttributeID String The ID (GUID) of the AF Attribute AttributeParentName String The Name of the Parent AF Attribute AttributeParentID String The ID (GUID) of the Parent AF Attribute

RetrievalMode String “Actual Values”, “Interpolated Values”, “Plot Values” or “Snapshot”

NumericValue SingleReal If the Value retrieved is a Number then this field will be populated

TextValue String The Textual representation of the Tag Value. Null if the Status is Bad

Timestamp DateTime The UTC Timestamp for this Data Value

Timezone String“Local” if the above Timestamp is displayed in Local Time or “UTC” if the Timestamp is displayed in UTC Time.

Status String Good or Bad IsGood String “True” if status is Good, else “False” Description String The Description of this Attribute Type String The Type of this Attribute UOM String The Unit Of Measure of this Attribute PITag String The PI Tag associated with this Attribute System String The PI System of this Attribute Database String The AF Database of this Attribute

Path StringA path string describing the hierarchy to this Attribute from the owning Database through the Event Frame Hierarchy

Page 57: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 57 of 68

Appendix B – Data Function Input Parameters The following sections detail the Input Parameters used by each Data Function and how they drive behavior.

PI Tag List

Parameter Name Spotfire Data Type Description Notes

Server String The OSIsoft PI Server to Connect to Username String The Username to use #1 Password String The Password to use #1 Encrypted Boolean Indicates whether Password field is encrypted #1 & #2 Domain String The Windows Domain to use #1 & #2 Authmode String The Authentication Mode to use #1

NameFilter String The Tag Name Filter string. Asterisk * is a wildcard.

SearchDescriptor Boolean“True” to search the Descriptor as well as the Tag Name, “False” to just search the Tag Name.

PointSourceFilter String The Point Source Filter string. Asterisk * is a wildcard.

DataTypeFilter String The Data Type Filter string. Asterisk * is a wildcard.

PointClassFilter String The Point Class Filter string. Asterisk * is a wildcard.

AttributeList String A comma-separated list of Tag Attributes to retrieve. #3

NumPoints Integer The number of Tags to retrieve

Table 6 : Default Columns

Note #1

You can set the Authmode parameter to one of two values depending how you want to authenticate yourself with the PI System:

• "OSIPI” – pass in this value if you want to authenticate with the PI System using a PI account. You must also provide values in the Username and Password Parameters but leave the Domain Parameter empty.

• “WINDOWS” – pass in this value if you want to authenticate with the PI System using a Windows account. There are two further options for how to authenticate:

o For Windows Explicit mode, populate the Username, Password and Domain Parameters.

Page 58: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 58 of 68

o For Windows Integrated mode, leave the Username, Password and Domain Parameters empty. Your current Windows login identity will be used.

Note #2

The Password can be supplied one of two ways:

• As plain text. Enter the plain text of the password in the Password parameter and set the Encrypted parameter to False.

• As encrypted text. Use the Password Encryption Tool described in Chapter 12 to encrypt the password, enter the encrypted text in the Password parameter and set the Encrypted parameter to True.

Note #3

The Attribute List Parameter takes a comma-separated list of PI Tag Attributes that you want to retrieve. For a complete list of PI Tag Attribute names, see the OSIsoft PICommonPointAttributes documentation.

Page 59: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 59 of 68

PI Tag Data

Parameter Name

Spotfire Data Type Description Notes

Server String The OSIsoft PI Server to Connect to Username String The Username to use #1 Password String The Password to use #1 & #2 Encrypted Boolean Indicates whether Password field is encrypted #1 & #2 Domain String The Windows Domain to use #1 Authmode String The Authentication Mode to use #1 TagName String The exact name of a Tag to retrieve. #3 RetrievalMode String How the data points will be retrieved #4 StartTime String An OSIsoft PI date/time string. Appendix C EndTime String An OSIsoft PI date/time string. Appendix C Timezone String “Local” or “UTC”. #5

NumPoints Integer The maximum number of data points to retrieve for each Tag

Table 7 : Default Columns

Note #1

You can set the Authmode parameter to one of two values depending how you want to authenticate yourself with the PI System:

• "OSIPI” – pass in this value if you want to authenticate with the PI System using a PI account. You must also provide values in the Username and Password Parameters but leave the Domain Parameter empty.

• “WINDOWS” – pass in this value if you want to authenticate with the PI System using a Windows account. There are two further options for how to authenticate:

o For Windows Explicit mode, populate the Username, Password and Domain Parameters.

o For Windows Integrated mode, leave the Username, Password and Domain Parameters empty. Your current Windows login identity will be used.

Note #2

The Password can be supplied one of two ways:

• As plain text. Enter the plain text of the password in the Password parameter and set the Encrypted parameter to False.

Page 60: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 60 of 68

• As encrypted text. Use the Password Encryption Tool described in Chapter 12 to encrypt the password, enter the encrypted text in the Password parameter and set the Encrypted parameter to True.

Note #3

To retrieve data for multiple Tags, specify the Tag Name Input Parameter as a Column.

Note #4

You can set the Retrieval Mode Parameter to one of these values:

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

Note #5

You can set the Timezone parameter to one of two values depending how you want to retrieve data value timestamps from the PI System:

• "Local” – pass in this value if you want the data value timestamps to be displayed in the timezone of your Spotfire client. In the case of Spotfire Web Player and Automation Services, this will be the timezone in which those servers are located.

• “UTC” – pass in this value if you want the data value timestamps to be displayed in Co-ordinated Universal Time.

Page 61: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 61 of 68

AF Element and Attribute Data

Parameter Name

Spotfire Data Type Description Notes

System String The OSIsoft PI System to Connect to Username String The Username to use. #1 Password String The Password to use. #1 & #2 Encrypted Boolean Indicates whether Password field is encrypted #1 & #2 Domain String The Windows Domain to use. #1 ElementID String The GUID of an AF Element. #1 AttributeName String The name of an AF Attribute. #3 RetrieveAttributeData Boolean True to retrieve Attribute Data. False to

retrieve Element and Attribute metadata. #4

RetrievalMode String How the data points will be retrieved. #4 StartTime String An OSIsoft PI date/time string. Appendix C EndTime String An OSIsoft PI date/time string. Appendix C Timezone String “Local” or “UTC”. #5

NumPoints Integer The maximum number of data points to retrieve for each Tag.

Table 8 : Default Columns

Note #1

OSIsoft AF only supports Windows Authentication. There are two options for how to authenticate:

• For Windows Explicit mode, populate the Username, Password and Domain Parameters.

• For Windows Integrated mode, leave the Username, Password and Domain Parameters empty. Your current Windows login identity will be used.

Note #2

The Password can be supplied one of two ways:

• As plain text. Enter the plain text of the password in the Password parameter and set the Encrypted parameter to False.

• As encrypted text. Use the Password Encryption Tool described in Chapter 12 to encrypt the password, enter the encrypted text in the Password parameter and set the Encrypted parameter to True.

Page 62: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 62 of 68

Note #3

The combination of the Element ID, Attribute Name and Retrieve Attribute Data Parameters control what data is retrieved by the Data Function.

Input Parameter Values

Result Use Case Element ID Attribute

Name

Retrieve Attribute

Data

Specify an Element GUID

Leave Empty False

Element metadata for the requested element will be retrieved. The fields returned will be as described in Appendix A under AF Element Metadata.

Used for displaying AF Element Metadata

Specify an Element GID

Specify an Attribute Name

False

Element and Attribute metadata for the requested AF Attribute of the requested AF Element will be retrieved. The fields returned will be as described in Appendix A under AF Attribute Metadata

Used for displaying AF Attribute Metadata

Specify an Element GUID

Set to asterisk * False

Element and Attribute metadata for all Attributes of the selected AF Element will be retrieved. The fields returned will be as described in Appendix A under AF Attribute Metadata

Used for displaying a list of AF Attributes for an AF Element

Specify an Element GUID

Specify an Attribute Name

True

Attribute data for the specified Attribute of the specified Element will be retrieved. The fields returned will be as described in Appendix A under AF Attribute Data

Used to display data for an AF Attribute over time

Note #4

When retrieving Attribute Data, you can set the Retrieval Mode Parameter to one of these values:

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

Note #5

Page 63: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 63 of 68

You can set the Timezone parameter to one of two values depending how you want to retrieve data value timestamps from the PI System:

• "Local” – pass in this value if you want the data value timestamps to be displayed in the timezone of your Spotfire client. In the case of Spotfire Web Player and Automation Services, this will be the timezone in which those servers are located.

• “UTC” – pass in this value if you want the data value timestamps to be displayed in Co-ordinated Universal Time.

Page 64: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 64 of 68

AF Event Frame Metadata and Data

Parameter Name Spotfire Data Type Description Notes

System String The OSIsoft PI System to Connect to Username String The Username to use. #1 Password String The Password to use. #1 & #2

Encrypted Boolean Indicates whether Password field is encrypted #1 & #2

Domain String The Windows Domain to use. #1 EventFrameID String The GUID of an AF Element. #1

RetrieveAttributeData Boolean

True to retrieve Attribute Data. False to retrieve Event Frame and Attribute metadata.

#3

RetrievalMode String How the data points will be retrieved. #3 ExtendStartTimeValue Integer A number indicating how much to extend

the start of the data retrieval time period

ExtendStartTimeUnits String The units for extending the start of the data

retrieval period. #4

ExtendEndTimeValue Integer A number indicating how much to extend the end of the data retrieval time period

ExtendEndTimeUnits String The units for extending the end of the data retrieval period. #4

Timezone String “Local” or “UTC”. #5

NumPoints Integer The maximum number of data points to retrieve for each Attribute.

Table 9 : Default Columns

Note #1

OSIsoft AF only supports Windows Authentication. There are two options for how to authenticate:

• For Windows Explicit mode, populate the Username, Password and Domain Parameters.

• For Windows Integrated mode, leave the Username, Password and Domain Parameters empty. Your current Windows login identity will be used.

Note #2

The Password can be supplied one of two ways:

Page 65: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 65 of 68

• As plain text. Enter the plain text of the password in the Password parameter and set the Encrypted parameter to False.

• As encrypted text. Use the Password Encryption Tool described in Chapter 12 to encrypt the password, enter the encrypted text in the Password parameter and set the Encrypted parameter to True.

Note #3

When retrieving Attribute Data, you can set the Retrieval Mode Parameter to one of these values:

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

Note #4

Valid values for the “ExtendStartTimeUnits” and “ExtendEndTimeUnits” parameters are:

• “Seconds” • “Minutes” • “Hours” • “Days”

Note #5

You can set the Timezone parameter to one of two values depending how you want to retrieve data value timestamps from the PI System:

• "Local” – pass in this value if you want the data value timestamps to be displayed in the timezone of your Spotfire client. In the case of Spotfire Web Player and Automation Services, this will be the timezone in which those servers are located.

• “UTC” – pass in this value if you want the data value timestamps to be displayed in Co-ordinated Universal Time.

Page 66: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 66 of 68

Appendix C – Valid Date/Time Formats Any string that can be used as a constructor for an AFTime object can be used. This includes:

• Specific Dates – 12/01/2014, 11/23/1996 • Specific Times – 01:23:47pm, 14:22:11 • Full Date/Time - Sat,01Nov200819:35:00GMT • Relative Dates, Times and Date/Times - Sat,01Nov201419:35:00GMT+2y+5d-

12h+30.55s • OSIsoft PI Syntax - *, *-2H, *-3D etc.

Here are some examples of valid declarations:

• "*" (now) • "*-8h" (8 hours ago) • "01" (first of current month) • "01/01" (first of current year) • "Monday+8h" • "Sat,01Nov200819:35:00GMT+2y+5d-12h+30.55s" • "Today" (Today at 00:00) • "T-3d" • "Yesterday+03:45:30.25"

For full details of the available options, you can consult the AFSDK documentation entry on the AFTime Constructor.

NOTE: The * notation cannot be used in languages other than English. However, in other languages, locale appropriate terms can be used.

For example “Today” and “Now” work in English work as expected, as do “Heute” and “Jetzt” in German.

Page 67: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 67 of 68

Appendix D – Troubleshooting Guide

No menu item to open data from OSIsoft PI or AF Check that the following steps have been taken:

A. Your system administrator has installed the plugin SPK files on the Spotfire Server that you connect to.

B. You have accepted the updates (you will need to restart Spotfire if it is already running)

C. Your System Administrator has licensed you to use one or more of the Datasources.

Your system administrator must also update the Web Player deployment before you can use files from the library that were built using the Datasources.

Error Message when opening data from PI or AF

In this situation you have the plugin SPK files installed but you do not have the required OSIsoft AF Client library installed. Install the “OSIsoftPIAFClient2015” and restart Spotfire to resolve this issue.

Page 68: OSIsoft PI Custom Data Source - TIBCO Community · OSIsoft PI Custom Datasource Page 5 of 68 1. Introduction The PI System is a suite of software products that are used for data collection,

OSIsoft PI Custom Datasource Page 68 of 68

Error Message when opening a DXP fi le containing data from PI or AF

Most likely the DXP file contains linked data created using the Custom Datasource and one of the two previous issues is preventing you from accessing the data.

See the previous two items. Make sure you can connect to OSIsoft PI or AF before attempting to open the file.

Missing Method Error Message when retrieving data from PI or AF ImportExceptionatSpotfire.Dxp.Data:Failedtoexecutedatasourcequery.(HRESULT:80131500)StackTrace:atSpotfire.Dxp.Data.DataSourceConnection.ExecuteQuery2()atSpotfirePS.Framework.OSIPIDataSource.DataSource.TagData.NoRowsDataSource.CreateReader(IServiceProviderserviceProvider)atSpotfire.Dxp.Data.DataSourceConnection.ExecuteQuery2()atSpotfire.Dxp.Data.DataFlow.Execute()atSpotfire.Dxp.Data.DataFlow.DataFlowConnection.ExecuteQueryCore2()atSpotfire.Dxp.Data.DataSourceConnection.ExecuteQuery2()...MissingMethodExceptionatSpotfirePS.Framework.OSIPIDataSource:Methodnotfound:'OSIsoft.AF.Asset.AFValueOSIsoft.AF.PI.PIPoint.CurrentValue()'.(HRESULT:80131513)StackTrace:atSpotfirePS.Framework.OSIPIDataSource.DataSource.TagData.DataRowReaderImpl.createIterators()atSpotfirePS.Framework.OSIPIDataSource.DataSource.TagData.DataRowReaderImpl..ctor(DataSourceImpldatasource)atSpotfirePS.Framework.OSIPIDataSource.DataSource.TagData.OSIPIDataSourceConnection.ExecuteQueryCore2()atSpotfire.Dxp.Data.DataSourceConnection.ExecuteQuery2()

This indicates than an older version of the OSIsoft AF Client library is installed. Update to the latest 2015 version to resolve this issue.