batch archiver user’s guide

52
Archiver User’s Guide

Upload: faber-hurtado

Post on 04-Jan-2016

145 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Batch Archiver User’s Guide

Archiver User’s Guide

Page 2: Batch Archiver User’s Guide

Contacting RockwellSoftware

Technical Support Telephone — 440-646-5800

Technical Support Fax — 440-646-5801

World Wide Web — www.software.rockwell.com

Copyright Notice © 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.

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 product’s performance will be affected by system configuration, the application being performed, operator control, and other related factors.

This product’s 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

Page 3: Batch Archiver User’s Guide

Contents

1 • Introducing the Batch Archiver 1Document Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Implementation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Creating the RDBMS Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Configuring the Data Source Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Creating the ODBC Connect String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Configuring the Reporting Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Configuring the Batch Archiver Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 • Working with Electronic Batch Records 5Electronic Batch Record Interpretation Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 • Creating a Data Source 9Creating an SQL Server Data Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Creating the SQL Server Batch History Database . . . . . . . . . . . . . . . . . . . . . . . . 10Creating the Archiver ODBC Connection to SQL Server . . . . . . . . . . . . . . . . . . 11

Creating an Oracle Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Modifying the BatchArc.ini File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Creating the Oracle Batch History Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Creating the Archiver ODBC Connection to Oracle . . . . . . . . . . . . . . . . . . . . . . 16

4 • Implementing the Batch Archiver 19Configuring the Reporting Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Configuring the Archiver Service for Incremental Archiving . . . . . . . . . . . . . . . . . . . 22

Assigning a User Account to the Archiver Service . . . . . . . . . . . . . . . . . . . . . . . 22Enabling the Archiver Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Configuring the Archiver for End-of-Batch Archiving . . . . . . . . . . . . . . . . . . . . . . . . 24Configuring the Archiver for Optimal Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Configuring the Archiver for Optimal Record Transfer. . . . . . . . . . . . . . . . . . . . 24Configuring the Archiver for Optimal Data Access . . . . . . . . . . . . . . . . . . . . . . . 25

Running the Archiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

iii

Page 4: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

5 • Using a Custom Archiver 29Creating a Custom Archiver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Arguments From the Batch Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29ArchQue.txt File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Developing the Output Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31BATCHHIS Database Table Schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Configuring the Custom Archiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

6 • Configuring the Archiver for BatchHistorian 39What is BatchHistorian? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Creating a Data Source for BatchHistorian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Updating the Database Connection String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Verifying the Database Connection String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Archiver Event Filters for BatchHistorian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Batch Event Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41MaterialTrack Event Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Batch Reporting Values for Optimum Performance (SQL Server Only) . . . . . . . . . . 41Recommendations for Optimum Data Access . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

A• Windows Event Log Entries 43

Index v

iv

Page 5: Batch Archiver User’s Guide

1 Introducing the Batch ArchiverThis 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 OrganizationThe 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 ArchiverWorking with Electronic Batch RecordsCreating a Data SourceUsing the ArchiverCreating a Custom ArchiverUsing the Windows Event LogArchiver 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 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.

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.

1

Page 6: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S 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 Archiver’s 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 Archiver’s 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.

System ArchitectureYou 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.)

If the system fails while the Archiver is in the process of inserting a file’s 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 file’s 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.

2

Page 7: Batch Archiver User’s Guide

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 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 incrementally writes to the Archiver’s 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.

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.

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.

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.

YourRelationalDatabase

RecipeExecution

(Batch Server)Archiver

Archiver QueueArchQue.txt

*.evtfiles

ElectronicBatch Records

Add *.evt filename to

EventDir.txtODBC

1

32

4

5

7

8

Operator/MES

69

3

Page 8: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

Implementation OverviewImplementing the Batch Archiver involves five distinct steps:

Creating the RDBMS databaseConfiguring a Data Source name for the RDBMS databaseCreating the ODBC database connect stringConfiguring the Batch reporting option in the Equipment Editor’s Server Options dialog boxConfiguring 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 DatabaseThe 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 NameAfter 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 StringOnce 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 OptionWhen 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-of-Batch), Archiver (Incremental), and the Report Editor.

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

4

Page 9: Batch Archiver User’s Guide

2 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 procedure’s 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 ExamplesThe 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:

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 Description Event PValue EU

12:TPROC\TUP:1\TOP:1\ CHARGE:1-1 AMNT_TO_CHARGE Recipe Value

50 GALLONS

Recipe Description PValue EU Phase

12:TPROC\TUP:1\TRANCT:1-1 Step Activated CHARGE:1 Phase ICE_CREAM

12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 State Changed: RUNNING CHARGEA

12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 State Changed: COMPLETE CHARGEA

5

Page 10: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S 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 Description PValue EU Phase

