LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help transitioning from express VIs to DAQmx data acquisition - buffer overflow error.

sample_code_snippet.png

The attached code snippet is taken fairly directly from a VI in the example finder - I am just trying to wrap my head around how hardware sample rates and buffers interact with software sample rates and buffers. No matter what input I choose for 'sample rate' and 'samples per channel', I always get the error:

 

"The application is not able to keep up with the hardware acquisition. Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem."

 

I am using a simulated DAQ to generate the data and my computer's hardware clock to set the sample clock. This is not an issue I have ever encountered in my use of the express VI's. I have tried using breakpoints and probes to debug - no help so far though. Any insights would be appreciated.

0 Kudos
Message 1 of 4
(2,775 Views)

Are you actually triing to use hardware timed single point sample mode and a 1000 samples a 1kS/Sec?  HTSP has no buffer! (that would explain the error you are seeing.)


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 4
(2,751 Views)

I am trying Continuous Samples with 100 samples per channel, 1000 Ks/sec. The simulated DAQ is generating a sine wave with an amplitude of 20 and a period of 0.1 seconds. If I select Finite Samples this is exactly what appears on my waveform graph, for one iteration of the loop. I created the simulated signal by converting an express VI to a DAQmx task. 

0 Kudos
Message 3 of 4
(2,735 Views)

I just tried running your VI in LabVIEW 2016, using a Simulated 6009 as the input device (and looking at ai0:3 (four channels).  I set Sample Mode to Continuous Samples, the Clock Source to OnboardClock, the Sample Rate to 1000 (not 1000K = 1 million), and tried Samples per Channel of both 1000 (the default) and 100 (your value).  Both worked just fine.  I made no changes to your code.  Since the pictures are "prettier" at 1000 Samples per Channel, that's what I decided to show ...

Simulated 6009.png

Incidentally, my simulated 6009 shows up in MAX as Dev1, and was automatically "visible" when I clicked the little selector on Physical Channel.

 

Bob Schor

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