Anda di halaman 1dari 52

Archiver Users Guide

Contacting Rockwell Software

Technical Support Telephone 440-646-5800 Technical Support Fax 440-646-5801 World Wide Web www.software.rockwell.com 2005 Rockwell Software Inc. All rights reserved. Printed in USA. This manual and any accompanying Rockwell Software products are copyrighted by Rockwell Software Inc. Any reproduction and/or distribution without prior written consent from Rockwell Software Inc. is strictly prohibited. Please refer to the license agreement for details.

Copyright Notice

Trademark Notices

The Rockwell Software and RSBizWare logos are registered trademarks of Rockwell Software Inc. FactoryTalk and RSBizWare eProcedure are registered trademarks of Rockwell Software Inc. RSBizWare Batch, RSBizWare MaterialTrack, RSBizWare BatchCampaign, RSBizWare Historian, RSBizWare BatchHistorian, RSBizWare Batch Archiver, RSBizWare Scheduler, RSAssetSecurity, PhaseManager, RSTune, and RSLoop Optimizer are trademarks of Rockwell Software Inc. Logix5000, RSLogix 5000, and ProcessLogix are trademarks and ControlLogix is a registered trademark of Rockwell Automation. All other trademarks are the property of their respective holders and are hereby acknowledged.

Warranty

This Rockwell Software product is warranted in accord with the product license. The products performance will be affected by system configuration, the application being performed, operator control, and other related factors. This products implementation may vary among users. This manual is as up-to-date as possible at the time of printing; however, the accompanying software may have changed since that time. Rockwell Software reserves the right to change any information contained in this manual or the software at anytime without prior notice. The instructions in this manual do not claim to cover all the details or variations in the equipment, procedure, or process described, nor to provide directions for meeting every possible contingency during installation, operation, or maintenance.
Modified: July 18, 2005 3:29 pm

ii

Contents
1 Introducing the Batch Archiver
Document Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the RDBMS Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Data Source Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the ODBC Connect String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Reporting Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Batch Archiver Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1
1 1 2 4 4 4 4 4 4

2 Working with Electronic Batch Records

Electronic Batch Record Interpretation Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Creating a Data Source


Creating an SQL Server Data Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the SQL Server Batch History Database . . . . . . . . . . . . . . . . . . . . . . . . Creating the Archiver ODBC Connection to SQL Server . . . . . . . . . . . . . . . . . . Creating an Oracle Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modifying the BatchArc.ini File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the Oracle Batch History Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the Archiver ODBC Connection to Oracle . . . . . . . . . . . . . . . . . . . . . .

9
10 10 11 14 15 15 16

4 Implementing the Batch Archiver


Configuring the Reporting Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Archiver Service for Incremental Archiving . . . . . . . . . . . . . . . . . . . Assigning a User Account to the Archiver Service . . . . . . . . . . . . . . . . . . . . . . . Enabling the Archiver Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Archiver for End-of-Batch Archiving . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Archiver for Optimal Performance . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Archiver for Optimal Record Transfer. . . . . . . . . . . . . . . . . . . . Configuring the Archiver for Optimal Data Access . . . . . . . . . . . . . . . . . . . . . . . Running the Archiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19
19 22 22 23 24 24 24 25 26

iii

BATCH ARCHIVER USERS GUIDE

5 Using a Custom Archiver


Creating a Custom Archiver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments From the Batch Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ArchQue.txt File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Developing the Output Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BATCHHIS Database Table Schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Custom Archiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29
29 29 29 31 31 38

6 Configuring the Archiver for BatchHistorian


What is BatchHistorian? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Data Source for BatchHistorian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Updating the Database Connection String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Verifying the Database Connection String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Archiver Event Filters for BatchHistorian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Batch Event Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MaterialTrack Event Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Batch Reporting Values for Optimum Performance (SQL Server Only) . . . . . . . . . . Recommendations for Optimum Data Access . . . . . . . . . . . . . . . . . . . . . . . . . . .

39
39 39 40 40 40 41 41 41 42

A Windows Event Log Entries Index

43 v

iv

Introducing the Batch Archiver


This reference guide provides the database administrator quick and easy access to information as well as procedural instructions required to use the RSBizWare Batch Archiver.

Document Organization
The information presented in this document should minimize the effort required to archive the batch data to a database. This manual presents the following subjects:

Introduction to the Archiver Working with Electronic Batch Records Creating a Data Source Using the Archiver Creating a Custom Archiver Using the Windows Event Log Archiver Setup for RSBizWare BatchHistorian Users

Overview
The Batch Archiver collects data from the electronic batch record files (.evt files) generated by the Batch Server and stores the data in a specified Open Database Connectivity (ODBC)-compliant relational database. Rockwell Automation recommends using a high-performance database such as SQL Server or Oracle due to the superior robustness and performance of these products.
The Batch Archiver requires an ODBC-compliant database that supports stored procedures, such as SQL Server 2000 or Oracle8i/9i. Database platforms that do not provide stored procedure support, such as Access 95, cannot be used with the Batch Archiver.

The Batch Server creates an electronic batch record for every batch on the Batch List. While these files may be viewed with a word processor or spreadsheet, many plants have implemented one of the many commercially available Relational Database Management System (RDBMS) software packages. The Archiver collects data from each electronic batch record file and places it in the specified RDBMS database, allowing you to store the electronic batch record data in this format.

BATCH ARCHIVER USERS GUIDE

You can configure the Archiver to archive batch data to the RDBMS database in either of two ways:

End-of-Batch Incremental Near-Time

When using End-of-Batch archiving, the Archiver inserts records into the RDBMS database when a batch is removed from the batch list. In this case, the Batch Archiver runs as a software program and is initiated by the Batch Server. When using Incremental archiving, the Batch Archiver inserts records into the RDBMS database on a pre-defined schedule. In this case, the Archiver runs as a Windows service. You can configure the archiving time interval in the Equipment Editor Server Options dialog box. (See Configuring the Reporting Option for more information.) When the operator creates a control recipe, the Batch Server adds the electronic batch record file name to the Archivers work queue file (Archque.txt). After the Archiver successfully inserts all of the electronic batch records into the database, it removes the electronic batch record file name from the work queue file. The Archiver does not delete the electronic batch record file unless it is specifically configured to do so. If the Archiver cannot successfully insert each item from the electronic batch record file, it does not remove the file name from the Archivers work queue file. Every time the Archiver runs, it attempts to insert the records from each file listed in the queue into the RDBMS database. In this manner, the Archiver attempts to store the data at a later time in the event of a failure. This mechanism ensures that failures such as networking problems do not result in a loss of archived data.
If the system fails while the Archiver is in the process of inserting a files records, the Archiver does not remember where it was in the record insertion process. When the Archiver is restarted, it attempts to insert all of the files records, which may result in duplicate records in the target database. When the Archiver is configured to run at the end of a batch, the Batch Server runs the Archiver as a Windows IDLE_PRIORITY process. If the system is busy, the Archiver is superseded by higher-priority functions, which slows the archiving process.