12:TPROC\TUP:1\TRANCT:1-1 Operation Started 0

12:TPROC\TUP:1\TRANCT:1-1 State Changed: RUNNING

12:TPROC\TUP:1\TRANCT:1-1 Step Activated RECIRC:2 Phase RECIRC1

12:TPROC\TUP:1\TRANCT:1-1 Step Activated CHARGE:1 Phase CHARGEA

12:TPROC\TUP:1\TRANCT:1-1 Step Deactivated Initial Step

12:TPROC\TUP:1\TRANCT:1\RECIRC:2-1 State Changed: IDLE RECIRC1

12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 State Changed: IDLE CHARGEA

12:TPROC\TUP:1\TRANCT:1\RECIRC:2-1 State Changed: RUNNING RECIRC1

12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 State Changed: RUNNING CHARGEA

12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 State Changed: COMPLETE CHARGEA

12:TPROC\TUP:1\TRANCT:1-1 Step Activated CHARGE_B:1 Phase CHARGEB

12:TPROC\TUP:1\TRANCT:1-1 Step Activated RECIRC:3 Phase RECIRC1

12:TPROC\TUP:1\TRANCT:1\CHARGE:1-1 State Changed: IDLE CHARGEA

12:TPROC\TUP:1\TRANCT:1-1 Step Deactivated CHARGE:1 Phase CHARGEA

12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 State Changed: RUNNING RECIRC1

12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 Owner Changed: PROGRAM RECIRC1

12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 Attribute Change PAUSED off RECIRC1

12:TPROC\TUP:1\TRANCT:1-1 Step Deactivated RECIRC:2 Phase RECIRC1

12:TPROC\TUP:1\TRANCT:1\CHRG_B:1-1 State Changed: IDLE CHARGEB

12:TPROC\TUP:1\TRANCT:1\CHRG_B:1-1 State Changed: RUNNING CHARGEB

12:TPROC\TUP:1\TRANCT:1\CHRG_B:1-1 State Changed: COMPLETE CHARGEB

12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 State Changed: COMPLETE RECIRC1

12:TPROC\TUP:1\TRANCT:1-1 Step Activated Terminal Step

12:TPROC\TUP:1\TRANCT:1\CHRG_B:1-1 State Changed: IDLE CHARGEB

12:TPROC\TUP:1\TRANCT:1-1 Step Deactivated CHARGE_B:1 Phase CHARGEB

6

Page 11: Batch Archiver User’s Guide

2 • Working with Electronic Batch Records• • • • •

12:TPROC\TUP:1\TRANCT:1\RECIRC:3-1 State Changed: IDLE RECIRC1

12:TPROC\TUP:1\TRANCT:1-1 Step Deactivated RECIRC:3 Phase RECIRC1

12:TPROC\TUP:1\TRANCT:1-1 State Changed: COMPLETE

12:TRNPROC\TRANUP:1-1 Step Activated Terminal Step

12:TPROC\TUP:1\TRANCT:1-1 Operation Done 0

Recipe Description PValue EU Phase

7

Page 12: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

8

Page 13: Batch Archiver User’s Guide

3 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.

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

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.

9

Page 14: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S 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 SourceSQL 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.

Creating the SQL Server Batch History DatabaseConsult 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 non-English event data, run sql_obat.sql followed by sql_obat2.sql. These scripts are provided in the Programs\Rockwell Software\Batch\History directory.

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

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

Page 15: Batch Archiver User’s Guide

3 • Creating a Data Source• • • • •

Creating the Archiver ODBC Connection to SQL Server1. 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

Page 16: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

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.

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.

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 Server’s user account must be a member of the local Administrator’s group on the SQL Server computer.

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.)

12

Page 17: Batch Archiver User’s Guide

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

Page 18: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S 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 SourceOracle 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.

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.

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

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

Page 19: Batch Archiver User’s Guide

3 • Creating a Data Source• • • • •

Modifying the BatchArc.ini FileEnable 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 DatabaseThe 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.

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.

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.)

15

Page 20: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

Creating the Archiver ODBC Connection to OracleThis section contains instructions to configure the Date Source name for the Oracle database and the ODBC database connect string using the Archiver Setup application.

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.

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.

You must create the Archiver ODBC connection on the Batch Server/Archiver (Oracle Client) computer.

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.

16

Page 21: Batch Archiver User’s Guide

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

Page 22: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

18

Page 23: Batch Archiver User’s Guide

4 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 Editor’s Server Options dialog box

Configuring the Batch Archiver service

CONFIGURING THE 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 Editor’s 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.

–CONFIGURING THE 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 OptionEnable the Batch Archiver by configuring the Batch Server to use the Batch Archiver as the reporting program through the Equipment Editor’s 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

Page 24: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S 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.

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.

If a value outside of this range is entered, the Archiver will run in 5-minute incremental periods.

