06-18-2019 09:51 PM
Use PXI6229 to measure Pulse Width with any PFI,code is next:
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateCIPulseWidthChan(taskHandle,"PXI1Slot16/ctr0", "cheese",0.000000100,0.830000000, DAQmx_Val_Ticks,DAQmx_Val_Rising,""));
DAQmxErrChk (DAQmxSetCIPulseWidthTerm(taskHandle,"cheese", "/PXI1Slot16/PFI15")); DAQmxErrChk DAQmxErrChk (DAQmxStartTask(taskHandle)); /*********************************************/ // DAQmx Read Code /*********************************************/ DAQmxErrChk (DAQmxReadCounterScalarF64(taskHandle,10.0,&data[0],0));
the measure value is always 0,But when I use the default connection PFI9,the measure value is right ,and my hardware connecting is no problem.
Please help me thanks