LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save data to excel with temporary frequent stops

Hi, I hope this post is not too much of a duplicate from other posts. I have looked around a lot and haven't been able to find something that helps. Know there is a lot of questions out there regarding how to save data to a file.

 

However, I have 2 issues. First I have used the "Write To Measurement File" to save my data, which seems to slow down my program significantly. I am struggling to figure out how to use the other functions from the File I/O. Next, I need the saving of my data to stop temporarily at short intervals. I am running an experiment with a turbidity probe, and every 15 min a viper gets turned on which gives a false high reading in the signal. I have a voltage signal from the probe that tells me when it turns on the viper and whenever this voltage signal turns on the data needs to stop saving. It's only for 1 second or 2.

 

I have attached my program below. There is ALOT in there, and it might look like a mess but it works, but the code I need help with is in the bottom right corner.

 

I appreciate the help.

 

 

0 Kudos
Message 1 of 4
(1,135 Views)

While I am unable to use "Excel" format (Excel is not installed on test machines) I can offer some advice. Express VIs have a lot of overhead and can significantly slow things down. I am going to suggest you learn and make use of the "Report Generation Toolkit" in your particular case. This will easily allow you to save data only when you need it saved.

 

I use TDMS and regular spreadsheet files and using the proper subvi's vs express vi's gives you more options to use and operate quickly. And while non periodic data to tdms gets ugly (fragmented files - large) I will use it anyway and post process the data. It just allows me to take data at very rapid rates.

 

Good luck on your journey!

 

Just remembered a second alternative. Create a second loop and put your save function in it. Using channel wires move data and the save boolean to that loop and it will run independent of the main loop. This lets the main loop continue while the save loop does its thing.

 

Robert

Message 2 of 4
(1,090 Views)

Hi Robert,

 

Thank you for your advice. I will look into using the "Report Generation Toolkit". I am totally fine with not getting an excel file or having to process the data afterward. As long as I can get it to save the data properly.

I tried your second advice but it seems to only save the very last iteration of the program like in the program I attached below.

 

 

0 Kudos
Message 3 of 4
(1,071 Views)

If you don't understand why that VI you attached works the way it does ....

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

0 Kudos
Message 4 of 4
(1,067 Views)