Log in

View Full Version : "Ticks" per revolutin Absolute Encoder


TimTheGreat
31-01-2016, 21:50
Does anyone know the 'ticks'/counts per revolution of

http://www.andymark.com/product-p/am-2899.htm

This is the number that CanTalon.getAnalogInPosition() reads

Joe Ross
31-01-2016, 21:57
See section 16.11 or 17.2 of the Talon SRX Software Reference Manual.

GeeTwo
31-01-2016, 22:50
Tim,
Going to the downloads tab on the AM page you linked, then looking at the datasheet, I found that it supports several options:


10-bit Analog output - 2.6 kHz sampling rate
10-bit PWM output - 1024 positions per revolution, 1 kHz
12-bit PWM output - 4096 positions per revolution, 250 Hz


It looks like it's somehow program selectable among these modes.

TimTheGreat
31-01-2016, 23:10
So I was looking at these, but they don't seem to match what the robot was doing.

I printed out motor.getAnalogInPosition() and I got discrete numbers that kept increasing like a standard encoder.

gblake
01-02-2016, 07:37
I'm thinking a software bug in your code is involved.

None of the three versions of that encoder produce "ticks" because of rotating.

Double-check that you are invoking a suitable analog read function, and thatsome other part of your code isn't summing the values you read.

The encoder output definitely is not the sort of signal that typically would get connected to an interrupt or other hw input port so that pulses could be counted. Instead its amplitude or duration should be measured (either Volts or Seconds), depending on which version of the encoder you are using.