LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking mulitiple sweeps with DAQ-mx, and ploting the average of N sweeps

Hi
 
I guess it might seem me a bit Lazy or a bit dim to pose this question - but I thought I would at least try as I am struggling at the moment.
 
I am building an application where I want to sample the data form multiple sweeps and plot the average of N sweeps to improve the S.N.  To give you a better idea - I sweep the frequency of the DUT via a frequency synthesizer with an Analogue output on my DAQ card then sample the frequency response via a transducer at an analogue input on my DAQ card.  What I want to do is take many sweeps of the the DUT (at a frequency of ~100Hz) and plot the average of N sweeps.  Of course, synchonization between analogue input and output is critical.
 
Does anybody have any code or is there even an example vi in labview 7.1 to help me on my way?
 
Many Thanks
 
 
Ashley.
0 Kudos
Message 1 of 4
(2,800 Views)
Hello Ashley,
 
I've written a simple program for you which should do an Analog Output and Analog Input - both of which are triggered of the same PFI line and have the same sample clock (so should be tightly synchronised). It then goes round the for loop reading a different line from the large numeric array and writing that to the analog output (so it is in this array that you can define what values you are using for your frequency sweep output), and then it reads back the samples from the analog input and then on each time round it calculates the mean of the samples and gives you that information on the output array.
 
Hope this helps,
 
Best regards,
 
Peter H.
Applications Engineer.
NIUK.
Message 2 of 4
(2,783 Views)
Thanls Peter
 
That's been a great help.
 
Ashley
0 Kudos
Message 3 of 4
(2,780 Views)

Hi Peter.

The code looks ok as far as I can see but I am getting the error message -200284 on the DAQ-mx Read.vi in the for loop and there is no data is being sampled.

I am trying to loctae the problem but I am completly at a loss.

Thanks

Ashley

0 Kudos
Message 4 of 4
(2,769 Views)