Вы находитесь на странице: 1из 64

- IN02 RSBizWare Historian Advanced Lab

Lab 1
Time-Series Data Collection and Reporting
Presenter: Todd Smith
RSBizWare Historian Product Manager

Historian Advanced Lab 1


Collection and Reporting

Time-Series Data

Contents
Before you begin .......................................................................................................................5
Tools & prerequisites................................................................................................................... 5
In this lab ...................................................................................................................................6
Overview....................................................................................................................................7
What is time-series data? ............................................................................................................ 7
How is time-series data stored?................................................................................................... 8
How can time-series data be included in reports? ........................................................................ 8
Collecting and Storing Time-Series Data ...............................................................................10
Create a database to store time-series data............................................................................... 10
Enhance the BizBikes RSSql configuration to log to the external data source ...................19
Create a connector for the RSSql configuration that connects to the external data store ............ 19
Register the ODBC enterprise connector for use in Historian data collection.............................. 20
Create a narrow time-series database table and configure data collection .........................22
Create a narrow time-series database table............................................................................... 22
Create a narrow time-series report data source ......................................................................... 23
Use the Historian Time-Series Data Collection wizard to configure data collection ..................... 28
Create a wide time-series database table and configure data collection .............................37
Create a wide time-series database table .................................................................................. 37
Create a wide time-series report data source............................................................................. 39
Use RSSql to configure the collection of data ............................................................................ 46

RSTechED 2005 Rockwell Software

3 of 64

Reporting on Time-Series Data...............................................................................................53


Start the Collection of Data........................................................................................................ 53
Create a Time-Series Report Object .......................................................................................... 55
Enhance Report Performance ................................................................................................... 57
Discussion: Comparing Trending Formats...........................................................................62
Narrow Time-Series Advantages ............................................................................................... 62
Wide Time-Series Advantages .................................................................................................. 62
Notes........................................................................................................................................63

4 of 64

RSTechED 2005 Rockwell Software

Before you begin


Historian specializes in retrieving and reporting data for trending analysis. This time-centric data
can be stored in the Production Server database or in any accessible Microsoft SQL Server or
Oracle database. This lab will examine some of the tools and options available to collect and
store this kind of data.

Tools & prerequisites


This lab assumes the lab computer has the following software installed and properly configured:
Microsoft Windows 2003 Server Standard Edition
Microsoft Internet Explorer 6.0 (SP1 or higher)
Microsoft SQL Server 2000 Standard Edition (SP3a or higher)
RSBizWare 8.0
FactoryTalk 2.0.10
The BizBikes RSView32 project, RSSql configuration, and BizBikes database from the
RSBizWare 8.0 CD restored according to the provided instructions
RSView32 7.2
Activation licenses for appropriate software. This lab requires an RSSql license in addition to
the Historian licenses.
2 script files from the RSTechEd CD

RSTechED 2005 Rockwell Software

5 of 64

In this lab
In this lab, you learn how to:
Create data storage tables for wide and narrow time-series data
Configure an external data source that allows Historian to view the data from outside of the
Production Servers database
Create time-series report data sources
Use Historian to configure the collection of narrow time-series data
Use RSSql to configure the collection of wide time-series data
Create a time-series report that combines data from the different data sources on a single
chart object
Compare the advantages of narrow versus wide time-series data storage

6 of 64

RSTechED 2005 Rockwell Software

Overview

What is time-series data?


A time-series data record contains the value of a specific data point, the time the data value was
collected, and a means to identify where the data came from. Each record can optionally contain
the RSSql quality rating of the data value.

In this example, Flow Rate, Pressure, and Temperature values are plotted over time. The
temperature values collected with bad quality are indicated by backwards slash \ marks. The
temperature values collected with uncertain quality are indicated by horizontal slash | marks.
Only data identified as time-series can be displayed on a Historian time-series data object. This
data object has these unique capabilities:
You can include different reporting tags on the same chart
Each reporting tag can be scaled to its own relative Y axis
A relative X axis can be configured to compare reporting tag values collected during different
time windows
You can annotate the chart with user comments
You can display data collected with RSSqls data-compression enterprise connector
It takes advantage of the Production Servers ability to display sampled data when the result
sets contain very large numbers of data records

