02-22-2011 05:32 AM
Hey!
I have one VI with one case structure with two cases. In first one I make an inspection. I use many Vision Assistant in that case. These VA's use templates located somewhere on a local disk. In the other case I make the templates that are later on used in the first case. The user presses a button when he wants to make new templates. New templates are made automatically and they rewrite the old ones, so the template paths stay the same.
The problem is, that VA's use the old templates, because when you run a VA the template picture is stored in RAM so that is works faster. If you don't restart the
program VA's will not actually use the new templates. Is there a way to reload the templates after the new ones are made, without restarting the program?
Matej
Solved! Go to Solution.
02-23-2011 08:42 AM
Any idea?
02-23-2011 02:13 PM
We fixed that problem in Vision Assistant 2010 SP1.
In the Vision Assistant express VI, pattern matching, color pattern matching, geometric matching, shape matching and calibration steps do not use the current template file path value when the path is updated dynamically.
If you can, please give this version a try.
-Christophe
02-24-2011 01:09 AM
Where can I get VA 2010 SP1?
I have a licenced product LV 2010 with vision development module and we bought it last year.
02-24-2011 02:37 AM
OK I found SP1 and instaled it, but the problem stays. I also selected Input path as a control for VA, but the problem stays.
02-24-2011 02:42 AM
Is there a way to restart the program programaticaly, using some VI's? I found start and exit labiview VI's, but no restart or start. If there is a posibility to restart the program that might help me.
02-24-2011 09:21 AM
What has been fixed in 2010 SP1 is the reloading of the template if the path changes for the functions that I mentioned above.
That could be one workaround (saving the new template as a different file name). For optimization reasons, we did not want to load the template at each iteration (each time the VI is called). We added code in 2010 SP1 to reload the template if the path passed to the Express VI is different (i.e. you select a different template).
If this is not an acceptable solution, what you can do is convert the Express VI to a regular sub-VI and modify the code to reload when a flag is set, or if performance is not an issue in your application, even load the template each time the VI is called.
Is any of the solutions I am suggesting acceptable?
Christophe
02-24-2011 11:29 AM
Thank you Christophe.
Well the performance is an issue so I can't afford to load the templates from disk every iteration. We decided that after the case where templates are made is finished a message window appears saying:" the program created new templates and need to restart. Than exit is made and the user runs the program again. It's not the best solution, but it works.
I like the idea of converting the VA's to VI and changing it to our needs, but what if I have to change something in the future. Using VA its so simple 🙂
Thank you though 🙂
05-16-2011 01:37 AM
Hey!
I accepted Christopher answer some time ago as a solution, but I just noticed that this is not true for golden template. It doesn't reload the template if the path changes. Is there any other solution for that?
Cheers,
Matej