Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

E-Series Samples Left in Buffer

Hello all,

 

I'm working with Labview 8.2, DAQmx and DAQmx base and a PCI-6035E DAQ card to do data acquisition. I would like to know the number of samples left on the card so my software can tune the sampling rate accordingly. I'm trying to implement this by using the "E-Series -- AI DMA Queries Available.vi" VI that was posted to this board some time ago. I've uploaded it for your convenience. Every time I run it, though, I receive an error 15:

 

Error 15 occurred at an unidentified location

Possible reason(s):

LabVIEW:  Resource not found.
=========================
NI-488:  Serial poll byte queue overflow.

 

If someone can help me mitigate this error or provide an easier way to do what I was looking for, it would be much appreciated, thank you.

 

Ryan

0 Kudos
Message 1 of 5
(3,016 Views)

I should also specify that it's an analogue input that I'm reading from.

0 Kudos
Message 2 of 5
(3,010 Views)

Hi Ryan,

 

As I understand your situation, you are acquiring an analog signal and you want to determine the number of samples on your FIFO so that you do not receive overflow or underflow errors.  Am I correct in the assumption?  You shouldn't have to worry about that too much if you choose your sample rates properly.  Keep the following in mind when you are doing an analog acquisition:

 

1. Sample at a rate 10 times that of your signal frequency.  This will ensure that your measured signal captures both the frequency and shape of your signal.  If your incoming signal is 10 kHz, you should sample at 100kHz.

2. Your sample rate should also be 10 times that of your samples to read.  If your sample rate is 100 kHz, your samples to read should be 10k.

 

You can receive buffer overflow or underflow errors if you violate the above conditions.  You can also use the Available Samples per Channel Property to see the number of samples available in your buffer.

 

I hope this helps.

 

Regards,

 

Todd V.

 

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 3 of 5
(2,985 Views)

Hi, and thanks for getting back to me.

 

Yes, you have an idea of what I'm trying to do, which is basically just fast data acquisition with a few user-defined parameters. 

 

I've attempted to use the DAQmx Read Available Samples per Channel property and received the following error:

 

Error -200455 occurred at Property Node DAQmx Read (arg 1)

 

Possible reason(s):

You cannot get the specified property, because the task is not a buffered input task.

 

I'm not sure I understand why that is. I've configured the task as an analogue input single hardware timed (voltage) point, which is read in a while loop.

 

Any further assistance would be much appreciated, thanks.

0 Kudos
Message 4 of 5
(2,970 Views)

Hi,

 

Hardware timed single-point isn't buffered.  Buffered is for continuous or finite multi-point sampling.  You are reading only one point at a time so there isn't a buffer like there is for a continuous or finite multi-point acquisition.  I would take a look at the examples in the LabVIEW example finder.  The Cont Acq and Graph Voltage- HW Timed is an excellent one.

 

Regards,

 

Todd 

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 5 of 5
(2,961 Views)