System Architecture
You can configure the Archiver to run as a software program (for end-of-batch archiving) or as a Windows service (for incremental archiving). The Archiver uses ODBC (Open Database Connectivity) technology to communicate with any of several ODBC-compliant databases. Table creation scripts are provided for Oracle and Microsoft SQL Server. (See Creating a Data Source for more information.)

1 Introducing the Batch Archiver

The following diagram illustrates the sequence of events that occur when the Batch Server initiates the Archiver to insert batch record data into your RDBMS database.
1. The operator or MES

(Manufacturing Execution System) starts a batch.


2. The Batch Server creates

Operator/MES Archiver Queue ArchQue.txt 1 4 Recipe Execution (Batch Server) 3 2 *.evt files 9 6 5 Archiver

an electronic batch record file.


3. The Batch Server adds the

name of the electronic batch record to the electronic batch record directory file, EventDir.txt.
4. The Batch Server

7 8

incrementally writes to the Archivers queue file, ArchQue.txt. The data in this file consists of the path to the electronic batch record file, and if the batch is removed from the batch list, a tab and the word REMOVED follows the file name.

Add *.evt file name to EventDir.txt

Electronic Batch Records

ODBC

Your Relational Database

5. Non-Incremental (End-of-Batch) Archiving: When a batch is removed from the batch

list, the Batch Server initiates the Archiver. For End-of-Batch archiving, the Archiver runs as a software program and the Archiver service must be disabled.
For Incremental archiving, the Archiver runs as a Windows service on a pre-defined schedule. The service must be enabled at all times during batch processing. 6. The Archiver reads the ArchQue.txt file for the name of the electronic batch record file

and the status of the batch.


7. The Archiver reads the electronic batch record file. 8. The Archiver inserts records into a database via ODBC. 9. If electronic batch record data is inserted into the database successfully, the file name

is removed from the ArchQue.txt file.


10. Steps 5-9 are repeated until the Archiver has attempted to insert each electronic batch

record file listed in the ArchQue.txt file into your database.

BATCH ARCHIVER USERS GUIDE

Implementation Overview
Implementing the Batch Archiver involves five distinct steps:

Creating the RDBMS database Configuring a Data Source name for the RDBMS database Creating the ODBC database connect string Configuring the Batch reporting option in the Equipment Editors Server Options dialog box Configuring the Batch Archiver service

The first three steps are covered in the Creating a Data Source chapter. The last two steps are discussed in the Implementing the Batch Archiver chapter.

Creating the RDBMS Database


The first step to implement the Batch Archiver requires creating the RDBMS database where the Batch Archiver will archive data from the event journals (.evt files).

Configuring the Data Source Name


After creating the database, the second implementation step involves configuring a Data Source name for the RDBMS database. The Data Source name functions as an alias for the database used by the Batch Archiver.

Creating the ODBC Connect String


Once the Data Source name is established, the next step is setting up the ODBC Connect String. The Batch Archiver uses this string to locate the appropriate RDBMS database where it archives data.

Configuring the Reporting Option


When the Data Source is generated, you will then configure the reporting option. This is done using the Batch Reporting tab of the Equipment Editor Server Options dialog box. The reporting options that can involve the Batch Archiver include Archiver (End-ofBatch), Archiver (Incremental), and the Report Editor.

Configuring the Batch Archiver Service


The final step to implementing the Batch Archiver requires configuring the Batch Archiver service. Configuring the service is a function of the selected reporting option.

Working with Electronic Batch Records


An electronic batch record (.evt) file is a record (history) showing the creation of a material batch. Among other uses, this record can be used for regulatory and reporting purposes. The ISA S88.01 standard defines batch history as A collection of data describing or related to a batch. For every batch execution, the Batch Server creates and maintains an electronic batch record (.evt) file during the batch procedures execution. Each electronic batch record entry contains fields and a variety of entries based on event types. All data is in ASCII format, which may represent time, integer, real number, string, or enumerations. As events occur during batch execution, the Batch Server appends data to the electronic batch record. You can access the electronic batch record from the Batch View or from any other client screens. The electronic batch data is in a simple ASCII format file (.evt), which you can view with a word processor or spreadsheet program. (See the System Files Reference Guide for a complete listing of electronic batch record fields and events. See the ISA S88.01 Standard for more information on modes, states, and commands.)

Electronic Batch Record Interpretation Examples


The event file contains a record for each occurrence of a phase, operation, unit procedure, and procedure changing state (STARTING, STOPPING, HOLDING, etc.). To look at values passed to a phase, look for the variable passed in the Description column. The PValue column indicates what parameter value was passed for that variable during that phase.
Example:
Recipe
12:TPROC\TUP:1\TOP:1\ CHARGE:1-1

Description
AMNT_TO_CHARGE

Event
Recipe Value

PValue
50

EU
GALLONS

To see whether a level (e.g., operation) became active, look through the Description column and find the phrase Operation Started, Step Activated, etc. The EU column will contain the word Phase if the step activated is a phase.
Example:
Recipe
12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1

Description
Step Activated State Changed: State Changed:

PValue
CHARGE:1 RUNNING COMPLETE

EU
Phase

Phase
ICE_CREAM CHARGEA CHARGEA

BATCH ARCHIVER USERS GUIDE

To evaluate a transfer of control, you will find entries showing the continuous phases involved becoming active and idle in turn. However, only the final continuous phase will show that it completed. In other words, if a transfer of control involved three instances of the same phase running in sequence, the first would start and become idle, then the second would start and become idle, and finally the third would start and become complete. The following example shows the state changes of an entire operation that contains a transfer of control operation in which a RECIRC phase occurs both before and after a transition:
Recipe
12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1\RECIRC:2-1 12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 12:TPROC\TUP:1\TRANCT:1\RECIRC:2-1 12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1\CHRG_B:1-1 12:TPROC\TUP:1\TRANCT:1\CHRG_B:1-1 12:TPROC\TUP:1\TRANCT:1\CHRG_B:1-1 12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1\CHRG_B:1-1 12:TPROC\TUP:1\TRANCT:1-1

Description
Operation Started State Changed: Step Activated Step Activated Step Deactivated State Changed: State Changed: State Changed: State Changed: State Changed: Step Activated Step Activated State Changed: Step Deactivated State Changed: Owner Changed: Attribute Change Step Deactivated State Changed: State Changed: State Changed: State Changed: Step Activated State Changed: Step Deactivated

