Intouchrecipe
Intouchrecipe
Intouchrecipe
Recipe Manager
User’s Guide
Revision A
December, 1997
Wonderware Corporation
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.
Contents
Chapter 1 - Introduction ............................................................... 1-1
The Recipe Manager Program ...................................................................................... 1-2
Recipe Template Files ........................................................................................... 1-2
Running Recipe Manager ............................................................................................. 1-3
Recipe Template Common Features...................................................................... 1-4
About this Manual ........................................................................................................ 1-5
Technical Support......................................................................................................... 1-6
Viewing Your FactorySuite License............................................................................. 1-6
C H A P T E R 1
Introduction
In the manufacturing world a recipe is used to describe many different things. For
example, a bakery may have a basic cookie dough recipe that lists all of the ingredients
required to make plain cookies and all of the optional ingredients such as nuts, fruit,
chocolate chips, and so on, that can be added to the basic recipe to make various kinds
of cookies. In a steel mill, a recipe might be a collection of machine setup parameters.
For batch processors, a recipe can be used to describe the various steps in the batch
process. InTouch Recipe Manager, combined with the basic InTouch QuickScript
functions, can handle all of these situations.
The Wonderware Recipe Manager add-on product consists of two components; Recipe
Manager and a set of recipe functions. Recipe Manager is a separate executable program
that is used to create recipe template files. The recipe functions are used in InTouch
QuickScripts to access the recipe template files. The recipe functions allow InTouch to
select, load, modify, create and delete the recipes contained in the recipe template files.
Contents
n The Recipe Manager Program
n Running Recipe Manager
n About this Manual
n Technical Support
n Viewing Your FactorySuite License
1-2 Chapter 1
Template Definition
You will use the Template Definition to define all ingredients that are contained in a
recipe. A data type is required for each recipe ingredient. The data type can be Analog,
Discrete or Message. The ingredient names are arbitrary and do not have to be InTouch
tagnames.
Unit Definition
You will use the Unit Definition template to associate InTouch tagnames with recipe
ingredients. Many different loading definitions can be created. These definitions are
called units. The RecipeLoad() function uses these definitions to load specific instances
of the recipe to the associated InTouch tagnames. A Unit Definition may consist of all
ingredient names or just a subset.
Note The tagnames defined for the unit may be Memory types that can be viewed
and/or edited in an InTouch window or I/O types that can be loaded directly to PLCs.
Each recipe template file is saved in the .CSV (Comma Separated Variable) file format.
Therefore, you can create, open or edit your recipe template definitions in any
application that supports the .CSV format. For example, Notepad or Microsoft Excel.
Recipe Definition
You will use the Recipe Definition template to define Recipe Names for each instance of
a recipe and, the quantity required for each ingredient used in the instance. Recipe
instances can be modified, created or deleted in runtime through the recipe functions.
Introduction 1-3
Input Box
Select/Auto-Size Column
Select/Auto-Size Template
Select Row
1-4 Chapter 1
Assumptions
This manual assumes you are:
• Familiar with the Windows 95 and/or Windows NT operating system working
environment.
• Knowledgeable of how to use of a mouse, Windows menus, select options, and
accessing online Help.
• Experienced with a programming or macro language. For best results, you should
have an understanding of programming concepts such as variables, statements,
functions and methods.
1-6 Chapter 1
Technical Support
Wonderware Technical Support offers a variety of support options to answer any
questions on Wonderware products and their implementation.
Prior to contacting technical support, please refer to the relevant chapter(s) in your
User's Guide for a possible solution to any problem you may have with using Recipe
Manager. If you find it necessary to contact technical support for assistance, please have
the following information available:
1. Your software serial number.
2. The version of InTouch you are running.
3. The type and version of the operating system you are using. For example, Microsoft
Windows NT Version 4.0 workstation.
4. The exact wording of system error messages encountered.
5. Any relevant output listing from the Wonderware Logger, the Microsoft Diagnostic
utility (MSD), or any other diagnostic applications.
6. Details of the attempts you made to solve the problem(s) and your results.
7. Details of how to recreate the problem.
8. If known, the Wonderware Technical Support case number assigned to your
problem (if this is an on-going problem).
& For more information on Technical Support, see your online FactorySuite System
Administrator's Guide.
C H A P T E R 2
Recipe Manager uses three different templates to create recipes. You can configure your
preferences for the templates. This chapter describes the procedures you will use to
configure your recipe template preferences and the procedures you will use to create
recipes.
Contents
n Configuring the Recipe Template Preferences
n Creating a New Recipe Template File
n Editing a Recipe Template File
2-2 Chapter 2
2. In the Maximum Items box, type the number of item names you want to allow in
your Template Definition template.
3. In the Maximum Units box, type the number of units you want to allow in your
Unit Definition template.
4. In the Maximum Recipes box, type the number recipe names you want to allow in
your Recipe Definition template.
8 The above three entries may have a value up to 9999. However, the larger the
number the more it will impact your system response time.
5. Click OK.
Important The values you set in the Preferences dialog box are applied to all
recipe template files that you create. When you modify these values, all your
existing recipe template files are also modified.
Ø To turn on the Auto Down on [Enter] key functionality:
On the Options menu, click Auto Down on [Enter].
8 The Auto Down on [Enter] option simplifies the data entry process in the
recipe templates. When you turn this option on, after each entry in your
template, you can press the ENTER key to move the cursor down to the next cell
in that same column.
Ø To turn off the Auto Down on [Enter] key functionality:
On the Options menu, click Auto Down on [Enter] again.
Using Recipe Manager 2-3
8 If you right click the text input, a menu will appear displaying the commands
that you can apply to the selected text.
2. Click the Template Definition template's title bar to activate it and bring it to the
front of the window.
3. In the Item Name column cells, type an arbitrary name for each recipe ingredient.
8 You can only type one ingredient per cell. If your ENTER key has been set to
Auto down on [Enter], then press the ENTER key after each ingredient is typed
to move down to the next cell.
4. In the Item Type column cells, type a valid item type for the respective recipe
ingredient.
8 The valid item types are; Analog, Discrete or Message. You need only to type
the first letter of the type in the cell then, press ENTER. Recipe Manager will
automatically fill the rest in for you.
2-4 Chapter 2
2. In the Unit Names>>> row, in the cell below each unit column heading (Unit 1,
Unit 2, and so on), type the name for each unit that you want to define.
8 You can use the scroll bars on the template to scroll through the recipe data.
The Item Name and Item Type columns do not move. Therefore, the master
recipe information remains visible as recipe instances are added.
3. In the Unit # column cells, type the InTouch tagname for each respective recipe
ingredient in the Item Name column.
8 If WindowMaker is running, double-click the cell to display the Tag Browser.
WindowMaker MUST be running in order to access the Tag Browser.
4. Double-click the desired tagname from the Tag Browser to insert it into the cell or
select it, and then click OK.
8 The tagnames defined for a unit can be Memory type tagnames that can be
viewed or edited in an InTouch window or, they can be DDE type tagnames
that are loaded directly into PLCs.
& For more information on the Tag Browser, see your InTouch User's Guide.
5. Repeat this procedure for each Unit Name.
Note When you use the RecipeLoad() function in an InTouch QuickScript, you
must specify a Recipe Name and a Unit Name. The values contained in that Recipe
Name definition are then loaded into the tagnames specified in the Unit Name when
the QuickScript executes.
Using Recipe Manager 2-5
1. Click the Recipe Definition template's title bar to activate it and bring it to the front
of the window. If it is not accessible, use your Window menu option to select the
template.
8 The Recipe Definition template displays the Item Name and Item Type
information from the previously defined Template Definition template. For
example:
2. In the Recipe Names>>> row, in the cell below each recipe column heading
(Recipe 1, Recipe 2, and so on), type the name for each recipe that you want to
define.
8 You can use the scroll bars on the template to scroll through the recipe data.
The Item Name and Item Type columns do not move. Therefore, the master
recipe information remains visible as recipe instances are added.
3. In the Recipe # column cells, type the values for each respective recipe ingredient
in the Item Name column.
8 These values are loaded into the InTouch tagnames when the RecipeLoad()
function is executed in an InTouch QuickScript.
The InTouch recipe functions portion of this program reads and writes directly
to the recipe template file. Therefore, the Recipe Manager program does not
need to be running in order for the recipe functions to execute properly in
InTouch QuickScripts.
Important If the recipe template file is being used by InTouch, any new recipes
you create or any changes you make to existing recipes cannot be written to the
recipe template file. Recipe Manager only creates recipe template files. Once they
have been created, the Recipe Manager should be closed.
4. On the File menu, click Save to save your recipe template file.
2-6 Chapter 2
2. Locate and select the recipe .CSV file then, click Open or, double-click the file
name. The three recipe templates in the file will appear.
Ø To delete a recipe template file:
1. On the File menu, click Delete. The Delete a Recipe Template dialog box appears:
2. Locate and select the recipe .CSV file then, click Open or, double-click the file
name. A message box will appearing asking you to confirm the deletion.
Note Open recipe template files cannot be deleted.
Using Recipe Manager 2-7
2. On the Edit menu, click Clear. A message box will appear asking you to confirm
the clearing of the selected range of cells.
3. Click Yes. The data is now cleared from the selected range.
Ø To fill right, down, left or up:
These commands are used to copy data in a range of selected cells to an adjacent range
of selected cells.
1. Select the cell or the range of cells to be copied and then also select the adjacent
range of cells that you want to copy the data into. (Either to the left, right, above or
below).
8 The selected ranges must be the same size.
2. On the Edit menu, select the appropriate fill command. The data is copied to the
selected range of cells.
2-8 Chapter 2
3. On the Edit menu, point to Fill Right, the selected data will automatically fill to the
right.
8 If the new column that the data was copied to, is not big enough to accommodate
the largest entry, simply double-click on the column heading to change the width to
the longest entry.
Using Recipe Manager 2-9
Ø To insert a row :
You can insert rows in the Template Definition template.
1. Click the Item # to select the row in the Template Definition that you want to
insert a new row above.
2. On the Edit menu, click Insert. A new row will be inserted above the row you
selected. For example:
Note If the maximum values configured for the Recipe Manager Preferences have
been reached, this command will not be active. You must close the current template
file then, on the Options menu, click Preferences. The Preferences dialog box will
appear. Increase the numbers specified to add Items/Units/ Recipes to your recipe
template file.
When you modify the Preferences, the changes will be applied to all existing recipe
template files.
3. All subsequent rows will automatically be renumbered.
8 All insertions and deletions in the Template Definition will automatically be
reflected in the Recipe Definition and Unit Definition templates as well.
Note You cannot insert rows in either the Recipe Definition or Unit Definition
templates.
2-10 Chapter 2
Ø To insert a column :
You can inserts columns in the Recipe Definition or Unit Definition template.
1. Click the Unit # to select the column in the Template Definition that you want to
insert a new column next to.
2. On the Edit menu, click Insert. A new column will be inserted next to the column
you selected. For example:
3. On the Edit menu, click Insert. A new blank column will be inserted to the left of
the selected column. For example:
8 In this example, notice that the Mixer 1 data has now moved to the Unit 3
column and a blank column has been inserted as Unit 2.
Using Recipe Manager 2-11
Ø To delete a column:
You can delete columns from the Recipe Definition or Unit Definition templates.
1. Click the Unit # column heading to select the column that you want to delete. For
example:
2. On the Edit menu, click Delete. A confirmation message dialog box will appear
asking you to confirm the deletion.
3. Click Yes. The column is now deleted from the template.
8 In this example, when the Unit2 column is deleted, the Mixer 2 data in Unit 3
will move to the Unit 2 column.
Ø To delete a row:
You can delete rows from the Template Definition template.
1. Click the Item # row header to select the row that you want to delete. For example:
2. On the Edit menu, click Delete. A confirmation message dialog box will appear
asking you to confirm the deletion.
3. Click Yes. The row is now deleted from the template.
8 For example, in the above dialog, if the Item 1 row was deleted, the data in
Item 2 row would move to the Item 1 row.
2-12 Chapter 2
3-1
C H A P T E R 3
InTouch uses recipe functions to interact with your recipe template files. These
functions are an extension of the standard InTouch QuickScript functions and can be
used in any script. They allow you to select, modify, insert or delete records in your
existing recipe template file from your InTouch recipe application.
Contents
n Recipe Functions
n Recipe Arguments
n Using Recipe Functions
n Nesting Recipes
n Applying Security to Recipes
3-2 Chapter 3
Recipe Functions
This section lists each Recipe Function. The general format of the recipe functions is as
follows:
RecipeFunction(Argument1, Argument2,...,ArgumentN)
& For complete details on each Recipe function and examples of how you use each,
see your InTouch Reference Guide.
Function Description
RecipeDelete This function is used to delete currently defined Recipe
names from the specified recipe template file.
RecipeGetMessage This function is used to write an executed function's
error code to an analog tagname and the corresponding
error code message to a message tagname.
$ For more information on displaying error code
messages, see Chapter 4 - Troubleshooting Recipe
Functions.
RecipeLoad This function is used to load a specific recipe to a
specific unit of tagnames.
& For more information on tags, see the InTouch
User's Guide.
RecipeSave This function is used to save a newly created recipe or to
save changes made to an existing recipe to the specified
recipe template file.
RecipeSelectNextRecipe This function is used to select the next recipe name
currently defined in the recipe template file.
RecipeSelectPreviousRecipe This function is used to select the previous recipe name
currently defined in the recipe template file.
RecipeSelectRecipe This function is used to select a specific recipe name
currently defined in the recipe template file.
RecipeSelectUnit This function is used to select the unit of tagnames to
which the current recipe values will be loaded.
$ For more information on combining functions, see
"Combining Recipe Functions."
Using Recipe Functions 3-3
Recipe Arguments
The following describes the arguments required for each recipe function. When a
argument is entered in a script surrounded by quotation marks, for example,
"Argument1", that exact text will be used. If no quotation marks are used, Argument1 is
assumed to be a tagname and the system will access the InTouch tagname directory for
the value of the tagname, Argument1.
The arguments to the recipe functions will be one or more of the following:
Argument Description
FileName This argument is the name of the recipe template file that will
be acted upon by the function. The FileName can be a string
constant or an InTouch tagname that is a I/O or memory-type
tagname.
RecipeName This argument is the name of the specific recipe in the
designated recipe template file to be used by the function. The
RecipeLoad(), RecipeSave() and RecipeDelete() functions
require the user to provide the RecipeName. The
RecipeSelectRecipe() function returns a value to this
argument. The RecipeName can be a string constant or an
InTouch tagname that is a I/O or memory-type tagname.
UnitName This argument is the name of the specific unit in the designated
recipe template file that will be used by the function. The
RecipeLoad() function requires the user to provide the
UnitName. The RecipeSelectUnit() function returns a value
to this argument. The UnitName can be a string constant or an
InTouch tagname that is an I/O or Memory type tagname.
Number If a function has to fill an argument with characters, this field
sets the maximum string length returned to the argument. In
InTouch, string (message) tagnames have a maximum length
of 131 characters. Use 131 for this argument unless you have
reduced the maximum string length of the InTouch tagname.
This argument can be a constant or an InTouch analog
tagname.
3-4 Chapter 3
Nesting Recipes
Multiple recipe template files can be linked to one another (using InTouch
QuickScripts) to create complex applications. This is accomplished by creating recipe
template files that define an Ingredient Name that is associated with a message tagname
(in the Unit Name) to which another Recipe Name can be loaded. This capability allows
you to create master recipe template files that define such things as machine setup
parameters to be used by various recipes in different recipe files. Keeping this type of
information in one central file greatly reduces the time it takes to maintain and/or update
the data whenever it changes.
Using Recipe Functions 3-5
In the RECFILEA.CSV file sample below, the Item Name, Setup, has been defined as a
message type and the units contain the message tagname, Setup, for this item. Each
recipe contains a second recipe name (defined in a different recipe file) that is loaded
into the tagname Setup when the recipe is selected.
The Select a Recipe dialog box appears. Once you select a Recipe Name, it is returned
to the tagname RecipeName and the script continues executing.
IF SecurityLevel >= $AccessLevel THEN;
RecipeLoad("c:\recipe\machine.csv", "PLC1" "RecipeName");
ELSE Show "Access Denied";
ENDIF;
When this script executes, if your access level is equal to or greater than 7000, the
selected recipe's values would be loaded into PLC1 unit's tagnames. If not, the window
named Access Denied is displayed and the recipe is not loaded into PLC1.
4-1
C H A P T E R 4
This chapter explains how to troubleshoot Recipe applications using the Error Codes
returned by your Recipe function. A list of error codes are included and how to use the
RecipeGetMessage( function to display) the error code message number.
Contents
n Troubleshooting Functions
n Displaying Error Code Messages
4-2 Chapter 4
Troubleshooting Functions
To retrieve the error code of a Recipe Function, it must be equated to an InTouch analog
tagname.
Example:
ErrorCode = RecipeLoad(FileName, UnitName, RecipeName);
The RecipeLoad( function will ) set the value of the tagname ErrorCod to 0 ife it is
successful. If the RecipeLoad( fails, it will) set the analog tagname, ErrorCod , to thee
number for the specific error condition. The following is a listing of the possible Error
Codes and their corresponding error messages and descriptions:
C H A P T E R 5
The recipe template file is saved in the .CSV (Comma Separated Variable) format.
Therefore, it can be created and/or edited in any Windows program that supports the
.CSV format such as Microsoft Excel and Microsoft Notepad.
Contents
n Using Excel with a Recipe Template File
n Using Notepad with a Recipe Template File
5-2 Chapter 5
3. Locate and select the .CSV file then, click Open or, double-click the filename. The
.CSV will open:
Creating Recipes in Other Windows Applications 5-3
4. The entries must be made in the order shown above. All Unit Names must be
defined in the file before the Recipe Names. Once all the required data is entered,
the spreadsheet must be saved with the .CSV extension, for example , RECLIST.CSV.
5-4 Chapter 5
3. Locate and select the .CSV file then, click Open or, double-click the filename. The
.CSV will open. For example:
Note All Unit Names must be defined in the file before any Recipe Names are
defined.
4. Once the required data is entered, the file must be saved with the .CSV extension.
5-6 Chapter 5
I-1
Index
RecipeGetMessage, 3-2
. RecipeLoad, 3-2
RecipeSave, 3-2
.CSV, 5-1
RecipeSelectNextRecipe, 3-2
RecipeSelectPreviousRecipe, 3-2
A RecipeSelectRecipe, 3-2
About this Manual, 1-5 RecipeSelectUnit, 3-2
Applying Security to Recipes, 3-6
Arguments, 3-3 I
FileName, 3-3
Input Box, 1-4
Number, 3-3
inserting a column, 2-10
RecipeName, 3-3
inserting a row, 2-9
UnitName, 3-3
Item Name, 2-3,2-5
Item Type, 2-3,2-5
C
clear a range of cells, 2-7 M
Combining Recipe Functions, 3-4
Maximum Items, 2-2
Configuring preferences, 2-2
Maximum Recipes, 2-2
Configuring the Recipe Template Preferences, 2-2
Maximum Units, 2-2
create a new recipe file in Excel, 5-3
create a new recipe file in Notepad, 5-5
Creating a New Recipe Template File, 2-3
N
Creating Recipes in Other Windows Applications, 5-1 Nesting Recipes, 3-4
Notepad, 5-4
D Number, 3-3
defining a Recipe Definition, 2-5
defining a Template Definition, 2-3
O
defining a Unit Definition, 2-4 Online documentation, 1-5
delete a recipe template file, 2-6 open an existing recipe template, 2-6
deleting a column, 2-11
deleting a row, 2-11 P
E Preferences, 2-2
S
Security, 3-6
Select Row, 1-4
Select/Auto-Size Column, 1-4
Select/Auto-Size Template, 1-4
T
Tagname Browser, 2-4
Template Definition, 2-3
Template Definition Template, 1-2,2-3
Template Files, 1-2
Templates
Recipe Definition, 2-3,2-5
Template Definition, 2-3
Unit Definition, 2-3,2-4
Troubleshooting Functions, 4-2
Troubleshooting Recipe Functions, 4-1
U
Unit Definition, 2-3
Unit Definition Template, 1-2,2-4
UnitName, 3-3
Using Excel with Recipe, 5-2
Using Notepad, 5-4
Using Recipe Functions, 3-1,3-4
Using Recipe Manager, 2-1
V
Viewing Your FactorySuite License, 1-6
W
Wonderware Technical Support, 1-6