You are on page 1of 20

Tetra Pak Inc.

– TPI Batch Kernel

Created By: Carey Warren


Created: 8/11/16
Last Revised By: Carey Warren
Last Revision Date: 8/11/16
Current Revision: 1.0

This document is the exclusive property of Tetra Pak, Inc. and must not be copied, reproduced, transmitted or
communicated without the prior written approval of Tetra Pak, Inc.
Table of Contents

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com
General 3
Overview.......................................................................................................................................3
System Architecture..........................................................................................................................3
Overview.......................................................................................................................................3
FTView SE System.......................................................................................................................4
FTView ME System.......................................................................................................................4
System Configuration.......................................................................................................................4
PI Model........................................................................................................................................4
TPIBK Configuration.....................................................................................................................5
PLC Configuration.........................................................................................................................7
PI Configuration..........................................................................................................................10
Editing Recipes...............................................................................................................................10
Downloading Recipes.....................................................................................................................14
Recipe Selection.........................................................................................................................14
Recipe Execution............................................................................................................................14
HMI..............................................................................................................................................14
Reports 19
Technical Support...........................................................................................................................20
Revision History..............................................................................................................................20

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 2
General
Overview
The purpose of this document is to provide users with a ‘How To’ step-by-step guide in creating,
modifying, and running a recipe using the TPI Batch Kernel.

Why did we decide to develop this application? We saw that the current PI batch engine had
issues with stability and ease of use in recipe building. We wanted something that would execute
recipes reliably, and give us a way of storing multiple recipes and having batch reports.

System Architecture
Overview
The TPI Batch Kernel is designed to replace the PI Batch Kernel provided with Tetra PlantMaster
installations. The design must be used with a PI installation. The batch kernel is executed in the
PLC, and the recipes are stored in new tables in the TPMDB.

The batch kernel is located in a PLC, and if multiple PLCs are required AOIs are included to allow
communications between the main PLC and the other PLCs.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 3
HMI DB Server

Recipe PI TPMDB

Recipe
Control Edit Batch Log
Storage

PLC

Units

TPIBK TPIBK
Engine Buffer
Figure 1 System Structure
FTView SE System
In a FTView SE system recipes are stored in the TPMDB. Recipes are editable in the HMI
application. Template screens have been provided for FTView SE. Recipe editing is done use
VBA forms that are stored in the button bar. These forms are also used to download recipes from
TPMDB to the PLC. The Excel spreadsheet “TPIBK Recipe Tool” can also be used to edit and
download recipes.

FTView ME System
In a FTView ME system the recipes cannot be edited in the HMI. The Excel spreadsheet “TPIBK
Recipe Tool” must be used. The initial release does not contain template screens.

System Configuration
PI Model
The PI model must be configured as normal for PI with batch execution. One exception is the
batch parameter tags. In a normal PI setup the tags names that are used are based on OPC tag
naming conventions. In this case the tags that should be entered are program scope tags.

These tags will be used to generate PLC code that will be imported into the Parameters routine of
the Recipe Controller program.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 4
TPIBK Configuration
Excel Tool Setup
The Setup sheet of the Excel spreadsheet “TPIBK Recipe Tool” is used to configure how the
spreadsheet interacts with the TPMDB and the PLC.

Figure 2 Setup Example shows an example a setup for the spreadsheet. The spreadsheet is
dependent on OPC in order to communicate with the PLC. The OPC server that is part of RSLinx
can be used if on a local machine.

Figure 2 Setup Example

Train Configuration
The train configuration is very similar to that done in PI. The information is stored in the same
table of PI, but there is a difference in some of the data. Do not use the train editor that is
provided with the PI Navigator. Train configuration must be done after the PI model is completed.

Select the train at the top, and then select the different process classes to see which units are
selected for that train in that class. Use the “<” and “>” buttons to add and remove units to the
selected list.

More than one unit from a class may be selected. If so then a number designation will be added
to each unit in the selected list.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 5
Figure 3 Train Editor

Parameters Linking
The parameters defined in the PI model are linked to the batch kernel by using the Parameter
Link form shown in Figure 4 Parameter Linking. Instead of using OPC to download the
parameters as each step in the recipe executes all the parameters are downloaded to the steps
when the recipe is downloaded. There are several named links i.e. Speed, Level, Flow, etc.
There are also several user defined links of various data types such as real, double integer, and
boolean. The available parameters are filtered by the data type that is used in the PI model.

