Hi DAQ Guru,
I want to create two tasks which use same AI channels, but I hope they work at sequential time. For example, while 1st task completes acquiring data, 2nd task will immediately start to work employing the same 4 channels.Then I can read the data from 1st task when 2nd task is still running. Does it work?
I just worry about that both tasks will occupy the same internal buffer. To me, the internal buffer attached to each task is blackbox. I do this to simulate a ring buffer to speed up my processing.
By the way, does DAQ has a built-in support for ring buffer?
Your help is much appreciated.
My example is attached as following,
iStatus = DAQmxCreateTask ("Acquire1", &thAcquire1);
iStatus = DAQmxCreateTa
sk ("Acquire2", &thAcquire2);
//Virtual channel creation for analog input ports 0-3.
iStatus = DAQmxCreateAIVoltageChan (thAcquire1, "Dev1/ai0:3",
"aiChan", DAQmx_Val_Cfg_Default, -1.0, 2.5, DAQmx_Val_Volts, NULL);
iStatus = DAQmxCreateAIVoltageChan (thAcquire2, "Dev1/ai0:3",
"aiChan", DAQmx_Val_Cfg_Default, -1.0, 2.5, DAQmx_Val_Volts, NULL);