Odrive Pro read additional encoder

I’ve tried to scour the forum, but I’m not finding any answers on this one: I have an Odrive Pro controlling a motor with an encoder (AMT212B-V) mounted directly to the motor to provide the control feedback. All set there with configuration as encoder0 for

But the mechanical system my motor is driving has some potential to slip, and I’d like to mount a 2nd encoder to one of the rotating components further downstream in the system, connect it to one of the unused encoder interfaces on the same Odrive Pro, and simply be able to query the position of this second encoder through the python interface. Then the python script controlling it all can at least log slippage, and maybe do something to correct it.

Is that possible? Connecting an auxiliary encoder and simply reading from it? If so, can anybody give me a nudge in the right direction?
Thank you.

Hi Wiggle,

You can simply connect the encoder and enable it as you would any other, but keep the commutation and load encoder as the one you already have. You will still be able to query the encoder.

We don’t support multiple AMT21’s currently (they all have the same RS485 ID), but you can do this with any other type of encoder (incremental is fine for example).

For example, if you want to set up the AMT10 incremental encoder you’d do:

odrv0.inc_encoder0.config.enabled = True
odrv0.inc_encoder0.config.cpr = 8192

Then sample it with

odrv0.inc_encoder0.raw