2 readandsaverecipeas, Readandsaverecipeas, Appendix – Lenze PLC Designer ApplicationTemplate (PLC Designer R3-x) User Manual

Page 147

Advertising
background image

Lenze · ApplicationTemplate · 1.3 EN - 04/2013

147

Appendix

Recipe manager

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

12.4.5.2

ReadAndSaveRecipeAs

...transfers the current PLC values to the recipe/file specified.

[12-8] Program example: Transfer the current PLC values to the recipe/file "Recipe_2011_10_01.txtrecipe"/"Recipe2".

Initial situation - MM_Par_Modul1 recipe definition:

Result:

VAR

_RecipeManCommands : RecipeManCommands;

_stRecipeDef : STRING := 'MM_Par_Modul1';

[name of the recipe definition]

_stRecipe2 : STRING := 'Recipe2';

[name of the recipe]

_stFileName1: STRING := 'Recipe_2011_10_01.txtrecipe';

END_VAR

MM_Par.scModule1.lrVel := 22;

MM_Par.scModule1.lrAcc := 12;

MM_Par.scModule1.lrDec := 13;

_RecipeManCommands.ReadAndSaveRecipeAs(_stRecipeDef,_stRecipe2,_stFileName1);

• Column

shows the current PLC values.

• Column

shows the recipe ("Recipe1")

• The recipe/file

"Recipe_2011_10_01.txtrecipe" is created

on the controller.

[12-9] Sample output file/recipe

"MM_Par_Modul1/"Recipe2"

• The current PLC values are visible in the

recipe/file.

Advertising