View Single Post
  #1   Spotlight this post!  
Unread 02-16-2015, 06:31 PM
restouffer's Avatar
restouffer restouffer is offline
Registered User
AKA: Bob Stouffer
FRC #2539 (Krypton Cougars)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2010
Location: Palmyra, PA
Posts: 11
restouffer is an unknown quantity at this point
CAN Talon Does Not Move in Speed Mode

We have a CAN Talon SRX wired to an encoder. When in PercentVBus mode, the motor moves and we can see our encoder values changing. When changed to kSpeed mode, the motor does not move. We have checked the System Configuration webpage on the roboRIO, and have even run a Self-Test while this is running. The Self-Test shows an error and an applied throttle, but the motor does not move. We have tried values in the range of 20 to 200.

Here is a snapshot of one Self-Test:
Click image for larger version

Name:	talon-snapshot.png
Views:	49
Size:	17.4 KB
ID:	18391

We followed the code given in the Software Reference:

Code:
        elevatorMotor = new CANTalon(RobotMap::Elevator::elevatorMotorID);
	elevatorMotor->SetControlMode(CANSpeedController::kSpeed);
	elevatorMotor->SetSensorDirection(true);
	elevatorMotor->ConfigSoftPositionLimits(
		RobotMap::Elevator::maxPosition,
		RobotMap::Elevator::minPosition
	);
	elevatorMotor->SetPID(
		RobotMap::Elevator::P,
		RobotMap::Elevator::I,
		RobotMap::Elevator::D
	);
	elevatorMotor->SelectProfileSlot(0);
	elevatorMotor->SetIzone(300);
	elevatorMotor->SetCloseLoopRampRate(48);
	elevatorMotor->SetVoltageRampRate(0);
Code:
elevatorMotor->Set(speed);
Anyone have any thoughts?
Reply With Quote