Hello, here's my question:
I have a USB-6009 and I am using NI-DAQmx Base in C++.
I have tried (unsuccessfully) to implement a situation where channels
ai0 and ai1 operate in differential mode and channels ai6 and ai2
operate in single ended mode (non referenced), meaning that each of ai2
and ai6 has a different wire connected to it with different
voltage...each of which I would like to know the value of seperately.
Here is an example of trying ai0 & ai1 in differential and ai2 in
single ended in referenced mode (non-referenced causes a program
error...).
I create the task handles as seperate items:
DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxBaseCreateTask("",&task2));
DAQmxErrChk
(DAQmxBaseCreateAIVoltageChan(taskHandle,"Dev1/ai0:1","",DAQmx_Val_Diff,min,max,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxBaseCreateAIVoltageChan(task2,"Dev1/ai2","",DAQmx_Val_RSE,min,max,DAQmx_Val_Volts,NULL));
and then start the tasks:
DAQmxErrChk (DAQmxBaseStartTask(taskHandle));
DAQmxErrChk (DAQmxBaseStartTask(task2));
The program just sits there and doesn't spit anything out in the loop where I call the 'DaqmxBaseReadAnalog64' function.
Any ideas? If there is any example code on how to run differential
inputs and analog inputs simultaneously, I'd appreciate a glance at it!
Thanks!