LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reference to cloned VI

Solved!
Go to solution

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 

0 Kudos
Message 1 of 8
(3,960 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(3,955 Views)

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.

0 Kudos
Message 3 of 8
(3,940 Views)

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

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 8
(3,931 Views)

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

0 Kudos
Message 5 of 8
(3,904 Views)
Solution
Accepted by topic author kaschiyski

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

0 Kudos
Message 6 of 8
(3,899 Views)

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

0 Kudos
Message 7 of 8
(3,891 Views)

Dear kaschiyski,

 

Thank you for your feedback, I'm happy it works now!

 

Regards,

Marton

NI Hungary

0 Kudos
Message 8 of 8
(3,874 Views)