Join us today!
Notifications
Clear all
RecipeManCommands - SetRecipeValues Problem
How-to & Troubleshooting
1
Posts
1
Users
0
Reactions
1,185
Views
Topic starter
Nov 12, 2024 11:16 am
(@eengineer1689)
Active Member
Joined: 1 year ago
[#293]
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 1 year ago by eengineer1689
Reply
Topic Tags
Forum Information
- 17 Forums
- 410 Topics
- 1,111 Posts
- 1 Online
- 1,193 Members
Our newest member: Ed
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed
