Я пытаюсь считывать два канала одновременно, если USB 6211 с питоном. С этой целью я попытался адаптировать пример из http://www.scipy.org/Cookbook/Data_Acquisition_with_NIDAQmx изменив строку
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))
Но затем я продолжаю получать сообщение об ошибке, что «вызов nidaq не выполнен с ошибкой -200229:« Буфер слишком мал для чтения данных ». Добавление строки CHK(nidaq.DAQmxCfgInputBuffer(taskHandle, uInt32(10000000)))
или увеличение длины массива данных не помогло...
Может ли кто-нибудь указать мне правильную переменную для изменения?