ClearSCADA

Description

In order to connect CleasrSCADA to an Excel Spreadsheet, please use the following steps as your guide:

  1. Create Spreadsheet with column headers and populate rows with appropriate text
  2. Create ODBC SYSTEM DSN Connection to the Excel File
  3. Create ClearSCADA objects in order to grab data

Instructions

Create Spreadsheet

In order to work with a data set, we need to create a spreadsheet which will act as our data source.

  1. Create a spreasheet with the appropriate column headers.  This example uses Commodity and Value as the column headers.
  2. Populate the spreadsheet with the data you require.



ODBC Connection

We need to make this spreadsheet accessible to ClearSCADA via ODBC. To accomplish this, we need to configure and ODBC SYSTEM DSN connection.

  1. Open the Control Panel | Administrative Tools | Data Sources (ODBC ) application
  2. Select SYSTEM DSN | Add 
  3. Select "Microsft Excel Driver" , select the newest version that supports the *.xlsx file if you are running Excel 2007. Other wise the standard *.xls connection is fine. 

     

     
  4. Name the Data Source Name to something meaningfull, and Browse to the Workbook Name.
     
     
     
  5. Press OK when complete.
     

Create ClearSCADA Objects

Now that we have a Data Souce and Connection, we need to bring that data into ClearSCADA.  A number of objects must be created and linked for this to happen.

  1. Create the following objects in ClearSCADA:  ODBC Connection, ODBC Query, ODBC Analog Point.

     
  2. Configure the Connection and browse to the DSN you created.
     

     
  3. Configure the Query object by selecting the Connection you created and enter a Query:
     

     
  4. Configure the Analog Point by  selecting the Query and Row and Column for the result:
     

     

Notes

Once all items are In Service, the Excel spread sheet is no longer editable. The open connection to the file from the DSN locks the file from being opened by other applications. To update values in the Spreadsheet, you should connect via another ODBC connection and use the UPDATE or INSERT commands.

To ensure the data always results in the selected Column and Row, you can edit the query on the Point Tab to filter based upon a unique row so that there is only one result returned from the query such as:

 SELECT * FROM [Sheet1$] WHERE Commodity = 'Oil'