Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cDaq devices losing/dropping/not reporting samples

Hi Carl H,

 

Can you give more of a description of your system configuration (i.e. How many tasks are you running and on what hardware)?

 

If you are able to perform continuous buffered acquisition using a single task then you can prevent blank reads from being performed by specifying a buffer size. An example is available in LabVIEW by going to Help > LabVIEW Example finder > Hardware Input and Output > DAQmx > Analog Measurements > Voltage > Cont Acq&Graph Voltage-Int Clk.vi


Milan
0 Kudos
Message 11 of 14
(839 Views)

I wonder if this is related to the problem I had: http://forums.ni.com/t5/Multifunction-DAQ/incorrect-number-of-samples-returned-by-PCIe-6351/td-p/180...

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 12 of 14
(835 Views)

Milan & John, thank you for your reply.  Let me start with the easy part:

John, I am a lowly Mech-Eng. so I struggle to follow the code posted.  Let us see if Milan is able to find a connection with the information I am sending.

 

Milan:

The system setup is as follows

-cDAQ-9174 with the following modules (9211, 9403, 9265 (2))

-cDAQ-9178 with the following modules (9217 (3), 9203 (3))

 

I am running 5 tasks:

1.All digital inputs, 10 channels (cDAQ-9174)

2.All digital out, 7 channels  (cDAQ-9174)

3.All analog out, 7 channels (cDAQ-9174)

 

4.TC inputs, 2 channels (cDAQ-9174)  [Continuous Samples 1kHz]

5.All analog in, 28 channels (cDAQ-9178) [Continuous Samples 3kHz]

 

'TC inputs' and 'All Analog in' are the ones that I am referring to.  I have added code to take a percentage of the samples available in the buffer and I have yet to confirm if this will eliminate the issue.  The VI below runs at 50ms.

 

At 1000 S/s and 50ms, I should have 50 samples of TC data available at every loop iteration (1000S/s*.05s=50S)

At 3000S/s and 50ms, I should have 150 samples of TC data available at every loop iteration (3000S/s*.05s=150S)

 

DAQ.png

 

What appears to be happening (if I do not limit the samples read per iteration), is that the task at random instances, passes two consecutive full buffers and when buffer number two is passed it is empty because it was just emptied.  By limiting the number of samples taken from the buffer, I am hoping to be able to leave samples available for the consecutive sample case.

 

Thank you for your time,

 

C.H.

0 Kudos
Message 13 of 14
(827 Views)

Hi Carl H,

 

Can you try specifying values for the read buffers (specifying the number of samples for the DAQmx read instead of reading the number of samples that are available)? This will wait for the buffer to fill before continuing to the next iteration of the loop and prevent the buffers from being returned as size zero. The NI recommended buffer size is 1/10th of the sampling rate.


Milan
0 Kudos
Message 14 of 14
(805 Views)