LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when starting data collection more than 10kS/s - 2x NI 9223 in a cDAQ-9174 chassis

Solved!
Go to solution

Hello,

 

I have a cDAQ-9174 chassis with 2 NI 9223 modules in it. I'm trying to monitor all 8 channels to catch a 125usec low pulse. As long as the sample rate when I first start monitoring is 10kS/s or less, it starts fine, and I can ramp it up to the max 1MS/s after a second or so. If I try to start at 1MS/s, I get -200279 error (seems to be a buffer issue). Its not a world ending issue, but I can't figure out what is causing the delay in the first loop, but subsequent loops are fine.

 

The code is LV2019, so I included a pic as well.

 

Thanks,

Simon

0 Kudos
Message 1 of 4
(2,181 Views)
Solution
Accepted by SimonAGoodson

I bet my hat that the Express VIs are the culprit. Aside from those nasties like the dynamic data graph wires which tend to be inefficient the biggest problem is that the DAQmx Express needs in the first iteration to create tasks for each hardware resource and that takes a serious amount of time. By the time the first loop iteration has finally finished the first DAQ task has long run out of buffer.

 

Solution is to abandone the DAQ Express VIs and program them yourself explicitly. That way you can put the task initialization before the loop and only leave the DAQ Read or Write functions for each task in the loop.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(2,148 Views)

Thanks! I think that may be a little beyond my meager ability at the moment though.

 

Regards,

Simon

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

@SimonAGoodson wrote:

Thanks! I think that may be a little beyond my meager ability at the moment though.

 

Regards,

Simon


Look through the examples that shipped with LabVIEW. DAQmx really isn't more difficult than the Express VIs.

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