You can apply recipe values on the controller to recipe definitions in the project, even if these definitions have been modified in the project.
Requirement: The “Recipe management in the PLC” is option is selected in the Recipe Manager.
-
Create a recipe definition
RecDef1
in the project, containing the variablesPLC_PRG.ivar
andPLC_PRG.bvar
. Insert a recipe “R1”: value forPLC_PRG.ivar
:33
; value forPLC_PRG.bvar
:TRUE
. -
Log in to the controller and download the application.
The recipe file
R1.RecDef1.txtrecipe
is saved to the default directory of the controller ($PlcLogic$). -
Logout and add another variable
PLC_PRG.dwvar
to the recipe definition in the project. -
Edit the recipe definition file
R1.RecDef1.txtrecipe
on the device by changing the value forPLC_PRG.ivar
from33
to34
.Moreover, add another recipe “R2” on the device. To do this, copy the
R1.RecDef1.txtrecipe
and rename it toR2.RecDef1.txtrecipe
. Then edit this file and change the recipe values:PLC_PRG.ivar
:1
,PLC_PRG.bvar
:FALSE
.Now two recipes “R1” and “R2” are available on the device. In the project, there is only “R1”, and it also contains other values than “R1” on the device.
-
Log in to the controller by means of an online change.
-
Click “Load Recipes from Device” from the context menu.
A dialog prompt notifies you that executing the command at the next login may trigger an online change, and that the recipes on the runtime system will overwrite the recipes of the current recipe definition.
-
Confirm that you want to continue.
A dialog prompt notifies you that the recipe for
PLC_PRG.dwvar
loaded on the device cannot yield a value from the controller. -
Confirm that you want to continue.
The value of
PLC_PRG.ivar
in recipe “R1” of the recipe definition in the project changes to34
. The recipe “R2” with the values1
andFALSE
is also listed in the recipe definition now.PLC_PRG.dwvar
remains in the recipe definition.