ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

autosave file

hello
i was trying to save file when the iteration goes to 5 while the n=10. it means that when the data is feeded into the table until the 5th row, the info in table will be saved.

what i previously did is by creating another loop at the outer of the for loop, then place the vi;s for saving file. but it appears the error message. NI 488 DMA hardware error detected.then knew only that the save file vi;s cannot be put in the loop

now i use the case structure, whenever there is 5th successive row in the table , it will save. however, it doesnt work.

someone pls enlighten me.thanks

regards

0 Kudos
Message 1 of 4
(3,193 Views)
I'm not sure I understand what you are trying to do. Each one of those inner for loops generates 10 rows of data all at once and all of the data is written to the tables all at once. If you were generating a row at a time and wanted to save as soon as every fifth row was written, you can do that but you have to generate the data much differently. Also, putting the case statement outside the for loop will not work at all. Since each table has 10 rows, the value you pass out of the main for loop is always 10 and will never equal 5. Even if you change the equal to look for 10, the save will be done after the main for loop finishes. That's basic dataflow. You are also creating 3D array and I'm not sure that's what you want either.
Message 2 of 4
(3,176 Views)
Why not put a while loop in the For loop, wheneven an iteration number equals 5, stop the whileloop and save the data? This may suit your needs. In your code, you can never run case structure before the for loop complete. This means the case structure is useless.
Message 3 of 4
(3,171 Views)
hello
thanks for the prompt reply.
what i desire is that the table will be kept running. but the data save will be done alternatively 5 row of table.in real time application the table will keep growing, i just want the file contain 5 row of data. can it be done ideally?


regards
thanks

0 Kudos
Message 4 of 4
(3,161 Views)