03-30-2012 11:06 AM - edited 03-30-2012 11:08 AM
Hi
I am using buffered event counting with a NI-DAQ USB 6211. My count clock is the onboard square wave generator (freqout, PFI6 pin,that I have connected to PFI0.) I have an external clock coming from an encoder that I use as sample clock, connected to PFI1. The objective is to get count readings at each encoder pulse.
I get sporadic sets of tens of samples where the count value has not changed, as if there were spikes in my encoder signal. But I already observed the encoder signal at these situations and it is clean.
I enabled the digital filters for the counter task, but I get the impression that the filters only filter the count clock and not the sample clock. My sample clock signal has a width of about 40 microseconds, but I still get samples when setting the filter to 2.56 ms minimum pulse width. These samples are with zero count, beacuse it is filtering the count clock signal, but the sample clock is not filtered. Although I am not able to see any spikes in this signal, I would like to filter it to try if that solves something.
So...how do I enable filtering for the sample clock?
I can't use the other counter, because I am using that one to do exactly the same with another encoder...with the same problems.
Thank you very much in advance
Regards
04-10-2012 11:31 AM
Hi Helder,
I just want to reiterate what you need :
You want to pick the counter value on each pulse of an external clock (here, your encoder) wired to the PFI 1, OK.
But, what frequency do you need ? 250kHz ?
Is your signal from this encoder noisy ? Why do yo have to filter it ?
Regards,
04-10-2012 02:40 PM
Each input terminal should have a separate property to enable or disable digital filtering.
You'll want to set the following DAQmx Timing Property to enable the digital filter for your sample clock:
You probably do not need to use the digital filter for the signal you are counting coming from freqout. You can actually route this internally if you want by specifying the counter's source with yet another property node:
Best Regards,
04-11-2012 07:18 AM
Dear Mathieu
Thank you for your reply.
You are right, I want to take a counter value at each pulse. The encoder siognal seems not to be noisy, but in fact once in a while I get multiple samples which are not triggered by the encoder (the encopder frequency is much lower). That's why i would like to try to deboun de the encoder signal to see if this solves something.
I think the next reply I got is what I need
Regards
Helder
04-11-2012 07:20 AM
Dear John
I have to see when i get the time to try this out, but I think this is EXACTLY the information I was looking for.
Thank you very very much.
Regards
Helder