From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save file while vi running

hello
i was trying to save the file in spreadsheet format. the data is feed from the table.
the file name is generated automatically from the time and date.
what i desire to do is to autosave the data. for example, the data of the table in front panel generates continually from analysis of the signal of sensor, but  i need to save the file 10 row of data in one file , (1st file contain 1-10th data,2nd file contains 11-20th data, and so forth). it means file is saved while the vi is kept runing.?i was trying to put the 'write file' in the while loop, but it pop up the error saying that the file name is already exist.

now i can only save manually by clicking the boolean control. but i have to sort the file manually.

thanks

regards
0 Kudos
Message 1 of 3
(2,424 Views)
How fast does the loop run?
 
If the loop is very fast, you just need to include more information (minutes/seconds/milliseconds, for example) in the filename to keep in unuique.
 
Can you post a simplified version of you code. Maybe we can come up with a better solution.
0 Kudos
Message 2 of 3
(2,418 Views)
Heang:

Another suggestion would be to use an index to write the data to a file (assuming that your data are stored in an array). After writing to the file, you could increment the index to make sure that the next 10 rows are saved after that. I hope this helps.

Regards,

Rudi N.
0 Kudos
Message 3 of 3
(2,398 Views)