Example: Settings for a Query Process with SAP MII 14.0
Example Description
The example shows how to proceed if you want to be able to query tags from an OSISoft PI source system starting from SAP MII.
The following information, in connection with PCo, refers to:
-
OSISoft PI (source system)
-
SAP MII 14.0 (destination system)
Prerequisites
In the PCo Management Console under you have configured the host name and made additional settings. (See also: Configuring the Main Service.)
Procedure
Settings in PCo
-
Create a source system of the type PI Agent. (See also: OSISoft PI Source System.)
-
Create an agent instance and choose the Servers tab.
-
On the Servers tab, select the SAP MII Query Server checkbox and enter at least the port, for example, 9001. (See also: SAP MII Query Server and Setting Up a Secure Connection for MII Queries.)
Settings in SAP MII 14.0
Creating a Data Server
-
In the MII menu, choose .
The MII system shows a list with all available data servers. For more information, see the SAP MII documentation under Data Servers.
-
Choose the Create pushbutton.
The New SAP MII Data Server dialog box appears.
-
In step 1 Connector enter the following data:
Field
Description
Server Name
Enter a name of your choice for the server on which PCo is running.
Connector Type
Choose the PCoConnector entry.
-
In step 2 Connectivity, enter the URL for the PCo instance manually: http://<servername>:<port>/PCoManagement.
The MII system displays a dialog box for logging on to the computer on which PCo is running.
-
Enter User Name and Password for the computer on which PCo is running.
Step 3 Component appears. The MII system displays the agent instances created in PCo.
-
Choose the agent instance that you created previously for your PI source system.
-
Choose the Finish pushbutton.
The new data server is created. The name of the data server and the type PCoConnector are displayed in the upper screen area. The Settings and Connection tabs are displayed in the lower screen area.
-
On the Settings tab, select the Enabled checkbox.
The data server that you created for PCo is now activated.
-
You need to check or specify the following data on the Connections tab:
Field
Description
Agent Name
The name of the selected PCo agent instance is displayed here.
Agent Port
The port of the PCo agent instance is displayed here.
Agent IP
Here you need to enter the IP address of the computer on which PCo is running.
Writable
Select the checkbox if, using the query, you want to change values of specific tags in the PI source system starting from SAP MII.
For more information, see the SAP MII documentation under PCo Connector.
Creating a PCo Query
-
Starting from the MII menu, choose .
The catalog overview is displayed.
-
If you have not yet created your own project, select the root of the catalog tree and choose the option New Project either using the right mouse button or from the menu. Enter a project name.
-
Select the project you created previously. Open the context menu using the right mouse button.
-
In the context menu, choose . For more information, see the SAP MII documentation under PCo Query.
The screen for selecting the available data servers appears.
-
Select the data server you created previously and then choose the entry TagRetrieveQuery in the Mode field. (See also: SAP MII documentation under Data Source for Queries.)
-
In the Template Categories screen area, double-click the Tag Retrieve Query entry.
The Hierarchy tab is displayed. All tags of the PI source system are displayed.
-
On the Hierarchy tab, select one or more tags that you want to query using the query. (See also: SAP MII documentation under Tag Retrieve, Aggregate, and Store Queries.)
Testing a PCo Query
-
To test the newly created query, open the project in the workbench.
-
Select the query and choose Test in the context menu.
The MII system displays the Test Query Template dialog box.
-
Select Inner Frame and choose the OK pushbutton to start the query.
The MII system displays the query results. The selected tags are displayed with the current tag values.

