View Single Post
  #1   Spotlight this post!  
Unread 14-12-2015, 17:57
entertainr entertainr is offline
Build Addicted
AKA: Levi
FRC #4522 (Team SCREAM)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Sedalia
Posts: 7
entertainr is an unknown quantity at this point
Talon SRX Swerve Control

We have been using Talon SRXs to control our swerve drive that's in development. For clarity "turn" will refer to the angle of the wheel, and "spin" will refer to the velocity. While attempting to turn the wheel past the 1023 limit, instead of continuing past 1023, the Talon will return to a point in the 0-1023 interval. I am currently using an Analog Encoder with the Talon in the Position closed-loop mode.

To attempt to solve this problem, I converted the encoder signal into an equivalent degree value, processed it to get my new setpoint, and then converted it back to a 0-1023 value in the same interval that the encoder is in. I believe my problem lies in the red boxed area of my code, but I could very easily be wrong. Any help is appreciated, and I will provide any additional information if needed.
Attached Thumbnails
Click image for larger version

Name:	Swerve Wheel.jpg
Views:	76
Size:	128.7 KB
ID:	19556  
Reply With Quote