Manage recipes at runtime
Use the recipes editor widget to store a new recipe, to delete an existing recipe, or to apply a recipe on the controller.
When you create, edit, or load a recipe from the database at runtime, an alias to the
Edit model
node is automatically created in the root project node,
under the ListView object. Until the node is saved, deleted, or sent to the controller, it
contains a temporary copy of the created, edited, or loaded recipe data. For more information
about ListView behavior and configuration, see ListView and Configure a ListView.
IMPORTANT:
If
the
FTOptixApplication
execution stops, the Edit model
node and its data are deleted.- To manage recipes at runtime
- To refresh the list of recipes, selectRefresh List.
- To create a new recipe:
- SelectCreate new recipe
- In the parameters list panel, configure the recipe values and name.
- SelectSave.
The new recipe displays in the recipes list. - To create a new recipe from a controller, selectCreate a new recipe from target.
- To activate a recipe on the controller:
- From the list, select the recipe you want to activate.
- SelectApply.
- To rename a recipe:
- In theMenucolumn select.

- In the parameters list panel, rename the recipe and selectSave.
- To duplicate a recipe, in theMenucolumn select, and select
Duplicate.The duplicate recipe displays in the recipe list. - To delete a recipe, in theMenucolumn select, and select
Delete.
SQL queries examples
Use these examples to query recipe data and
Edit model
data at runtime.Recipe list query
This query lists recipes for a specific recipe schema.
SELECT * FROM Recipes WHERE RecipeSchemaName = 'DemoRecipeSchema' ORDER BY Name
Recipe metadata query
This query lists recipes and their metadata for a specific recipe schema.
SELECT R.*, M.* FROM Recipes AS R LEFT JOIN RecipeMetadata_DemoRecipeSchema AS M ON R.Id = M.RecipeId WHERE R.RecipeSchemaName = 'DemoRecipeSchema' ORDER BY R.Name
Edit model query
This query lists items and data items from the
Edit model
for a specific recipe.SELECT * FROM EditModel WHERE RecipeName = {#name:sql_literal} AND RecipeVersion = {#version:sql_literal} ORDER BY DisplayName
Edit model query filtered by type
This query filters
Edit model
items by type display name.SELECT * FROM EditModel WHERE RecipeName = {#name:sql_literal} AND RecipeVersion = {#version:sql_literal} AND TypeDisplayName = {#type_name:sql_literal} ORDER BY DisplayName
EditModel store table
The
Edit model
data includes item identifiers, relative browse paths, type identifiers, display names, type display names, and a DataItems
array.ItemId | ItemRelativeBrowsePath | TypeId | DisplayName | TypeDisplayName | DataItems |
|---|---|---|---|---|---|
Motor1_id | Machine/Motors/Motor1 | MotorType_id | Motor1 | Motor | data_items_array |
Motor2_id | Machine/Motors/Motor2 | MotorType_id | Motor2 | Motor | data_items_array |
Tank1_id | Machine/Tanks/Tank1 | TankType_id | Tank1 | Tank | data_items_array |
DataItems JSON sample
DataItems
is an array of JSON objects, as shown in this sample.[ { "RelativeBrowsePath": ["TargetSpeed"], "ElementAccess": null, "Value": 1500.0, "DataTypeId": "Float", "ActualDataTypeID": "Float" }, { "RelativeBrowsePath": ["TorqueLimit"], "ElementAccess": null, "Value": 15.5, "DataTypeId": "Float", "ActualDataTypeID": "Float" } ]
Provide Feedback