View Single Post
  #1   Spotlight this post!  
Unread 02-06-2018, 07:12 PM
loveshark's Avatar
loveshark loveshark is offline
Registered User
FRC #3145 (Teraviks)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Coeur d'alene Idaho
Posts: 12
loveshark is an unknown quantity at this point
Can TalonSRX Motion Magic

Our team is looking to use PID with one of our talons, and from what we've researched Motion Magic is the simplest option. Our problem is that we don't seem to know exactly how to use the motion magic capabilities of the SRX. We tried out the following code but to no avail.

Code:
#configuration
self.talon.configSelectedFeedbackSensor(0,0,0)
self.talon.configMotionAcceleration(self.talon.getQuadraturePosition(), 0)
self.talon.configMotionCruiseVelocity(self.talon.getQuadraturePosition(), 0)

#some thing to run the motor
self.talon.set(self.talon.ControlMode.MotionMagicArc, ctre.wpi_talonsrx.MotionMagicArc.PercentOutput, 1)
This obviously doesn't work, but does anybody here have experience using motion magic with the CAN TalonSRX? What worked for you?

Thanks in advance.
Reply With Quote