Hi,
Because of getting this error: "One or more devices do not support multidevice tasks.", I am trying to use an array of tasks to be able to read multiple devices, as suggested by GregFreeman in the following link:
http://forums.ni.com/t5/LabVIEW/One-or-more-devices-do-not-support-multidevice-tasks/td-p/2608285
But the problem is that I still get another error, which is :
NIDaq Error in DAQmxStartTask code -89121 Destination terminal to be routed could not be found on the device.
Here's my code:
for (int i = 0; i < nCh; i++) {
niStat = DAQmxCreateTask (tName, pTH);
niStat = DAQmxCreateAIVoltageChan(*pTH, chanName, "", myConfig, rLo[i], rHi[i], DAQmx_Val_Volts, NULL);
niStat = DAQmxSetAIRngLow(*pTH, chanName, rLo[i]);
niStat = DAQmxSetAIRngHigh(*pTH, chanName, rHi[i]);
niStat = DAQmxCfgInputBuffer (myTasks[t], (int) sampRate);
}
niStat = DAQmxCfgSampClkTiming(myTasks[0], "", sampRate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, sampRate);
for (int t = 1; t < nTasks; t++) {
niStat = DAQmxCfgSampClkTiming(myTasks[t], "PFI1", sampRate,DAQmx_Val_Rising, DAQmx_Val_ContSamps, sampRate);
}
niStat = DAQmxExportSignal(myTasks[0], DAQmx_Val_AIConvertClock, "PFI1");
for(int t = 0; t < nTasks; t++) {
niStat = DAQmxRegisterEveryNSamplesEvent(myTasks[t],DAQmx_Val_Acquired_Into_Buffer,buffSamps,0,EveryNCallback, NULL);
}
for(int t = 0; t < nTasks; t++) {
niStat = DAQmxRegisterDoneEvent(myTasks[t],0,DoneCallback,NULL);
}
for(int t = 0; t < nTasks; t++) {
niStat = DAQmxStartTask(myTasks[t]);
}
I would be very grateful if you could help me.
Thanks.