Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a single channel digital waveform for PXI-6259 with fixed frequency

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

 

0 Kudos
Message 1 of 2
(3,045 Views)

Hi:

  

    I met the same problem,but get no answer!!!

waiting someone to give a solution! 

 

 

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