Enterprise RTView® 
User Guide


Archiving and Viewing Historical Data

Requirements
This example requires that you have a working knowledge of Enterprise RTView. If you would like to work through a basic example, please complete the Quick Start before continuing. NOTE: The SQL data source is required to view data from the Historian in Enterprise RTView. Verify that the SQL data source is licensed in your installation in the Display Builder About dialog.

Objectives

  • Create a configuration file for the Historian
  • Run the Historian with this configuration file
  • Create and view a display file which shows data from the Historian
  • Create a configuration file that will cause the Historian to store your tabular data to a new table in the history database
  • Run the Historian with this configuration file to create and view a display file which shows the new table of data
NOTE: This example uses the XML data source to illustrate the features listed below. Even if you will not be using XML data, we suggest you complete this exercise in order to learn basic concepts of archiving and viewing historical data.

Getting Started
This example assumes that you have a database to which the Historian will store data. If you do not have a database and you are running on a Windows platform with Microsoft Access, you may setup demos\dstutorial as your history database using an ODBC-JDBC bridge.

If you have not already Setup the Historian Database, you must do so before continuing.

On Windows

1. Start the XML data simulator:
 
Select Start-->Programs-->Enterprise RTView-->Demos-->Simulators-->XML Data Simulator

2. Start the Display Builder:
 
Select Start-->Programs-->Enterprise RTView-->Display Builder

3. Login to the Display Builder. By default, the Display Builder does not require a login. Login can be enabled at setup to support role based security. The default user name and password are:
User Name: admin
Password: admin

NOTE: It is possible that your system administrator may have configured another user name and password. In this case, you may also need to select a role.

 

On UNIX

1.    Open a UNIX terminal window.

2.    In the terminal window, go to your Enterprise RTView installation directory.

3.    Initialize the terminal window.
 
csh bsh
  type source rtv_init type . ./rtv_init.ksh

NOTE:  You must initialize each new terminal window you open. See the Setup section for more details about setting up your environment.

4.    In the initialized terminal window, go from your installation directory to the demos directory.

5.    Start the XML data simulator:
 
type run_simdata &

The XML data simulator will run as a background process in a separate terminal window.

6.   Start the Display Builder in your original, initialized terminal window:
 
type run_builder &

7. Login to the Display Builder. By default, the Display Builder does not require a login. Login can be enabled at setup to support role based security. The default user name and password are:
User Name: admin
Password: admin

NOTE: It is possible that your system administrator may have configured another user name and password. In this case, you may also need to select a role.

 

Application Options

1.    In the Display Builder, select Tools>Options to open the Application Options dialog.

2.    Select the XML tab and click on Add.

3.    In the Add XML Source dialog:
 
XML Source Name - Enter update.xml

4.    Click OK to add the XML source.

5.    Click on the SQL tab and select Add Database.

6.    In the Add Database dialog:
 
Database Name - Enter RTVHISTORY 

NOTE: If you are using a password protected ODBC-JDBC bridge connection to communicate with the history database, you will need to enter your User Name and Password in the Add Database dialog. If you are using a direct JDBC connection, deselect the Use ODBC Driver checkbox and enter a JDBC Driver Class Name and JDBC Database URL. See the SQL Application Options page in the Data Sources section of this documentation for more details. 

7.    Click OK to add this database.

8.    Click Save to save these options and select No in the confirmation dialog.

 

Create a Configuration File to Store Historical Data
In this section you will add two meters to a display. The data you attach to these meters will be used by the Historian to store data in the history database.

1.    Select Edit>Add.

2.    In the Object Palette window, select the Meters tab and add the first meter in the palette (class name: obj_meter20) to the display.

3.    In the Object Properties dialog:
 
label - change to Data.  Press <Enter>.

value - Right-click in the Property Name field and select Attach to Data>XML.

4.    In the Attach to XML Data dialog:
 
XML Source - update.xml should already be selected.

Data Key - Select element1_data from the drop down menu.

5.    Click OK to apply these values and close the Attach to XML Data dialog.

6.    Select the Element 1 Data meter and click the Copy button  .

7.    Click the Paste  button.

8.    Click to place the new meter.

9.    In the Object Properties dialog:
 
label - change to Load.  Press <Enter>.

value - Right-click in the Property Name field and select Attach to Data>XML.

10.    In the Attach to XML Data dialog:
 
