LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a timed loop with write to spreadsheet file

I want to save the mean histogram value every 10 minutes.  I tried using the binary write to file function but it would only record one piece of data.  Will the attached vi write to a file every 10 with the mean value?  At the moment I cannot test it because I can't interupt the experiement.  If it wouldn't work do you have any suggestions?

Thanks

0 Kudos
Message 1 of 2
(2,659 Views)

No, it won't.

 

This behaviour has nothing to do with using different types of loops or file I/O functions.

The main problem is that you forgot the dataflow! Since you connected an output tunnel of your main loop with an input tunnel of your timed loop, the timed loop will be executed after the main loop finished, so either someone is pressing stop, or an error is causing the main loop to stop. And then your timed loop will run forever, because there is no condition wired.

 

I would suggest you to first build a simple VI where you generate random values, representing the data you want to save every 10 minutes. Then you need to create an algorithm which determins when 10 minutes are left. Place this into a loop, connect it with a case structure where you have the File I/O inside.

 

 

Hope this helps,

Christian

 

 

0 Kudos
Message 2 of 2
(2,633 Views)