My encoders are read OK by the PCI-QUAD04 at slow rotation speeds, but counts are lost at higher speeds.

The cause of "missing encoder pulses at higher speeds" is often a result of having too low of a filter value set (not not setting it at all).  At power up, a random filter value may be latched into the 7266 IC.  Here is some background information, and how to set the filter value via your UL program:

Prescaling and Filtering:  There is an onboard digital clock signal (FCK) used to time the quadrature counter. The fastest quadrature signal that can be counted by FCK is an X4Quad signal at half the FCK frequency. The base FCK is 10Mhz and the highest quadrature frequency (at X4Quad) is 1.2Mhz. (It’s not 5Mhz because of pulse width limitations on the quadrature signals.) The digital clock signal can
be filtered down for more accuracy using a prescaler value. The resulting frequency is 10Mhz/(prescaler + 1), where the prescaler value is a number from 0 to 255. So, if the prescaler value is 4, the FCK will be 2Mhz (=10Mhz/(4+1)) and the highest possible X4Quad input signal
will be 1MHz; if the prescaler value is 255, the FCk will be 39kHz (=10Mhz/(255+1)) and the highest possible X4Quad signal will be 19.5kHz. Note: The prescaler is set to an undetermined value upon startup. This is the most common reason for “lost counts”, caused by trying to count a quadrature signal that is faster than the highest allowed signal. To avoid this problem, always load the prescaler register with a known value just after configuring the counter.

Posted 1/20/2012 6:45:32 AM by Brent