Share this

PLC formulation usage process

2026-04-06 02:42:36 · · #1

Meaning of recipe and recipe manager

A formula can be defined as a set of parameter values ​​that provide the information needed to produce a product and control the production process.

The recipe manager is used to process one or more recipes, including a list of variables and one or more sets of values ​​for those variables.

In PLC programming, users can save recipes to files or write recipe files to the controller, thereby enabling the setting and monitoring of PLC control parameters. This allows for the automatic adjustment of equipment parameters according to different needs and conditions during production. It can also be used for power-off retention, enabling the backup of control parameters even when power is lost.

For example, a structure array can be created to represent 10 recipes [1…10]. The structure members include flour, water, and sugar, each corresponding to different parameters (recipes). These are combined to form different recipes, each with a different ID (recipe name), such as: dumplings/steamed buns/bread, etc. When needed, the PLC can identify the required structure from recipe [1…10] based on its ID.

01. Recipe Function Usage Steps

Add Recipe Manager

Users can add recipes through the Recipe Manager. Right-click "Application" in the device navigation tree, select "Add Object" → "Recipe Manager…". Enter the recipe manager name in the pop-up dialog box, and then click the "Open" button.

Add a recipe manager. After clicking "Open", the recipe manager configuration interface will pop up.

◆ Storage: Includes storage type, file path, file extension, and recipe variable restrictions.

◆ General: Some settings for saving recipes, loading recipes, and reading/writing recipes.

Parameter configuration

After configuring the page, add a new recipe definition by right-clicking "Recipe Manager" in the device navigation tree and selecting "Add Object" → "Recipe Definition...".

Users can also define custom recipe names.

Set recipe values

After clicking to open, the added recipe page is shown in the image below. Users can right-click and select "Add New Recipe" to configure different recipe values, or select a recipe value (such as Recipe 1) to delete, load, or save the recipe.

Set a name for the new recipe

In addition to editing recipe files directly in the LeadSys interface, users can also perform operations such as creating (CreateRecipe), deleting (DeleteRecipe), and loading (LoadRecipe) recipes through the "Recipe Management" library.

◆Adding a library: Double-click “Library Manager” under the device tree, then select “Add Library” in the “Library Manager” interface, and click “Advanced” in the pop-up window. Then enter the library name “Recipe Management” and click OK to add the library to our software (for common recipe instructions, please refer to “III. Recipe Instruction Instructions” below).

After adding the recipe, the user needs to define the variables that need to be used in the recipe in the program, and then insert the variables into the recipe.

Read and write recipes

After the variables are inserted, the user can fill in the parameters in Recipe 1 and Recipe 2. Click "Login and Run Program," then click "Write Recipe" in the recipe area to write Recipe 1 into the PLC.

Click to read the recipe and write the current value into recipe 2.

By following the steps above, users can flexibly set and use various formulas, ensuring the accuracy and consistency of configuration parameters. This reduces the error rate and improves product quality and production efficiency.

02. Formula Instructions

RecipeManCommands_0.readRecipe(RecipeDefinitionName:= Recipes_1, RecipeName:=); (Reads the current PLC value into the recipe)

RecipeManCommands_0.WriteRecipe(RecipeDefinitionName:= Recipes_1, RecipeName);

Write the recipe into a PLC variable

RecipeManCommands_0.SaveRecipe (RecipeDefinitionName:= Recipes_1, RecipeName); (Saves the recipe to a standard recipe file. After modifying the recipe values, executing this command will overwrite the original standard recipe file.)

Notice:

Since commands such as creating and deleting recipes are methods under the RecipeManCommands function block, this function block needs to be instantiated first, as shown in the following figure:

03. Summary

Recipe management is a crucial function in PLC programming. It enables flexible management and application of control parameters in industrial production, thereby improving production efficiency and product quality. With the help of a recipe manager, we can more easily create, delete, load, and save recipes, achieving real-time process adjustments and switching, thus improving production efficiency and flexibility. It plays a vital role in actual production.

-END-

Read next

CATDOLL 135CM Vivian (TPE Body with Hard Silicone Head)

Height: 135cm Weight: 24.5kg Shoulder Width: 33cm Bust/Waist/Hip: 62/57/69cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22