Page 1 of 1

Recipe help (again)

Posted: Sat Jun 30, 2012 2:32 am
by jmsmoreira
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

Re: Recipe help (again)

Posted: Mon Jul 02, 2012 6:45 am
by mark.monroe
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.

Code: Select all

			if(Globals.Tags.SystemTagLatestLoadedRecipeName.Value == "")
			{
				AnalogNumeric2.Value=0;
			}else
			{
				AnalogNumeric2.Value=1;
			}

Re: Recipe help (again)

Posted: Mon Jul 02, 2012 8:44 am
by jmsmoreira
Thanks Mark, I was doing something similar, but I was not using the .value after the system tag.