PValue
0 RUNNING RECIRC:2 CHARGE:1 Initial Step IDLE IDLE RUNNING RUNNING COMPLETE CHARGE_B:1 RECIRC:3 IDLE CHARGE:1 RUNNING PROGRAM PAUSED off RECIRC:2 IDLE RUNNING COMPLETE COMPLETE Terminal Step IDLE CHARGE_B:1

EU

Phase

Phase Phase

RECIRC1 CHARGEA

RECIRC1 CHARGEA RECIRC1 CHARGEA CHARGEA Phase Phase CHARGEB RECIRC1 CHARGEA Phase CHARGEA RECIRC1 RECIRC1 RECIRC1 Phase RECIRC1 CHARGEB CHARGEB CHARGEB RECIRC1

CHARGEB Phase CHARGEB

2 Working with Electronic Batch Records

Recipe
12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 12:TPROC\TUP:1\TRANCT:1-1 12:TPROC\TUP:1\TRANCT:1-1 12:TRNPROC\TRANUP:1-1 12:TPROC\TUP:1\TRANCT:1-1

Description
State Changed: Step Deactivated State Changed: Step Activated Operation Done

PValue
IDLE RECIRC:3 COMPLETE Terminal Step 0

EU

Phase
RECIRC1

Phase

RECIRC1

BATCH ARCHIVER USERS GUIDE

Creating a Data Source


This chapter provides instructions for the first three steps required to implement the Batch Archiver:

Creating the RDBMS database Configuring a Data Source name for the RDBMS database Creating the ODBC database connect string

While you can archive Batch data to a variety of Relational Database Management System (RDBMS) software packages, Rockwell Automation recommends using SQL Server or Oracle. The instructions contained within this document are specific to these two applications.
The Batch Archiver requires an ODBC-compliant database that supports stored procedures, such as SQL Server 2000 or Oracle8i/9i. Database platforms that do not provide stored procedure support, such as Access 95, cannot be used with the Batch Archiver.

CREATING

THE

RDBMS DATABASE

The first step to implementing the Batch Archiver is to create the RDBMS database where the Archiver will archive data from the event journals (.evt files). Scripts to create the SQL Server and Oracle databases (with a default database table name of BATCHHIS) are provided in the C:\Program Files\Rockwell Software\Batch\History folder. CONFIGURING
THE

DATA SOURCE NAME

After generating the database where the Archiver will archive data, the second step requires configuring a Date Source name for the RDBMS database. The Data Source name functions as an alias for the database used by the Archiver. The Date Source name may be produced in one of two ways:

Manually through ODBC Through the Archiver Setup application

While the Date Source name may be manually created using ODBC, the instructions in this chapter specifically use the Archiver Setup application to create both the Date Source name and the ODBC database connect string. CREATING
THE

ODBC CONNECT STRING

In addition to creating the Date Source name, the Archiver Setup application also creates the ODBC Connect String. The Archiver uses the ODBC Connect String to locate the

BATCH ARCHIVER USERS GUIDE

appropriate RDBMS database for archiving data. Once created, the ODBC Connect String is stored in the BatchArc.ini file. OTHER REQUIRED STEPS After creating the data source for SQL Server or Oracle, the next implementation steps involve configuring the Batch Archiver appropriately for Incremental or End-of-Batch archiving. This involves configuring the Equipment Editor Server Options as well as the Batch Archiver service. These instructions are included in the next chapter, Implementing the Batch Archiver.

Creating an SQL Server Data Source


SQL Server Installation: For the server computer, install SQL Server 2000. This section assumes that the SQL Server software is running on a different computer than the computer where the Batch Server and Archiver software are installed.
It is highly recommended that the SQL Server software runs on a separate computer than the Batch Server and the Batch Archiver applications.

Creating the SQL Server Batch History Database


Consult your System or Database Administrator to assist with setting up the Batch History database. To create a default database and table in which the Archiver writes data, run the script named sql_obat.sql. To create a default database and table that supports nonEnglish event data, run sql_obat.sql followed by sql_obat2.sql. These scripts are provided in the Programs\Rockwell Software\Batch\History directory.
If you are configuring the Archiver to run with BatchHistorian, do not use these scripts to create the default table. (See Creating a Data Source for BatchHistorian for more information.)

10

3 Creating a Data Source

Creating the Archiver ODBC Connection to SQL Server


1. Click the Start button, point to Programs > Rockwell Software > RSBizWare > Batch, and then select Archiver Setup. The Select Data Source dialog box opens to the File Data Source tab. 2. Select the Machine Data Source tab.

3. Click New. The Create New Data Source dialog box opens. 4. Select System Data Source (applies to this machine only), and then click Next. 5. From the Select a driver for which you want to set up a data source area, scroll down and select SQL Server, click Next, and then click Finish. The Create a New Data Source to SQL Server dialog box opens. 6. In the Name box, type a name for the data source (such as Batch Archiver). 7. In the Description box, type a description of the data source (such as RSBizWare Batch Historical Data). 8. From the Server list, select the SQL Server to which you want to connect (if the SQL Server is on this machine, select local), and then click Next.
When using Incremental Archiving, the user account assigned to the Batch Archiver service must be granted login access to SQL Server and must have permission to insert data into the BATCHHIS table.

11

BATCH ARCHIVER USERS GUIDE

When using End-of-Batch Archiving, the user account assigned to the Batch Server must be granted access to the BatchHistory database on the SQL Server and must have permission to insert data into the BATCHHIS table. The Batch Servers user account must be a member of the local Administrators group on the SQL Server computer.

9. Select how SQL Server should verify the authenticity of the login ID as follows:

If you are not using Batch Archiver in conjunction with BatchHistorian, select With Windows NT authentication using the network login ID. If you are using Batch Archiver in conjunction with BatchHistorian, select With SQL Server authentication using a login ID and password entered by the user.

The login ID specified must be that of the user who created the RSBizWare database. (See Creating a Data Source for BatchHistorian for more information.)

10. Make sure Connect to SQL Server to obtain default settings for the additional configuration options is selected, and then click Next. 11. Select the database file name as follows:

If you are not using Batch Archiver in conjunction with BatchHistorian, check the Change the default database to box, and select BatchHistory from the pull-down list If you are using Batch Archiver in conjunction with BatchHistorian, select the name of the appropriate RSBizWare database, not the Batch History database. (See Creating a Data Source for BatchHistorian for more information.)

12. Select Use ANSI quoted identifiers and Use ANSI nulls, paddings, and warnings, and then click Next.

12

3 Creating a Data Source

13. Select Perform translation for character data, and then click Finish. The ODBC Microsoft SQL Server Setup dialog box opens.

14. Click Test Data Source. The results display in the Test Results area. 15. If the test is successful, click OK to close the SQL Server ODBC Data Source Test window. If the test is not successful, consult your system administrator.

13

BATCH ARCHIVER USERS GUIDE

