Collapse
CollapsingX
  • - or -

Recipes overview


Recipes allow you to use a single project to inspect an entire family of related products. Each recipe configures the values of variables, step inputs, and platform configuration settings so that your flowchart can inspect a particular product variant. For other techniques to deal with multiple product variants, see the Strategies for inspecting product variants section in Chapter 54: Switching products to inspect.

Every project has at least one recipe. Individual recipes in a project can have different step inputs, status conditions, models, variables, color-samples, and other types of data. Recipes can be created and configured at both design-time and runtime, provided that the operator view has been set up to do so. For an example of recipe creation at runtime, see the Recipe template project, accessible from the Quick Start tab.

Recipes can be switched at runtime from the operator view, or when signaled by a PLC. Each recipe can be referenced by both a unique name and a unique ID.

All steps, variables and platform configuration settings that vary per recipe are persistent. This means that all modifications made to recipes at runtime will be saved and used the next time the project is run. Care must be taken when re-deploying your project to a runtime platform if you need to retain this persistent data. For more information see the Importing and synchronizing recipes from your runtime platform subsection of the Recipes at design-time section later in this chapter.

Best practices for working with recipes

The following hints will improve your workflow when using recipes:

  • Build and test as much of your flowchart as possible before creating additional recipes. This will save you from having to repair broken links in each recipe as a result of the structural changes which are common early in a project's development.

  • Once you are ready to create additional recipes, do not start by creating all of the recipes that you will need at once. Build and test a second recipe first. This will usually reveal any further changes that must be made to your flowchart. Once you have 2 fully functional recipes, creating your remaining recipes should be a much simpler process.

  • Whenever you create a new recipe, you will start by cloning a existing recipe. You should always base your new recipe on the recipe that requires the fewest changes.

  • If possible, keep the same model and feature names between recipes. This ensures that any links from steps which do not vary between recipes will remain valid from one recipe to the next.

  • The main inspection loop of your flowchart should typically not have any recipe-related steps, such as the LoadRecipe step.

  • If you know the recipe name and you want to get the recipe ID, use the RECIPEIDFROMNAME function. If you know the recipe ID and you want to get the recipe name, use the RECIPENAMEFROMID function.