I am measuring a signal that is roughly 50 kHz max. I use a 10 Hz clock from another timer and count pulses in between those clock pulses. When I apply a load (VFD) to the system, I get a high frequency noise on my primary signal which causes erroneous measurement. I am trying to add filtering from a PXI-6602, but the two functions I need are not in the help files. I am getting an error on the second to last line below saying that the channel is not in the task.
1. If that is the case, what channel am I supposed to pass? I thought filters were tied to all "PFI lines."
2. Also, what boolean data do I pass as the third parameter in the second to last line?
3. Can I pick any pulse width for the last line or does it have to be one of the four I've seen documented?
4. Why aren't these function calls nicely documented in the help files?
/***************************************************************************/
/* Configure task To count rising edges from 1,024 pulses/rev torque meter */
/***************************************************************************/
DAQmxErrChk (DAQmxCreateTask("HBKSpeedTask",&speedTaskHandle));
DAQmxErrChk (DAQmxCreateCICountEdgesChan(speedTaskHandle,"PXI1Slot7/ctr0","CountEdges",DAQmx_Val_Rising,0,DAQmx_Val_CountUp));
DAQmxErrChk (DAQmxSetChanAttribute(speedTaskHandle, "CountEdges", DAQmx_CI_CountEdges_Term, "/PXI1Slot7/PFI38")); // 9
DAQmxErrChk (DAQmxCfgSampClkTiming(speedTaskHandle,"/PXI1Slot7/PFI39",100,DAQmx_Val_Rising,DAQmx_Val_ContSamps,10)); // 8
DAQmxErrChk (DAQmxSetCICountEdgesDigFltrEnable(speedTaskHandle, "/PXI1Slot7/PFI38", 1));
DAQmxErrChk (DAQmxSetCICountEdgesDigFltrMinPulseWidth(speedTaskHandle, "/PXI1Slot7/PFI38", 0.00002));