LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with taking the mean of acquired analog waveform.

Hi everyone. I'm a LabView Newbie and am writing a simple routine to read analog input from a PC-1200 board using the AI Acquire Waveform VI. However, I find that I cannot take the mean of my acquired waveform using the Mean VI. Has anyone encountered this problem. Any possible solutions? Thanks in advance and I'm happy to clarify any issues. --Kay
0 Kudos
Message 1 of 4
(1,787 Views)
I'm assuming that you're using LabVIEW 6.x. In that case, AI Acquire Waveform returns a waveform datatype. To get the 1D array that Mean.vi expects, use a Get Waveform Components function on the output of AI Acquire and select Y (the data values of the waveform). This will give you the 1D array you need.
0 Kudos
Message 2 of 4
(1,787 Views)
Thanks for your response Dennis, I am using Labview 5.01 not 6...do you know how I can do this in labview 5? Also, I also have the reverse problem i.e. need to obtain waveform as input for the ac-dc estimator VI from a 2-D array. Thanks for your help so far.

-kay
0 Kudos
Message 3 of 4
(1,787 Views)
If your're using 5.x, then Ai Acquire Waveform should return a 1D array that you can feed directly to the mean function. What exactly is the problem you're having?

As to the second question, use Index array to get a 1D array from a 2D.
0 Kudos
Message 4 of 4
(1,787 Views)