I'm having trouble getting accurate measurments using my counterboard, and I was wondering if it is just because I am running it wrong. Here is my program:
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateCISemiPeriodChan(taskHandle,"Dev1/ctr1","",10,83.0000000,DAQmx_Val_Seconds/*,DAQmx_Val_Rising*/,""));
DAQmxErrChk (DAQmxStartTask(taskHandle));
DAQmxErrChk (DAQmxReadCounterScalarF64(taskHandle,10.0,&data[0],0));
DAQmxErrChk (DAQmxClearTask(taskHandle));
printf("Measured Pulse Width: %.9f sec\n",data[0]);
(this is the code from the code PulseWidth.c)
I manually trigger the switch, and I continue to get very low values, around 0.000011. I even put it into a for-loop to see if it was just a debouncing problem, but I'll get a string of small values. Now I changed my MinVal and MaxVal to larger values, but I continue to get the small numbers. Can anyone help me with this? I'm trying to read pulse width values between 0.0005 seconds to 3 seconds. Thanks
Craig