LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write fo text file problem

How does labview write file command work? Does it works this way: write data into a buffer first, then write it into a text file once the buffer is full?
I am tring write some data into a file. I can see about 390 data were written, but after cycle computer's power, only about 340 data in the file. Are the rest data in buffer and werr lost when power off?

How can I solve this problem?

Thanks.
0 Kudos
Message 1 of 3
(2,486 Views)
You can force to flush all buffers to file using the "flush.vi" in the Advanced File functions palette.

Your main problem is the fact that you cycle the power during run. This should normally not happen. If you often have power outages, you should put that computer on an UPS system.
Message 2 of 3
(2,486 Views)
Actaully, my purpose is try to save the lastest system reading when power off. We don't have UPS in system and power outage is not often, but it may happen. I'll try flush.vi and see if it works for my case. Otherwise we have to use a UPS.

Thanks.
0 Kudos
Message 3 of 3
(2,486 Views)