04-13-2009 07:31 AM
I'm trying to obtain reference to cloned VI.
I have a program that has multiple calls to reentrant VI with prealocated clone for each instance. I'd like to reinitialize default values of all clones that's why I need reference to call the method that reinitialize values. I see that cloned VI's has different numbers e.g. edge.vi:1 (clone), edge.vi:2 (clone), but can't find way to obtain reference to them.
Refference to original VI doesn't affect cloned VI's
Thanks,
Petar
Solved! Go to Solution.
04-13-2009 07:46 AM
Can you show us an example of how you are using the cloned VI's?
If you are explicitly opening and starting each you can just hang on to the reference used to create them. If your clones are all located on your diagrams then stategic use of "Fist Call" may help you.
Have fun!
Ben
04-13-2009 08:19 AM
This is very simple representation of my idea. There two running clones of one vi and on some time I want to resets their internal state.
I don't think first call can help me because I'd like to reinitialize them during execution.
04-13-2009 08:37 AM
OK now I see.
What you really need is an Action Engine as I describe in this thread.
Here is a preview of them in use (from that thread).
Ben
04-14-2009 01:54 AM
Thanks for the article, it is good to know, but I need reference to clone vi, not just solution for the given example. And my question is if it's possible to get reference to cloned vi or not.
Thanks
04-14-2009 02:36 AM
Dear kaschiyski,
In my opinion the easiest way to do that is storing the references when opening them. For example you can put the references into an array or queue and then use the method you want to use.
You can also use the naming cnvention described in this threa: http://forums.ni.com/ni/board/message?board.id=170&message.id=263156&requireLogin=False
If you have any question how to do that please feel free to ask!
Regards,
Marton
04-14-2009 03:36 AM
Thanks,
That asnwers my question. I missed to obtain reference earlier becouse I used path constant instead of string constant connected to Open VI Reference. Stupid error but happens 🙂
Best regards
04-14-2009 06:43 AM
Dear kaschiyski,
Thank you for your feedback, I'm happy it works now!
Regards,
Marton
NI Hungary