UE9 Quadrature Counter Configuration


EISServices

Recommended Posts

Is there an example for setting up a quadrature counter, using a bi-phase rotary encoder connected to FIO0 and FIO1. After configuring TIMER0 and TIMER1 to QUAD for the UE9 module I am unable to display any sensible count values. I have read through the tutorial and tried the Counter example provided by with no success.

Link to comment
Share on other sites

Actually, you are pretty much there if you have the timers setup. Just to clarify, to setup the timers for quad, you just have to enable the two timers with LJ_chNUMBER_TIMERS_ENABLED and then tell both timers to be LJ_tmQUAD. As EISServices correctly did, it takes two timers to read one quadrature input. The easiest way to read the timer once this is done is to create a channel with I/O type Timer, channel # = 0 in this case (the first timer of the pair), Timing = the desired update interval.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.