LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform acquisition and averaging

Solved!
Go to solution

Hello!

I need to acquire M waveforms of N samples and average them. Waveforms are started by external trigger, clock is internal. Repetition rate is 5 kHz maximum. The length of waveform should be close to inverse of that (preferably within 95%, e.g. 0.95*0.2 ms). No triggers should be lost. M is (preferably) on the order of thousands. N is (preferably) as much as time resolution permits. After receiving data, any time can be spent on whatever task. What will be the right strategy to deal with this problem?

 

M-and E- series boards, C-interface to NIDAQmx DLL (I will also undestand labview v8.2 example )

Thank you!

Boris
0 Kudos
Message 1 of 4
(2,851 Views)
Best bet would be to let the hardware do the averaging.  It's good at it.  And it's easy.
-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




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

I agree - good to have an averager... I have NI-6289. Boris

0 Kudos
Message 3 of 4
(2,837 Views)
Solution
Accepted by Boris_Epel

Hi Boris,

 

If you have a 6289, there are no hardware averaging capabilities, but performing the averaging in software is not a problem. If I understand your requests correctly, all of your requests are realizable.

 

You are limited on number of channels to read by the channel count on your 6289, but if that is ok, you're all set.

 

External triggers and internal clock are absolutely doable. Have you looked in the NI Example Finder? There are a lot of examples that will do almost all of what you are specifying.; If you can work with LabVIEW 8.2 I would open up your example finder and check out two examples in particular. The first is called Acq& Graph Voltage-Int Clk - Dig Start.vi. This can be found in the Example Finder under the following folder path. Hardware Input and Output>>DAQmx>>Analog Measurements>>Voltage. The second good example that I think would help you is called Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi. This example is found in the folder path  Hardware Input and Output>>DAQmx>>Synchronization>>Multi-Function. This example uses a counter (which is re-triggerable in hardware time) as the sample clock for your analog acquisition task.

 

These examples can basically be directly translated into C programs, with the accompanying setup and definitions, etc. that are used in C. If you're curious about the C functions that relate to a DAQmx function, check out the DAQmx C Reference Help, that is located in Start>>Programs>>National Instruments>>NI-DAQ>>Documentation. There are also C examples that install if you install support for CVI when you install DAQmx, and they install the the following location: C:\Documents and Settings\All Users\Shared Documents\National Instruments\NI-DAQ...

 

Chris W
Message 4 of 4
(2,806 Views)