Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Read-Out of two channels of USB 6211 with python

Hi!

 

I'm trying to read out two channels simultaneously if an USB 6211 with python. To that end, I tried to adapt the example from http://www.scipy.org/Cookbook/Data_Acquisition_with_NIDAQmx by changing the line

 

CHK(nidaq.DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",
                                   DAQmx_Val_Cfg_Default,
                                   float64(-10.0),float64(10.0),
                                   DAQmx_Val_Volts,None))

 

to

 

CHK(nidaq.DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0:1","",
                                   DAQmx_Val_Cfg_Default,
                                   float64(-10.0),float64(10.0),
                                   DAQmx_Val_Volts,None))

 

But then, I keep receiving the error message that "nidaq call failed with error -200229: 'Buffer is too small to fit read data". Adding the line CHK(nidaq.DAQmxCfgInputBuffer(taskHandle, uInt32(10000000))) or increasing the length of the data array did not help...

 

Could someone point me to the right variable to change?

0 Kudos
Message 1 of 3
(4,006 Views)

Hello,

 

maybe this link can help you:

How Can I Call DAQmx C Functions in Python?

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

 

Regards,

Phil

0 Kudos
Message 2 of 3
(3,992 Views)

Did you ever find the solution to this?

0 Kudos
Message 3 of 3
(2,438 Views)