Srx Mag encoders offset

Hi thereee!!

So I am using for the first time SRX mag encoders for the swerve and I need the offset position of each one. I know that i need to zero the wheels first but then where do I see the offset value?

btw i am connecting the encoders in the analog input

Thank youuu

Offset is simply the difference between where it is and where it should be. So if you “zero” the wheels (i.e. move them to where you would normally expect the encoders to return 0), then read the value from the encoder (many ways to do this, ranging from reading in code and writing to smart dashboard/network tables/etc, to reading from the REV Hardware Client). This value will be your offset. Just repeat for each pod

Yeah yeah of course, but my problem is that i don’t know how to get the value, I am connecting the srx mag by an analog input so how do i record the value?

Does an SRX mag ecoder have an analog output? I thought it only has an AB quadrature and an absolute PWM output which doesnt directly support analog.

Not by itself but we bought adapters so we could connect it to the analog input

Do you have a link to the adapter you are using?

1 Like

Note the absolute PWM output of a mag encoder can be read by the Rio using a digital input and the DutyCycleEncoder class.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.