10-10-2017 12:50 PM
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
10-10-2017
01:21 PM
- last edited on
05-09-2025
04:31 PM
by
Content Cleaner
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.
10-18-2017 09:15 AM
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?
10-19-2017 04:52 PM
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.