Skip to main content

Setting the magnet offset for a CANcoder

  1. Move the encoder's mechanism to the desired home position
  2. Reset the magnet offset of the CANcoder to 0 in phoenix tuner
  3. Apply config (hit the button with the down arrow next to CANcoder Configs)
  4. Hit the green refresh button
  5. Check the absolute position of the CANcoder
    1. This will appear in a table under Self Test
  6. Set the magnet offset to the absolute position multiplied by -1
  7. Apply config
  8. Hit the green refresh button 
  9. Confirm that the absolute position now reads 0
    1. If it is still significantly far off from 0, adjust the magnet offset number until the absolute position gets as close to 0 as possible. Remember to hit apply config and the green refresh button every time you change the magnet offset
  10. Set this new value in the code
  11. Reboot the robot
    1. This is needed so the updated values in the CANcoder are properly distributed to the other CAN devices
  12. Confirm that the absolute position still reads 0 at the desired position