05-05-2006 02:30 AM
05-05-2006 07:01 AM
05-05-2006 08:45 AM - edited 05-05-2006 08:45 AM
Message Edited by Alain S on 05-05-2006 08:46 AM
05-12-2006 02:45 AM
Hello Alain,
I think that the preferrable task for you to use is the 'Count edges' task with the option for count direction set to 'externally controlled'. In this case you can link the A-wire of your quadrature encoder to the source of the counter and the B-wire to the AUX-input of the counter.
There is also no problem with using the pause function that you already implemented. Since you will not need to 'stop' the task in this case your count will remain at the number it was. It will also count up and down according to the direction the encoder is turning.
Regards,
Wouter Van Hoof
AE, National Instruments Belgium
05-12-2006 08:36 AM
Before you switch to an edge-counting task with hw-controlled count direction, I'd highly recommend reading through App Note 084. It may still turn out to be your best option overall, though I'd suggest that you use a quadrature decoder chip like the one described in the app note.
-Kevin P.
05-12-2006 09:02 AM
Hi Kevin,
That app note is dated May 1996, not quite recent and intend for use with NI E-Series MIO DAQ boards.
I use a NI PCI-6601 TIO device. Any idea if the problem described in app note 084 is still standing for this board?
Regards
Alain
05-12-2006 09:54 AM
It's an oldie but goodie. The 660x counter/timer boards (and the M-series counters) have been specifically designed to support an additional measurement mode that performs quadrature decoding internally. So for most people in most situations, there'd be no compelling reason to measure a quadrature encoder signal using edge counting with hw-controlled direction on a 660x board. On an E-series board though, that was the closest approximation available, hence the app note.
However. Your app seems to be an exception. If you're unable to implement pause-triggering with a true quadrature encoder task, then edge-counting with hw-controlled direction becomes an option to consider. The behavior of the 660x's counters would be like the E-series counters when using that mode, in which case the problems described in AN084 would indeed still apply to the 660x counters.
-Kevin P.