RecipesΒΆ

Introduction

In UNIQO, recipe management is done through one or more Recipe schema objects.

A Recipe Schema object defines a set of variables, or ingredients, with which it is possible to configure different recipes, i.e. different sets of values for the same set of variables.

../../_images/82c2e0694f929e6ba6573b4bfceb31faa0f41065.svg

This object can be used to define the values of a configuration and save them to be reapplied as needed. It can be useful, for example, to restore the initial settings of the machine following changes that compromise its operation.

Ingredients of a Recipe Schema

To define the ingredients in a Recipe Schema, a destination node must be set at design time that contains, among all the child nodes, the variables of interest. It can be any node of the project and the choice depends on the structure of the project and its complexity. For example, the destination node can be the Model folder, an object inside the Model folder, or a node that contains variables of one or more PLCs (see Import tags from the PLCs).

Hint

to define variables contained in different nodes of a complex project as ingredients of a Recipe Schema, create a dedicated object in the Model folder and add variables inside it, then create a dynamic link between the variables and desired ingredients. In fact, if the object is selected as destination node, the selection of the Recipe Schema ingredients is more intuitive, as only the variables referenced in the object are shown.

Recipe management at runtime

To design recipe management at runtime, the Recipes Editor widget included in Q Studio can be used.

The widget can be used as provided (see Recipes Editor) or some of its components can be reused to design a customized solution (see Customize recipe management).

Edit model

When the user creates, edits or loads a recipe from the database at runtime, an Edit model node is automatically created in the project root node that can be referred to at design time. The Edit model node contains a temporary copy of the created/edited/loaded recipe data, until it is saved, deleted or sent to the PLC.

Important

if execution of the Q Application is stopped, the Edit model node and the data it contains are deleted.

To design custom recipe management, the mechanisms related to the Edit model node must be known. On the other hand in the Recipes Editor widget, the references to the Edit model node are already correctly set to guarantee all features at runtime.