The form is used to provide the map that the download engine uses to put the parameters in the
correct link in each step. The tags in the PI model which normally point to OPC tag names
should instead be configured as if they are controller scope tags in the PLC. The Export sheet of
the Excel spreadsheet “TPIBK Recipe Tool” can be use to generate the logic that goes into the
Parameters routine of the recipe controller program. An example of this logic is shown in Figure
5 Parameter Sample.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 6
Figure 4 Parameter Linking

Figure 5 Parameter Sample

PLC Configuration
Controllogix import files are provided in the PLC Files directory. They need to be imported into the target
PLC according to Figure 6 PLC Layout.
Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 7
Tasks Task91_TimeInBuffer and Taskx0_Recipe will need to be created manually, and an Event function
needs to be added to the ExecutionCoord routine for the Taskx0_Recipe.

The routines Parameters, Units, Phases need to be imported from the Excel spreadsheet “TPIBK Recipe
Tool”. Example of unit and phase logic are shown in Figure 8 Unit Example and Figure 9 Phase
Example. The AOI inputs QA_Status and Empty_Status need to be updated manually if the unit will
have any of the allocation interlocks QA Status or Empty. If not used then leave value as 0. Typically
only used on batch tanks. There are three allocation interlocks in the recipe based on QA Status, Empty,
and Material Check. They will use these inputs to interlock the allocation.

The routine Transitions will need to have logic developed for each of the transitions defined and mapped
in the recipe and PI. The recipe controller can have up to 32 transitions.

Figure 6 PLC Layout

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 8
Figure 7 Recipe Controller Layout

Figure 8 Unit Example

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 9
Figure 9 Phase Example

PI Configuration
As part of the PI configuration disable the batch menu option in the Navigator menu. Nothing related to
recipes or batches should be used in the PI Navigator. This includes the recipe train editor. The version
of the train editor supplied in the Excel spreadsheet “TPIBK Recipe Tool” should be used only.

Editing Recipes
Recipes can be edited using either the Excel spreadsheet “TPIBK Recipe Tool” or the HMI. The forms
are VBA and the code can be copied from either platform with some minor changes.

Recipe Search
Opening the Recipe Search shown in Figure 10 Recipe Search form provides a list of recipes. This form
is similar to the one used in PI. The list can be filtered using the Recipe Status selection and the Recipe
ID text box. Recipe Status can be filtered by Registered, Approved, Valid, and Obsolete. The Recipe ID
filter will return recipes that match exactly what is in the text box. To list more than one recipe use the “*”
character as a wildcard.

From this form new blank recipes can be created, existing recipes can be edited, and existing recipes
can be copied using the Save As function.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 10
Figure 10 Recipe Search

Recipe New\Edit
Clicking on New or Edit will open the detailed recipe form shown in Figure 11 Recipe Details. This form
is similar to the one used in PI. Here the basic details of a recipe can be changed i.e. final product, batch
size and required equipment.

Before the equipment requirements can be set, the recipe needs to be saved. The equipment
requirements have a list of available process classes that can be selected. Using the arrow buttons the
classes can be added\removed from the selected list. More than one instance of a class can be added
to the selected list. When this is done, numbers will be added to each class. From the selected list one
class needs to be added to the main batch class. This is usually the batch tank.

Once the recipe is ready to use, it must first be validated. Clicking the Validate button will run a series of
checks on the recipe. If it finds the recipe to be valid the status of the recipe will be changed to Valid. If
a recipe is valid the Approve button is enabled. Approving a recipe makes the recipe visible to be
downloaded. To remove an approved recipe from the download list use the Validate button.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 11
Figure 11 Recipe Details

Recipe Procedure
Clicking on the Procedure button of the Recipe details form will open the Recipe Procedure form. This is
where the steps of the recipe are defined. Each step has a defined action. These actions are shown in
Table 1 Step Descriptions. Depending on the type of step selected different pieces of information needs
to be entered.

Every step has a number. This number is used to order the steps in the correct order. If a step needs to
be moved in the sequence, the step number needs to be changed accordingly. The process class list is
enabled for certain step types. It is populated based on what classes were selected on the recipe form.

