Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronisation issue with NI 6251

Hi John,             As per your advice I modified the MultVoltUpdate-IntClk example program (NIDAQmx, Linux) to create analog_input and analog_output tasks to transmit 10 samples and receive 10 samples at a rate of 10 samples/s, as shwon below: TaskHandle taskHandle_In=0,taskHandle_Out=0;DAQmxErrChk (DAQmxCreateTask("",&taskHandle_In));DAQmxErrChk (DAQmxCreateTask("",&taskHandle_Out)); DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle_In,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle_Out,"Dev1/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL));  DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle_In,"",10.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,10));DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle_Out,"ai/SampleClock",10.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,10)); DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle_Out,10,0,10.0,DAQmx_Val_GroupByChannel,data_out,&written,NULL));DAQmxErrChk (DAQmxStartTask(taskHandle_Out));DAQmxErrChk (DAQmxReadAnalogF64(taskHandle_In,10,10.0,DAQmx_Val_GroupByChannel,data_In,10,&read,NULL));DAQmxErrChk (DAQmxStartTask(taskHandle_In)); Once I execute the aforesaid code, I am unable to obtain any synch at all, and the receive array 'data_In' contains arbitrary values ranging from -10.5V to -9.8V.  Could you please suggest the correct sequence of function calls if there is a mistake. Thanks,Adeel 
0 Kudos
Message 1 of 2
(2,743 Views)

For the response to this post, please proceed to this link.

aNIta B

Applications Engineer

National Instruments

0 Kudos
Message 2 of 2
(2,725 Views)