LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1D Array of Waveform

So I'm assuming the task at hand is complicated because I do not fully understand the data type I am working with, I'm hoping someone can shed some light on the subject.  Currently I have two microphones being read with the tools from the DAQmx tools pallete.  The data from the DAQmx Read.vi is in the form of 1D Array of Waveform (DBL).  The task is to make both signals look like one and then plot the sound power level to a graph.  I've tried various methods of averaging the waveforms with no luck.  Even took the Y components of both waveforms and averaged them together and with the original t0 and dt from one of the original waveforms built a new waveform and tried to read the sound power level with erroneous results.  All I want to do is average the signal from both microphones and display the result as if it was coming from one microphone.  Any suggestions?  Thanks in advance.
LabVIEW 2016 - Windows 7

CLAD
0 Kudos
Message 1 of 24
(6,176 Views)
1. Why do you think you are getting the "wrong" average?

2. Most NI DAQ cards do not sample two channels simultaneously. Have you accounted for the difference in sampling time?
0 Kudos
Message 2 of 24
(6,167 Views)
I am using the PXI 4462 to aquire the signals.  The results in the sound power graph don't make any sense, I'm getting -83 total band power for a reading in an ambient environment.
LabVIEW 2016 - Windows 7

CLAD
0 Kudos
Message 3 of 24
(6,166 Views)
OK so this is a simultaneous-sampling instrument. So that's not the issue.

But you still haven't convinced me that the result is "wrong." Maybe (as suggested by the name) you're a co-op student and new to trouble-shooting?

If I encountered this I would to the following:

1. PLOT each of the two channels independently. Look at the voltage values. Do they make sense? Do they increase if you make noise?

2. PLOT the average of the two channels. Does it look right?

Only after doing this would I attempt to make sense of  a high-level analysis result.
0 Kudos
Message 4 of 24
(6,155 Views)
Nice name recognition, I was a coop for 3 years and I've been full time for about a year now.  None the less I'm still new to LabVIEW and even newer to sound aquisition.  However I have already been through the steps you've mentioned and I am satisfied that individually the channels are reading correctly, I even double checked them with a calibrated sound source.  There is something in my averaging methodolgy that is incorrect, not sure what it is.
LabVIEW 2016 - Windows 7

CLAD
0 Kudos
Message 5 of 24
(6,148 Views)
What functions or algorithm are you using to average the values?

-Bob
0 Kudos
Message 6 of 24
(6,125 Views)
Well yesterday I was using the mean.vi to calculate the average in a while loop.  I realized last night that without some sort of buffer between the actual reading from the hardware and what is displayed on the screen I'm not really averaging anything so I'm assuming what I am really looking for is a way to calculate a running average on this data type.
LabVIEW 2016 - Windows 7

CLAD
0 Kudos
Message 7 of 24
(6,115 Views)
You may want to look at the point-by-point statistic functions.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 8 of 24
(6,110 Views)

It's kind of unclear what you are trying to do and how you were using the mean function. The output of the mean function is a scalar so I don't see how you can recreate a waveform from a single point. Shown below is one way to take two wavefroms and average each point.

Message Edited by Dennis Knutson on 08-21-2007 10:07 AM

Message 9 of 24
(6,096 Views)
Thank you Knight of NI!  He could also average the scalars, but the dt would be different.  If he averages 1000 data points read at 1kHz the scalars would have a dt of 1 (assuming he is doing buffered acquisition there would be no lost data).  See my screenshots where I am reading 100 data points at 1kHz.

-Bob


Message Edited by B O B on 08-21-2007 11:32 AM

Download All
0 Kudos
Message 10 of 24
(6,103 Views)