Go to Post My guess is you all are planning on being overweight......interesting strategy.....i like it - Stephen Kowski [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-03-2016, 22:27
mhaeberli mhaeberli is offline
Registered User
FRC #3045
 
Join Date: Feb 2014
Location: Redwood City
Posts: 88
mhaeberli is on a distinguished road
Talon SRX in PID Speed mode won't stop!

Hi!

We have a Talon SRX (to a CIM motor, with a quadrature encoder) - it's attached via a pullup / breakout board to the encoder.
On our test robot board (no robot, just control system), it seems to behave as expected:

using control mode kSpeed - ...

(pseudo-code):

if (button1) {
talon.Set(1000.0); //turn it on.
}

if (button2) {
talon.Set(0.0); //turn it off.
}

- the talon starts and stops when commanded.

On our real bot, though, it won't stop once started.

(we also tried putting it in voltage mode; in that case

(pseudo-code):

if (button1) {
talon.Set(1.0); //turn it on.
}

if (button2) {
talon.Set(0.0); //turn it off.
}

Which works fine.

Stumped!

Martin Haeberli
(de-)mentor, FRC 3045 Gear Gremlins (formerly SWAT)
Reply With Quote
  #2   Spotlight this post!  
Unread 07-03-2016, 22:31
Poseidon5817's Avatar
Poseidon5817 Poseidon5817 is offline
"Cool" Squad
AKA: Mitchel Stokes
FRC #5817 (Uni-Rex)
Team Role: Mentor
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Clovis, CA
Posts: 340
Poseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to behold
Re: Talon SRX in PID Speed mode won't stop!

Quote:
Originally Posted by mhaeberli View Post
Hi!

We have a Talon SRX (to a CIM motor, with a quadrature encoder) - it's attached via a pullup / breakout board to the encoder.
On our test robot board (no robot, just control system), it seems to behave as expected:

using control mode kSpeed - ...

(pseudo-code):

if (button1) {
talon.Set(1000.0); //turn it on.
}

if (button2) {
talon.Set(0.0); //turn it off.
}

- the talon starts and stops when commanded.

On our real bot, though, it won't stop once started.

(we also tried putting it in voltage mode; in that case

(pseudo-code):

if (button1) {
talon.Set(1.0); //turn it on.
}

if (button2) {
talon.Set(0.0); //turn it off.
}

Which works fine.

Stumped!

Martin Haeberli
(de-)mentor, FRC 3045 Gear Gremlins (formerly SWAT)
If you read the software reference manual, you'll see a section on how to set up speed PID control on the Talons. Based on the first step of that section, your encoder and Talon outputs are probably opposite directions. So try either:

Code:
talon.reverseOutput(true);
or

Code:
talon.reverseSensor(true);
Either of those should fix it. If it fixes it but the motor is the wrong direction, you can switch which one you are using. If for some reason it still doesn't work after that, you might want to check the roboRIO webpage and make sure you are getting encoder feedback on that Talon. Also, make sure you have the correct feedback device selected, PID parameters, etc.
__________________
My FRC History:

2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division


Reply With Quote
  #3   Spotlight this post!  
Unread 08-03-2016, 06:57
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Talon SRX in PID Speed mode won't stop!

Check the web dashboard first. See if there's anything different between the two Talons' configurations, and verify that the encoder is working.

My guess is that the encoder is not working.
Reply With Quote
  #4   Spotlight this post!  
Unread 08-03-2016, 09:30
JPL69's Avatar
JPL69 JPL69 is offline
Registered User
FRC #3596 (Rocket Robotics)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2013
Location: Wisconsin
Posts: 11
JPL69 is an unknown quantity at this point
Re: Talon SRX in PID Speed mode won't stop!

Usually in a PID situation when a motor does not stop is due to the feedback signal is missing, or the feedback signal is reversed.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-03-2016, 13:40
mhaeberli mhaeberli is offline
Registered User
FRC #3045
 
Join Date: Feb 2014
Location: Redwood City
Posts: 88
mhaeberli is on a distinguished road
Re: Talon SRX in PID Speed mode won't stop!

Thanks for all the suggestions.

It appears (and we'll have to double check) that the PID does control to the target speed and direction. That is Set(1000) makes it go 1000 RPM in one direction; Set(-1000) at the start would go the opposite direction; but in this set of circumstances, Set(0) doesn't stop it.

What does work, which is a horrible hack, is to switch to Voltage mode, Set(0), then set back to PID mode.

Thanks,

Martin Haeberli
(de-)mentor, FRC 3045 Gear Gremlins (formerly "SWAT")
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi