07-01-2014 10:05 AM
I need to know if i have the buffer in the right place. I am not getting the right buffer size when i use it on another vi.
Solved! Go to Solution.
07-01-2014 10:34 AM
Since you are using Continuous Samples, get rid of the set buffer size and leave the Sample Per Channel on the DAQmx Timing unwired. The buffer will default to way more than you will need.
07-01-2014 10:50 AM
So are you saying for me to get the exact number of samples I need i need to use the finite mode.
07-01-2014 11:08 AM - edited 07-01-2014 11:09 AM
No. For your DAQmx Read, you tell it how many samples to get. It the buffer doesn't have that many samples yet, then the function waits until that many samples are available. Otherwise it just returns the number of samples you requested. If you are getting a buffer overflow error, then you are either sampling too fast or you are not performing the reads fast enough.
Here's what my setup will typically look like.
07-01-2014 11:17 AM
Where would you put how many numbers of samples you want at because when i put it in number of samples i get this error message.
Some or all of the samples requested have not yet been acquired.
To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger, make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0
Task Name: _unnamedTask<254>
07-01-2014 11:19 AM
I also get this one when i put it in sample rate.
Specified sample rate is higher than the fastest rate supported by the device.
Property: SampClk.Rate
Requested Value: 324.0e3
Corresponding Value: 325.203252e3
Maximum Value: 250.0e3
Device: cDAQ1
Task Name: _unnamedTask<257>
07-01-2014 11:58 AM
@reggie2016 wrote:
I also get this one when i put it in sample rate.
Specified sample rate is higher than the fastest rate supported by the device.
Property: SampClk.Rate
Requested Value: 324.0e3
Corresponding Value: 325.203252e3Maximum Value: 250.0e3
Device: cDAQ1
Task Name: _unnamedTask<257>
Well that one is obvious. Your DAQ board can only sample at 250kS/s. You tried to sample at a higher rate (324kS/s).
07-01-2014 12:01 PM
@reggie2016 wrote:
Where would you put how many numbers of samples you want at because when i put it in number of samples i get this error message.
Some or all of the samples requested have not yet been acquired.
To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger, make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0Task Name: _unnamedTask<254>
What did you set the timeout for the DAQmx Read to? What are your other settings? What DAQ are you trying to read from?
07-02-2014 02:35 PM
I was using 10 seconds for timeout.4000 sample rate. 324000 samples. I am trying to use NI Daq 9205 to acquire this data.
07-02-2014 02:54 PM
@reggie2016 wrote:
I was using 10 seconds for timeout.4000 sample rate. 324000 samples. I am trying to use NI Daq 9205 to acquire this data.
Your math seems off.
10 seconds will give you 40,000 samples so you are indeed timing out before collecting 324,000.