RSTechED 2005 Rockwell Software

7 of 64

How is time-series data stored?


Time-series data is stored in either a narrow, wide, or compressed format.
Narrow formatWith narrow time-series data, every record contains at least three columns: a
data value, a timestamp, and a numeric value used to look-up a text description of the data and
the engineering units in which the values are measured.

Historian uses a default narrow format table called RSDataPointSample for storing time-series
data. However, as you will see in this lab, it can log data to other narrow format tables that you
create.
Wide formatWith wide time-series data, every record contains a timestamp and columns for
different reporting tag values collected at the same time.

Historian does not use any wide format tables for data collection by default, nor does it have the
capability to configure data collection to such a table. However, you can create a wide table and
use RSSql to log data to it (this requires a separate RSSql license). Once the data is in the table,
Historian can recognize it as time-series data. This technique can also be used to have Historian
interpret foreign tables as time-series data.
Compressed formatCompressed time-series data is similar to the narrow format in that each
record contains data for a single data point. However, unlike narrow format records, a
compressed record contains binary arrays that hold blocks of data values and their corresponding
timestamps and collection quality values. Each record also contains the start and end times that
the data values span as well as the min and max data values stored in the array.

How can time-series data be included in reports?


An RSBizWare report data source is created using the RSBizWare Production Client. The report
data source identifies the following about the data:
The format of the time-series data (narrow, wide, or compressed)
The name of the table where the data is stored

8 of 64

RSTechED 2005 Rockwell Software

The name of the table that stores the text descriptions of the data points and the engineering
units in which the values are measured.
The time-series report object is a Historian ActiveX control that can be inserted into HTML
documents, HMI projects, and so on to display the values of one or more reporting tags. As you
will see in the lab, Historian is capable of reporting on time-series data from different tables on the
same chart.

RSTechED 2005 Rockwell Software

9 of 64

Collecting and Storing Time-Series Data


In this section, you will create an external database and configure RSBizWare to be able to report
from the data in those tables. Next you will modify the existing BizBikes RSSql configuration by
giving it a new ODBC enterprise connector to log data to the external database. Then you will go
through the process of creating narrow and wide time-series database tables and configuring the
collection of the data to be stored in those tables.

Create a database to store time-series data


Creating an SQL Server database and login account
To create an SQL Server database and login account, do the following:
1. From the Windows Start menu select Programs > Microsoft SQL Server > Enterprise
Manager. Expand the Databases folder under Microsoft SQL Servers > SQL Server Group >
(local) (Windows NT) item.

2. Right-click the Databases folder and select New Database from the shortcut menu.

10 of 64

RSTechED 2005 Rockwell Software

3. Enter Time-Series Data for the database name and click OK.

.
4. Expand the Security folder and then right-click the Logins item and select New Login from
the shortcut menu.

RSTechED 2005 Rockwell Software

11 of 64

5. On the New Login dialog box, enter ExternalData for the Name. Click the SQL Server
Authentication option. Specify ExternalData as the SQL Server Authentication Password.
Select the Time-Series Data database from the Database list.

12 of 64

RSTechED 2005 Rockwell Software

6. Click the Database Access tab. Select the Time-Series Data database as the database to
be accessed by this login. Then check the db_owner check box in the list of Database roles.

7. Click OK and confirm the password ExternalData for this login.

8. Exit the SQL Server Enterprise Manager application.

RSTechED 2005 Rockwell Software

13 of 64

Creating an ODBC connection to SQL Server


