Go to Post The FIRST community will always step up in times of need. - nikeairmancurry [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 26-01-2017, 10:29
bohdand bohdand is offline
Registered User
FRC #1099
 
Join Date: Jan 2016
Location: CT
Posts: 6
bohdand is an unknown quantity at this point
TalonSRX Reverse Output

I'm hoping someone can shed some light on a problem we are having with the TalonSRX. We are trying to make the motor run backwards under closed loop speed control and we are unable to do it. Specifically, using CTRE Magnetic encoder, and the sample Java code from CTRE that we downloaded from GitHub. We are able to run the motor in the forward (green lights on Talon) no problem, but when we set reverseOutput() True the motor stops running (Talon lights stay orange).

At first we thought the problem was that we were using 2017 java code but 2016 Talon firmware (2.0) so we updated the Talon to 2017 version firmware 2.20 and we still have the same problem. We tried reverseSensor() also with no luck.

Has anyone seen this problem?

Any help is appreciated.

Bohdan
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2017, 10:40
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,770
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: TalonSRX Reverse Output

You should be setting your PID speed target to a negative value, not changing the sense of the motor or sensor. Changing the sense of motor or sensor causes the motor to drive clockwise when it should drive counterclockwise, making things worse, not better.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 26-01-2017 at 10:42.
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2017, 10:51
Oblarg Oblarg is online now
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,116
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: TalonSRX Reverse Output

reverseOutput() and reverseSensor() should only be used to make sure that your sensor and motor output are pointing in the same direction (in fact, I am not sure why they have two functions for this...)

To change the direction of the whole system, you should use setInverted().
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2017, 19:34
bohdand bohdand is offline
Registered User
FRC #1099
 
Join Date: Jan 2016
Location: CT
Posts: 6
bohdand is an unknown quantity at this point
Re: TalonSRX Reverse Output

Thanks for the info. I changed the speed to - and it still did not work. I then realized that we had the following:

configPeakOutputVoltage(+12.0f, 0.0f)

so the output would never go negative - opps!

Change to -12 and we are good.

Thanks for the help!
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 19:32.

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