03-24-2010 05:06 PM
Dear all,
I am going to use a USB-6008 DAQ to measure voltage and temperature over a long period of time. (say 1-2 hours)
I've been building a VI but I've encountered a problem. In my VI i use a simulated signal for testing purposes. (signaltoarray.vi is the latest)
The problem is that the output of the simulated signal is a 1-D array of dynamic data. It has to be 1-D array of doubles. How can I manage this conversion?
The goal of this VI is to take some measurements every second, put it in a array, then repeat this and put it in the second column, etc... In the end I want to take the avarage of each column (because I have noise on my signal). I want to use these avarage values to create a graph so I can see the voltage and temperature change over time. (But I didn't add this yet)
I have found a thread with a similar problem, but using that solution I ended up with a 3D array!
Thanks in advance for your time.
03-24-2010 05:39 PM
1: Sorry for double posting
2: I threw away the simulated part and inserted the things I needed to get real readings, so the original problem is gone. (DAQ express VI = misery? )
3: I'm sorry for my English: it's average, not avarage
4: I attached my current VI. It still doesnt give me the avarage of the colums, but it's a start
Could anyone point me what I am doing wrong? (I suppose I am)
03-24-2010 09:47 PM
03-24-2010 09:50 PM
I'm pretty sure you don't need the loop with STOP2.
The DAQmx VI will take 1000 points, no need to be in a secondary loop.
Do you need to save all the data ? or just the mean of each acquisition?
A simple technique is shown below. You could add data saving as required.
03-26-2010 04:54 AM
Hello,
I have some question about the goal of the code you wrote:
A) In the "simulated" VI you confugured the simulate signal express VI to take every second 5 samples at 100Hz. Is this what you really want?
5 samples in the first 50 ms and the nothing?
B) In the "real" VI you use a task that is not configured in the VI. Is it defined somewhere else? If it is then how is it configured? (with regards to sample rate, continous/finite (N) sampling,... )
As jeff said, the second stop loop (with stop 2) around the DAQmx read function should be removed.