Command Load and Write Recipe

Symbol: Command Load and Write Recipe 1:

Function: The command loads a recipe from a file and writes the values to the variables in the controller.

Call: Recipes menu; context menu

Requirement: The PLC project is in online mode, and a recipe value is selected in the recipe definition.

After running the command, you are asked whether the values from the file should also be written to the recipe in the project, or only to the PLC. An update of the values in the recipe may necessitate an Online Change with the next login.

When you execute the command, TwinCAT overwrites the values of the selected recipe in the recipe definition. In addition, the values of variables in the controller are overwritten with these recipe values.

If you want to overwrite only individual recipe variables with new values, remove the values for the other variables before loading the recipe into the recipe file. Entries without value specification are not read, which means that these variables are unaffected by the update on the controller and in the project. The following is an example of the entries in a recipe file. When it is loaded, only MAIN.nVar1 is written with a new value (6).

MAIN.nVar1:=
MAIN.nVar2:=6
MAIN.nVar3:=
MAIN.sVar4:=
MAIN.wstVar5:=

For values of the REAL/LREAL data type, the hexadecimal value is also written to the recipe file in some cases. This is necessary so that the exact identical value is restored during the back conversion process. In this case, change the decimal value and delete the hexadecimal value.

See also: