Temporary recipes
The concept of using a temporary recipe is to have a single recipe that is always active on the control. Any latest changes are stored in this active temporary recipe until the user explicitly calls the SaveActiveRecipe
function to save the recipe. This gives the user an opportunity to reload the original recipe to undo any latest changes.
Since the active temporary changes are stored in a recipe, those changes are available on the controller even after a restart.
Different recipe operations performed in this configuration are explained below.
Recipe Structure: One autogenerated recipe ActRcpData
will function as an active recipe, and there can be several recipes defined by users.
![Temporary recipes 1:](Images/png/13187522699__Web.png)
Activating a recipe: The function LoadProductRecipe
needs to be called to load and activate a recipe. The recipe will first copy all the recipe information into the temporary recipe ActRcpData
and after that this temporary recipe will be activated.
![Temporary recipes 2:](Images/png/13187516939__Web.png)
New changes by the user: All the new changes made on the controls provided in Beckhoff.TwinCAT.HMI.Plastic package will be automatically saved in the active temporary recipe without affecting the original recipe.
![Temporary recipes 3:](Images/png/13187520779__Web.png)
Saving a recipe: By calling the SaveActiveRecipe
function with the target name same as the last activated recipe name the user can save all the content from active temporary recipe into its original recipe.
![Temporary recipes 4:](Images/png/13187526539__Web.png)
Undoing current changes and reloading original recipe: By calling LoadProductRecipe
with the name of the recipe that was last activated the user can overwrite the active temporary recipe with undoing all the unsaved changes.
![Temporary recipes 5:](Images/png/13187524619__Web.png)
Saving current changes as a new recipe: Using SaveActiveRecipe
with a new target recipe name all the active temporary recipe will be saved as a new recipe, without affecting the original recipe that was loaded before.
![Temporary recipes 6:](Images/png/13187528459__Web.png)