20

Page 25: Batch Archiver User’s Guide

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).

9. Click OK.

(See the RSBizWare Batch Administrator’s Guide for more information on the Server Options dialog box.)

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 file’s LclTime is YYYY.MM.DD HH:MM:SS and is not configurable, regardless of the language being used.

21

Page 26: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

Configuring the Archiver Service for Incremental ArchivingFor 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.

Assigning a User Account to the Archiver ServiceYou 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.

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.

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 [email protected] to domain\user.

The services for the Batch Archiver and the Batch Server should use the same user account.

22

Page 27: Batch Archiver User’s Guide

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.

Enabling the Archiver ServiceWhen 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.

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.)

23

Page 28: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

Configuring the Archiver for End-of-Batch ArchivingThe 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.

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 PerformanceThe 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 TransferBatch 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).

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.

24

Page 29: Batch Archiver User’s Guide

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.

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.

Configuring the Archiver for Optimal Data AccessConfiguring 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.

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 computer’s 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.

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.

25

Page 30: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S 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.

Running the ArchiverWhen 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.

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.

26

Page 31: Batch Archiver User’s Guide

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.

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.

6. Click OK.

Select the computer first because the Batch Service Manager needs to determine the available services on the selected computer.

Clicking the Pause button causes the Incremental Archiver to pause after processing the active .evt file. Click the Start button to resume Incremental Archiving.

27

Page 32: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

28

Page 33: Batch Archiver User’s Guide

5 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 ArchiverThe 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 ServerThe 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

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

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.

29

Page 34: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S 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

Page 35: Batch Archiver User’s Guide

5 • Using a Custom Archiver• • • • •

Developing the Output TableThe 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 Field Type Description Example

GMT datetime NULL Time event is recorded in Greenwich Mean Time

2003-04-29 12:21:01.000

lclTime datetime NULL Local time event is recorded 2003-04-29 14:52:07.000

UniqueID varchar(12) NULL

Unique identifier assigned by the Batch Server

31

BatchID varchar(255) NULL

Alpha Batch ID BATCH_ID-030102-3

Recipe varchar(1000) NULL

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>:Instance-LoopCounter

The data in the brackets is optional, depending on the recipe level.

13:Y_300_YELLOW_PAINT

Descript varchar(255) NULL

Description of PValue data Yellow Paint

Event varchar(155) NULL

Event type triggering the record

Material Tracking / Material Bound / Material Unbound

PValue varchar(255) NULL

Value reported to the electronic batch record

50

DescriptAPI varchar(255) NULL

Description of PValue data Engineering Units

See “Spanish Translation of DescriptAPI, EventAPI, and PValueAPI”

EventAPI varchar(155) NULL

Event type triggering the record

Report

31

Page 36: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

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 varchar(255) NULL

Engineering units associated with Pvalue

GALLONS

Area varchar(155) NULL

Area model name in batch equipment configuration where batch was executed

THE_PAINT_COMPANY

ProcCell varchar(155) NULL

Process cell in Batch equipment configuration

YELLOWPAINT1

Unit varchar(155) NULL

Unit name in Batch equipment configuration

PREMIX_A

Phase varchar(155) NULL

Name of the phase generating the record

PROC_ORDER_N

Printed datetime NULL Last date the batch report was printed

2003-04-29 14:52:07.000

UserID varchar(85) NULL

Computer name/Windows user name

mjames1

PhaseDesc varchar(50) NULL

Phase class description

MaterialName varchar(155) NULL

Common name of the material

YELLOWPAINT

MaterialID varchar(50) NULL

Inventory control system material ID used to track the material

31

LotName varchar(255) NULL

Name assigned to a lot of material

TEST317_BRAND

Label varchar(255) NULL

ID assigned to a distributed portion of a lot

STANDARDBRANDYELLOW

Container varchar(255) NULL

Container’s name where material and lot were distributed, or where material and lot are stored

WAREHOUSE2/PAINT_PALLET1

Field Name Field Type Description Example

32

Page 37: Batch Archiver User’s Guide

5 • Using a Custom Archiver• • • • •

PromiseID varchar(50) NULL

Unique ID used as a key to allow grouping of separate event entries all resulting from a single material addition

100

Signature varchar(255) NULL

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.

ERP_Flag varchar(1) NULL Tag indicating information reported to SAP

RecordNo int NULL Unique identifier assigned to the record when it is added to the database

31

Reactivation Number

int Number of times an active eProcedure control step has been reactivated

1

Instruction HTML

ntext HTML for completed eProcedure instruction steps

<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.

1

ActionID int 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

Field Name Field Type Description Example

33

Page 38: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

HOW TO DISPLAY ALL INSTRUCTION HTML DATA FROM AN SQL DATABASE

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