To create an ODBC connection to an SQL Server for the Production Server to use when
accessing this database, do the following:
1. From the Windows Start menu select Settings > Control Panel, select Administrative
Tools, and then select Data Sources (ODBC). Select the System DSN tab and click Add.

2. Select SQL Server as the driver and click Finish.

14 of 64

RSTechED 2005 Rockwell Software

3. Specify ExternalData in the Name box, RSBizWare External Data Storage in the
Description box, and (local) in the Server list. Click Next.

4. Select With SQL Server authentication and enter ExternalData for the Login ID and
Password. (This is the SQL Server login account / and password configured earlier.) Click
Next.

RSTechED 2005 Rockwell Software

15 of 64

5. Click Next on the next dialog box and Finish on the dialog box after that.

6. On the last dialog box, click the Test Data Source button. You should see the following
TEST COMPLETED SUCCESSFULLY! message:

7. Click OK and then click OK on the ODBC Data Source Administrator dialog box.

16 of 64

RSTechED 2005 Rockwell Software

Creating an RSBizWare external data source


To create an RSBizWare external data source, do the following:
1. From the Windows Start menu select Programs > Rockwell Software > RSBizWare >
RSBizWare Enterprise Manager. Expand the Server Manager item.
2. If prompted, login using the default administrator account:

User: admin

Password admin2

Server localhost (a keyword for the current machine); you could also use the IP address
or name of the computer.

Click Login.
3. Expand the Servers item and then expand the Production Server item. Click the External
Data Sources item under the Production Server item.

RSTechED 2005 Rockwell Software

17 of 64

4. Click Add on the bottom left hand side. Then type the following property values for the
external data source:

Server DSN: ExternalData

Description: RSBizWare external data storage

User: ExternalData

Password: ExternalData

5. Click the Test Connection button. You should get a Connection Succeeded message. Click
OK for that message and then click OK on the Data Source Properties dialog box. You
should now see the following entry in the list of external data sources:

18 of 64

RSTechED 2005 Rockwell Software

Enhance the BizBikes RSSql configuration to log to the external


data source
In this section you will create an enterprise connection for the RSSql configuration that connects
to the external data source and register the ODBC enterprise connector for use in Historian data
collection.

Create a connector for the RSSql configuration that connects to


the external data store
1. In the RSBizWare Enterprise Manager, Expand the RSSql Configurations item and the
RSSql item. Right-click the BizBikesOnline item and select Add a Connector from the
shortcut menu.

RSTechED 2005 Rockwell Software

19 of 64

2. On the Add RSSql Connector dialog box, select ODBC from the Connector Type list if it is not
already selected. Enter the name of your computer as the Connector Host and a user name
and password with Administrator privileges. Then click Done.

Register the ODBC enterprise connector for use in Historian data


collection
1. If the Production Server item is not already expanded, open it and expand the Data
Collection folder under it. Right-click the BizBikesOnline item and select Register
Connector from the shortcut menu.

2. Click Next on the first dialog box of the RSSql to RSBizWare Registration Wizard.

20 of 64

RSTechED 2005 Rockwell Software

3. On the Enterprise Connection Database Settings dialog box, select the ODBC connector and
click Configure.

4. On the Enterprise Connection Settings dialog box, select ExternalData from the ODBC DSN
list and enter ExternalData for the User Name and Password. Click OK.

5. Click Next to advance to the last dialog box of the RSSql to RSBizWare Registration Wizard.
Click Finish to complete the wizard.

RSTechED 2005 Rockwell Software

21 of 64

Create a narrow time-series database table and configure data


collection
In this section you will create a narrow time-series database table and a narrow time-series report
data source and use an Historian wizard to configure data collection.

Create a narrow time-series database table


1. Launch the Microsoft Query Analyzer from the Windows Start menu by selecting Programs
> Microsoft SQL Server > Query Analyzer. Enter ExternalData for the Login name and
Password and click OK.

