Join us today!
Notifications
Clear all
RecipeManCommands - SetRecipeValues Problem
How-to & Troubleshooting
1
Posts
1
Users
0
Reactions
25
Views
Topic starter
Nov 12, 2024 10:16 am
(@eengineer1689)
New Member
Joined: 2 weeks ago
I am having trouble with the SetRecipeValues method of the RecipeManCommands function block. I create a recipe file using the CreateRecipe method, then I attempt to set the values of this recipe using the SetRecipeValues method. The execution looks like this:
VAR RecipeCommands: RecipeManCommands; values: ARRAY[0..2] OF STRING[30]; END_VAR RecipeCommands.CreateRecipe(RecipeDefinitionName := 'DefinitionName', RecipeName := 'RecipeName' ); values[0] := 'val1' values[1] := INT_TO_STRING(1); values[2] := 'val2' RecipeCommands.SetRecipeValues(RecipeDefinitionName := 'DefinitionName', RecipeName := 'RecipeName', pStrings := ADR(values), iSize := 3, iStartIndex := 0 );
However, when I open the file and look at the values, nothing has changed. The really weird thing is that the method return value is 0 (ERR_OK). If anyone has any ideas why you could get the ERR_OK value after the SetRecipeValues method fails to set the recipe values, I would love your insight.
This topic was modified 2 weeks ago by eengineer1689
Reply
Topic Tags
Forum Information
- 17 Forums
- 267 Topics
- 942 Posts
- 0 Online
- 721 Members
Our newest member: controls
Latest Post: Beckhoff Automation at SPS 2024
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed