03-11-2015 06:35 PM
Hello all,
So I have built this VI for my research and we are now beginning to run very long experiments (24+ hours). My question is how do I separate my output file into multiple files so that I don't end up with ridiculous text files? I am having trouble doing this using the write to text file VI, I know there is an option to do this in the express VI but that slows down my program too much..
Attached is a screenshot of the current VI, how would I change this so that it starts writing to another file after say 2 hours or after a pre-determined number of cycles for the while loop?
Thanks a lot,
Luca
03-11-2015 09:34 PM - edited 03-11-2015 09:36 PM
The easiest way that I have been able to do this is using the date/time in the file name that you are writing to. You are going to need to add a bit more to your program that can control all of your timing and file generation. As I cannot see inside of your express VI, how frequently is the loop acquiring data?
03-12-2015 07:18 AM
Instead of writing to text files, I recommend using the DAQmx Configure Logging on your task to have the data streamed to a TDMS file. You should have a add-in for Excel to open up those files. If you then dig into the properties of the DAQmx Read, you will find a property to limit the number of samples that go into a single file. DAQmx will automatically create a new file when the current one reaches that many samples.
This will greatly reduce the amount of work you will need to do in your program.