02-26-2013 09:29 AM
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?
02-28-2013 09:59 AM
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
12-20-2019 05:32 PM
Did you ever find the solution to this?