2. Select File > Open and browse to the IN02 > Lab 1> Scripts folder on the RSTechEd CD
(this file may be located on the desktop and/or the directory structure may not be the same as
listed here, but you should be able to find it.) Open the NarrowTimeSeries.sql file. The
following should appear in your Query Analyzer query window:

3. Execute this query by selecting Query > Execute from the menu. You will get a message
saying that the command completed successfully. Exit the Query Analyzer application.

22 of 64

RSTechED 2005 Rockwell Software

Create a narrow time-series report data source


1. Launch the RSBizWare Production Client from the Windows Start menu by selecting
Programs > Rockwell Software > RSBizWare > RSBizWare Production Client.
2. Select the Configure > Reporting > Report Data Sources, Objects, and Filters from the
menu. Then click Add under the Report Data Sources area on the Configure Report Data
Sources, Objects, and Filters dialog box.

This will launch the Report Data Source Configuration wizard.


3. Click Next on the first dialog box of this wizard. On the next dialog box, you are asked to
enter a name for your report data source. Enter External Narrow Time-Series and click
Next.

RSTechED 2005 Rockwell Software

23 of 64

4. On the Choose a Database Table or View dialog box, you must select a data source and then
select a table or view from within that data source. Select RSBizWare external data storage
from the list, select the Narrow_Time_Series table from the list of tables and views, and click
Next.

5. On the Column Selection dialog box, click the >> button to select all columns and click Next.

24 of 64

RSTechED 2005 Rockwell Software

6. On the Time Selection toolbar dialog box, select DateAndTimeStamp from the list and click
Next.

7. On the Time-series Format dialog box, select the Narrow Format option and click Next.

RSTechED 2005 Rockwell Software

25 of 64

8. On the Match Time-series Columns dialog box, you must identify the functions of each of the
columns in your data table. When you click the <None> value in the Time-series use
column, a list will appear. Assign the following uses to the Fields:

DataPointId: Data Point Ids

DateAndTimeStamp: Timestamp

Milliseconds: Milliseconds

Value: Value

Quality: Quality

Click Next.

26 of 64

RSTechED 2005 Rockwell Software

9. On the Data Point Configuration Table dialog box, you are asked to select a database table
to act as the configuration table. The configuration table maps the numeric Data Point Id
values with the text data point description and engineering units columns. You did not create
a configuration table before because the wizard can be used to do this automatically.
Click Create Configuration Table to create this table. Then click Next.

10. On the last dialog box, click Finish to exit from the wizard. Then click Close to exit from the
Configure Report Data Sources, Report Objects, and Filters dialog box.

RSTechED 2005 Rockwell Software

27 of 64

Use the Historian Time-Series Data Collection wizard to


configure data collection
To generate data for the Narrow_Time_Series table, you will run the BizBikes RSView32
application, which simulates a production system.
1. Too configure the collection of data from an RSView32 application, the application must be
running. If the BizBikes application is not already running, follow these steps to launch it:

Launch the RSView32 application. From the Windows Start menu select Programs >
Rockwell Software > RSView32 > RSView32 Works.

Select File > Open from the menu and browse to and open the
C:\BizBikes\RSView32\BizBikes.rsv file.

Click the Run Mode tab and then click Run Project.

2. To configure the data collection, return to the RSBizWare Production Client.

28 of 64

RSTechED 2005 Rockwell Software

3. From the Production Client menu, select Configure > Historian > Time-Series Data
Collection. The Time-Series Data Collection Wizard will appear. Click Next.

RSTechED 2005 Rockwell Software

29 of 64

4. Identify the report data source, the RSSql configuration to be used for collecting data, and the
enterprise connector to be used by that configuration.

The Historian Data Point Default and Historian Data Point Compressed options are used
when configuring data collection of data for the default normal time-series and default
compressed time-series data sources. Since you will be using the data source you
created earlier, select the Advanced option and select External Narrow Time-Series
from the Advanced list.

