04-10-2012 11:31 AM - edited 04-10-2012 11:33 AM
Hi,
I am using example code I've downloaded from the NI website to measure two edge separation from a rotary encoder I am using. The rotary encoder has two channels that generate 5000 ppr and are staggered by 45 degrees of a wavelength. A third channel generates 1 ppr which is used as the trigger for the task.
I am finding that when I run the task and have the encoder rotating at
a relatively low speed (~1 rpm) I am obtaining measurements of the order of 0.1 seconds and when I increase the speed to a slightly higher value ~4 rpm) I obtain results that are thousands of times lower.
Eventually I receive:
"Error 200140
Possible Reason(s):
Two consecutive active edges of the input signal occurred without a counter timebase edge.
Use a faster counter timebase."
I was wondering what the reason could be for the violent fluctuations I am receiving this error as although the encoder has a high resolution, at these low speeds it should not be pushing the PCI card.
The link for the example code is:
http://zone.ni.com/devzone/cda/epd/p/id/1612
Any help would be most appreciated,
Many thanks
Ingram
04-12-2012 05:00 AM
Hello Ingram,
My first thought is that is could be a noise issue. I am unsure of the best way you could check this, a basic counting application might show you problems if the signal is noisy, otherwise just hook the signal up to an analogue in.
I will let you know if I come up with any other suggestions.