Example

This example Application demonstrates how to read asset telemetry data, the average motor current for pump 1, from a SQL Server Database using the TSC SQL Server Connector.

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

Step 1: Add the Connection

From the Properties blade of the Time Series Chart, select the Data Source tab.

Click the plus icon next to Data Source, then the plus icon next to Connection, and select the TSC SQL Connector.

Step 2: Configure Name and Server

Enter a name for the Connection. In this case, set the name to TSC SQL Connection.

Enter the authentication details: the Server Instance, User Name, and Password. In this case, tick to use SQL Server authentication as a password is needed.

Step 3: Configure Database

Select the database and click Save.

Step 4: Use the Connection

Select the Connection that was just created, enter the Data Source name, and select the entity to read. In this case, set the name to Chart Data and the entity to SimpleChart. Save the Data Source.

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

Repeat steps 1 to 4 to add another TSC SQL Data Source for the Hierarchy. In this case, set the name to Chart Hierarchy and the entity to SimpleTree. Save the Data Source.

Step 5: Use the Data Sources

Select the Data Sources we just added, configure the Block properties and save the Application.

In this case, use the following values:

Step 6: Results

Click the launch button and select the asset telemetry data from the hierarchy that we want to display: motor current for pump 1. Observe that the average motor current data is returned from the SQL Server database for the selected period.

Files

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

Last updated