Page 39: Batch Archiver User’s Guide

5 • Using a Custom Archiver• • • • •

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

-- 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 @buffervalEND

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

Page 40: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

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

SPANISH TRANSLATION OF DESCRIPTAPI, EVENTAPI, AND PVALUEAPIOn a Spanish Batch system, the following values in the DescriptAPI, EventAPI, and PValueAPI columns are translated into English:

Column Values Translated into English

DescriptAPI 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

Page 41: Batch Archiver User’s Guide

5 • Using a Custom Archiver• • • • •

EventAPI 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

Column Values Translated into English

37

Page 42: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

Configuring the Custom ArchiverNow that you’ve 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 Administrator’s Guide for more information on the Server Options dialog box.)

38

Page 43: Batch Archiver User’s Guide

6 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 Client’s 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 User’s Guide.

Creating a Data Source for BatchHistorianBatchHistorian 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

Page 44: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

RSBizWare system Data Source name in the Batch Archiver Setup and specify the BHBatchHis Table name in the Equipment Editor.

Updating the Database Connection StringComplete the following steps to update the database connection string:

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 StringComplete 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 BatchHistorianWhen you install RSBizWare Batch, the appropriate archiver event filters for BatchHistorian are automatically configured if you select the installation option indicating

All RSBizWare Batch users previously archiving data to a BatchHis Table must perform these steps to ensure proper connectivity and data storage.

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.

40

Page 45: Batch Archiver User’s Guide

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.

Batch Event Filters

MaterialTrack Event Filters

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 = 1000Incremental Period = 5 Minutes

If you are using BatchHistorian with multiple batch servers, special Archiver event filter settings are provided in the BatchHistorian User’s Guide.

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

Material Bound

Material Unbound

Material Tracking

41

Page 46: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

Recommendations for Optimum Data AccessThe 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 = 10Incremental 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.

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.

These settings are a guideline and may vary depending on the number of events generated per batch, the duration of the batch, etc.

42

Page 47: Batch Archiver User’s Guide

A 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 Description

Date Date that the event occurred

Time Time that the event occurred

Type Type of event, such as Information or Error

User Configured domain user

Computer Computer on which the Batch Archiver is running

Source BATCHARC.log file

43

Page 48: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

The following Archiver events can be entered in the Windows event log:

Field Description

Category Category of the event

Event ID ID of the event

Description Description of the event

Data File name and line number from the Archiver’s source code that generated the entry

Category Event Description

Start 1001 Batch Archiver Service started successfully in incremental mode

Start 1002 Batch Archiver Process started successfully in non-incremental mode

Start 1003 Batch Archiver failed to start; see the BATCHARC.LOG file for more information

Start 1004 Batch Archiver failed to open the BATCHARC.LOG file

Start 1005 Service handler not installed

Start 1006 Bad Service Request

Start 3001 Batch Archiver Service paused

Start 3002 Batch Archiver Service continuing

Shutdown 4001 Batch Archiver Service shutting down

Setup 5001 Batch Archiver setup; new connect string = <new string>

44

Page 49: Batch Archiver User’s Guide

INDEX• • • • •

Index

Symbols.evt files 1

AADDEVENT execute 21Archiver

database schema 31running 26system architecture 2

Archiver event filtersfor BatchHistorian 40

Archiver serviceassign user account to 22enabling 23

archivingend-of-batch 3incremental 3non-incremental 3

ArchQue.txt File 29

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

archiver event filters 40

Cconfiguring

custom archiver 29end-of-batch archiving 24incremental archiving 22optimal record transfer 24the server 19

creating a data sourceOracle 14SQL 10

Ddata source 39database

schema 31types to use 1

database connection string 39verify 40

Eelectronic batch records 1

description 5interpretation examples 5

end-of-batch archiving 3configuring 24

event filtersfor Batch 41for BatchHistorian 40for MaterialTrack 41

event journal 5Event Log entries 43execute

ADDEVENT 21

Ffilters

for BatchHistorian 40

Iincremental archiving 3

configuring 22

MMaterialTrack event filters 41

Nnon-incremental archiving 3

v

Page 50: Batch Archiver User’s Guide

BATCH ARCHIVER USER’S GUIDE•

• •

• •

Ooptimal data access 25optimal performance

configuring Archiver for 24data access 25record transfer 24

optimal record transfer 24optimum data access

recommendations for BatchHistorian 42Oracle database

creating a data source 14

Rreporting options 19

configuring 19reporting values for optimal performance

SQL Server only 41

Sserver configuration 19service manager 26SQL database

creating a data source 10system architecture 2system failure 2

Uuser account

for Archiver service 22

WWindows Event Log 43

vi

Page 51: Batch Archiver User’s Guide

INDEX• • • • •

vii

Page 52: Batch Archiver User’s Guide