Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Data while in a loop, when a command button is clicked.

I searched, but didn't find my exact situation.
 
Here goes...
 
I have a loop that runs continously, and does different things (user defined) while the loop is running.  There is a button that will initiate some GPIB equipment and write the data to a file.  After it reaches a certain point, it stops writing the data and contiues its normal operation... I am using the Write Data.vi and it has two choices.  Save to one file, or save to multiple files.  I like the save to one file, because you can tell it to ask the user where they want to save the file.  The problem is that once I run the Write Data.vi and ask the user where to save the file, it will only ask once, and just keeping adding data to the same file, for different runs.  What I want to do is, eveytime I click the button, have the Write Data.vi ask where to save the file, go from start to stop, then when the command button is pressed again, ask where to save the next set of data...  I could just stop the loop, and rerun the whole Test.vi, but thats the easy way around it, and I'd rather keeping running the Test.vi continously.  Is there a way to reset the WriteData.vi, like a close file or something?  I could get a text line from the user, concatinate the paths, and put that into the path input of the WriteData.vi, but I really like the interface that the WriteData.vi uses.
 
TIA
0 Kudos
Message 1 of 3
(3,214 Views)
Are you really talking about the Write LabVIEW Measurement File function because the Write Data on the File I/O>Storage palette doesn't have the option to write to multiple files or to even select the file name. Write LabVIEW Measurement File does and it also has the option to ask the user for the file name with each iteration.
0 Kudos
Message 2 of 3
(3,210 Views)
That must be the vi I'm thinking of.  Sorry for the confusion, I dont have the program handy...  I'm using 7.1 if that helps...
0 Kudos
Message 3 of 3
(3,204 Views)