Go to Post "Mother nature does not give partial credit" -Woodie Flowers, Kickoff 2003 - TerryDolan [more]
Home
Go Back   Chief Delphi > Technical > Motors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-01-2016, 21:32
JamesB JamesB is offline
Registered User
FRC #4103
 
Join Date: Nov 2015
Location: avon, IN
Posts: 5
JamesB is an unknown quantity at this point
CAN follower mode

So I am trying to make one CAN Talon from Cross the Road follow another. According to their documentation you can use (in C++)
motor->SetControlMode(motor->kFollower);
motor->Set(canId);
to make it follow the motor with the canId specified. When I try to run this on the robot the motor I set to follower doesn't do anything. Am I missing something?
  #2   Spotlight this post!  
Unread 16-01-2016, 21:41
AustinShalit's Avatar
AustinShalit AustinShalit is offline
Registered User
AKA: אוסטין
no team (WPILib Suite Developer)
 
Join Date: Dec 2013
Rookie Year: 2008
Location: Los Angeles/Worcester/Israel
Posts: 97
AustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of light
Re: CAN follower mode

Can you post more code please?
__________________
  #3   Spotlight this post!  
Unread 17-01-2016, 10:52
JamesB JamesB is offline
Registered User
FRC #4103
 
Join Date: Nov 2015
Location: avon, IN
Posts: 5
JamesB is an unknown quantity at this point
Re: CAN follower mode

This is all the code to make our robot move forward the specified feet. leftMot is on id 4, rightMot is on id 3 and diameter is just a constant.
void driveFeet(double feet=10,double speed=.5){
leftMot->SetPosition(0);
rightMot->SetPosition(0);
rightMot->SetControlMode(rightMot->kFollower);
rightMot->Set(4);
double distance=abs(feet/(3.1415*diameter)*1000.0);
while(abs(leftMot->GetEncPosition())<distance){
leftMot->Set((feet>0?speed:-speed)*(1-(abs(leftMot->GetEncPosition())/distance)));
}
leftMot->Set(0);
}
  #4   Spotlight this post!  
Unread 18-01-2016, 21:40
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: CAN follower mode

Be sure to update your Talon SRX Firmware to latest.
  #5   Spotlight this post!  
Unread 20-02-2016, 10:25
loafdog loafdog is offline
Registered User
AKA: Maciej
FRC #2876 (DevilBotz)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Burlington, MA
Posts: 33
loafdog is an unknown quantity at this point
Re: CAN follower mode

We are having a similar problem.. can't get slave/follower talon to work follow masters. Individually the talons all work if we make them masters. All fw is up to date. Don't see any faults in web ui. We tried steps in sw manual section "16.31.3. Confirm Slave/Follower Talons are driving ". When the master is output signal, the follower is doing nothing. We don't see leds change from solid orange. We use smartdashboard to change the follower to be in percentvbus mode and talon works fine. When talon is in follower mode, the webui self-test shows mode as "mode 5 follower". All this used to work and we aren't sure what may have broken it. Any ideas what to check next?
Thanks.
-Maciej
Closed Thread


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 22:59.

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