Professional Documents
Culture Documents
Introduction Vijeo Designer software provides a recipe management tool that is available
in Magelis HMI during runtime. This tool can support storage and control for
up to 8192 individual recipes.
During production an operator may need to quickly find and access a
specific recipe. A custom recipe name search script can help locate an
exact recipe or prompt the user when a recipe name has not been found.
This document shows a typical configuration for creating initial recipes, as
well as a method for implementing a custom recipe name search tool which
can be added to any Vijeo Designer project.
Implementing a Recipe Name 1. Start a new project or open an existing project in Vijeo Designer:
Search Tool Figure 1: Start or Open a Vijeo Designer Project
2. Navigate to Recipes within the Vijeo project tree to add new Recipe
Groups and Individual Recipes:
Figure 2: Navigate to Recipes
4. Enter the recipe label name by clicking in the Label field, then entering a
unique recipe name:
NOTE: Duplicate recipe labels are not allowed.
7. Add the additional recipes with their ingredients to the existing recipe
group as needed.
NOTE: A maximum of 256 recipes is allowed in each recipe group.
9. Add a new graphic panel to the project or open an existing panel to add
recipe parts from the Toolchest library:
a. Click on the Toolchest icon from the Menu bar or go to Tools >
Toolchest to access a Toolchest library browser.
b. Navigate to a Recipe folder and locate the RG_RSelection object.
c. Select the RG_RSelection object and drag it into the graphical panel
area.
Figure 9: Add Recipe Parts from the Toolchest Library
10. From the Main Menu bar, go to Draw > Data Display:
a. Select a String Display object and add it to the graphic panel.
b. Double-click on String Display to edit its settings:
Enable Input Mode: Checked
Display Length: 40
Style: 00026
Plate Color: White (This color makes it possible for the operator to
enter a recipe search name during runtime)
Figure 10: Edit String Display Settings
NumofBytes: 40
Figure 14: NumofBytes
11. From the Main Menu bar go to Draw > Switch and add a recipe search
name push button to the graphic display. Double-click on it to edit the
push button's style, color, and text and to assign an operation which
executes when the button is pressed:
Figure 15: Double-Click on the Button to Edit It
14. From the Main Menu bar, go to Draw > Data Display:
a. Select an additional String Display object and add it to the graphic
panel.
b. Double-click on String Display to edit its settings:
Display Length: 44
Style: 000000 (This shows the recipe search name result)
Figure 18: Add a String Display Object
15. Create a msgResult variable and assign it to the String Display object.
A msgResult variable has the following properties:
Data Type: String
Data Source: Internal
NumOfBytes: 44
Figure 19: String Display Settings
16. Create additional variables which will be used in recipe search name
script.
a. Navigate to Variables within Vijeo project tree, right-click on
Variables to select a New Variable, and then select Variable from
the pull-down menu.
Figure 20: In the Vijeo Project Tree, Right-click on Variables
c. Select Script from the Operation pull-down menu and click on New
Script button:
Figure 25: Select Script from the Operation Menu, then Click on
New Script
d. When the Script Editor window opens, paste the Recipe Search
Name Script (page 12) text inside the window.
NOTE: This script is for demonstration purposes only.
Refer to section 18.1, Programming with Scripts, and 17.3.5, Recipe
Control Variables, available from the Vijeo Designer Help menu, for
more details.
NOTE: The initial value of MAX_GROUP_NR script variable can be
modified to represent the actual number of recipe groups configured
in the Vijeo project.
Figure 26: Paste Search Name Script in the Script Editor Window
switch (RecipeSearchCase.getIntValue()){
case 0: //initialize
RecipeFound.write(false); //set the flag
_RecipeControlDefault.RecipeGroupNumber.write(1);
_RecipeControlDefault.RecipeNumber.write(1);
msgResult.write("Searching...");
RecipeSearchCase.write(10);
break;
18. Validate the project and check for errors (Main Menu > Built > Validate
All):
Figure 29: Validate, Check for Errors
19. Save the Vijeo project and download it to the target HMI:
Figure 30: Download Project to the HMI
20. After successfully downloading the project to the HMI and restarting the
device, navigate to the panel with the Recipe Name Search tool, click in
the text box, and enter a search name:
Figure 31: Enter a Search Name
Enter Product D for the search name and press the Enter key on the
HMI on-screen keyboard (search name is not case sensitive):
Press the search button and wait for the result to be displayed:
14