LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

loading independent sub vis in sub panels and calling from main vi

Hi all,

 

I have trying to work on the following requirement.

 

I have a main vi with a file browzer and sub panel - Channel . I will select a channel configuration text file which contains Analog and digital channels names. ''

My vi will read that file and loads and Channel VI in the sub panel - Channel.

 

Now the CHANNEL VI has a tab control with 2 pages analog and digital. Each page again has sub panels i,e. sub Panel - Analog and sub-Panel-Digital.

Analog VI with some knob controls which are binded to Signals are displayed in the sub Panel - Analog.

Digital VI with some boolean controls  which are binded to Signals are displayed in the sub Panel - Digital.

These vis will show the values acquired from the hardware.

 

 I want to provide the user to load any channel configuration file and acquire the data. For the first time the execution is working fine. The next time when I tried to load a new configuration file. it says "Invoke node in main cvi <Append> Method Name <b>Run VI</b> and the new configuration is not loaded.

 

The following logic is implemented as a sub vi to load and close the sub panel vi.

 

VI Load logic:

VILoad.JPG

 

 

 

VI CLose Logic

VIClose.JPG

 

 

So please let me know where am i doing wrong.

 

Before loading the new configuration file Iam calling the close logic . But still is not working.

 

Thanks in Advance.

Ramesh.

 

 

0 Kudos
Message 1 of 3
(2,005 Views)

Can you post a vi snippet? It would be helpful to see your logic flow, I'm wondering if your problem is that you've got "remove vi" node at the end after you have already closed the vi reference - but can't tell if same vi reference are used as in the case of top diagram.

 

-DP

--------------------------------------------------------

New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI


0 Kudos
Message 2 of 3
(1,996 Views)

Two things come in my mind:

 

First it looks strange to me that you open a VI reference for running and one for closing. Why don't you cache the refnum and reuse it in your closing logic?

Second, and that might be more important, do you stop your subVI before removing it from the subpanel? Just closing the refnum doesn't work - your subVI keeps running in the background. As a quick and dirty attempt you could use the Abort VI method. If it works you should implement something more elaborated to quit your subVI, e.g. via notifier or user event.

0 Kudos
Message 3 of 3
(1,976 Views)