04-10-2014 11:49 AM
Hi,
I am developping a 4-channel acquisition which is read from one device (USB-6210), and would like to record the 4 input signals to a graph, then to file. The signals are acquired at an effective sampling rate of 1S/s (averaging 50 samples at 50Hz).
The files are written based on the output from a function which formats the signal data: this includes a timer counter the data itself, and calculated data in multiple columns. When I run the program, The timer starts off correctly (it is self-programmed) but will eventually go out of sync -- after 10 minutes, the timer will skip by 4. The final data in the file is all present, but just the user interface is not presenting well. I tried to compare the timer with the system time, but when I run the program, the system time will also eventually skip the display to every 4s.
My guess is that this is caused by memory accumulation so I have tried to minimize this - I have used an event structure and already placed all the functions that I could. The remainder of the processes in the main loop are necessary for processing the data prior to graphing.
I have tried using parallel loops with the DAQmx task outside of the loop, but this does not work.
I use a lot of local variables, so am going to see if I can reduce this.
Any thoughts or suggestions? I unfortunately I cannot post my code, thanks!
04-10-2014 12:13 PM
With that low of a sample rate, I don't see memory problems happening after 10 minutes.
Can you at least post screenshots of the acquisition portion of your code? I'm having a hard time visualizing what is going on.
04-11-2014 04:33 AM
@BowenM wrote:
[...]Can you at least post screenshots of the acquisition portion of your code? [..]
Far better would be to post your VI(s) which you are using.
Is my understanding correct that your "timestamp" is "late" for 4s after a period of 10 minutes (600 seconds)? If not, please clearify the exact issue with your timestamp.
Norbert