XML Source - update.xml should already be selected.

Data Key - Select element1_load from the drop down menu.

11.    Click OK to apply these values and close the Attach to XML Data dialog.
12.    Select File>Save and name this file tutorial_history_config.rtv.

 

Store Historical Data

1.    Start the Historian:

On Windows
 
Select Start-->Programs-->Enterprise RTView-->Historian

On UNIX
In an initialized terminal window:
 
type run_historian &

2.    Click Add on the Configuration tab.

3.    Select tutorial_history_config.rtv

4.    Click Open to insert into the Data Configuration Files list.

5.    Select the Show Data in Console checkbox.

This prompts the Historian to print a line to the console for each record it stores to the history database.

NOTE: If you are using a password protected ODBC-JDBC bridge connection to communicate with the history database, you will need to enter your Database User Name and Database Password. If you are using a direct JDBC connection, deselect the Use ODBC Driver checkbox and enter a JDBC Driver Class Name and JDBC Database URL. See Database Options in Running the Historian for more details. You must enter the same configuration settings you entered in the Add Database dialog.

6.    Click Save Configuration to save these settings.

7.    Select the Console tab.

8.    Click Start Storing Data.

Data will immediately start printing to the console window.

NOTE: Let the Historian run as you go through the next section.

 

View Historical Data
In this section you will create a display with a graph that loads initial data from the history database and then updates with live XML data. You will also add a table that will show all data from a table in the history database.

1.    In the Display Builder click on the New  button.

2.    In the Object Palette window, select the Graphs tab and add the second graph in the palette (class name: obj_trendgraph02) to the display.

3.    In the Object Properties dialog:
 
objWidth - Increase to 500.  Press <Enter>.

label - Change to History Graph.  Press <Enter>.

trace1ValueHistoryFlag - Select the checkbox.

trace2ValueHistoryFlag - Select the checkbox.

NOTE: Selecting these checkboxes indicates that, if available, initial values for the graph should be read from the Historian.

trace1Value - Right-click in the Property Name field and select Attach to Data>XML.

4.    In the Attach to XML Data dialog:
 
XML Source - update.xml should already be selected.

Data Key - Select element1_data from the drop down menu.

5.    Click OK to apply these values and close the Attach to XML Data dialog.

6.    In the Object Properties dialog:
 
trace2Value - Right-click in the Property Name field and select Attach to Data>XML. This attaches the second trace to data.

7.    In the Attach to XML Data dialog:
 
XML Source - update.xml should already be selected.

Data Key - Select element1_load from the drop down menu.

8.    Click OK to apply these values and close the Attach to XML Data dialog.

Data attachments in the History Graph now match the data attachments on the meters in the configuration display file you saved as tutorial_history_config. rtv.

9.    Select File>Save and name this file tutorial_history_display.rtv.

When you open this display, the graph will load initial data from the history database and will continue to update as live XML data comes in.

10.    Select File>Open to reopen the display (.rtv) file you saved as tutorial_history_display.rtv.

11.    In the Object Palette window, select the Tables tab and add the first table in the palette (class name: obj_table02) to the display.

12.    In the Object Properties dialog:
 
objWidth - Increase to 500.  Press <Enter>.

label - Change to History Table.  Press <Enter>.

valueTable - Right-click in the Property Name field and select Attach to Data>SQL.

13.    In the Attach to SQL Data dialog:
 
Database Name - RTVHISTORY should already be selected.

Table Name - Select HISTORY from the drop down menu. 

Column(s) - Select * from the drop down menu. 

14.    Click OK to apply these values and close the Attach to SQL Data dialog.

The table will now display the entire HISTORY table from the history database.

Setup Database to Store Historical Tabular Data
In this section you will need to add a table to the history database. If necessary, contact your database administrator to complete the next section.

1.    Exit the Historian and Display Builder.

2.    Add a table named production_archive to the history database.

3.    Add the following columns to that table:
 
Field Name Field Type
RowName Text (10 characters)
Plant Text (30 characters)
UnitsInProduction Number
UnitsCompleted Number
Status Text (30 characters)
OnSchedule Text (10 characters)
TimeStamp Text (30 characters)
TimeStampLs Text (30 characters)

 

Create a Configuration File to Store Historical Tabular Data
In this section you will add a table to a display. The data you attach to this table will be used by the Historian to store data in the production_archive table you created in the history database.

