LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner - How to log using multiple files

I am in trouble when I try to record the produced data into multiple files. There is a Rec button that is used to start to log the data that is produced by the system.

As you can see in the attached image.

The problem is that the user can stop the data logger and then start it again. And so, I need to create a new file. I configured the "write to measurement file" to save data into multiple files, but, it is appending the data into the file created before.

How can I solve this?

Thank you in advance.
Download All
0 Kudos
Message 1 of 5
(3,141 Views)
Have a look at the image for Screen2. You haven't setup any File Termination rules. The Write To Measurement File doesn't know what the condition needs to met before moving over to the next file.
 
David
0 Kudos
Message 2 of 5
(3,133 Views)
Actually thinking about it this won't do what you want. You are probably better encoding your filename to be different every time you run your logger VI.
 
That feature might be used if you VI is running continuously to keep the data into manageable chunks.
 
David
0 Kudos
Message 3 of 5
(3,127 Views)
Hi David!

But I don't need to setup them... I only want to create a new file, with the hour:minute that the rec button was clicked. Instead of it, the system is appending the first file.


0 Kudos
Message 4 of 5
(3,124 Views)

You could do something like this.

This creating a filename based on the hour and minute of the day then passing that as a parameter into the Write Measurement File function. Watch out its possible to get duplicate filenames with this method. Consider adding date elements to make the filename more unique.

David

Message Edited by David Crawford on 06-29-2006 03:48 PM

Message 5 of 5
(3,118 Views)