16. Click OK to exit the ODBC Microsoft SQL Server Setup dialog box, and return to the Select Data Source dialog box.

17. Select the Machine Data Source tab. Select the new data source as shown above, and then click OK.

Creating an Oracle Data Source


Oracle Server Installation: For the server computer, install Oracle 9i Enterprise Manager. This section assumes that the Oracle Server software is running on a different computer than the computer on which the Batch Server and the Archiver software are running.

It is highly recommended that the Oracle Server software runs on a separate computer than the Batch Server and the Batch Archiver applications.

Oracle Client Installation: For the client computer, install Oracle 9i Client and select the Administrator option. The Oracle Client software can reside on the same computer with Batch Server and the Archiver software.
So that an ODBC data source can be created to connect with Oracle, you must install an Oracle Client on the same computer as the Archiver.

14

3 Creating a Data Source

Modifying the BatchArc.ini File


Enable Oracle to operate with the Archiver by making the following changes in the [Archiver] section of the BatchArc.ini file located in the \Batch\bin folder: 1. Set FormatDate=YES. 2. Type the following new lines:
DateFormatMask='YYYY.MM.DD HH24:MI:SS' DateFormatFunction=TO_DATE

Creating the Oracle Batch History Database


The create_ora_db.bat file, located in the \Batch\History folder, contains the scripts necessary to create the Oracle database, BATCHHIS table, and other database objects required by the Archiver.
Rockwell guarantees the table structure for BATCHHIS to be correct for archiving Batch history data. However, your database administrator should review the table to ensure completeness for your specific Oracle version. (See Developing the Output Table for the structure of the default BATCHHIS output table.)

1. On the Oracle Client computer, transfer a copy of the C:\Program Files\Rockwell Software\Batch\History folder to the Oracle Server computer. 2. At the root directory on the Oracle Server computer, create a folder named ORACLEARCHIVER. 3. Copy the contents of the History folder to the ORACLEARCHIVER folder. 4. Run create_ora_db.bat from the ORACLEARCHIVER folder. The script may take up to 15 minutes to complete. 5. Reboot the computer.

15

BATCH ARCHIVER USERS GUIDE

Creating the Archiver ODBC Connection to Oracle


This section contains instructions to configure the Date Source name for the Oracle database and the ODBC database connect string using the Archiver Setup application.
You must create the Archiver ODBC connection on the Batch Server/Archiver (Oracle Client) computer.

1. Click the Start button, point to Programs > Rockwell Software > RSBizWare > Batch, and then select Archiver Setup. The Select Data Source dialog box opens. 2. Select the Machine Data Source tab.

3. Click New. The Create New Data Source dialog box opens. 4. Select System Data Source, and then click Next. 5. Select Oracle9 ODBC Driver 9.2.0.6 (SQORA32.dll), and then click Next.
You must use ODBC driver version 9.2.0.6. Although Oracle installs ODBC driver version 9.2.0.1 during installation of Oracle 9i, this version will not correctly transfer timestamp data.

6. Verify that the data source information is correct, and click Finish to create the data source. The Oracle9 ODBC Driver Setup dialog box opens. 7. In the Data Source Name box, type a name for the data source.

16

3 Creating a Data Source

8. In the Service Name and UserID boxes, type openmes.

9. Click OK to return to the Select Data Source dialog box. 10. Select the Machine Data Source tab, and then double-click the Oracle data source. The Oracle9 ODBC Driver Connect dialog box opens 11. In the Service Name, User Name, and Password boxes, type openmes.

12. Click OK. The Batch Archiver can now begin archiving records to the specified database.

17

BATCH ARCHIVER USERS GUIDE

18

Implementing the Batch Archiver


This chapter provides instructions for the last two steps required to implement the Batch Archiver:

Configuring the Batch reporting option in the Equipment Editors Server Options dialog box Configuring the Batch Archiver service
THE

CONFIGURING

REPORTING OPTION

The next step to implementing the Batch Archiver involves configuring the reporting option. This is done on the Batch Reporting tab in the Equipment Editors Server Options dialog box. There are three reporting options that can involve the Batch Archiver:

Archiver (End-of-Batch) The Batch Server initiates the Batch Archiver when a

batch is removed from the batch list.

Archiver (Incremental) The Batch Archiver runs as a service on a periodic interval.


THE

CONFIGURING

BATCH ARCHIVER SERVICE

The final step for the Batch Archiver implementation is configuring the Archiver service. Configuring the service is a function of the selected reporting option.

Archiver (End-of-Batch) The Batch Archiver service must be disabled since the

Batch Server initiates the Batch Archiver when a batch is removed from the batch list.

Archiver (Incremental) Since the Batch Archiver runs as a service on a periodic interval, the Batch Archiver service must be assigned a Windows 2003 user name and the service must be enabled.

Configuring the Reporting Option


Enable the Batch Archiver by configuring the Batch Server to use the Batch Archiver as the reporting program through the Equipment Editors Server Options dialog box. 1. Click the Start button, point to Programs > Rockwell Software > RSBizWare > Batch, and then select Equipment Editor. 2. From the Options menu, select Server Options. The Server Options dialog box opens to the Project Settings tab.

19

BATCH ARCHIVER USERS GUIDE

3. Select the Batch Reporting tab.

4. In the Reporting Application area, select either Archiver (End-of-Batch) or Archiver (Incremental). 5. In the Table Name box, type the name of the data table where the batch data is archived. The default table name created by the supplied scripts is BATCHHIS. 6. If Archiver (Incremental) is selected, enter the time period between active archiving in the Incremental Period box, and then select Minutes or Seconds. The minimum setting is 5 seconds. The maximum is 9999 minutes.
If a value outside of this range is entered, the Archiver will run in 5-minute incremental periods.

The database connect string is automatically entered in the Database Connect String box. This was configured when the Archiver Setup function created the database connect string.

20

4 Implementing the Batch Archiver

7. Select the Archiver Event Filters tab.

MaterialTrack Filters are only displayed if MaterialTrack is installed. eProcedure Filters are only displayed if eProcedure is installed.

8. Select the data that you want to archive from the Batch event journal files (.evt).
You cannot filter out data added to the Batch event journal files (.evt) by the ADDEVENT execute.

The date format used for the event journal files LclTime is YYYY.MM.DD HH:MM:SS and is not configurable, regardless of the language being used.

9. Click OK. (See the RSBizWare Batch Administrators Guide for more information on the Server Options dialog box.)

21

BATCH ARCHIVER USERS GUIDE

Configuring the Archiver Service for Incremental Archiving


