|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Programming Victors in Java
The window motor on our robot is not working. Is the problem in our program??
if(operator.getRawButton(6)) { Pulley.set(-1.0); } else if(operator.getRawButton(3)) { Pulley.set(1.0); } else { Pulley.set(0); } if(operator.getRawButton(4)) { Scoop.set(-1.0); } else if(operator.getRawButton(5)) { Scoop.set(1.0); } else { Scoop.set(0); } if(operator.getRawButton(1)) { Window.set(-1.0); } else if(operator.getRawButton(2)) { Window.set(1.0); } else { Window.set(0); } Any help would be greatly appreciated! Thanks!! |
|
#2
|
||||
|
||||
|
Re: Programming Victors in Java
Can you also post the declaration and initialization of the Victor object?
The things that you have posted seem to be alright, do the other motors work correctly? |
|
#3
|
|||||
|
|||||
|
Re: Programming Victors in Java
Code:
if(operator.getRawButton(6)) {
Pulley.set(-1.0);
} else if(operator.getRawButton(3)) {
Pulley.set(1.0);
} else {
Pulley.set(0);
}
if(operator.getRawButton(4)) {
Scoop.set(-1.0);
} else if(operator.getRawButton(5)) {
Scoop.set(1.0);
} else {
Scoop.set(0);
}
if(operator.getRawButton(1)) {
Window.set(-1.0);
} else if(operator.getRawButton(2)) {
Window.set(1.0);
} else {
Window.set(0);
}
P.S. I didn't change anything in the code, just reorganized it a bit. |
|
#4
|
||||
|
||||
|
Re: Programming Victors in Java
Yes, drive motors work (they are not listed in the program above) but none of the motors on victors work which are the ones in the program above.
What is the declaration and initialization of the Victor? |
|
#5
|
||||
|
||||
|
Re: Programming Victors in Java
The part where you say Victor Window = new Victor(port);
|
|
#6
|
|||||
|
|||||
|
Re: Programming Victors in Java
Quote:
Code:
Victor Window = new Victor(1); |
|
#7
|
||||
|
||||
|
Re: Programming Victors in Java
Here is our whole code.
|
|
#8
|
||||
|
||||
|
Re: Programming Victors in Java
The victors blink orange.
|
|
#9
|
|||||
|
|||||
|
Re: Programming Victors in Java
That means that they are never getting communication with the cRIO, are you sure that the PWM's are plugged into the correct channels on the digital sidecar?
|
|
#10
|
||||
|
||||
|
Re: Programming Victors in Java
Yes. We double checked that they were plugged in correctly, and we put on a brand new Digital Sidecar so no ports should be broken.
Any other ideas? |
|
#11
|
|||||
|
|||||
|
Re: Programming Victors in Java
It's not a code issue that I can see. What motor controllers are you using for your drivetrain?
|
|
#12
|
||||
|
||||
|
Re: Programming Victors in Java
Jaguars for the driving.
|
|
#13
|
||||
|
||||
|
Re: Programming Victors in Java
Quote:
Based on the Victor datasheet, the problem that you are describing is an improperly wired PWM cable or no PWM cable at all. Code:
Indication : Flashing ORANGE indicator on power up. Problem : No PWM signal. Possible Solutions : 1. Ensure the transmitter and receiver are powered ON. 2. The PWM cable may be improperly connected. Check wire color-coding at each end. Check that the connector is not off a pin at the receiver end. 3. Check for a good PWM signal by connecting a known good servo to the PWM extension cable. If the servo does not move, this can indicate either: a) a faulty receiver b) an improperly connected cable c) a bad PWM extension cable Last edited by eddie12390 : 13-02-2014 at 09:38. |
|
#14
|
||||
|
||||
|
Re: Programming Victors in Java
Determine if you are actually getting a PWM signal in your PWM cable.
You can use an oscilloscope, or a simple digital voltmeter*, or you can plug the cable into a known-good Jaguar or Talon to test it. * ask if you want more detail how to do this |
|
#15
|
||||
|
||||
|
Re: Programming Victors in Java
We think that we have verified the problem is in the code. Can somebody look at the code again and double check for errors?
Thanks! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|