LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

auto save multiple files

I have tried to use the "Write LabVIEW Measurement File" vi to auto save to a seperate file every 10 minutes. The "DAQ Assistant" is in a while loop so it captures 1000 samples at 1000Hz. The problem I'm getting is that the "Write Lab......" vi seems to slow the while loop down a fair amount and I'm worried about loosing too much data.

I have tried to use the "Elapsed time" vi with a case structure and a "Write to spreadsheet" vi inside. This seems to work well as the saving only occurs at the end of the 10 minutes and doesn't slow the while loop down continuously. Only prob is I can't work out how to change the  file name every iteration without a manual input. Thanks for any assistance
0 Kudos
Message 1 of 3
(2,966 Views)
The easiest way to change the file name would be to have a shift register on the While Loop that keeps a number that you increment each time you write to the file.  You can convert this number to a string and append it to the file name every time you write the file.  So you would be appending _1, _2, _3, etc. each time the code runs that writes to a file.
 
Hope this helps,
-D
0 Kudos
Message 2 of 3
(2,960 Views)
Thanks for the help. I was trying to use a string in a while loop and then convert to a path constant. But as silly as it sounds, I couldn't change the string using a while loop after trying numerous ways. After your advice I managed to find the number to string conversion and used concanate strings to add the strings together, then convert to path constant. So close before and now it works. Cheers
0 Kudos
Message 3 of 3
(2,954 Views)