When an allocate step is used there are three options to select: Material Check, Not QA Approved, and
Level. These will cause the unit to not allocate until the selected conditions are met.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 12
Figure 12 Recipe Procedure

Table 1 Step Descriptions


ID Name Description
1 Run Phase Start a phase and remain in step until phase complete
2 Start Phase Start a phase and continue on to next step
Send a finalize command to a phase and wait until
3 End Phase complete
4 Check Phase Check the status of a phase. If complete then continue
Download
5 Parameters Download parameters to a phase
6 Transition Wait in step until transition logic in PLC is met
7 Operator Prompt operator with message and wait until operator

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 13
Confirmation confirms
Lock a unit for use by batch. If unit is in use then wait until
8 Allocate Unit available
9 Deallocate Unit Unlock a unit for use by batch
10 Jump Jump to recipe step if condition is true

Downloading Recipes
Recipe Selection
Select the Download button in the HMI or Excel spreadsheet. Using the form shown in Figure 13 Recipe
Download allows the user to select a recipe, apply a train, set the batch size and download to the recipe
controller in the PLC. The recipe status will be shown in the textbox. Once a valid recipe has been
downloaded this recipe can be executed multiple times. The batch ID is managed by the PLC. Each
execution of a recipe will increment the batch ID by one. The recipe parameters and setpoints can be
modified while in the PLC. These new values will be logged to the reports. The overall batch size and
the material names cannot be modified once downloaded.

Figure 13 Recipe Download

Recipe Execution
HMI
The recipe is controlled by the operator from the HMI. The faceplate looks similar to Figure 14 Batch
Controller Interface. This interface can contain up to ten batch controllers. On a typical project there
may be one controller per batch tank. As the batch controller is a phase it has the same interface as
most other phases with phase control, interlocks, and run faults. Each line that represents a controller
displays the current selected train and recipe.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 14
Figure 14 Batch Controller Interface

Selecting the phase representing the controller and selecting the “Conditions” tab provides access to the
interlocks and run faults for the batch controller only.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 15
Figure 15 Interlocks and Run Faults

Selecting the parameters tab, displays a summary status of the batch controller. It contains batch
controller information shown in Figure 16 Batch Summary such as:
 Step status – indication of what step of the sequence the batch controller phase is currently in
 Step time – indication of the time remaining in the step
 Batch # - the current batch number of the batch controller. This number resides in the PLC and is
auto incremented by each batch controller
 Recipe – the name of the recipe that has been downloaded to the batch controller
 Train – the train that was selected during the download
 Batch Size – the batch size that was downloaded, and the recipe was scaled too.
 Download – button used to download a new recipe
 Batch Step Data – displays window similar to Figure 17 Batch Details
 Batch Step – current step of the batch
 Operator Prompt – button visible if the active step of the recipe is an operator prompt.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 16
Figure 16 Batch Summary

The batch step data displays information about the currently active recipe in the controller. It displays the
same information as the summary and includes the batch size, recipe material, and recipe version.

The batch step data also includes animated status on each step of the recipe.
 Step State – displays the current state of each step. This could include running, held, or finished
 Step Number – the descriptive step number of the step in the recipe
 Step Description – a text description, describing the function of the step
 Step Type – an icon indicating the type of step, see Table 1 Step Descriptions
 Parameter Button – button that is used to access step parameters if they exist example shown in
Figure 18 Parameter Change
 Material ID and Name – displays the material ID and name if the step is either a production or
manual addition.

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 17
Figure 17 Batch Details

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 18
Figure 18 Parameter Change

Reports
The reports work as normal in a PI installation. Stored procedures have been included that translate the
new batch kernel bus and insert the data into the existing batch tables in TPMDB. The only difference
would be in the Recipe Execution section of the report. As shown Figure 19 Batch Report the steps of
the recipe and the download of the parameters are show.

Figure 19 Batch Report

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 19
Technical Support
For support on recipe configuration or execution please contact Tetra Pak Service at
(800)952-6859 to be put in touch with an engineer.

Revision History

Revision 1.0 (8/11/2016; Carey Warren):


- Initial Release

Tetra Pak Inc. 101 Corporate Woods Parkway, Vernon Hills IL +1 847 955-6000 www.tetrapak.com 20

You might also like