Page 1 of 1
Control recipes from controller
Posted: Wed Feb 06, 2013 3:43 am
by philip.joebstl
Hello,
on the MAC E1000 - Terminals there was a function called "RecipeControlBlock". By using the function it was possible to manage recipes (new, delete, load, save,...) by a combination of data registers from the plc.
Is there a possibility to do this with iX-Panel, e.g.:
plc writes '7' in tag 'RecipeNr', and the panel loads the recipe from the nr stored in the tag?
Thanks for your answers!
Re: Control recipes from controller
Posted: Wed Feb 06, 2013 9:26 am
by mark.monroe
You would have to write C# to do that. You can put an if statement on the value change of a tag, and then depending on the tag's value, you can load a different recipe. Take a look at this
forum post on the code needed to load a recipe.
The Value Change event is located in the lower left hand corner of the Tags Tab.
- Snap 2013-02-06 at 08.25.53.png (48.49 KiB) Viewed 11763 times
Re: Control recipes from controller
Posted: Wed Feb 06, 2013 9:42 am
by philip.joebstl
So this is what I thought...
Maybe you should take this topic on the wish list for the next iX-Developer. Because the big deal on the old panels was that there was a bunch of pretty awesome features built-in and use-ready. If everything has to be written in C# on iX-Panels, many customers will be overwhelmed.
And as always, thanks for the quick answer!
Re: Control recipes from controller
Posted: Tue Feb 12, 2013 8:01 am
by philip.joebstl
I have another question regarding this topic.
I tried to load a recipe by passing the recipe name in the sample project Sample_recipe, there it was working fine. But when I do the same thing on a T7A-panel project, it loads the chosen recipe and then always pops up with the load recipe-screen.
Is this because of the compact framework or some difference between pc and panel project?
Re: Control recipes from controller
Posted: Tue Feb 12, 2013 9:37 am
by mark.monroe
Take a look at this
forum post and download the CustomRecipeDialog project. On Screen2 there is code that loads a recipe, and it does not bring up any dialog or confirmation boxes.
Code: Select all
void Button1_Click(System.Object sender, System.EventArgs e)
{
//Load the recipe that was entered
Globals.Recipe1.LoadRecipe(Globals.Tags.RecipeNameToLoad.Value);
//Close the load recipe screen
Globals.Screen2.Close();
}
Re: Control recipes from controller
Posted: Tue Feb 12, 2013 10:09 am
by philip.joebstl
Sorry, I had the 'LoadRecipe'-Action still set on that button. Shame on me. Of course now there comes no dialog any more