Since only one RSSql configuration has been registered with the Production Server for
use in collecting Historian data, the BizBikesOnline configuration will be pre-selected in
the RSSql Configuration list and cannot be changed.

Since the ODBC enterprise connector was configured to access the external data store,
select it from the RSSql Enterprise Connection list.

Click Next.

30 of 64

RSTechED 2005 Rockwell Software

5. On the From RSSql Data Points to Historian Reporting Tags dialog box, click Add.

6. On the Select RSSql Data Points dialog box, click Add/Edit Points.

RSTechED 2005 Rockwell Software

31 of 64

7. You might see a progress bar as the tag list is generated from the FactoryTalk Directory
Server. Then, the (RSSql) FactoryTalk Data Point dialog box will appear.

8. Select the data points to be collected.

Select the Paint folder from the Folders list.

Select the MixSpeed tag from the Contents of /::Paint list and click Add Selected
Tag(s).

Select TankTemp tag from the Contents of /::Paint list and click Add Selected Tag(s).

32 of 64

RSTechED 2005 Rockwell Software

9. Click Apply and then click Close to exit the (RSSql) FactoryTalk Data Point dialog box.

10. On the Select RSSql Data Points dialog box, enter PAINT in the Text box then click the
Contains option.

The list of data points will be filtered to show only the ones recently added for the PAINT
workcell.
11. Select all of the data points and click Select.

RSTechED 2005 Rockwell Software

33 of 64

12. On the From RSSql Data Points to Historian Reporting Tags dialog box, click Next.

13. Because all of the selected data points were scheduled, the RSSql Scheduled Transaction
dialog box will appear. Change the Scan Rate from 1 to 5 seconds and then click Next.

34 of 64

RSTechED 2005 Rockwell Software

14. Accept all of the default values on the RSSql Transaction Settings dialog box and click Next.

RSTechED 2005 Rockwell Software

35 of 64

15. On the Summary dialog box, click Create to create the RSSql transactions that will collect
data from these data points.

16. Click Finish on the final dialog box of the wizard. The RSSql configuration is now configured
to collect the selected data points and store them in the External Narrow Time-Series
database table.

36 of 64

RSTechED 2005 Rockwell Software

Create a wide time-series database table and configure data


collection
In this section you will create a wide time-series database table and report data source and use
RSSql to configure the collection of data.

Create a wide time-series database table


1. Launch the Microsoft Query Analyzer. From the Windows Start menu select Programs >
Microsoft SQL Server > Query Analyzer. Enter ExternalData for the Login name and
Password and click OK.

2. Select File > Open from the menu and browse to the IN02 > Lab 1 > Scripts folder on the
RSTechEd CD. Open the WideTimeSeries.sql file. The following should appear in your
Query Analyzer query window:

RSTechED 2005 Rockwell Software

37 of 64

3. Execute this query by selecting Query > Execute. You will get a message saying that the
command completed successfully. Exit the Query Analyzer application.

38 of 64

RSTechED 2005 Rockwell Software

Create a wide time-series report data source


1. Launch the RSBizWare Production Client if it is not already running (from the Windows Start
menu select Programs > Rockwell Software > RSBizWare > RSBizWare Production
Client).
2. Select Configure > Reporting > Report Data Sources, Objects, and Filters from the
menu. Then click the Add button in the Report Data Sources area of the Configure Report
Data Sources, Objects, and Filters dialog box.

3. This will launch the Report Data Source Configuration wizard. Click Next.

RSTechED 2005 Rockwell Software

39 of 64

4. On the Report Data Source Name dialog box, you must enter a name for your report data
source. Enter the name External Wide Time-Series and click Next.

40 of 64

RSTechED 2005 Rockwell Software

5. Next you must select a data source and then select a table or view from within that data
source. Select the RSBizWare external data storage from the database list, select the
Wide_Time_Series table from the list of tables and views, and then click Next.

RSTechED 2005 Rockwell Software

41 of 64

6. On the Column Selection dialog box, click the >> button to select all columns, and then click
Next.

7. On the Time Selection Toolbar dialog box, select the DateAndTimeStamp column from the
list and then click Next.

42 of 64

RSTechED 2005 Rockwell Software

8. On the Time-series Format dialog box, select the Wide Format option, and then click Next.

RSTechED 2005 Rockwell Software

43 of 64

9. On the Match Time-series Columns dialog box, you must identify the functions of each of the
columns in your data table. When you click the <None> value in the Time-series Use column,
a list will appear. Assign the following uses to the Fields:

DateAndTimeStamp: Timestamp

Milliseconds: Milliseconds

Quality: Quality

MixSpeed: Data Point

TankTemp: Data Point

CoolTemp: Data Point

MotionMax: Data Point

Then click Next.

44 of 64

RSTechED 2005 Rockwell Software

10. On the Data Point Configuration Table dialog box, you must select a database table to act as
the configuration table. The configuration table maps the data point column numbers with the
text data point description and engineering units columns. You did not create a configuration
table before because the wizard can be used to do this automatically.
Click the Create Configuration Table button to create this table, and then click Next.

11. On the last dialog box, click Finish to exit the wizard. Then click Close to exit the Configure
Report Data Sources, Report Objects, and Filters dialog box.

RSTechED 2005 Rockwell Software

45 of 64

Use RSSql to configure the collection of data


Historian does not provide a time-series data collection wizard for wide time-series data sources
like it does for narrow time-series data sources. To configure wide time-series data collection, you
must use the RSSql client. This section will cover how the existing BizBikes RSSql configuration
can be modified to collect data for the wide time-series table created earlier.

1.

Close the RSBizWare Production Client. Having both the Production Client and RSSql open
at the same time can cause display refresh problems.

2.

Launch the RSSql client application. From the Windows Start menu select Programs >
Rockwell Software > RSSql > RSSql.

3.

Expand the BizBikesOnline item and the Transaction/Control Manager item. Then, rightclick the FT item and select Define Data Points from the shortcut menu.

4.

You might see a progress bar as the tag list is generated from the FactoryTalk Directory
Server. Then, the (RSSql) FactoryTalk Data Point dialog box will appear.

46 of 64

RSTechED 2005 Rockwell Software

5.

Select the data points to be collected.


Select the Paint folder from the Folder list.
Select the CoolTemp tag from the Contents of /::Paint list and click the Add Selected
Tag(s) button.
Select the MotionMax tag from the Contents of /::Paint list and click the Add Selected
Tag(s) button.

6.

Click Apply and then click Close to exit the (RSSql) FactoryTalk Data Point dialog box.

7.

On the main RSSql dialog box, expand the ODBC_Connectors item. Then, right-click the
ODBC item and select Define Data Object from the shortcut menu.

RSTechED 2005 Rockwell Software

47 of 64

8.

On the Data Object Definition dialog box, give the new data object a name by entering
Wide_Data_Logger in the Name list. You also need to specify which DSN to use to connect
to the external database. Select the browse button ( ) next to the Database Connection list.

9.

Select ExternalData from the System DSN list. This will automatically fill the Connection
Name list with a value of ExternalData. Specify ExternalData for the User Name and
Password boxes. Test the database connection by clicking the Test button.

10. Click OK on the Connection Succeeded message, and then click Apply and Close.

48 of 64

RSTechED 2005 Rockwell Software

11. On the ODBC Data Object Definition dialog box, the Database Connection list will be set to

ExternalData. Select ExternalData.Wide_Time_Series from the Table list.

12. Double-click each of the entries in the Database Columns list in order to move them to the

Data Object Columns list. Then, click Apply and Close to return to the main RSSql dialog
box.

13. Select Define > Transaction from the menu. Enter Wide_Data_Transaction in the

Transaction Name list. Select Wide_Data_Logger from the Data Object Name list.

