LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain references

Hi

I have 2 VIs. From one vi I want to obtain the reference to a waveform placed on the another vi and update it but I don't want to open the vi where the waveform is. How can I do it?

To obtain the reference is it necessary the VI is opened before?

And... to update the waveform, is it necessary it is opened before too?

Thanks,

ToNi.
0 Kudos
Message 1 of 6
(3,206 Views)
You can call the vi,but don't open the front panel. Have you tried dynamic vi without front panel opened?
---------------------------
Lady And Basketball Vividly In my Exciting World !!!
Daniel.Tang E-mail: tangye@friendess.com
0 Kudos
Message 2 of 6
(3,192 Views)

The term open is a bit confusing. I assume you mean the FP. A VI can be open (in memory) even if its FP isn't.

To get the reference, you have to have a reference to the VI, which means it needs to be in memory. Since by obtaining the ref to the VI or by placing it anywhere in your hierarchy you're loading it into memory, then yes, you can get the reference even if isn't open. You should also be able to set it even if the FP is closed, as long as the reference is kept open. The tricky thing is that if you called the VI only dynamically and its FP is closed, it will be removed from memory once you close all the references to it or once the VI which opened those references stops running.

As for how to do that, simply use Open VI ref with the VI path. If it isn't in memory it will be loaded, but you have to rememeber to be careful about this.


___________________
Try to take over the world!
0 Kudos
Message 3 of 6
(3,177 Views)

How about call the dynamic vi once you need the reference? That means if you need the reference again call it again.

---------------------------
Lady And Basketball Vividly In my Exciting World !!!
Daniel.Tang E-mail: tangye@friendess.com
0 Kudos
Message 4 of 6
(3,173 Views)
Thanks,

One problem, from a vi I want to obtain the reference of a text control placed inside a Tab (the text control and the tab control is in another vi), but I can't obtain the reference, it generates an error. However I can obtain the reference of an object placed in that vi from another vi if this control is not inside the tab control. Why?

ToNi.
0 Kudos
Message 5 of 6
(3,158 Views)

Objects placed in tab controls and clusters do not appear when you use the VIs Controls[] property.

Instead, you need to go into the tab using its Pages property followed by the page's Controls[] property.

Here is an example for a VI which returns the references of all the controls in the VI (not including clusters and tabs).


___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(3,149 Views)