LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Appending/saving data at intervals

I have a measuring computing 16bit daq I am using to record pressure data from a pressure transducer I've wrote code to save the data. I am trying to update and modify my code to save and append the data to a text file at a given interval so it wont overload and slow the computer down. I've attached the original data saving vi file and then my modified attempt at saving at a given interval. any advised or help is much appreciated

 

Charlie

Message 1 of 4
(3,029 Views)

Can't the DAQ read waveforms at a specific sampling rate?  That would make code a lot easier and give you a more deterministic sampling rate.

 

And then look at the Producer/Consumer architecture.  The idea is to log the data in parallel with the acquisitionloop by using a queue to pass the data to the logging loop.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(3,013 Views)

Thanks, this certainly is a more eloquent way of managing data. In my program and if I were to create a separate data loop I feel I just need to create a time array and use that to specify the save time interval?

0 Kudos
Message 3 of 4
(2,952 Views)

If you would like to write in chunks without overloading your computer, the simplest option is always creating a loop and setting a wait function in the loop to prevent it from writing too quickly. I do agree that looking at the Producer/Consumer architecture is definitely a good way to go as well.

Casey G.
0 Kudos
Message 4 of 4
(2,936 Views)