RSTechED 2005 Rockwell Software

49 of 64

14. Right-click the DateAndTimeStamp column and select Bind Expression from the shortcut

menu.

15. Click the TransTimestamp() button, and then click OK to close the Expression Editor.

Repeat the process of using the Expression Editor to configure the Milliseconds column. In
the Expression Editor, click the MTransTimestamp() button for the Milliseconds column.

50 of 64

RSTechED 2005 Rockwell Software

16. On the Transaction Definition dialog box, double-click MixSpeed in the list of Data Object

Columns. The Filter and Select Data Points (drag & drop enabled) dialog box will appear on
the right. Scroll down through the Data Point list until you see the four data points configured
for the Paint workcell. Select the FT.RSViewBizBikes.Paint_MixSpeed data point. Drag it
over to the left and drop it on the MixSpeed Data Object Column. This will bind the data
point to the data object column.

17. Repeat the drag and drop procedure to bind the TankTemp, CoolTemp, and MotionMax

data points to the corresponding Data Object Columns. Close the Filter and Select Data
Points dialog box when completed.

18. On the Transaction Definition dialog box, click the Trigger / Storage button.

RSTechED 2005 Rockwell Software

51 of 64

19. On the Trigger And Storage Parameters dialog box, change the Scan Rate to 5 and select

the Seconds option. Then click OK to close the Trigger And Storage Parameters dialog
box.

20. On the Transaction Definition dialog box, click the Enabled option under Transaction Status.

Then, click Apply and Close.

The BizBikes RSSql configuration is now configured to collect the MixSpeed, TankTemp,
CoolTemp, and MotionMax data points every five seconds and store their values to the
same database record in the Wide_Time_Series table in the Time-Series Data SQL Server
database.
21. Close the RSSql client.

52 of 64

RSTechED 2005 Rockwell Software

Reporting on Time-Series Data


In this section you will start data collection, create a time-series report object, and enhance the
performance of the report.

Start the Collection of Data


1. To configure the collection of data from an RSView32 application, that application must be
running. If the BizBikes application is not already running, follow these steps to launch it (you
should have already completed this step on page 28):

Launch the RSView32 application. From the Windows Start menu select Programs >
Rockwell Software > RSView32 > RSView32 Works.

Select File > Open from the menu and browse to and open the
C:\BizBikes\RSView32\BizBikes.rsv file.

Click the Run Mode tab and then click the Run Project button.

RSTechED 2005 Rockwell Software

53 of 64

2. From the main BizBikes dialog box, click the Remote Areas button on the toolbar. Then click
the Paint button on the pop-up menu.

3. From the Paint Process dialog box, click the


button. Leave the RSView32
project running. Launch the RSBizWare Production Client from the Windows Start menu by
selecting Programs > Rockwell Software > RSBizWare > RSBizWare Production Client.
4. Select Configure > RSSql Configurations from the menu. Click Start on the RSSql
Configurations dialog box.

Close the RSSql Configurations dialog box by clicking on the Close button.

54 of 64

RSTechED 2005 Rockwell Software

Create a Time-Series Report Object


1. From the Production Client, select File > New Report from the menu. Insert a time-series
report object into the report by selecting Insert > Time-Series Trend Chart from the menu.
Click Yes when asked if you want to author the report as the user admin.
2. On the Configure Time-Series Report Object dialog box, enter External Time-Series Data in
the Report Object Name box. Expand the Reporting Tags by Data Source item in the
Report Tags Available tree. Expand the External Narrow Time-Series and External Wide
Time-Series items. Double-click the (External Wide Time-Series) MixSpeed reporting tag
and double-click the (External Narrow Time-Series) FT.RSViewBizBikes.Paint_TankTemp
reporting tag.

3. Click OK to close the Configure Time-Series Report Object dialog box.


.

RSTechED 2005 Rockwell Software

55 of 64

4. Click the Preview Mode button (

) button to preview the report object.