Restart the Display Builder

On Windows
1.    Start the Display Builder:
 
Select Start-->Programs-->Enterprise RTView-->Display Builder

2.    Login to the Display Builder. By default, the Display Builder does not require a login. Login can be enabled at setup to support role based security. The default user name and password are:
User Name: admin
Password: admin

NOTE: It is possible that your system administrator may have configured another user name and password. In this case, you may also need to select a role.

On UNIX

1.   Start the Display Builder in your original, initialized terminal window:
 
type run_builder &

2.    Login to the Display Builder. By default, the Display Builder does not require a login. Login can be enabled at setup to support role based security. The default user name and password are:
User Name: admin
Password: admin

NOTE: It is possible that your system administrator may have configured another user name and password. In this case, you may also need to select a role.

3.    Select Edit>Add to open the Object Palette.

4.    Select the Tables tab and add the first table in the palette (class name: obj_table02) to the display.

5.    In the Object Properties dialog:
 
label - Change to Production Data.  Press <Enter>.

objWidth - Increase to 500.  Press <Enter>.

valueTable - Right-click in the Property Name field and select Attach to Data>XML.

6.    In the Attach to XML Data dialog:
 
XML Source - update.xml should already be selected. 

Data Key - Select production_table from the drop down menu.

Column(s) - Select * from the drop down menu.

7.    Click OK to apply these values and close the Attach to XML Data dialog.
 

8.    In the Object Properties window:
 
historyTableName - Type production_archive in the Property Value field. Press <Enter>.

historyTableRowNameFlag - Select the checkbox. 

NOTE: When you enter production_archive in the Property Value field, you are telling the Historian which table in your history database to store the tabular data in. Selecting the historyTableRowNameFlag checkbox tells the Historian to store the data from the row name field into the first column in the production_archive table in your history database. 

9.    Select File>Save and name this file tutorial_history_table_config.rtv.

 

Store Historical Tabular Data

Restart the Historian:

1. On Windows
 
Select Start-->Programs-->Enterprise RTView-->Historian

 

1. On UNIX
In an initialized terminal window:
 
type run_historian &

2.    Click Add on the Configuration tab.

3.    Select tutorial_history_table_config.rtv

4.    Click Open to insert into the Data Configuration Files list.

The Show Data in Console flag should already be checked. This prompts the Historian to print a line to the console for each record it stores to the database.

5.    Click Save Configuration to save these settings.

6.    Click on the Console tab.

7.    Click Start Storing Data.

Data will immediately start printing to the console window.

Note: Let the Historian run as you go through the next section.

 

View Historical Tabular Data

1.    In the Display Builder, click on the New  button.

2.    In the Object Palette window, select the Tables tab and add the first table in the palette (class name: obj_table02) to the display.

3.    In the Object Properties dialog:
 
label - Change to Historical Production Data.  Press <Enter>.

objWidth - Increase to 500.  Press <Enter>.

objHeight - Increase to 350.  Press <Enter>.

valueTable - Right-click in the Property Name field and select Attach to Data>SQL.

4.    In the Attach to SQL Data dialog:
 
Database Name - RTVHISTORY should already be selected. 

Table Name - Select production_archive from the drop down menu.

Column(s) - Select * from the drop down menu.

Click OK to attach data and close the Attach to SQL Data dialog.
5.    Select File>Save and name this file tutorial_history_table_display.rtv.

6.    Exit the Historian, Display Builder, and XML data simulator.
 
   


 
Enterprise RTView contains components licensed under the Apache License Version 2.0.

 

Treemap Algorithms v1.0  is used without modifications and licensed by MPL Version 1.1. Copyright © 2001 University of Maryland, College Park, MD

 

Datejs is licensed under MIT. Copyright © Coolite Inc.

 

JCalendar 1.3.2 is licensed under LGPL. Copyright © Kai Toedter.

 

jQuery is licensed under MIT. Copyright © John Resig,

 
JMS, JMX and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. They are mentioned in this document for identification purposes only. 

 
SL, SL-GMS, GMS, Enterprise RTView, SL Corporation, and the SL logo are trademarks or registered trademarks of Sherrill-Lubinski Corporation in the United States and other countries. Copyright © 1998-2009 Sherrill-Lubinski Corporation. All Rights Reserved.