LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to close a write to file express VI

Hi, 

 

I am using an Write to File express VI inside a subVI in LabVIEW 7.1.  Since it is in a DAQ loop it is configured to create only one file even though it is called many times. 

 

The problem I am having is that when the subVI itself is closed and reopened the express VI does not prompt to create a new file.  Is there a way to get around this? 

 

I am hoping there is some sort of invoke or property node that I can use on either the express VI or the subVI itself to close or "reset" it.

 

Does a subVI stay in memory even after the front panel is closed?  I am guessing this is what is causing my problem.  Any ideas?

 

I do realize the BEST thing to do here would be to simply not use an express VI but I am hoping there is a way to fix this without going that far yet.  From what I can tell LV7.1 does not allow me to convert an express VI to code which makes it look like it will take even longer to rewrite this.

 

For now the solution we have in place is the following:  close the subVI, close the main program (the calling VI), and then reload.  

 

Thanks,

 

Dave

 

0 Kudos
Message 1 of 4
(2,687 Views)

dave,

 

if i remeber correcty... there is a file path option will be available with the express vi... I actualy can not reproduce this here since i dont have LV 7.1. So if you feel that the express vi does not gives you a prompt for selecting the file path, then just place a "File dialog" function before the express vi and wire the selected path.

 

Regards
Guru (CLA)
0 Kudos
Message 2 of 4
(2,674 Views)

It does prompt, but only once.  If the subVI is closed it does not prompt again.  If the entire program is closed it will prompt again. 

 

0 Kudos
Message 3 of 4
(2,655 Views)
The subVI is still in memory, of course. Are you passing the file name from the top level to the subVI and back up? If you are using a shift register and if you initialize it with an empty path, you should be getting prompted the next time you run the top level.
0 Kudos
Message 4 of 4
(2,652 Views)