Jump to content
  • 0

Find rotation using quadrature encoder in USB-1808X


Question

2 answers to this question

Recommended Posts

  • 0
Posted

Hello @PhilipW.

When the count value increases, while the application is running, then the direction of rotation is clockwise.  Likewise, if the count value decreases, then the direction of rotation is counter clockwise.  You do not need to do any averaging.  When an encoder's rotation starts, then the first rising edge determines the direction of rotation.  The reference signal 'Z' generates a pulse once every revolution.

image.png

 

Regards,

Fausto

  • 0
Posted

Hi Fausto,

And to configure the quadrature encoder, I must use the following parameters?

MccDaq.CounterMode Mode = MccDaq.CounterMode.Encoder | MccDaq.CounterMode.EncoderModeX1;
MccDaq.CounterDebounceTime DebounceTime = MccDaq.CounterDebounceTime.DebounceNone;
MccDaq.CounterDebounceMode DebounceMode = 0;
MccDaq.CounterEdgeDetection EdgeDetection = MccDaq.CounterEdgeDetection.RisingEdge;
MccDaq.CounterTickSize TickSize = 0;
int MapCounter = 0;

 

int counterChannel = 2;   // encoder channels are 2 and 3

daqBoard.CConfigScan(counterChannel, Mode, DebounceTime, DebounceMode, EdgeDetection, TickSize, MapCounter);

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...