09-14-2009 10:44 PM
Hi,
I have problem like this: Now I use LabWindows/CVI 8.0, NI PXI-6259, I want to generate one output on digital port0/line0 continuous. And I use "ai/sampleclock" as the sample clock source. But when I run the program there is no waveform at all on prot0/line0. What is the matter?
Thanks very much.
Part of the code is :
uInt32 j,mask=1; uInt8 *data=NULL; DAQmxErrChk (DAQmxCreateTask("",&taskHandle)); DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev1/port0/line0","",DAQmx_Val_ChanPerLine)); DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"ai/sampleclock",10000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000)); data=malloc(1000*sizeof(uInt8)); for(j=0;j<1000;j++) data[j] = (uInt8)((j&mask)/mask%256); /*********************************************/ // DAQmx Write Code /*********************************************/ DAQmxErrChk (DAQmxWriteDigitalLines(taskHandle,1000,0,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL)); /*********************************************/ // DAQmx Start Code /*********************************************/ DAQmxErrChk (DAQmxStartTask(taskHandle));
12-09-2009 12:42 AM
Hi:
I met the same problem,but get no answer!!!
waiting someone to give a solution!