LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

close vit front panel

Hello,

Is it possible to close a vit reference from this vit ?
I use the run VI method to run my vi several time with synchronous wait set to false and I would like to close the VI reference when the user push a "quit" button on the instance f the subvi. How can I do that ?

Thank you !
0 Kudos
Message 1 of 4
(3,337 Views)
Hello,

The Run method allows to create new instances of a VI. LabVIEW will create uniquely named VI instance for each reference ("VIname 1.vi", "VIname 2.vi", etc). The user can interact with each of them independently.
The VI 'Close Reference' allows to close each reference.

Marc Larue
Applications Engineer
NIF
0 Kudos
Message 2 of 4
(3,337 Views)
Thank you for your answer.
My next question is if I run a VIT ( since I don't know how many times this VI will be called ) using the run method, from the main program, I can't close the reference using the output reference just after the run method since it would close the front panel of the subvi. Is it possible to get the reference of a vit which has been opened by the run method, inside its diagram, so I can use the VI close reference inside an event structure "close front panel" ?
Thank you for your answer !"
0 Kudos
Message 3 of 4
(3,337 Views)
Hi,

In the run method, you can select "auto dispose", and don't wait for it to
finish.

In the VI, you can use the Front Panel.Open property, without a reference
attached to it. By default, LabVIEW will use a reference to the calling VI.

Remember that the template instance will remain in memory until all
references are closed.

Regards,

Wiebe.


"VanessaB" wrote in message
news:50650000000500000037B80100-1079395200000@exchange.ni.com...
> Thank you for your answer.
> My next question is if I run a VIT ( since I don't know how many times
> this VI will be called ) using the run method, from the main program,
> I can't close the reference using the output reference just after the
> run method since it would close the front panel o
f the subvi. Is it
> possible to get the reference of a vit which has been opened by the
> run method, inside its diagram, so I can use the VI close reference
> inside an event structure "close front panel" ?
> Thank you for your answer !"
0 Kudos
Message 4 of 4
(3,337 Views)