le 07-12-2013 08:28 AM
Subject : it seems impossible to run a multiple boards analogical acquisition task with one or several analogical generation task using the same boards.
NI Configuration : Dev1 = Dev2 = 6321 boards
Development environnement : LabWindows CVI 10
Source code for analogical acquisitino task :
DAQmxCreateTask("",&AIRecordingtaskHandle);
DAQmxCreateAIVoltageChan(AIRecordingtaskHandle,chan,"",DAQmx_Val_NRSE,min,max,DAQmx_Val_Volts,NULL);
DAQmxCfgSampClkTiming (AIRecordingtaskHandle, "", rate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan);
DAQmxGetTaskAttribute(AIRecordingtaskHandle,DAQmx_Task_NumChans,&gNumChannels);
Chan = "Dev1/ai0, Dev1/ai1, Dev1/ai2, Dev2/ai1"
Source code for analogical generation taskS :
DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC0));
DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC0, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev1/ao0
DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC1));
DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC1, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev1/ao1
DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C2_DAC0));
DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C2_DAC0, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev2/ao0
At the first DAQmxReadBinary call attempt, the system shows an error (see attached document)
What we understand about that error : it is impossible to run the two set of tasks (ai and ao) using ressources from both Dev1 and Dev2 in the set of tasks because it is not allowed to use the same Reference Clock for that.
The question is : is there a way to to that without having that kind of message?
We tried different combinations :
- Using only one ao task (on Dev1/Dac0) : same error
- Not using any ao task (only the ai task) : no error
- configuring the ai task with only channel from Dev1 : no error
- Using "/Dev1/ai/SampleClock" as internal clock for the ai task and "/Devk/ao/SampleClock" for each ao task (k standing for "1" or "2" depending of the ao task we consider) : error
Thanks a lot.
le 07-16-2013 08:18 AM
Valentin
Certified LabVIEW Architect
Certified TestStand Architect
Certified LabWindowsCVI Developer
National Instruments France