Discussion:
How can I get multi channel reads using the NIDAQ library
(too old to reply)
DaleFlow
2008-06-19 23:10:16 UTC
Permalink
Hi
 
USB 6008. Python
Can anyone tell me how I can read three channels simultaneously?
I tried "Dev/ai0:2" but this did not work. Using just Dev1/ai0 gives the correct result but I need this for 3 channels (simultaneuosly)
 
Thanks
       
# now, on with the program        CHK(nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle)))        CHK(nidaq.DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",                                           DAQmx_Val_Diff,                                  #DAQmx_Val_Diff,   #DAQmx_Val_RSE,       #DAQmx_Val_Cfg_Default,                                           float64(-10.0),float64(10.0),                                           DAQmx_Val_Volts,None))        CHK(nidaq.DAQmxCfgSampClkTiming(taskHandle,"",float64(10000.0),                                        DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,                                        uInt64(max_num_samples)));        CHK(nidaq.DAQmxStartTask(taskHandle))        read = int32()        CHK(nidaq.DAQmxReadAnalogF64(taskHandle,max_num_samples,float64(1.0),                                     DAQmx_Val_GroupByChannel,data.ctypes.data,                                     max_num_samples,ctypes.byref(read),None))
 
Jochen
2008-06-24 08:10:10 UTC
Permalink
<a href="http://forums.ni.com/ni/board/message?board.id=250&amp;message.id=41010#M41010" target="_blank">answered here</a>
DaleFlow
2008-06-24 11:10:08 UTC
Permalink
Hi Jochen
&nbsp;
Thanks. I figured out the solution myself. I posted that solution for others :-)
&nbsp;
DaleFlow
&nbsp;
Jochen
2008-06-24 11:10:08 UTC
Permalink
Hi Daleflow, that's what I saw. I have just added the link to make it easier for other users to find the solution.Jochen
Loading...