Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Motors (http://www.chiefdelphi.com/forums/forumdisplay.php?f=52)
-   -   CAN follower mode (http://www.chiefdelphi.com/forums/showthread.php?t=141926)

JamesB 16-01-2016 21:32

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?

AustinShalit 16-01-2016 21:41

Re: CAN follower mode
 
Can you post more code please?

JamesB 17-01-2016 10:52

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);
}

ozrien 18-01-2016 21:40

Re: CAN follower mode
 
Be sure to update your Talon SRX Firmware to latest.

loafdog 20-02-2016 10:25

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


All times are GMT -5. The time now is 22:59.

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