For incremental archiving, the Batch Archiver runs as a Windows service. You must assign a Windows user account to the Archiver service in order to log on to the system. By default, the Archiver service uses the Batch Server user account specified during the installation. You can use the Local System account instead of the Batch Server user account if archiving data only to the local computer.
The Archiver cannot log into the database when the database account uses special characters. To avoid this problem on Windows 2000 systems using Active Directory, change the default format of user@domain.com to domain\user.

Assigning a User Account to the Archiver Service


You can create a custom user account for the Batch Archiver. You must add the user account to the local Administrators user group and assign the user name to the Archiver service.
The services for the Batch Archiver and the Batch Server should use the same user account.

1. Click the Start button, point to Programs > Administrative Tools, and then select Services. The Services dialog box opens.

2. Double-click Batch Archiver. The Batch Archiver Properties (Local Computer) dialog box opens to the General tab.

22

4 Implementing the Batch Archiver

3. Select the Log On tab. The Batch Server account specified during installation is the default account. 4. Click Browse. The Select User dialog box opens. 5. Locate and select the desired Batch Archiver user account. Click OK to close the Select User dialog box. 6. In the Password box, type the password for the Archiver user account, type the password again in the Confirm password box, and then click OK. A message displays stating that the user account has the Log On As A Service right. 7. Click OK, and then close the Services dialog box.
If the Archiver inserts data into a database on another computer and you wish to use Trusted Security, the Archiver service must run in a domain account that is assigned the appropriate privileges within the database program. The benefit of using Trusted Security is that you only need to create one set of accounts. (See the RSBizWare Batch Administrator's Guide for information on creating user accounts.)

Enabling the Archiver Service


When RSBizWare Batch is installed, the Archiver service defaults to enabled. In the event the Archiver service becomes disabled, perform the following steps to reactivate this function: 1. Click the Start button, point to Programs > Administrative Tools, and then select Services. The Services dialog box opens. 2. From the Services list, double-click Batch Archiver. The Batch Archiver Properties (Local Computer) dialog box opens to the General tab. 3. Select the Log On tab. 4. In the Hardware Profile area, select the appropriate profile, and then click Enable. The Archiver service is now enabled. 5. Select the General tab. 6. From the Startup Type list, select Automatic. 7. Click OK, and then close the Services dialog box.

23

BATCH ARCHIVER USERS GUIDE

Configuring the Archiver for End-of-Batch Archiving


The End-of-Batch Archiver runs in the security context of the Batch Server service and does not require a Windows user account. To use end-of-batch archiving, you must disable the Archiver Service so that the Archiver runs as a program triggered by the Batch Server.
When using end-of-batch archiving, the Batch Server's user account must be granted login access to the BatchHistory database on the SQL Server and must have permission to insert data into the BATCHHIS table. The Batch Server's user account must be a member of the local Administrator's group on the SQL Server computer.

1. Click the Start button, point to Programs > Administrative Tools, and then select Services. The Services dialog box opens. 2. From the Services list, double-click Batch Archiver. The Batch Archiver Properties (Local Computer) dialog box opens to the General tab. 3. From the Startup Type list, select Disabled. 4. Click OK, and then close the Services dialog box.

Configuring the Archiver for Optimal Performance


The Batch Archiver can archive batch event journal data either incrementally or at the end of a batch. In addition to selecting when archiving is performed, by adjusting various configuration settings you can optimize the Batch Archiver for either optimal record transfer performance or optimal data access.

Configuring the Archiver for Optimal Record Transfer


Batch Archiver configuration settings are set by default during installation; however, they can be adjusted to achieve optimal results. Many variables can impact record transfer performance such as server hardware, processor speed, memory available, network configuration, database size, number of records generated per incremental archive period, etc., so there is no single setting or combination of settings that can be set by default for each and every system. Tuning the Batch Archiver to archive the maximum number of records per second can be accomplished by configuring the Archiver to Incremental, and setting the Maximum Records Per Transaction to 75 and the Incremental Period to 10, as discussed in the following steps: 1. Open the Equipment Editor. 2. Select Server Options from the Options menu. 3. Click the Batch Reporting tab. 4. In the Reporting Application area, select Archiver (Incremental).

24

4 Implementing the Batch Archiver

5. In the Maximum Records Per Transaction box, type 75. This results in a maximum of 75 records written and committed to the database in each transaction. By minimizing the number of round trip requests from the Batch Archiver to the database, performance is improved. However, it is important to note that performance will vary; 75 should be used as a starting point and adjusted either up or down based upon the results observed.
If you enter a value of 0, the minimum value that can be entered in the Maximum Records Per Transaction field, all records will be committed in a single transaction. This value should only be used for End-of-Batch archiving. The maximum value that can be entered in the Maximum Records Per Transaction field is 10000. However, the maximum number of records that can be successfully archived in a single transaction depends on your computers capabilities and may be significantly less than 10000. If you encounter Time Out messages in the batcharc.log, you must reduce the value in the Maximum Records Per Transaction field. These settings are merely guidelines and vary depending on the number of events generated per batch, the batch duration, etc.

6. In the Incremental Period box, enter 10 (or more) and select Minutes. This should be set to an incremental period that is high enough to ensure a significant number of records are generated so that when the Batch Archiver runs it will pick up at least the number or records specified in the Maximum Records Per Transaction field. For example, if the batches running only generate 50 records and the Maximum Records Per Transaction is set to 75 then the incremental period should be increased. Conversely, if 500 records are generated every 10 minutes then it may be advantageous to set the incremental period lower.
This value is set higher by default for BatchHistorian users primarily because considerably more database-side processing time is required to evaluate and parse each and every record, along with inserting data into the BatchHistorian tables. Having the Archiver send more records to the database (i.e. 1000) in each transaction, higher performance results in terms of the total records transferred per second.

Configuring the Archiver for Optimal Data Access


Configuring the Batch Archiver to achieve faster access to the event data being archived can be accomplished by configuring the Archiver to Incremental, and setting the Maximum Records Per Transaction to 1 and the Incremental Period to 5, as discussed in the following steps: 1. Open the Equipment Editor. 2. Select Server Options from the Options menu. 3. Click the Batch Reporting tab.
25

BATCH ARCHIVER USERS GUIDE

4. In the Reporting Application area, select Archiver (Incremental). 5. In the Maximum Records Per Transaction box, type 1. 6. In the Incremental Period box, enter 5 (or more) and select Minutes. This ensures that events generated are written and committed to the database as quickly as possible. It also allows the data to be available at or near the time the event data is actually generated, which allows you to retrieve data more quickly for reporting and analysis purposes.
This configuration is usually not the most efficient in obtaining the maximum number of records transferred per archival incremental period; however, it will make the data available as quickly as possible.

Running the Archiver


When the Batch Archiver is configured to perform End-of-Batch Archiving, the Batch Server automatically runs the Archiver when a batch is removed from the batch list. When configured to perform Incremental Archiving, the Archiver service runs continuously during batch execution and automatically archives batch data at user-defined incremental periods. You can control the Archiver Service using the Batch Service Manager. You must have administrative privileges on the computer where the Archiver is installed. The Batch Service Manager must communicate with the Windows Service Manager of the selected computer to determine what services are available. There may be a noticeable delay as communications are established. If the Batch Service Manager cannot communicate with the Windows Services of the selected computer, you receive an error message.

26

4 Implementing the Batch Archiver

1. Click the Start button, point to Programs > Rockwell Software > RSBizWare > Batch, and then select Batch Service Manager. The Batch Service Manager dialog box opens.

2. Click Select Computer. The Select Computer dialog box opens. 3. Select the name of the computer where the Batch Archiver service is installed. Click OK. The Select Computer dialog box closes.
Select the computer first because the Batch Service Manager needs to determine the available services on the selected computer.

4. From the Service list, select Batch Archiver. 5. Once Batch Archiver is selected, you can start, stop, pause, or restart the Archiver service using the appropriate command buttons.
Clicking the Pause button causes the Incremental Archiver to pause after processing the active .evt file. Click the Start button to resume Incremental Archiving.

6. Click OK.

27

BATCH ARCHIVER USERS GUIDE

28

Using a Custom Archiver


If you have requirements that are not met by the Archiver, you can write a custom archiver. This custom archiver should receive arguments from the Batch Server, as well as reading and manipulating the ArchQue.txt, electronic batch record (.evt), and BatchArc.ini files.

Creating a Custom Archiver


The custom archiver executable file can be any of the following:

C, C++, or Visual Basic application batch (.bat) file command (.cmd) file

Arguments From the Batch Server


The Batch Server passes the following arguments to the Archiver: <path to custom executable file> <.ini file name> <path to archque.txt> <time delay in minutes>
Example
C:\Program Files\Rockwell Software\Batch\PROJECTS\CUSTOM\MYARCHVR.EXE MYARCHVR.INI C:\Program Files\Rockwell Software\Batch\PROJECTS\JOURNALS\ARCHQUE.TXT 30

ArchQue.txt File
Keep the ArchQue.txt file locked while it is open and keep it open for only a few seconds. If the queue file is held open for more than a few seconds, the Batch Server cannot add entries to the queue as other control recipes are created.

The archive queue file, ArchQue.txt, contains a list of electronic batch record files. The line format within the list contains the path and file name of the electronic batch record file. The path name can use either UNC names or local path names, depending on how the

29

BATCH ARCHIVER USERS GUIDE

journal project directory is defined in the Equipment Editor Server Options dialog box as shown here.

If the batch is removed from the batch list, a tab character (\t) and the word REMOVED follows the file name. Each electronic batch record file is listed in a single record delimited with Carriage Return / Line Feed (CR/LF). LINE FORMAT (UNC) \\computer_name\sharename\path_to_journal_file \t REMOVED{CR/LF}
Example
\\station1\BATCHCTL\SAMPLEDEMO1\journals\123.evt \t REMOVED{CR/LF} \\station1\BATCHCTL\SAMPLEDEMO1\journals\124.evt \t REMOVED{CR/LF} \\station1\BATCHCTL\SAMPLEDEMO1\journals\125.evt {CR/LF}

LINE FORMAT (LOCAL PATH NAME) C:\path_to_journal_file \t REMOVED{CR/LF}


Example
C:\Program Files\Rockwell Software\Batch\SAMPLEDEMO1\journals\123.evt \t REMOVED{CR/LF} C:\Program Files\Rockwell Software\Batch\SAMPLEDEMO1\journals\124.evt \t REMOVED{CR/LF} C:\Program Files\Rockwell Software\Batch\SAMPLEDEMO1\journals\125.evt{CR/LF}

30

5 Using a Custom Archiver

Developing the Output Table


The following database schema is based on the structure of the default BATCHHIS output table. Use it to develop a custom output table.

BATCHHIS Database Table Schema

Field Name GMT lclTime UniqueID BatchID Recipe

Field Type datetime NULL datetime NULL varchar(12) NULL varchar(255) NULL varchar(1000) NULL

Description Time event is recorded in Greenwich Mean Time Local time event is recorded Unique identifier assigned by the Batch Server Alpha Batch ID The recipe element that was executing at the time of the electronic batch record entry. The field contents appear as:
<UniqueID>:[<Procedure >\][<Unit Procedure>:Instance\] <Operation>:InstanceLoopCounter

Example 2003-04-29 12:21:01.000 2003-04-29 14:52:07.000 31 BATCH_ID-030102-3 13:Y_300_YELLOW_PAIN T

The data in the brackets is optional, depending on the recipe level. Descript Event PValue DescriptAPI varchar(255) NULL varchar(155) NULL varchar(255) NULL varchar(255) NULL Description of PValue data Event type triggering the record Value reported to the electronic batch record Description of PValue data Yellow Paint Material Tracking / Material Bound / Material Unbound 50 Engineering Units

See Spanish Translation of DescriptAPI, EventAPI, and PValueAPI EventAPI varchar(155) NULL Event type triggering the record Report

31

BATCH ARCHIVER USERS GUIDE

Field Name

Field Type

Description

Example

See Spanish Translation of DescriptAPI, EventAPI, and PValueAPI PValueAPI varchar(255) NULL Value reported to the electronic batch record 50

See Spanish Translation of DescriptAPI, EventAPI, and PValueAPI EU Area varchar(255) NULL varchar(155) NULL varchar(155) NULL varchar(155) NULL varchar(155) NULL datetime NULL varchar(85) NULL varchar(50) NULL varchar(155) NULL varchar(50) NULL varchar(255) NULL varchar(255) NULL varchar(255) NULL Engineering units associated with Pvalue Area model name in batch equipment configuration where batch was executed Process cell in Batch equipment configuration Unit name in Batch equipment configuration Name of the phase generating the record Last date the batch report was printed Computer name/Windows user name Phase class description Common name of the material Inventory control system material ID used to track the material Name assigned to a lot of material ID assigned to a distributed portion of a lot Containers name where material and lot were distributed, or where material and lot are stored YELLOWPAINT 31 GALLONS THE_PAINT_COMPANY

ProcCell Unit Phase Printed UserID PhaseDesc MaterialName MaterialID

YELLOWPAINT1 PREMIX_A PROC_ORDER_N 2003-04-29 14:52:07.000 mjames1

LotName Label Container

TEST317_BRAND STANDARDBRANDYELL OW WAREHOUSE2/ PAINT_PALLET1

32

5 Using a Custom Archiver

Field Name PromiseID

Field Type varchar(50) NULL

Description Unique ID used as a key to allow grouping of separate event entries all resulting from a single material addition Used for event journal signatures by Batchsig program to detect changes in .evt file. Information stored here is a hexadecimal or a single spaced character. Tag indicating information reported to SAP Unique identifier assigned to the record when it is added to the database Number of times an active eProcedure control step has been reactivated HTML for completed eProcedure instruction steps

Example 100

Signature

varchar(255) NULL

ERP_Flag RecordNo

varchar(1) NULL int NULL

31

Reactivation Number Instruction HTML

int

ntext

<FORM> Add a CIP Batch to the Batch List. Click OK when done. </FORM>

SQL Server columns that have a field type of ntext only retrieve 256 characters of data at a time using a standard SELECT statement. To retrieve all the data use the READTEXT function. (See How to Display All Instruction HTML Data from an SQL Database for more information.) SignatureID int A 32-bit unsigned integer that uniquely identifies a Signature Request within the batch system. A 32-bit unsigned integer that uniquely identifies an Action within the batch system. An Action is a queued Execute command to the Batch Server that is pending one or more Signature completions prior to being performed. 1

ActionID

int

33

BATCH ARCHIVER USERS GUIDE

HOW TO DISPLAY ALL INSTRUCTION HTML DATA DATABASE

FROM AN

SQL

If you are archiving data to an SQL database, you must use the READTEXT function to retrieve all data in the Instruction HTML column for a specified record number. The following steps provide a sample query and explain how to modify the query that will produce an .html file for viewing in a browser: 1. In Query Analyzer go to the Tools > Options > Results tab and clear the Print column headers (*) option. Click Apply and then OK to close the dialog box. 2. From the Query menu, select Results to File. 3. Copy the following example query into a blank query window:
/* -- Displays the contents of a text column in a 255-character wide query window -- @txtptrval is the text pointer value for the specified text column -- @offsetval is the offset value and represents the starting -- position within a text column -- @bufferval represents the amount of text to put in the row -- in this case, it is set to 255 because isql/w only displays -- 255 characters in a row -- @maxval is the full length of the entire text column */ BEGIN SET NOCOUNT ON DECLARE @txtptrval VARBINARY(16), @offsetval INT, @bufferval INT, @maxval INT SELECT @txtptrval = TEXTPTR(bhbatchhis.InstructionHTML) FROM bhbatchhis WHERE recordno = '5817' SELECT @offsetval = 0 SELECT @bufferval = 255 SELECT @maxval = DATALENGTH(bhbatchhis.InstructionHTML) / 2-1 FROM bhbatchhis WHERE recordno = '5817'

34

5 Using a Custom Archiver

--PRINT --PRINT --PRINT --PRINT

'Total length of column: ' '------' @maxval ''

-- Last chunk, reduce buffer size to the nChars remaining IF (@offsetval + @bufferval) > @maxval BEGIN SELECT @bufferval = @maxval - @offsetval --PRINT 'Last chuck... buffer size remaining is:' --PRINT '------' --PRINT @bufferval END WHILE @offsetval < @maxval BEGIN READTEXT bhbatchhis.InstructionHTML @txtptrval @offsetval @bufferval --PRINT 'Data started at character position' --PRINT @offsetval SELECT @offsetval = @offsetval + @bufferval --PRINT 'Data ended at character position' --PRINT @offsetval --PRINT ' ' -- Last chunk, reduce buffer size to the get the last nChars remaining IF (@offsetval + @bufferval) > @maxval SELECT @bufferval = @maxval - @offsetval + 1 END SET NOCOUNT OFF END

4. In the query, edit the WHERE clause to specify the recordno for which you want to view the InstructionHTML. 5. Run the query and save the results to a file name, such as Output.html.
Be sure to specify the .html extension, change the Save as type to All Files (*.*), and change the File Format to ANSI.

35

BATCH ARCHIVER USERS GUIDE

6. In Windows Explorer, double-click the .html file to view the actual HTML in your browser. SPANISH TRANSLATION
OF

DESCRIPTAPI, EVENTAPI,

AND

PVALUEAPI

On a Spanish Batch system, the following values in the DescriptAPI, EventAPI, and PValueAPI columns are translated into English:
Column DescriptAPI Values Translated into English Unit Procedure Started Operation Started Version Version Date Author Product Code Product Description Class of Instance Recipe Type Area Model File Name Area Model Validated Against Validation Time File Name

36

5 Using a Custom Archiver

Column EventAPI

Values Translated into English System Message Recipe Value Report State Change Mode Change Mode Command Recipe Value Change Bind Creation Bind Unbind Recipe Header State Command Prompt Prompt Response COMMENT Event File Name Material Tracking

PValueAPI

RUNNING IDLE COMPLETE STOPPED ABORTED First Available Bind Prompt Bind Beginning of Batch End of Batch

37

BATCH ARCHIVER USERS GUIDE

Configuring the Custom Archiver


Now that youve created your custom archive executable and initialization files, you need to configure the Batch Server to use the files. 1. Start the Equipment Editor. 2. From the Options menu, select Server Options. The Server Options dialog box opens to the Project Settings tab. 3. Select the Batch Reporting tab.

4. Select User-defined (End of Batch). 5. In the Executable file box, use the browse button to locate the .exe file. 6. In the Initialization file box, use the browse button to locate the .ini file. 7. Click OK. (See the RSBizWare Batch Administrators Guide for more information on the Server Options dialog box.)

38

Configuring the Archiver for BatchHistorian


If you are using RSBizWare BatchHistorian, you must configure the Archiver to store the relevant batch data to the RSBizWare relational database.

What is BatchHistorian?
RSBizWare BatchHistorian extends the capability of RSBizWare Batch and RSBizWare Historian to provide web-based reporting and analysis of batch data. Once the Batch Archiver is configured to store batch data created by RSBizWare Batch to the RSBizWare production database, stored procedures assimilate the data into various tables within the RSBizWare relational database. You can then use the RSBizWare reporting environment to create reports for analysis of batch data. As an add-on to Historian, BatchHistorian shares the same reporting environment as other RSBizWare modules. Reports are authored using the RSBizWare Production Client. BatchHistorian adds a new RSBizWare report object, the Batch Analysis Chart, to the Production Clients report object toolbar. The Production Client allows you to drop report objects onto your report, along with text, graphics, etc., and lets you arrange the objects for the desired layout. Additionally, RSBizWare includes several sample reports that can be used as is or as a basis for creating your own reports. Advanced designers can use the BatchHistorian and BATCHHIS table schema information to further customize their reports. (See Collecting BatchHistorian Data in the BatchHistorian User's Guide for more information.) Users can view reports easily from a web browser such as Microsoft Internet Explorer. Each BatchHistorian server also contains a license for an RSBizWare Historian Server with a specific number of tags. This means that in addition to reporting on batch data created by RSBizWare Batch, process data points can be collected directly from the factory control system and stored in the RSBizWare database for analysis. For more information on BatchHistorian, see the RSBizWare BatchHistorian Users Guide.

Creating a Data Source for BatchHistorian


BatchHistorian database tables are installed as part of the RSBizWare database. To use BatchHistorian features, you must specify a Database Connection String that points to the

39

BATCH ARCHIVER USERS GUIDE

RSBizWare system Data Source name in the Batch Archiver Setup and specify the BHBatchHis Table name in the Equipment Editor.
All RSBizWare Batch users previously archiving data to a BatchHis Table must perform these steps to ensure proper connectivity and data storage.

Updating the Database Connection String


Complete the following steps to update the database connection string:
Make sure the Archiver service is not running before attempting to run the Archiver Setup program. If the Archiver service is running, stop the service and then proceed with the following steps.

1. Open Batch Archiver Setup by selecting Programs > Rockwell Software > RSBizWare > Batch > Archiver Setup from the Windows Start menu. The Select Data Source dialog box displays. 2. Click the Machine Data Source tab. 3. Select the valid RSBizWare Data Source name (DSN). 4. Click OK.

Verifying the Database Connection String


Complete the following steps to verify the Database Connection String has been updated correctly: 1. Open the Equipment Editor by selecting Programs > Rockwell Software > RSBizWare > Batch > Equipment Editor from the Windows Start menu. The Equipment Editor opens. 2. From the Options menu, select Server Options. The Server Options dialog box opens. 3. Select the Batch Reporting tab. 4. Verify the new DSN in the Database Connect String box, and click OK.

Archiver Event Filters for BatchHistorian


When you install RSBizWare Batch, the appropriate archiver event filters for BatchHistorian are automatically configured if you select the installation option indicating

40

6 Configuring the Archiver for BatchHistorian

you will be using BatchHistorian. If you forgot to select this option during installation, you will need to select the following archiver event filters in the Equipment Editor.
If you are using BatchHistorian with multiple batch servers, special Archiver event filter settings are provided in the BatchHistorian Users Guide.

Batch Event Filters


Comment File Name Message Mode Change Mode Command Prompt

Response Recipe Header Recipe Parameter Deviation Recipe Value Recipe Value Change Report Parameter Deviation

State Change State Command Unit Bind Unit Creation Bind Unit Unbind

MaterialTrack Event Filters

Material Bound Material Unbound Material Tracking

Batch Reporting Values for Optimum Performance (SQL Server Only)


There are many variables such as processor speed, available memory, network traffic, and database size, that can affect system performance and data access. When you install RSBizWare Batch, the recommended default data collection settings for Batch Reporting with BatchHistorian are automatically configured if you select the option indicating that you will be using BatchHistorian. These recommended default settings provide for optimum performance, but you may need to adjust them based on your server, network traffic, and database size. If you forgot to select this option during installation, you will need to enter the appropriate data collection values in the Equipment Editor Server Options dialog box, on the Batch Reporting tab:

Archiver (Incremental) Maximum Records Per Transaction = 1000 Incremental Period = 5 Minutes

41

BATCH ARCHIVER USERS GUIDE

The minimum value that can be entered in the Maximum Records Per Transaction field is 0 and the maximum is 10000. However, the maximum number of records that can be successfully archived in a single transaction depends on the capabilities of your computer, and may be significantly less than 10000. If you encounter Time Out messages in the batcharc log, reduce the value in the Maximum Records Per Transaction field. If you enter a value of 0, all records will be committed in a single transaction at the end of the batch.

Recommendations for Optimum Data Access


The data collection settings can be adjusted for either optimum speed or optimum data access. While the previous section recommended settings for optimum performance, the following settings are recommended for faster access to event data being archived:

Archiver (Incremental) Maximum Records Per Transaction = 10 Incremental Period = 1 minute or less.

These values ensure that events are processed, stored, and committed to the database as quickly as possible, making this data available for prompt retrieval.
These settings are a guideline and may vary depending on the number of events generated per batch, the duration of the batch, etc.

42

Windows Event Log Entries


The Archiver creates a number of Windows event log entries during startup, run time, and shutdown. The following describes the possible event log entries.

All log entries contain the following fields:


Field Date Time Type User Computer Source Description Date that the event occurred Time that the event occurred Type of event, such as Information or Error Configured domain user Computer on which the Batch Archiver is running BATCHARC.log file

43

BATCH ARCHIVER USERS GUIDE

Field Category Event ID Description Data

Description Category of the event ID of the event Description of the event File name and line number from the Archivers source code that generated the entry

The following Archiver events can be entered in the Windows event log:
Category Start Start Start Start Start Start Start Start Shutdown Setup Event 1001 1002 1003 1004 1005 1006 3001 3002 4001 5001 Description Batch Archiver Service started successfully in incremental mode Batch Archiver Process started successfully in non-incremental mode Batch Archiver failed to start; see the BATCHARC.LOG file for more information Batch Archiver failed to open the BATCHARC.LOG file Service handler not installed Bad Service Request Batch Archiver Service paused Batch Archiver Service continuing Batch Archiver Service shutting down Batch Archiver setup; new connect string = <new string>

44

INDEX

Index
Symbols
.evt files 1

D
data source 39 database schema 31 types to use 1 database connection string 39 verify 40

A
ADDEVENT execute 21 Archiver database schema 31 running 26 system architecture 2 Archiver event filters for BatchHistorian 40 Archiver service assign user account to 22 enabling 23 archiving end-of-batch 3 incremental 3 non-incremental 3 ArchQue.txt File 29

E
electronic batch records 1 description 5 interpretation examples 5 end-of-batch archiving 3 configuring 24 event filters for Batch 41 for BatchHistorian 40 for MaterialTrack 41 event journal 5 Event Log entries 43 execute ADDEVENT 21

B
Batch event filters 41 Batch Service Manager 26 batcharc.ini file 40 BatchHistorian 10 archiver event filters 40

F
filters for BatchHistorian 40

C
configuring custom archiver 29 end-of-batch archiving 24 incremental archiving 22 optimal record transfer 24 the server 19 creating a data source Oracle 14 SQL 10

I
incremental archiving 3 configuring 22

M
MaterialTrack event filters 41

N
non-incremental archiving 3

BATCH ARCHIVER USERS GUIDE

O
optimal data access 25 optimal performance configuring Archiver for 24 data access 25 record transfer 24 optimal record transfer 24 optimum data access recommendations for BatchHistorian 42 Oracle database creating a data source 14

S
server configuration 19 service manager 26 SQL database creating a data source 10 system architecture 2 system failure 2

U
user account for Archiver service 22

R
reporting options 19 configuring 19 reporting values for optimal performance SQL Server only 41

W
Windows Event Log 43

vi


INDEX

vii

Anda mungkin juga menyukai