Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB6008 + NiDaqMxBase + Linux simultaneous analog input

Solved!
Go to solution

Hello!

 

My setup:

NI USB6008

NiDaqMxBase

Linux OpenSUSE 11.0 on netbook Toshiba NB200


I need to measure 4 AI channels 5 times a second.

 

I do:

create AI0 ... AI3 = DAQmxBaseCreateAIVoltageChan( taskHandle, chan, "", DAQmx_Val_RSE, min, max, DAQmx_Val_Volts, NULL )

do

   start  AI0 - read AI0 - stop AI0 = DAQmxBaseStartTask(thAI0) - DAQmxBaseReadAnalogF64(thAI0... - DAQmxBaseStopTask(thAI0);

   ...

   start  AI3 - read AI3 - stop AI3

while true

 

One do-while loop takes ~ 1 second

 

The question: Is there a way to speed up the procedure?

 

Vadim.

0 Kudos
Message 1 of 3
(3,714 Views)

Hello Vadim,

 

To speed up your program I recommend setting your acquisition to do a continiuos read, as suppose to starting the task, reading one sample and ending the task, where most of your delay is likeely occurring.  Look in the following folder \\...National Instruments\NI-DAQmx Base\Examples\aicontAcquireNChan.c,for such an example.

 

Regards,

Glenn

Applications Engineer

National Instruments

 


Regards,
Glenn
0 Kudos
Message 2 of 3
(3,692 Views)
Solution
Accepted by topic author Vadim_I

Thank you! I got the idea.

 

Regards, Vadim.

 


0 Kudos
Message 3 of 3
(3,667 Views)