About Recipes size & functionality in TxA

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
nxen
Posts: 19
Joined: Wed Jan 16, 2013 3:18 am

About Recipes size & functionality in TxA

Post by nxen »

Hi all.

I'd like to ask some questions about “Recipes” functionality in iX TxA panels.

1. Which is the maximum available memory in TxA series, to use for recipes storage?
Is there a formula to calculate the total recipes size in an application?

2. Is there a way to inform, at every system start up, the iX panel for the last loaded recipe?

In H and Exter series there is the “Current Recipe Nr” register, so I keep it in a retentive PLC memory and, after the start up, the controller calls the particular recipe in the panel. This way the user is not obliged to select the required recipe manually.

Can we do the same in the iX series?

Thank you in advance.
Best Regards,
Nikos X

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: About Recipes size & functionality in TxA

Post by mark.monroe »

There is a system tag that has the name of the most recently loaded recipe. When the unit starts up, if you want the recipe to load, you will need to write code to load the recipe.

To tell if the unit is just starting up, you can set the initial value of a tag to 0, then after you have loaded your recipe, set it to 1. Then when the HMI is powered off, the tag will be set to 0 again when the unit comes up. You can put the load recipe code in the Open screen event of your project's startup screen and only execute it if the tag is set to zero.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

nxen
Posts: 19
Joined: Wed Jan 16, 2013 3:18 am

Re: About Recipes size & functionality in TxA

Post by nxen »

Thank you for your answer Mark.

The problem is that the System Tag "Latest Loaded Recipe" does not keep its value after the system start up. So, the "Load Last Recipe" button opens the Load Recipe pop-up, does not load the recipe itself.

I can keep the value in the PLC but a 100 character string means 50 retentive registers... it is too much.

Is there an other way? Could you please take a look to my example? Is it something wrong in my application?
Attachments
TxA_RecipesTest.zip
(43.75 KiB) Downloaded 552 times
Best Regards,
Nikos X

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: About Recipes size & functionality in TxA

Post by mark.monroe »

You need to copy the value out of the system recipe tag into a user defined tag. The "Latest loaded recipe" after a system reboot is nothing, since a recipe has not been loaded.

Use the system recipe tag's value change event to copy the value to a different tag. Then set the non-volatile value to true for that new tag. Use an if statement to only copy values to your tag if the recipe name has more than zero characters in it. That way when the system reboots, you will not overwrite your tag that contains the recipe name with "blank".

You end up with two tags:
One tag is the System recipe tag
The other tag is a tag that you control.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

nxen
Posts: 19
Joined: Wed Jan 16, 2013 3:18 am

Re: About Recipes size & functionality in TxA

Post by nxen »

Thanks for your reply.

Now, the problem is that it does not refresh the controlled tag on system tag's value change.
I use the following code. If I remove the if statement it works o.k.

Code: Select all

public partial class Tags
    {		
		void SystemTagLatestLoadedRecipeName_ValueChange(System.Object sender, Neo.ApplicationFramework.Interfaces.Events.ValueChangedEventArgs e)
		{
			if(Globals.Tags.SystemTagLatestLoadedRecipeName.Value > "")
			{		
				Globals.Tags.RcpName_Hold.Value = Globals.Tags.SystemTagLatestLoadedRecipeName.Value;	
			}	
		}	
    }
Best Regards,
Nikos X

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: About Recipes size & functionality in TxA

Post by mark.monroe »

A string can not be greater than another string. "ABC" is not > "". If you wanted to make such a comparison you could try:

Code: Select all

//this gets the length of my string
int stringLength = Globals.Tags.MyTag.Value.String.Length;

if(stringLength > 0)
   //Do Something
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

jmkowol
Posts: 13
Joined: Wed Jul 31, 2013 10:23 am

Re: About Recipes size & functionality in TxA

Post by jmkowol »

HELLO,
I did solve this problem adding a TAG "TagLatestRecipeName" (String <100>)
Set it as always active and non-volatile in the configuration tabs.

...and then used the "SystemTagLatestLoadedRecipeName" and do the comparison.
Did the evaluation on Value change for the system TAG.

________________________________________________

public partial class Tags
{

void SystemTagLatestLoadedRecipeName_ValueChange(System.Object sender, Neo.ApplicationFramework.Interfaces.Events.ValueChangedEventArgs e)
{
if(Globals.Tags.SystemTagLatestLoadedRecipeName.Value=="")
Globals.Tags.SystemTagLatestLoadedRecipeName.Value = Globals.Tags.TagLatestRecipeName.Value;
else
Globals.Tags.TagLatestRecipeName.Value = Globals.Tags.SystemTagLatestLoadedRecipeName.Value;
}
}

______________________________________


I hope this helps

Post Reply