Quantcast
Channel: Measurement Studio for VC++ topics
Viewing all articles
Browse latest Browse all 654

Trying to read multidevices in an array of tasks

$
0
0

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 

   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);

}

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);
}

Thanks.


Viewing all articles
Browse latest Browse all 654

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>