06-04-2018 06:33 AM
Hello,
sometimes we have a problem with DAQmxReadCtrFreqScalar function reading a PWM (duty cycle) value from NI 6343 card.
During the measurement it starts grabbing the N value (eg. N=30%) and after some time it changes to 1-N (eg. 70%) and keeps this value.. This is probably caused by some kind of disturbance in the wiring. Can someone please explain the internal duty cycle measurement principle of the DAQmxReadCtrFreqScalar function (how it internally works?). It seems like the function uses only one timer/counter and when one additional (disturbance) edge is detected it returns this wrong value.
06-04-2018 10:22 AM
I don't have a full answer, but can offer some reasonable guesses on bounding it.
A complete answer likely requires detailed knowledge of the DAQ board circuitry. Info available in the manuals describes behavior for measuring duty cycle on pulse signals that meet the board's specs (both voltage levels and transition timing). I know of no good explanation for the behavior you see unless:
- signals don't meet specs in some very specific way
- something about your programming or diagnosis is incorrect
-Kevin P