Log in

View Full Version : talon srx SetVoltageRampRate disabling motor controllers


Sparkyshires
03-03-2015, 17:44
Hello all,

So my team is using the talon srx motor controllers this year. I was attempting to use the SetVoltageRampRate function for autonomous, but when I put the lines in the motor controllers don't output anything at all! I've tried putting them in different sections of the code, nothing works. If you're interested, here's the code:

FR->SetVoltageRampRate(6.0);
FL->SetVoltageRampRate(6.0);
RR->SetVoltageRampRate(6.0);
RL->SetVoltageRampRate(6.0);


this is called once in the beginning of autonomous. I've also tried it with the value 1000, that does not work either :/ any suggestions?

wireties
03-03-2015, 18:05
It will take 2 seconds to get to max output. Is that the problem, were you expecting such a long ramp? Is your autonomous code running for the correct amount of time?

Sparkyshires
03-03-2015, 18:12
No, that's the problem, I don't get ANY motor output. And it is definitely just those lines. I comment them out, it works, I comment those four lines back in, and I get zero motor movement. I've left it for about 2 minutes thinking maybe it was just a slow ramp, but the motors do not change :/ Is there a different set function you have to call after using the SetVoltageRampRate? Is there something in the web interface you have to do? I'm running it through CAN if that helps, but like I said it's not a wiring issue, it works perfectly until I put those lines in then it stops doing any motor output.

ozrien
03-03-2015, 18:43
Please grab the self-test results when a Talon SRX is not meeting your expectations. That's always the first step.

Also check the DS Messages view on the right side for anything. If the view is not empty, correct the problems listed in the messages listview.

Alan Anderson
03-03-2015, 19:47
You are also setting an actual motor output value somewhere, right? Just configuring the ramp rate doesn't tell the Talon to drive anything. Based on your commenting the lines in/out and having it fail/work, I don't think you're being so silly, but I just want to make sure.

Sparkyshires
04-03-2015, 08:19
Yeah, I am. I'm setting them all to 1.0 for autonomous. do you maybe need to tell it to monitor a specific pdp port or something? I'm at a loss because supposedly it just works, and the documentation for this section of the software is lacking a bit for trouble shooting.

FrankJ
04-03-2015, 08:43
The Talon programing manual (pg. 63) implies the throttle range is 1023 to -1023. 1 is essentially 0? I know the joy stick output is 1 to -1 but maybe the gets scaled somewhere that is not obvious before being sent to the talon?

wireties
04-03-2015, 10:46
The Talon programing manual (pg. 63) implies the throttle range is 1023 to -1023. 1 is essentially 0? I know the joy stick output is 1 to -1 but maybe the gets scaled somewhere that is not obvious before being sent to the talon?

We are passing -1.0 to 1.0 to the Set() function and using the SetVoltageRampRate() with no problems. It has to be something else.

Did you by chance set the limits to normally closed at some point and leave them that way? Check the status using the web interface and see if something looks goofy. What revision of the firmware is on the Talons?

Sparkyshires
04-03-2015, 12:05
The Talon programing manual (pg. 63) implies the throttle range is 1023 to -1023. 1 is essentially 0? I know the joy stick output is 1 to -1 but maybe the gets scaled somewhere that is not obvious before being sent to the talon?

Nope, just like every other motor controller in FRC, the range is -1.0 to 1.0. Again, when I comment those four lines out it works perfectly with all it's sweet features. The talon SRX is a really amazing piece of electronics.

Did you by chance set the limits to normally closed at some point and leave them that way? Check the status using the web interface and see if something looks goofy. What revision of the firmware is on the Talons?

I'll get back to you this afternoon at around 4:45 once I get to our shop. Is there any specific setting that they have to be at? We're not wiring a limit switch in so I really haven't bothered with the NO or NC options in the web interface. Fingers crossed that that's it!

Also, would you mind posting your applicable code? Just so I can see if perhaps I'm missing some basic issue?

Sparkyshires
04-03-2015, 17:03
And I'm running hardware revision 1.4, bootloader revision 2.6, Firmware revision 0.28. And all of them are set to coast mode, and normally opened on both forward and reverse limit switch.

ozrien
04-03-2015, 17:07
Unrelated but......
Firmware 0.28? Did you read rule R59? You must update the Talons to be FRC-legal (1.1 or greater).

Alan Anderson
04-03-2015, 18:02
Unrelated but......
Firmware 0.28?

I'm not sure it's unrelated at all. The early firmware does not implement all the features of the current firmware (1.1-1.4).

wireties
04-03-2015, 18:19
Yeah, update to 1.1 or even better to 1.4 and try again.

ozrien
04-03-2015, 18:19
Hey, looks like there was a throttle-ramp fix back in 0.34. Cool (jeesh that was back in November) Forgot about that. Good thinking Alan.

So anyway, this is addressed to ALL teams : PLEASE UPDATE YOUR CAN DEVICES because...
-The ship firmware is not legal
-Updating them at the comp wastes a great deal of time.
-The legal firmware is what the control system team and beta teams have been using/testing.

Sparkyshires, please update your Talons.

Sparkyshires
05-03-2015, 11:33
Hey, looks like there was a throttle-ramp fix back in 0.34. Cool (jeesh that was back in November) Forgot about that. Good thinking Alan.

So anyway, this is addressed to ALL teams : PLEASE UPDATE YOUR CAN DEVICES because...
-The ship firmware is not legal
-Updating them at the comp wastes a great deal of time.
-The legal firmware is what the control system team and beta teams have been using/testing.

Sparkyshires, please update your Talons.

Oh my god, I feel like an idiot D: I updated the talons on our final, but not our prototype. Thank you so much! Sorry about this!