Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

strange error message on analogue i/p

Hi,

 

I've been running my application on a Linux box using a 6224 card.

 

The s/w sets the board acquiring 32 channels at 1000Khz/chn and goes into DAQmxBaseReadAnalogF64 to get the data.

 

This routine blocks until data is ready at which time it exits and the s/w processes the results before calling the routine again.

 

From time to time I would get an error from this routine which decoded into the message

 

 

"ADC conversion attempted before the prior conversion was complete"

 

The board stops working at this point and needs a reset.

 

Surely the conversion process is a board function (once it has been set up) all the s/w is doing is asking for the data when it is ready?

 

Any clues??

 

regards

Ian

 

0 Kudos
Message 1 of 6
(3,060 Views)

This means that you are sampling faster than the ADC on the board can allow.  The ADC needs some time to read each measurement (settling time) to ensure accurate measurements.  This is what restricts the sampling rate of the board.

 

The specifications for the 622x (pg 1) state that the maximum analog input sampling rate is 250 kS/s aggregate. If you are sampling 32 channels that means the most each channel can run is

 

(250,000 S/s) / 32 channels = 7812 S/s/Ch or 7.812 kHz whereas you stated you were running at 1000 kHz.

 

There could also be an issue with the buffer on the board not being configured correctly and I would recommend you take a look at the following KnowledgeBase article.

http://digital.ni.com/public.nsf/allkb/A01AA72779C4604986257047007344EC?OpenDocument

Doug Farrell
Solutions Marketing - Automotive
National Instruments

National Instruments Automotive Solutions
0 Kudos
Message 2 of 6
(3,038 Views)

Hi Ian,

While Doug's suggestions are all on target, I do have a question along a different line of thought: what factors led you to choose DAQmx Base as the driver for your 6224 card?

 

DAQmx 8.0.1 [1] has support for that board as well, and is has better performance (multithread-safe, faster data troughput, lower application overhead, all hardware features exposed). If you need DAQmx Base, though, I am curious as to why 🙂

 

[1] DAQmx 8.0.1 for Linux

http://joule.ni.com/nidu/cds/view/p/id/1194/lang/en

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 3 of 6
(3,027 Views)

Hi,

 

Thanks for reply. Sample rate was a typo on my part. Sampling is actually 1Khz/channel or 32Khz aggregate. Well spotted!

 

So I think this is well within the capabilities of the board.

 

The system will run for some time (minutes) without error, but then just fails.

 

I dont know the internal driver structure, but it does seem that a load of threads get kicked off when the board is set up and started. What priority do they run at? Can it be changed?

 

The thread that starts the data acq is the highest priority thread in my app.

 

regards

Ian

 

0 Kudos
Message 4 of 6
(3,015 Views)

Hi,

 

Thanks for reply.

 

Its a while since I installed the board in my red hat RHEL 5 system (18 mths) and I think the Base was the only support that would install. I do remember having a lot of trouble getting it going and finally someone at NI sorted me out with Base!

 

I have no preferences on driver, and the slicker the better. I could try again with 8 and see what issues I have.

 

regards

Ian

0 Kudos
Message 5 of 6
(3,014 Views)

Just to add the sample rate is 1Khz not 1000Khz per channel. ie a throughput of 32Khz.

 

cheers

 

0 Kudos
Message 6 of 6
(3,012 Views)