Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write file while running the VI

Hello,

 

Please could you help me write into a file (as .txt file or excel file) while running the labview VI?

All the modules I used save the data into a file or append into a file just when I stop the VI. Is there a way to save data into a file once I got the data and running the VI? I am doing  a real time monitoring and am always running the VI. Second, I need to check the entered data by java in a real-time process. 

So, stopping the VI to save the data is not acceptable by the application am doing.

 

Again, I will be really thankful if you provide a way to save data without stoping the VI.

 

Regards,

 

 

Bill  

0 Kudos
Message 1 of 3
(2,900 Views)

Hello Bill,

 

What did you use to save data? I think I have never seen behavior you are describing - that Write to File would happen just after VI is stopped. Writing into file can be delayed (Windows uses delayed writting), but it means that data can remain in memmory for a moment until there are resources to finish operation. If you use some streaming methods, function can wait until you have big enough buffer and then it will write bigger piece at once by which the operation can be faster.

 

You can find some expamples on how to handle File IO in LabVIEW Example Finder -> Fundamentals -> File Input and Output.

 

file_IO.png

 

Can you provide an example code where you have seen behavior you described?  I suspect some misunderstanding....

 

 

stefo

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 2 of 3
(2,882 Views)

Hi Stefo,

 

thanks for your help, actually I found the problem! I was putting by mistake the write block was outsite the while loop!  

It's working now.

 

Thank you,

 

 

Bill 

0 Kudos
Message 3 of 3
(2,870 Views)