Hi,
I'm using a T10A, with recipes.
I'm using the systemtaglatestloadedrecipename, to display it on an AnalogNumeric of the string type.
What I would like to do is to compare that tag with an empty string to see if there is any recipe loaded or not, but I cannot convert it to string.
is there a way to do it, or any other way to know if there is any recipe loaded or not?
Thanks
Recipe help (again)
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Recipe help (again)
You should be able to write a script code that does what you want. The below lines will check to see if there is a recipe loaded.
AnalogNumeric2 will display either 0 or 1 depending on whether or not a recipe is loaded. You then just need to decide how you want to trigger the code. You could do it when the screen is initially opened or via a button click.
AnalogNumeric2 will display either 0 or 1 depending on whether or not a recipe is loaded. You then just need to decide how you want to trigger the code. You could do it when the screen is initially opened or via a button click.
Code: Select all
if(Globals.Tags.SystemTagLatestLoadedRecipeName.Value == "")
{
AnalogNumeric2.Value=0;
}else
{
AnalogNumeric2.Value=1;
}
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 28
- Joined: Mon Apr 23, 2012 7:03 am
Re: Recipe help (again)
Thanks Mark, I was doing something similar, but I was not using the .value after the system tag.