Wonderware FactorySuite InBatch Getting Started Guide Revision C October, 2001 Wonderware Corporation This document contains information for InBatch Premier edition. For information regarding the Getting Started Guide and tutrorial for InBatch FlexFormula edition, please visit the following URL: http://www.wonderware.com/Products/mmi/inbatch.htm All rights reserved. No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the Wonderware Corporation. No copyright or patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this documentation, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. The information in this documentation is subject to change without notice and does not represent a commitment on the part of Wonderware Corporation. The software described in this documentation is furnished under a license or nondisclosure agreement. This software may be used or copied only in accordance with the terms of these agreements. 2001 Wonderware Corporation. 100 Technology Drive Irvine, CA 92618 U.S.A. (949) 727-3200 http://www.wonderware.com All Rights Reserved. Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Wonderware Corporation cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Wonderware, InTouch and FactorySuite Web Server are registered trademarks of Wonderware Corporation. FactorySuite, Wonderware FactorySuite, WindowMaker, WindowViewer, SQL Access Manager, Recipe Manager, SPCPro, DBDump, DBLoad, HDMerge, HistData, Wonderware Logger, Alarm Logger, InControl, InTrack, InBatch, IndustrialSQL, FactoryOffice, FactoryFocus, License Viewer, Scout, SuiteLink and NetDDE are trademarks of Wonderware Corporation. Contents System Requirements ...............................................................................................1-6 Microsoft SQL Server........................................................................................1-6 InBatch Server ..................................................................................................1-6 Batch Runtime Client ........................................................................................1-6 Batch Development Client.................................................................................1-6 InBatch Program Menus...........................................................................................1-7 InBatch Server ..................................................................................................1-7 InBatch Batch Development Client....................................................................1-7 InBatch Batch Runtime Client...........................................................................1-8 Installing InBatch ....................................................................................................1-9 InBatch Server Installation ................................................................................1-9 InBatch Client Installation ................................................................................1-9 Overview of Capabilities ........................................................................................1-10 Flexible Recipes and Process Lines..................................................................1-10 Process Modeling ............................................................................................1-10 Materials Tracking Management .....................................................................1-12 Recipe Management ........................................................................................1-13 Batch Management..........................................................................................1-13 Batch History ..................................................................................................1-14 Batch Reports..................................................................................................1-14 Extensibility...........................................................................................................1-15 Managing InBatch Configurations .........................................................................1-15 InBatch Application Modules.................................................................................1-16 Configuration Modules....................................................................................1-16 Runtime Modules ............................................................................................1-17 Utility Modules................................................................................................1-18 InBatch Configuration Architecture .......................................................................1-19 The Breading Plant Process Area ...........................................................................2-22 Hardware Architecture ...........................................................................................2-22 Hardware Architecture ...........................................................................................2-23 Install the InBatch Software ...................................................................................2-23 Start InBatch Environment Display........................................................................2-24 Configuration Steps................................................................................................2-24 Model the Process ..................................................................................................2-25 Define Units ....................................................................................................2-26 Define Connections .........................................................................................2-27 Define Process Classes ....................................................................................2-28 Define Process Phases .....................................................................................2-29 Define Transfer Classes...................................................................................2-33 Define Transfer Phases....................................................................................2-34 Define Segments .............................................................................................2-35 Validate the Model ..........................................................................................2-37 Use the Tag Linker.................................................................................................2-38 Define Export Configuration ...........................................................................2-39 Perform a Simulation Export ...........................................................................2-40 Update the Runtime Databases ...............................................................................2-41 Define the Process Trains.......................................................................................2-42 Defining the Materials and Material Locations.......................................................2-43 Define Materials..............................................................................................2-44 Define Material Locations ...............................................................................2-45 Build a Recipe........................................................................................................2-46 Recipe Header .................................................................................................2-47 Define Equipment Requirements .....................................................................2-48 Define Formula Inputs.....................................................................................2-49 Construct the Recipe Procedure....................................................................... 2-51 Validate the Recipe......................................................................................... 2-54 Save the recipe................................................................................................ 2-54 Approve the Recipe for Production.................................................................. 2-55 Create an InBatch Runtime Client (InTouch) Application...................................... 2-56 Create an Operator Interface on InTouch using InBatch Wizards.................... 2-56 Define Windows ............................................................................................. 2-57 Modify Access Name ...................................................................................... 2-72 Set Initial Value for IB_TIM_ACCESS Tag ................................................... 2-73 Define Complimentary Scripts ........................................................................ 2-74 Start the InBatch Runtime System ......................................................................... 2-77 Schedule and Execute Batches ............................................................................... 2-78 From the InBatch Server................................................................................. 2-79 From the InBatch Runtime Client (InTouch)................................................... 2-80 Execute an End-of-Batch Report............................................................................ 2-81 C H A P T E R 1 Welcome to InBatch InBatch is a “Flexible Batch Management System” that is designed to be quickly and easily configured once fundamental concepts are understood. It is extremely important to read this section of the manual before attempting to use InBatch. Once InBatch concepts are understood, you should be able to quickly build and edit configurations without using this manual. As with most menu driven systems, you will become more proficient by using the manual as a reference to improve your understanding of InBatch and how to apply features that may not be obvious. This manual is written for the individuals who will be configuring and applying the batch control system. Process and control engineers or experienced technicians, who are very knowledgeable about control system programming and process control, are the most obvious individuals. The batch system does not require programming at the PC. However, control system programming is required. Also, the batch system is a very complex, yet configurable software product that requires a fundamental knowledge of Windows NT 4.0 operating system, computer system networking, programmable logic controllers (PLCs), and process control. Server and client licensing are not discussed in this section. Contents System Requirements InBatch Program Menus Installing InBatch Overview of Capabilities Extensibility Managing InBatch Configurations InBatch Application Modules InBatch Configuration Architecture The Breading Plant Process Area Hardware Architecture Hardware Architecture Install the InBatch Software Start InBatch Environment Display Configuration Steps Model the Process Use the Tag Linker Update the Runtime Databases Define the Process Trains Defining the Materials and Material Locations Build a Recipe Create an InBatch Runtime Client (InTouch) Application Start the InBatch Runtime System Schedule and Execute Batches Execute an End-of-Batch Report System Requirements InBatch system requirements are the same as for InTouch with additional requirements as described below. Microsoft SQL Server • InBatch utilizes Microsoft SQL Server 7.0 on a separate Information Server machine for database storage and retrieval. Allow at least 200-300 MB free hard disk space for your InBatch databases. InBatch Server • • • InBatch Server (only) requires 40 MB free hard disk space. InBatch Server with a Batch Runtime Client requires 70 MB free hard disk space. SVGA(1024X768) display and adapter w/2MB Video RAM. Batch Runtime Client • • • • Wonderware InTouch. Microsoft Windows 95, 98 or NT 4.0. Client requires 30 MB free hard disk space. SVGA Monitor, 2MB Video RAM. Batch Development Client • • Microsoft Windows NT 4.0. SVGA(1024X768) display and adapter w/2MB Video RAM. InBatch Program Menus InBatch Server When you install the InBatch Server, the Wonderware FactorySuite menu is created which contains the InBatch Server submenu. The contents of the InBatch Server sub-menu are summarized below. Environment Display - starts the Environment Display and initializes the background processes necessary to access InBatch configuration and runtime applications. History Admin. - starts the History Administration utility, and is used to define the user account that will be used to access the historical database. History Archive - starts the History Archive utility, and is used to set when InBatch will create archival databases of completed batch information. Release Notes - starts a Windows Help file that contains a summary of enhancements, user documentation that was unable to be included in this User’s Guide, and known problems with, and work-arounds for InBatch. The UnInstall - allows you to remove the InBatch server. Use this only if you want to remove InBatch from your computer. InBatch Batch Development Client When you install a Batch Development Client, the Wonderware FactorySuite menu is created which contains the InBatch Development Client sub-menu and the items described below. Process Modeling Editor - starts the InBatch Process Modeling Editor on the client. Tag Linker - starts the InBatch Tag Linker on the client. Train Editor - starts the InBatch Train Editor on the client. Material Editor - starts InBatch Material Editor program on the client. Recipe Editor - starts InBatch Recipe Editor program on the client. Report Editor - starts the InBatch Report Editor on the client. Security Editor - starts InBatch Security Editor program on the client. Process Log Editor - starts InBatch Process Log Editor program on the client. UnInstall - allows you to remove the Batch Development Client. Use this only if you want to remove InBatch from your computer. InBatch Batch Runtime Client When you install a Batch Runtime Client, the Wonderware FactorySuite menu is created which contains the InBatch Runtime Client sub-menu and the items described below. InTouch 7.0 is required in order to install the Batch Runtime Client. Batch Display - starts InBatch Batch Display program on the client. Batch Scheduler - starts InBatch Batch Schedule program on the client Report Display - starts InBatch Report Display on the client. UnInstall - allows you to completely remove the Batch Runtime Client. Use this only if you want to remove InBatch from your computer. In addition to these items, the following items are added to the InTouch installation. InBatch Wizards – loads batch wizards into InTouch. ActiveX Objects – loads the Batch ActiveX object and the SFC ActiveX object onto the client system. Alarm/Event Interface – loads the wwextalm.dll and the ibhist.dll into InTouch. Script Add-On Functions – loads several script add-on functions that can be used with InBatch into InTouch. ? For more information on using InTouch, see your online InTouch User’s Guide. Installing InBatch InBatch is installed from the FactorySuite CD-ROM. The installation program provides the capability to install various Batch Server and Batch Client configurations. A summary of the server and client configuration options specific to InBatch is provided below. InBatch Server Installation InBatch Client Installation Configuration and runtime components Redundancy Batch Development Client (InBatch configuration applications) for NT 4.0 only Batch Runtime Client (InBatch runtime applications, Batch Wizards, ActiveX objects, etc.) for NT 4.0 Batch Runtime Client (InBatch runtime applications, Batch Wizards, ActiveX objects, etc.) for Windows 95 Redundancy Overview of Capabilities Wonderware InBatch is flexible batch management software designed to automate and provide a complete production history for batch processes. Consistent with the Instrument Society of America (ISA) S88.01 standard, InBatch allows you to quickly and easily create recipes and simulate their execution against a model of the process – all before writing one line of control code. InBatch also provides complete production history and materials genealogy. InBatch's powerful batch engine, combined with its integration with FactorySuite, means that you can reduce the cost and time to implement your batch-related processes by up to 40 to 60% over competitive solutions. InBatch provides "Out of the box" batch management functionality that eliminates the need for unsustainable custom code in the PLC or DCS and dramatically reduces the life-cycle engineering effort. The sophisticated batch engine is responsible for Unit-to-Unit Material Tracking, Short Term Scheduling, Dynamic Batch and Equipment Management, and Batch History and Reporting. The batch management system also supports redundancy for mission-critical applications. Flexible Recipes and Process Lines In the batch control system, recipe procedures can be changed and new formula and process lines can be easily re-configured, not re-engineered, for new product introductions. The batch system is flexible because it lets you model your plant, create new process lines, manage recipes, schedule and execute batches, and keep a history of all batch processing activity. Flexibility in a batch process will make a plant more competitive. Improvements will result because of faster line changeovers, faster time-to-market for new products, quick response to customer orders, accurate batch history, and consistent product quality. Process Modeling A batch processing plant is made up of units and connections. Units process and/or hold materials while connections transfer materials between units. A unit is defined as any vessel that can hold and/or process materials. Some units have no processing capabilities, as is the case with bulk storage vessels, manual add stations, and hold tanks. Other units have significant processing capabilities, as is the case with most reactors, blenders, mixers, dryers, retorts, and washers. Examples of processing capabilities are agitating, mixing, heating, cooling, blending, and packaging. Other examples of units are storage tanks, silos, ovens, fillers, washers, retorts, molders, bottlers, wrappers, cartoners, and palletizers. Connections are defined as the equipment, i.e. pumps, valves, separators, condensers and flow meters, that is necessary for transferring a product from one unit to another. Many plants have units that are connected to more that one unit and some plants have multiple connections between the same two units. All units that have the same processing capabilities or perform the same function are grouped into one process class. All the connections between the same two process classes are grouped into one transfer class. Process Classes and Transfer Classes define a family of units and connections, respectively. The ability to group units and connections into classes is the essence of a true flexible batch system. Processing and transferring capabilities are defined by Phases. Each phase is an independent action that may contain a unique set of Parameters. Parameters configure the phase based on a recipe’s requirements. Phases can be automatically executed by the control system. The can also be manually executed by an operator. The execution of automatic phases is performed by the control system using Phase Logic. Units, Process Classes (Processes), Connections, Transfer Classes (Transfers), and Processing Capabilities are the five main components of the Process Model. Defining the plant processing capability is called Process Modeling and involves the steps listed below. 1. 2. 3. 4. 5. 6. 7. 8. 9. Identify each unit and its attributes. Group units into process classes. Identify all connections between units. Define all equipment segments and assign to connections. Group connections into transfer classes. Define the processing capabilities of each process class (phases and parameters). Define the transferring capabilities of each transfer class (phases and parameters). Define equipment statuses. Define trains. 10. Develop phase logic. An integral part of Process Modeling involves defining specific data points, called Tags, for Units, Processes, Connections, and Transfers. Tags allow data to move between the batch system and the control system. Tags must be defined prior to configuring any of the batch system application modules. The number of tags allowed in the batch system is only limited by the amount of mass storage in the system. Materials Tracking Management Materials Tracking Management includes the ability to define materials as ingredients, intermediates, finished goods, by-products, and others. The ability to define characteristics is provided for each material entered in the system. The Materials Editor is used to track the location of materials that are stored in units. This usually pertains to bulk ingredients and work in process materials. The batch management system uses the ingredient location data to determine where to get ingredients when a batch is to be produced. This capability allows ingredient locations to be independent of recipes and control programs, and permits ingredients to change locations with no effect on recipe execution. The materials database is used by the Recipe Editor in the construction of recipes. Only materials in the materials database can be used in recipes. When new bulk ingredients are received, the unit location may be entered into the materials database by plant personnel. A lot identification can also be assigned to the material. Multiple lots of the same ingredient may be stored in the same vessel. The batch management system updates the database when ingredients are used and when intermediates or finished goods are produced. The database provides for easy access to WIP information and can be used to update higher level material management and material resource planning (MRP) systems with ingredient usage information, WIP, and finished goods production. The Materials Editor is not an inventory management system, but may be used to complement existing systems. Recipe Management The batch control system manages and constructs recipes according to the guidelines outlined in the Instrument Society of America (ISA) SP88 Flexible Batch Specification. The batch control system provides a recipe management system that enables Master Recipes to be constructed and edited. Master recipes are not process line specific, but rather are equipment independent. They can be assigned to any process line (train) that has units belonging to the classes of process equipment defined in the recipe. A master recipe becomes a Control Recipe as the units defined in the train are dynamically allocated and used in producing a batch. A master recipe is not size specific, but is scalable to the batch size defined by production scheduling. All formula quantities for ingredients, intermediates, byproducts, and finished goods are entered as either actual quantities or can be expressed as a percent of the total batch size. Quantities expressed in percentages are scaled by the batch management system when the batch is executed. The Recipe Editor provides several text and graphical editors to construct and alter recipes. Recipes can be saved, retrieved, and printed. A revision control system provides an accurate time stamped history of all changes and revisions that have been made to the recipe. Batch Management Batch Management consists of scheduling batches, initializing batches, coordinating the execution of batches with the control system, interfacing with operators, and storing all batch activity. This functionality is achieved through the Batch Manager, Batch Scheduler, and Batch Display programs. The final result is a flexible, reliable, and intuitive approach to the management of a batch process. Scheduling: The Batch Manager’s scheduling capability is that of dispatching batches that are ready to run to plant floor operators. Scheduling involves the manual entry of the batch identification, master recipe, batch size, and Train (Process Line) into the Batch Scheduler. Once entered, the batch can be initialized. Initialization: Each batch must be initialized before it is executed. The initialization process involves validation of the recipe, checking if the Train exists, checking if the bulk materials defined in the recipe are available in the Train, ensuring that the recipe’s equipment requirements are satisfied by the Train, and verifying that the Process Model database is compatible with the recipe. Batch and Unit Management: Batch Manager directs and supervises the execution of each batch. The Batch Manager interprets recipes and enables the control system. Based on the recipe’s procedure, blocks of control software, referred as phase blocks, are signalled to execute by the Batch Manager. Phase block control logic, located in the control system, is responsible for controlling the process. Prior to enabling each phase block, the Batch Manager verifies that the phase block is ready to be executed. If so, phase parameter values are downloaded to the block, then the block is started. Batch Manager also interfaces with Batch Display programs. The Batch Display programs provide operators with information on all batches initialized and/or executing in the system. Through these displays, operators can put a batch or phase in hold, as well as restart and abort batches or phases. In addition, operators can change phase parameter values, acknowledge the execution of phases, review phase interlock statuses, and enter comments while the batch is executing. The Batch Manager coordinates the usage of process units for each batch. The Batch Manager is capable of running a large number of batches simultaneously. Each batch is a separate entity and contends along with other batches to possess the process units it needs. Batch Manager allocates ownership of units to batches as units become available, and releases units when the batch no longer requires the unit. Flexible batch systems using controllers must take the approach in which the supervisory workstation becomes an active participant in executing a batch. The reason for this is that unit management is very sophisticated in a flexible batch system. Most controllers do not have the ability to program a unit manager capable of interpreting and executing the recipe procedures that can be constructed in the batch control system. A Master Recipe uses classes of process units, not specific units. This means phases pertain to a class of units not a specific unit. When the Batch Manager executes a Master Recipe, each phase encountered is converted into a unit specific phase. This process is called Master Recipe to Partial Control Recipe conversion. The Train assigned to produce the batch specifies all the units that can be used. The Batch Manager automatically converts the Master Recipe to a Control Recipe based on the units found in the Train. History: Batch Manager captures and stores all processing and operator activity during the execution of a batch. Batch History InBatch uses Microsoft SQL Server as its historical repository to provide open and easy access to all batch history data The Batch Management System is responsible for writing all information related to the production of a batch to the history database. This includes events, process data, production information, material usage, operator comments, operator actions, and equipment used. Batch Reports InBatch uses Seagate Crystal Reports Professional for report development. This provides a flexible and open platform so that the user can easily build custom reports. Retrieval of historical data in the form of reports is provided by the runtime Reporting System. Reports can be automatically triggered during the execution of a batch or at the end of a batch. InBatch is supplied with a set of predefined reports. Extensibility InBatch offers a rich set of ActiveX objects and API functions for integrating external applications such as ERP or scheduling systems and allowing exchange of formulas/recipes, materials and production results. InBatch also uses Microsoft SQL Server as its historical repository to provide open and easy access to all batch history data. These interfaces make it easy to integrate with ERP and Advanced Planning Systems, allowing InBatch to be a key link in a successful supply chain management initiative. Managing InBatch Configurations When the InBatch Server is installed, the following folder structure is created. The folders and files shown must never be modified, except for one notable exception, the configuration folder. The InBatch configuration that you create is stored in the “…/FactorySuite/InBatch/cfg/config_A” folder. The InBatch system looks for your configuration and must find it in config_A. If you want to work on a different configuration, you can create a different folder. For example, create a folder named “ AnotherConfig,” and then move the configuration files from “config_A” into it. An empty set of default database files can be copied from the dflt_cfg folder to “config_A.” InBatch Application Modules Configuration Modules The following section is a summary of the applications that are available within the Environment Editor. Environment Editor (EnvEdit) (Required) The Environment Editor is used to define the batch configuration and runtime applications that are to be executed. Process Modeling Editor (ModelEdit) Tag Linker Editor (TagLinker) (Required) Provides the capability for a user to create a process model database. Only one Process Modeling Editor can run in a system at a time. (Required) The Tag Linker Editor associates InBatch tags with a control system. It is also capable of associating InBatch tags with InTouch tags. Tag Linker also exports InBatch tags to a comma separated variable file that will ultimately populate the InTouch tag dictionary with memory and IO tags. Train Editor (TrainEdit) (Required) The Train Editor is used to create production lines on which batches are scheduled. Materials Editor (MaterialEdit) Recipe Editor (RecipeEdit) Report Editor (ReportEdit) (Required) Provides the capability for a user to create and edit a materials database both on and off-line. Multiple Materials Editors can run in a system enabling multiple users to edit the same database simultaneously. (Required) Provides the capability for a user to create and edit a recipe database both on and off-line. Multiple Recipe Editors can run in a system enabling multiple users to edit the same database simultaneously. (Optional) The Report Editor is used to create, edit, and print report configurations. Process Log Editor (LogEdit) Security Editor (SecEdit) (Optional) The Process Log Editor is used to create, edit, and print batch-related data logging configurations. (Optional) Provides the capability for a user to define the users of the system, security levels for each user, appropriate workstation access for each user, appropriate recipe access for each user, and enable/disable applications and functions requiring security. Runtime Modules Environment Manager (EnvMngr) Environment Display (EnvDspl) Unilink Manager (UnilinkMngr) InBatch Client (IBCli) (Required) The Environment Manager manages the execution of the batch runtime applications defined with the Environment Editor. (Required) The Environment Display is a client of the Environment Manager and provides a single interface for starting and stopping all batch system GUI applications. (Required) Manages inter-process communications between all of the batch system applications. (Required for Runtime) Runtime client application which allows InBatch to access tag data from SuiteLink and DDE Servers. Memory Tag Manager (MemTagMngr) Simulation Manager (SimMngr) (Required) The Memory Tag Manager is responsible for generating all of the tags configured as InBatch Memory Tags in the Tag Linker application. (Required for Simulation) The Simulation Manager replaces the communication drivers for a batch system and allows the system to be executed without control system hardware present. Information Manager (InfoMngr) InBatch Server (IBServ) (Required) Provides general batch server information to client applications. (Required) Runtime server application, which allows SuiteLink and DDE client applications (e.g. InTouch), to use InBatch TIM tags and Control System tags. InBatch Function Server (IBFServ) Batch Manager (BatchMngr) (Required if you are using Batch Function Tags) Runtime server application, which allows SuiteLink and DDE client applications (e.g. InTouch), to use InBatch Batch Function Tags. (Required) Interfaces with the process model, recipe, and materials databases. The Batch Manager works in conjunction with the Batch Scheduler and Batch Display programs. The Batch Manager executes all recipes, manages unit allocation, moves batch information to the History Manager, and triggers reports. Batch Scheduler (BatchSched) (Optional) Interfaces with the Batch Manager and is used to construct a schedule of batches to be executed. Multiple Batch Schedulers can run in a system. Batch Display (BatchDspl) (Optional) The Batch Display is a client of the Batch Manager, and provides all of the runtime information concerning the execution of a single batch. Multiple Batch Displays can run in a system. Report Manager (ReportMngr) (Optional) The Report Manager interfaces with the Batch Manager for report triggers. In addition, the Report Manager will retrieve historical data from the Historical Database. Only one Report Manager can be run in a system. Process Logger Manager (LogMngr) Security Manager (SecMngr) (Optional) The Process Logger Manager controls the data logging of any tag in the system according to the logging configuration. (Optional) Security Manager is used in batch and external applications to evaluate and respond to requests for security clearance. Tag Interface Management (TIM) System Batch Process (TIMBatch) (Optional) The TIM System Batch Process manages the runtime tag interface between the batch management system and the computers and/or controllers defined in the system. Tag Interface Management (TIM) System Function Library Process (TIMFunc) Tag Interface Management (TIM) System Security Process (TIMSec) (Optional) The TIM System Function Library Process manages the runtime tag interface between the batch functions and the computers and/or controllers defined in the system. (Optional) The TIM System Security Process manages the runtime tag interface between the security system and the computers and/or controllers defined in the system. Utility Modules Phase Logic Testing Tool (PhaseLogic) Change Password (ChgPwd) Tag View (TagView) (Optional) The Phase Logic module permits individual phase execution independent of any batch operation. (Optional) The Change Password application permits the user to interact with the security system from the command line in order to change a user’s password. The Change Password utility is part of the security system. (Optional) The Tag View application permits monitoring and changing any of the InBatch equipment or TIM tags. InBatch Configuration Architecture ModelEdit TrainEdit MaterialEdit RecipeEdit ReportEdit CfgModelDB MaterialDB RecipeDB ReportDB TagLinker EnvEdit SecEdit LogEdit LinkDB Imp/Exp CfgLinkDB CfgTIMDB DBLoad Files EnvDB SecurityDB LogDB InBatch Runtime Architecture RecipeEdit MaterialEdit EnvMngr EnvDB Lock Manager (lm_tcp) RecipeDB MaterialDB BatchDB .BatchWR BatchSched (OCXBatch) InfoMngr BatchDspl (OCXBatch, SFCOCX) TIMBatch TIMSec TIMFunc TrainEdit ModelDB UnilinkMngr SysTagMngr LogDB BatchMngr LogMngr InSQL SQLServer IBHist SimMngr IBCli LinkDB IBServ TIMDB WindowMaker/Viewer IO Server InControl SFC ActiveX Object Batch ActiveX Object InBatch Wizards InBatch Tag Alarm/Event and Script Browser Interface (.dlls) Functions Server C H A P T E R 2 Discovering InBatch - A Tutorial This chapter guides you through the process of developing actual InBatch Server and Client applications using a generic Breading Plant process as a reference. The purpose of the tutorial is to show you the ease with which you can configure InBatch and the power that InBatch provides as a design, engineering and simulation tool. Additionally, it familiarizes you with all other InBatch capabilities associated with configuration and control system logic, material management, recipe management, history, reporting, and operator interface. As you work through this tutorial, you will develop a complete understanding of what InBatch is and how it is configured. This tutorial assumes that the user has a properly configured, operational hardware system and strong working knowledge of InTouch. Contents The Breading Plant Process Area Hardware Architecture Hardware Architecture Install the InBatch Software Start InBatch Environment Display Configuration Steps Model the Process Use the Tag Linker Update the Runtime Databases Define the Process Trains Defining the Materials and Material Locations Build a Recipe Create an InBatch Runtime Client (InTouch) Application Start the InBatch Runtime System Schedule and Execute Batches Execute an End-of-Batch Report The Breading Plant Process Area Bulk1 (Flour) Bulk2 (Salt) BulkTks Process Phases None Blk1_Dis Common Blk2_Dis Bulk_Mix Transfer Phases/Parameters BulkAdd Qty_Kgs (Input) Mix1_Chg Mix2_Chg Mixers Mixer1 Mixer2 Process Phases/Parameters Mix ManAdd Instruct Time_Min, Speed_% Qty_Kgs (Input) Mix_Hold Transfer Phases/Parameters Discharg Qty_Kgs (Output) Hold1 Hold2 HoldTks Process Phases None Hardware Architecture Our example architecture is shown below. MERCURY is the name of the InBatch Server. MIXER1 is the name of the InBatch Development Client and MIXER2 is the name of the InBatch Runtime Client. InBatch Server "MERCURY" Windows NT 4.0 InBatch Development Client "MIXER1" Windows NT 4.0 InBatch Runtime Client "MIXER2" Windows NT or 95 Install the InBatch Software Install the InBatch Server software on MERCURY. Install and Configure Microsoft SQL Server on MERCURY. This can be done by installing IndustrialSQL Server. Install the InBatch Development Client software on MIXER1. Install the InBatch Runtime Client software on MIXER2. Note The MIXER1 node is used for illustration purposes only. This node is portrayed as an InBatch Development Client. All configuration information presented can be performed from the InBatch Server or the InBatch Development Client. This example refers to the server. Start InBatch Environment Display Select the Environment Display option from the Start/Programs/Wonderware FactorySuite/InBatch Server folder. The InBatch Environment Display will be displayed. This application is used to start the InBatch configuration and runtime applications. Configuration Steps 1. 2. 3. 4. 5. 6. 7. 8. 9. Model the Process Use the Tag Linker Update the Runtime Databases Define the Process Trains Defining the Materials and Material Locations Build a Recipe Create an InBatch Runtime Client (InTouch) Application Start the InBatch Runtime System Schedule and Execute Batches 10. Execute an End-of-Batch Report Model the Process Double-click the ModelEdit icon on the Environment Display window. The Process Modeling Editor main window is displayed. Define Units Units are equipment entities that hold, process and/or package materials. Select the Units tab to display the Units editor. Use the Units editor to enter the units as shown below. Define Connections Connections are defined by a source and a destination unit. If materials can move between two units, then the connection must be defined. The way in which materials move is not important at this time. Select the Connections tab to display the Connections editor. Use the Connections editor to enter the connections as shown below. Define Process Classes A Process Class is a group of one or more units that perform the same functions. Select the Processes tab to display the Processes editor. Use the Processes editor to enter the process classes and assign all of the units as shown below. Process Class Name BulkTks Mixers HoldTks Assigned Units Bulk1, Bulk2 Mixer1, Mixer2 Hold1, Hold2 Define Process Phases Only define process phases for the classes of equipment that actually process material. In our example, only the Mixers process material. The BulkTks and HoldTks classes do not. Select the Mixers process class and then click the Phases… button from the Processes tab dialog. This displays the Edit Phases dialog. Enter the process phases shown below. Phase Name Mix ManAdd Instruct Phase Type Automatic Manual Manual In the Save History pane, select the Control/Status Activity and Parameter Status check boxes for each phase in the Mixers class. If you do not set these check boxes, then phase events and parameters will not be stored in the history database. Note You must select the Change button following any phase modifications. Create Phase Control/Status Tags All Automatic phases must have Phase Control and Status tags. These are the tags that would ultimately be linked to the control system memory/register addresses. There is only one automatic phase in the Mixes class. Select the Mix phase from the Phases list and then click Phase Control/Status... The Edit Phase Control/Status dialog is displayed. Click Select All and then click Create Tags. All tags needed to control and monitor the status of the Mix phase will be automatically created. Define Formula Parameters Formula parameters are used to provide phases with information they need to do their job. Parameter values are defined in the recipe and written to the control system when the phase is executed. The recipe procedure determines when each phase is executed. Select the appropriate phase from the Phases list, then click the Formula Parameters… button. The Edit Formula Parameters dialog will be displayed. Enter the following parameters for each of the defined process phases. Phase Mix ManAdd Parameter Speed_% Time_Min Qty_Kgs Parameter Type Process Variable Process Variable Input Configure both Mix formula parameters as follows: 1. 2. 3. Create tags for the Target and Actual elements by enabling the check box for each and selecting the Create Tags button. Set the Edit Allowed check box for the Target element. Set the Enable Display check box for the Actual element. Configure the ManAdd formula parameter as follows: 1. 2. Set the Enable Display check box for the Target and Material ID elements. Set the Edit Required check box for the Actual and Lot Code elements. Note You do not have to create tags for the ManAdd phase. Define Transfer Classes A Transfer Class is a group of one or more connections that perform the same functions. Within a Transfer Class, all of the source units are in the same process class and all of the destination units are in the same process class. The source and destination process classes can be the same. Select the Transfers tab to display the Transfers editor. Use the Transfers editor to enter the transfer classes and assign all of the connections as shown below. Transfer Class Name Bulk_Mix Mix_Hold Source Process BulkTks Mixer Destination Process Mixer HoldTks Transfer Class Name Bulk_Mix Mix_Hold Assigned Connections Blk1Mix1, Blk1Mix2, Blk2Mix1, Blk2Mix2 Mix1Hld1, Mix2Hld2 Define Transfer Phases Each transfer class should have at least one transfer phase defined. The phase is responsible for moving material from a source unit to a destination unit. Select a transfer class and then click the Phases… button from the Transfers tab dialog. This displays the Edit Phases dialog. Enter the transfer phases shown below. Transfer Class Name Bulk_Mix Mix_Hold Phase Name BulkAdd Transfer Phase Type Automatic Automatic In the Save History pane, select the Control/Status Activity and Parameter Status check boxes for each phase. If you do not set these check boxes, then phase events and parameters will not be stored in the history database. Note You must select the Change button following any phase modifications. Create Phase Control/Status Tags As previously discussed for process phases, all Automatic phases require control and status tags. These are the tags that would ultimately be linked to the control system memory/register addresses. Select the appropriate transfer class. Select the automatic phase defined for the class from the Phases list and then click Phase Control/Status... button. The Edit Phase Control/Status dialog is displayed. Click Select All and then click Create Tags. All tags needed to control and monitor the status of the Mix phase will be automatically created. Define Formula Parameters Select the appropriate phase from the Phases list, then click the Formula Parameters… button. The Edit Formula Parameters dialog will be displayed. Enter the following parameters for each of the defined transfer phases. Transfer Class Name Bulk_Mix Mix_Hold Phase BulkAdd Transfer Parameter Qty_Kgs Qty_Kgs Type Input Output Configure each of the formula parameters as follows: 1. 2. 3. 4. Create tags for the Target and Actual elements by enabling the check box for each and selecting the Create Tags button. Set the Edit Allowed check box for the Target element. Set the Enable Display check box for the Actual element. Set the Enable Display check box for the Material ID element. Define Segments A segment is a subsection, that is, part of a connection. Segments are the lowest equipment entities that are managed by InBatch. The segments that make up a connection are allocated to a batch when a transfer is executed. This prevents other transfers from using the same segments associated with their connection. This permits the batch engine to provide some automatic process interlocking. Select the Segments tab to display the Segments editor. Use the Segments editor to enter the segments as shown below. Assign Segments to Connections Select the Connections tab to display the Connections editor. At the bottom of the Connections tab dialog assign the required segments to appropriate connections. Select the connection and then click the Assign Segments… button to display the Assign Segments to Connection dialog. Select the required segments from the Segments list and Apply to the connection as shown below. Connection Name Blk1Mix1 Blk1Mix2 Blk2Mix1 Blk2Mix2 Segments Blk1_Dis, Common, Mix1_Chg Blk1_Dis, Common, Mix2_Chg Blk2_Dis, Common, Mix1_Chg Blk2_Dis, Common, Mix2_Chg Define Equipment Status Equipment statuses apply to all units and segments in the system. The status of a unit or segment is evaluated before it is allocated to a batch. The status must be Available before it is allocated. Select the Equipment Status tab to display the Equipment Status editor. Use the Equipment Status editor to enter the segments as shown below. Validate the Model Select the File/Validate… menu option from the Process Modeling Editor main window to check for modeling errors. Correct any discrepancies. Use the Tag Linker Double-click the TagLinker icon on the Environment Display window. The Tag Linker main window is displayed. The Tag Linker is used to configure tags to point to the control system and to export tags to a .csv file for use in InTouch. Define Export Configuration Select the Edit/Export… menu option. This displays the Export Editor dialog. Configure this dialog as shown below. Perform a Simulation Export Select the File/Simulation Export… menu option. An Export Results dialog will be displayed telling you what is being exported and when it is complete. The Simulation Export performs two primary functions. First, it creates a .csv file for the client type. Secondly, the InBatch Server creates a set of Tag Interface Management (TIM) System tags using the Client Type name and the declared Number of Clients, and creates a unique topic name for MIXER2. Update the Runtime Databases The InBatch Environment system provides the user with the ability to make offline changes to the process model and link databases. The Environment Display Update/Runtime menu option copies the contents of the process model, link, and TIM configuration databases to the corresponding runtime databases. This option must be performed before the runtime system will recognize the latest changes. Note This option is not permitted in a running system. Define the Process Trains Double-click the TrainEdit icon on the Environment Display window. The Train Editor main window is displayed. Enter train names and assign units to the trains as shown below. Train Name Mixer 1 Train Mixer 2 Train Assigned Units Bulk1, Bulk2, Mixer1, Hold1 Bulk1, Bulk2, Mixer2, Hold2 Defining the Materials and Material Locations Double-click the MtlEdit icon on the Environment Display window. The Materials Status main window is displayed. IMPORTANT You MUST select the Update/Runtime from the Environment Display as described at the end of the previous section before continuing. Define Materials Select the Edit/Materials Editor… menu option on the Material Status main window. The Materials Editor dialog is displayed. Define the following ingredients. Material ID Flour 100 Salt 200 CS102 PS102 Material Name Pure White Flour Pure Salt Chicken Spice Pork Spice UOM LBS LBS LBS LBS Hi Dev 1.0 1.0 1.0 1.0 Low Dev 1.0 1.0 1.0 1.0 Define the following finished goods. Material ID CB1000 PB1000 Material Name Chicken Breading Pork Breading UOM LBS LBS Hi Dev 1.0 1.0 Low Dev 1.0 1.0 Define Material Locations Select the Edit/Material Locations… menu option on the Material Status main window. The Material Location Assignment Editor dialog is displayed. Assign the bulk materials to the appropriate bulk tanks and define Lot Tracking Information as shown below. Material ID Material Name Unit Lot Quantit Flour 100 Salt 200 Pure White Flour Pure Salt Bulk1 Bulk2 y Flour Vendor 1 Salt Vendor 3 50,000 30,000 Build a Recipe Double-click the RecipeEdit icon on the Environment Display window. The Recipe Editor main window is displayed. This editor is used to define a recipe. Recipe Header Select the Edit/Recipe Header… menu option on the Recipe Editor main window. The Recipe Header dialog is displayed. Enter the Header information for the Chicken Breading recipe as shown below. Define Equipment Requirements Select the Edit/Equipment Requirements… menu option on the Recipe Editor main window. The Equipment Requirements Editor dialog is displayed. Select the Add Processes… button and add the process classes as shown below. Define Formula Inputs Select the Edit/Formula Inputs… menu option on the Recipe Editor main window. The Formula Inputs Editor dialog is displayed. Select the Add Inputs… button and add the ingredients as shown below. Define Formula Outputs Select the Edit/Formula Outputs… menu option on the Recipe Editor main window. The Formula Outputs Editor dialog is displayed. Select the Add Outputs… button and add the finished goods as shown below. Construct the Recipe Procedure Construct the recipe procedure for the Chicken Breading product as shown on the following pages. Add Materials Operation WaitSec(35) Material: Flour 100 Qty_Kgs: 40% Material: Salt 200 Qty_Kgs: 15% Speed_%: 40 Time_Min: 8 Material: CS102 Qty_Kgs: 5% Mix Materials Operation Speed_%: 10 Time_Min: 4 Material: Flour 100 Qty_Kgs: 40% Speed_%: 10 Time_Min: 4 Ask(“ Mix Again?”) Instruction: “Take Sample for QA Test. Wait for Results.” Ask(“Test OK?”) Enable “ Ack On Entry” Instruction: “Enter Speed and Time, then Acknowledge.” Discharge Operation Material: CB1000 Qty_Kgs: 100% Validate the Recipe Select the File/Validate… menu option from the Recipe Editor main window to check for configuration errors. Correct any discrepancies. Note The recipe must be valid in order to schedule and execute. Save the recipe Select the File/Save… menu option from the Recipe Editor main window to save the recipe. Enter the information shown below. Approve the Recipe for Production. Select the File/Approvals… menu option from the Recipe Editor main window to approve the recipe. Enable the Approved for Production check box as shown below. Create an InBatch Runtime Client (InTouch) Application This section will describe the steps required to create the batch client application using InTouch. Several windows will be created that use wizards, ActiveX objects, and InBatch tags to represent the batch activity. Note There are two alternatives to making batch tags available within the InTouch application. The first involves importing the .csv file that was created by selecting the File/Simulation Export… menu option in the Tag Linker into InTouch using the DBLOAD utility. The second makes use of the tag browsing and remote referencing capabilities on InTouch. The latter option will be used in this example. Create an Operator Interface on InTouch using InBatch Wizards Use the InTouch – Application Manager program to create a new InTouch application named IB_Client. After the application has been created, select the new application and start WindowMaker. Note This example assumes that a screen resolution of 800x600 is used for the InBatch Runtime Client application. Define Windows Create a new Popup window named Questions as illustrated below. Insert the Batch Questions (w/Close) wizard in the center of this window with the font settings of Courier New, 8pt, Bold. Save the Questions window. The Questions window should look similar to the one shown below. Create a new Popup window named Equipment as illustrated below. Insert the Equipment Allocation wizard in the center of this window with the font settings of Courier New, 8pt, Bold. Save the Equipment window. The Equipment window should look similar to the one shown below. Create a new Popup window named Errors as illustrated below. Insert the Errors wizard in the center of this window with the font settings of Courier New, 8pt, Bold. Save the Errors window. The Errors window should look similar to the one shown below. Create a new full-screen, Replace window named Schedule as illustrated below. Insert the Batch Scheduler/Dispatcher wizard at the top of this window with the font settings of Courier New, 8pt, Bold. Double-click the schedule wizard and change the List Size to 4. Below the schedule wizard, insert the Active Batch List wizard with the font settings of Courier New, 8pt, Bold. Double-click the batch list wizard and change the List Size to 4. To the right of the Active Batch List wizard, add a column of four Batch/Phase/Misc Button wizards with font settings of Courier New, 8pt, Bold. Double-click each of the buttons and configure each to have the following name and action assignments. Label Batch Start Batch Hold Batch Restart Batch Abort Button Action Batch Start Batch Hold Batch Restart Batch Abort Below the schedule wizard, insert the Batch Comments wizard with the font settings of Courier New, 8pt, Bold. To the right of the Batch Comments wizard, add two button wizards using the directions provided earlier with font settings of Courier New, 8pt, Bold. Double-click each of the buttons and configure each to have the following label and action assignments. Label Name Batch Display Equipment Button Action Window Show: Show ‘Window Name’; Display Window Show: Show ‘Window Name’; Window Batch Equipment Note The Batch Display window will be defined later. This step will have to be completed after the Batch Display window is defined. Save the Schedule window. The Schedule window should look similar to the one shown below. Create a new full-screen, Replace window named Batch Display as illustrated below. Insert the Active Phase List wizard at the top of this window with the font settings of Courier New, 8pt, Bold. Double-click the schedule wizard and change the List Size to 3. Insert the Phase Parameter List wizard below the Active Phase List wizard with the font settings of Courier New, 8pt, Bold. Double-click the schedule wizard and change the List Size to 3. Insert the Phase Instructions wizard below the Phase Parameter List wizard with the font settings of Courier New, 8pt, Bold. Double-click the schedule wizard and change the List Size to 3. Insert the Phase Message Display wizard to the right of the Phase Instructions wizard with the font settings of Courier New, 8pt, Bold. To the right of the phase wizards, add a column of six Batch/Phase/Misc Button wizards with font settings of Courier New, 8pt, Bold. Double-click each of the buttons and configure each to have the following label and action assignments. Label Phase Start Phase Hold Phase Restart Phase Abort Ack On Entry Ack On Exit Button Action Phase Start Phase Hold Phase Restart Phase Abort Phase: Ack On Entry Phase: Ack On Exit Add another Batch/Phase/Misc Button wizard with font settings of Courier New, 8pt, Bold. Double-click each of the buttons and configure each to have the following label and action assignments. Label Name Schedule Button Action Window Show: Show ‘Window Name’; Window Schedule Add the InBatch SFC Control to the bottom of the window and position accordingly. Save the Batch Display window. The Batch Display window should look similar to the one shown below. Modify Access Name A default Access Name is created when an InBatch wizard is used in an application. This access must be modified to point the InTouch batch client application to the InBatch Server for runtime wizard data. Select the Special/Access Names… menu option to display the Access Names dialog. Modify the IB_TIM_TAGS access as shown below. Set Initial Value for IB_TIM_ACCESS Tag There are several tags created in the InTouch Tagname Dictionary when an InBatch wizard is used in an application. One tag in particular must be modified to point the InTouch batch client application to the InBatch Server for runtime wizard data. Select the Special/Tagname Dictionary… menu option to display the Tagname Dictionary. Modify the initial value of the IB_TIM_ACCESS_TAG tag as shown below. Define Complimentary Scripts In order to complete the batch client application, several scripts are required. These scripts will use several of the InBatch tags. These tags will be remotely referenced from the InTouch tag browser. Define Tag Sources In order to use the InBatch tags within the scripts defined on the next few pages, an InTouch tag source must be defined that points to the InBatch Tag Interface Management (TIM) System tags. These are the wizard tags that provide access to the runtime batch information from InTouch. Create the tag source shown below from any script entry dialog. The Location will correspond to the configuration directory (config_A) on the InBatch Server (MERCURY) node. Questions Condition Script Condition: Script: Script: IB_TIM_TAGS:BTRQ-QUES-NUMITEMS > 0 Show “Questions”; Show “Questions”; Condition Type: On True Condition Type: While True (Every 5000 Msec) Errors Data Change Script Tagname: Script: IB_TIM_TAGS:BTEE-MSG-NUMITEMS Window Script Window: Script: Batch Display #InBatchSFCCtrl1.Host = "mercury"; Condition Type: On Show Condition Type: On Hide Script: #InBatchSFCCtrl1.Term(); InBatch SFC ActiveX Control Event Script Double-click the InBatch SFC ActiveX control object to display the InBatchSFC1 Properties dialog. Select the Events tab. Select the SystemShuttingDown event and define the following script. Script Name: Script: TermControl #InBatchSFCCtrl1.Term(); Batch Focus Data Change Script Tagname: Script: IB_TIM_TAGS:BTB-SEL-SCHFOCUSOK Start the InBatch Runtime System Click the Runtime… button on the Environment Display window. The Runtime Application Display dialog is displayed. Select the Start All button in this dialog to start all of the runtime applications. After the Server Applications are started, start the InTouch WindowViewer. Schedule and Execute Batches Double-click the BatchSched icon on the Environment Display window. The Batch Scheduler main window is displayed. Schedule the following batches. Select the Initialize/All menu option from the Batch Scheduler main window to change the status of all of the batches from Open to Ready. From the InBatch Server Double-click the BatchDspl icon on the Environment Display window. The Batch Display main window is displayed. Select the Windows/Schedule… menu option from the Batch Display main window. This displays a list of available batches. Select a batch from the list. Start the batch by clicking the Batch Start button. Monitor the execution of the batch, answering any question, entering data for manual phases and acknowledging phases when necessary. From the InBatch Runtime Client (InTouch) Make sure the InTouch WindowViewer application is running and displaying the Schedule window. Enter the information shown below and then click Add. Campaign: Lot: Batch: Recipe: Quantity: Train: C001 L002 1 CB1000 5000 Mixer 1 Train Click the Init Batch button to initialize the new batch. The batch status will change from Open to Ready. Select a batch from the list at the bottom of the Schedule window and click the Batch Start button. After the batch status changes to Run, click the Batch Display button to activate the Batch Display window. Monitor the execution of the batch, answering any question, entering data for manual phases and acknowledging phases when necessary until the batch is done. Execute an End-of-Batch Report Double-click the ReportDspl icon on the Environment Display window. The Report Display main window is displayed. Select the File/Open… menu option from the Report Display main window. This displays a list of available reports. Select the B_Journal.rpt file. Upon opening, the search criteria dialog will be displayed. Enter the information shown below to generate a report for the batch executed. After defining the search criteria, the report will be displayed containing all batch information.