|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Talon SR speed control recieving power, not outputting power
On one of our test bench robots for Java, we have a simple robot drive with 4 Talon SR speed controllers. This robot was functioning fine with Labview, but when we switched to Java, the speed controllers stopped functioning. We have tried many different programs, ranging from using the sliders on the Smart Dashboard to a full scale joystick hookup. However, no matter which program we use, we get the same problem. The program builds successfully, but no amount of movement of the sliders or joysticks will control the speed controllers, which sit there mocking us with a solid orange light. We have tried everything, from older versions of Eclipse to re-imaging the roboRio to update the roboRio hardware. Does anyone have any ideas on why this is happening?
|
|
#2
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
Quote:
|
|
#3
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
If the Talon LED is solid orange, then the Talon is getting a healthy PWM signal from the RIO with a neutral value. That means you are likely creating the Talon object correctly, but not giving it a nonzero value in the set() routine.
You can try deploying a simple java app that just sets the value to a fixed constant, for example: myTalon.set(0.10) for 10% and see what happens. You can post your code like Jalerre suggested. Or trying using the debugger to peek at the value being passed to the Talon. |
|
#4
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
My mistake. They are flashing orange.
We are using robo builder, which generates a large folder that I send to the robot using WPILIB java deploy Here is a google drive link to the folder: https://drive.google.com/drive/folde...llkWktWTkJ2MEk Last edited by Mikey Richards : 05-11-2015 at 21:37. |
|
#5
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
Okay. We are using robo builder, which creates a whole folder full of files that I send to the robot with WPILIB java deploy. Here is the link to the folder on google drive.
https://drive.google.com/drive/folde...llkWktWTkJ2MEk |
|
#6
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
Your SR's aren't getting a signal from the RoboRIO's PWM.
1) Is your robot in disabled mode? If yes, connect with the DS and put it into Teleop, they should now be solid orange or green or red 2) Is your robot program actually running? Check the DS that your code is actually running, it could just be crashing and you don't know it. 3) Is it on the right port? A bit of a silly question, but still worth checking. 4) Is the PWM cable faulty? Unlikely, but your robot could have been physically damaged. |
|
#7
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
1.) We have run this multiple times, and we are sure it is enabled.
2.) The smart dashboard is showing us the sliders to control the speed controllers in test mode, so the code should be running 3 and 4.) We had this robot working fine in labview, and we made no physical changes at all. We are completely sure the wires are plugged into the right port and we used a multimeter to check the voltage, and electricity is making it to the speed controller. |
|
#8
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
Quote:
|
|
#9
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
As for code, there is a link further up in the forum.
|
|
#10
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
Jaci is correct, your link does not work...see attached.
|
|
#11
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
If you have an oscilloscope handy, you can check the PWM cables to really be sure you're sending values. If you get a good reading then it just might be the motor controller. However, if you get nothing, then it's probably your code, your RoboRio, the PWM cable (make sure it's seated properly in the RoboRio)
|
|
#12
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
Ok. I had the sharing settings set up incorrectly. I am pretty sure the folder works now.
|
|
#13
|
||||
|
||||
|
Re: Talon SR speed control recieving power, not outputting power
Here is the robot.java file of a test project that we downloaded from FIRST for testing the robot in java. Same story, flashing orange lights.
Code:
package org.usfirst.frc.team3812.robot;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class Robot extends IterativeRobot {
RobotDrive myRobot;
Joystick stick;
int autoLoopCounter;
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
myRobot = new RobotDrive(0,1);
stick = new Joystick(0);
}
/**
* This function is run once each time the robot enters autonomous mode
*/
public void autonomousInit() {
autoLoopCounter = 0;
}
/**
* This function is called periodically during autonomous
*/
public void autonomousPeriodic() {
if(autoLoopCounter < 100) //Check if we've completed 100 loops (approximately 2 seconds)
{
myRobot.drive(-0.5, 0.0); // drive forwards half speed
autoLoopCounter++;
} else {
myRobot.drive(0.0, 0.0); // stop robot
}
}
/**
* This function is called once each time the robot enters tele-operated mode
*/
public void teleopInit(){
}
/**
* This function is called periodically during operator control
*/
public void teleopPeriodic() {
myRobot.arcadeDrive(stick);
}
/**
* This function is called periodically during test mode
*/
public void testPeriodic() {
LiveWindow.run();
}
}
Last edited by Mikey Richards : 07-11-2015 at 13:46. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|