My team is using a Talon SRX and Victor SPX motor controller to control an arm. The talon has a mag encoder attached to it. I wanted to use the talon’s motion magic control mode to control the arms, and created a function to get ticks of the encoder where degrees are inputted and ((degrees * 4096 ticks per rotation)/(360 degrees per rotation)) is returned.If I set the talon to motion magic control mode and to the ticks per degrees, would that work?
Motion Magic isn’t a black box that can magically work out of the box on any mechanism, unfortunately. You first need to tune it to your mechanism. To use it, however, you need to set some things up. There are a few parameters you need to set. Here is a link to the CTRE Motion Magic Example Code. You can download it and adapt it slightly to work for your arm. I recommend running some “testbench code” isolated from the rest of your code while you work on tuning and configuring the Motion Magic code for your arm. I recommend putting the different parameters on SmartDashboard/Shuffleboard and tuning them on the fly so you don’t need to redeploy code every time you change a value.
But I want to believe in magic
But, you are also correct.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.