Quote:
Originally Posted by flameout
Also, I assume you don't have to specify the quadrature decoding type, right (1x, 2x, or 4x?) I would assume it gets that right without modification.
|
The decoding type can be used on any quadrature encoder. If you want to count the rising and falling edges on both the A and B channel, choose 4x. 2x does rising and falling edges on only one channel, while 1x only counts 1 edge on one channel. If you are using the encoder for position only, using 4x gets you extra resolution. If you are trying to use the rate function, you'll probably have better results with 1x. Choose whatever makes sense for your application.
One cool thing you can do with the scaling is get the encoder value in a measurement you want to use. For example, if you want to measure angle in degrees, put in a 1 for the scaling. Each tick will then be 1 degree (since the encoder has 360 ticks per revolution). Alternately, you could calcuate using your gear ratios and wheel size that each tick makes the robot move 1/10 of an inch. Put in 1/10 and then you will get the distance the robot traveled in inches.