LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAC Output rate becomes much slower at higher sample rate (PCIe-6351)

Solved!
Go to solution

I am using a PCIe-6351 with one channel for analog output. The specs page PCIe-6351 and USB-6351 Specifications - NI says the analog output goes up to 2.86 MS/s. However if I set the sample rate above 100 KS/s, while everything appears to work fine within the program, checking the output on an oscilloscope shows that the output frequency starts to decrease, becoming many times slower than specified as the sample rate approaches 2.86 MS/s. Here are some measurements:

  • Specified frequency 10 Hz and output period of 1 second so number of samples = sample rate
  • Output sample rate up to 100 KS/s gives output of 10 Hz as expected
  • SR 200 KS/s gives 9.8 Hz
  • SR 1 MS/s gives 2.7 Hz
  • SR 2 MS/s gives 1.35 Hz

A VI that recreates this behavior by writing a 10 Hz sine wave to the analog output is attached. Note that any measurements done within LabView do not show the slowing down (using an analog input task to plot the signal from the output, the time base somehow gets adjusted the same way so the plotted frequency appears to be 10 Hz in all cases, but it really isn't). There must be something wrong with the time base set up, but this error occurs in a silent manner.

 

0 Kudos
Message 1 of 6
(164 Views)
Solution
Accepted by topic author labview64851

1. In most cases, you don't have to specify a sample clock source. The default onboard clock works most of the time.

2. You should wire all wire cluster to capture any possible errors and warnings. Try shipping example <LabVIEW>\examples\DAQmx\Analog Output\Voltage - Continuous Output.vi

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 6
(121 Views)

Hello ZYOng,

The VI I attached does not specify a sample clock source, rather it has an indicator, showing the default source is /Dev2/ao/SampleClockTimebase

The example you mention works, apparently because it has the DAQmx write task preceding the DAQmx start task. I had the DAQmx start task preceding the DAQmx write task, because I need to update the output waveform each loop, and I thought it would be the same pattern as used for DAQmx read - start task with continuous samples, read / write data in each loop, stop task after loop is finished. If I have to write the data before the loop begins, I'm not sure how changing the output waveform for each loop could be accomplished. The goal is to write a different waveform in each loop (these waveforms may not all have the same number of samples), and read the analog input response, on a synchronized clock. The PC is fast enough to keep up with a few MSa/s analog read with continuous sampling, so I assume it can do the same for analog write. I was able to implement this, but with the sample rate limitation mentioned originally. Note that the slowing down of the output occurs even without any analog read tasks.

Thanks

0 Kudos
Message 3 of 6
(103 Views)

You can refer to example <LabVIEW>\examples\DAQmx\Analog Output\Voltage (non-regeneration) - Continuous Output.vi instead.

-------------------------------------------------------
Control Lead | Intelline Inc
Message 4 of 6
(87 Views)

Hi ZYOng

I eventually got this to work. Since I need to output a different length waveform on each loop, I use the DAQmx timing VI to set the number of samples and then start and stop the task in each loop.

Thanks

0 Kudos
Message 5 of 6
(70 Views)
You can give Kudos and mark a solution to thank people for their help.
0 Kudos
Message 6 of 6
(68 Views)