LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Quadrature Encoder DAQ at high frequencies

Hello,

I am using a quadrature encoder and am planning to analyse the signals from the three data lines (A, B and Z) using the PCI-6343 card and LabWindows. I have attempted to do this by detecting input changes on the digital input lines using the "RegisterSignalEvent" function and analysing the data in a callback function to determine in which direction the encoder disk is turning. However, I quickly ran into the problem that the buffer would fill up extremely quickly. It surprised me a little that the processing of the signals (up to a few hundred kHz) would take so much longer than the acquisition. The encoder has a rather high resolution of 0.006 deg, so there is a lot of bouncing going on.

Would a better solution use timed interrupts to ignore the high frequency signals caused by bouncing? I saw the possibility of using asynchronous timers in the doc. Would it even be possible to reliably use interrupts in intervals of a few microseconds?

I would like to avoid to use multithreading, but I guess that it is necessary in this case?

Does anyone have any experience with similar DAQ scenarios?

0 Kudos
Message 1 of 5
(2,764 Views)

What dou you mean by "processing of the signals"?

Which pins of the 6343 are you using? Analog Input, Digital Input or Counter Inputs?

If you are trying to analyse the quadrature signals yourself from analog acquisiton, this is not the right way to handle this.

You should use the counter input which read quadrature signals directly in the hardware.

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 5
(2,736 Views)

By "processing the signals" I mean that I determine the direction of the encoder disk by comparing the new position to the previous one and subsequently update a strip chart.

I receive digital signals on TTL voltage levels from the encoder interface. Up to now I was using dedicated digital I/O pins, but you appear to be correct that the counter inputs are the correct way to count the edges. Especially since the PCI card supports X4 quadrature encoding.

Thank you for your help so far. Could you possibly direct me to some documentation for the software approach?

0 Kudos
Message 3 of 5
(2,730 Views)

Hi, I am glad I could help.

To direct you to documentation for the software approach, we need to understand what is your final goal.

Just reading instantaneous angle values and putting them on a strip chart or doing something more?

S. Eren BALCI
IMESTEK
0 Kudos
Message 4 of 5
(2,725 Views)

Hello,

The final goal is to display the instantaneous angle values on a strip chart, save the angle values of the whole measurement period to a file (TDMS) and to display the whole measurement period on a graph (either already during, or at least after the measurement). However this program will be merged with a program that controls the actual step motor that spins the encoder disk at a later point in time.

0 Kudos
Message 5 of 5
(2,722 Views)