This report object shows that reporting tags from multiple, external time-series data sources
that can be included on the same chart even if those report data sources are a mixed
collection of narrow and wide time-series tables.

56 of 64

RSTechED 2005 Rockwell Software

Enhance Report Performance


It will not take long before the reporting performance begins to seriously degrade for report
objects with reporting tags from the newly created external time-series tables. Follow these steps
to create an index on each data table.
1. From the Windows Start menu select Programs > Microsoft SQL Server > Enterprise
Manager. Expand the Time-Series Data folder under the Microsoft SQL Servers > SQL
Server Group > (local) (Windows NT) > Databases folder. Click the Tables item. The list of
tables in this database will appear on the right.

2. In the list of database tables, right-click the Narrow_Time_Series table and select the All
Tasks > Manage Indexes from the shortcut menu.

RSTechED 2005 Rockwell Software

57 of 64

3. Click the New button on the Manage Indexes dialog box.

58 of 64

RSTechED 2005 Rockwell Software

4. On the Create New Index dialog box, enter an index name like Narrow Index in the Index
name list. Check the DataPointId and DateAndTimeStamp column check boxes, and then
click OK.

Because queries of narrow time-series data are frequently based on the Data Point Id and
Timestamp values, they should be included in the tables index. Click Close on the Manage
Indexes dialog box.
5. In the list of database tables, right-click the Wide_Time_Series table and select All Tasks >
Manage Indexes from the shortcut menu.

RSTechED 2005 Rockwell Software

59 of 64

6. Click New on the Manage Indexes dialog box.

60 of 64

RSTechED 2005 Rockwell Software

7. On the Create New Index dialog box, enter Wide Index in the Index name box. Check the
DateAndTimeStamp column check box, and then click OK.

Because queries of wide time-series data are frequently based on the Timestamp value, it
should be included in the tables index. There is no Data Point Id used with wide time-series
data like there is with narrow time-series data.
Click Close on the Manage Indexes dialog box.
Queries on the data from these tables should run more efficiently now.

RSTechED 2005 Rockwell Software

61 of 64

Discussion: Comparing Trending Formats


Narrow and wide time-series storage formats have contrasting advantages and disadvantages.
This section lists the advantages of each method to help you decide when each format is best for
your application.

Narrow Time-Series Advantages


A narrow time-series database record is typically smaller than a wide time-series record. A
wide time-series record often contains many data value columns while a narrow time-series
record only has one data value column. When large numbers of records are queried for a
single reporting tag, the result set size in bytes will typically be larger and less efficient for wide
time-series data compared to narrow time-series data. In these cases, the narrow time-series
queries will be more efficient and faster than queries of wide time-series data.
Historian has a built-in wizard to configure narrow time-series data collection. Configuring wide
time-series data collection requires the RSSql client and thus requires a RSSql license.
Narrow time-series data collection is ideal for unscheduled data points. If you want to collect
data point values when they change, you definitely want to store them in a narrow format. It
would be very inefficient to store multiple data point values in a wide format every time any of
the values changes.

Wide Time-Series Advantages


Logging scheduled data points can be much more efficient with a wide time-series format. If
you are collecting 100 values every minute, a wide time-series format would only require one
database write every minute versus 100 database writes every minute. Even though the wide
record is much larger than the narrow, the wide record is much smaller than the combined 100
narrow records.
A wide time-series report data source can be configured with a derived field column. This
column could be a value that is a function of two or more other data point values.
If it is important to compare different reporting tags collected by the same transaction, you can
only do this with wide time-series records. Data points collected in a narrow format cannot
always be associated one-for-one with other data points based on timestamp, even if the data
points are scheduled and collected at the same rate.

62 of 64

RSTechED 2005 Rockwell Software

Notes

RSTechED 2005 Rockwell Software

63 of 64

64 of 64

RSTechED 2005 Rockwell Software

Вам также может понравиться