Log in

View Full Version : RobotBuilder and first Java code.... help needed


Coach Seb
30-06-2016, 11:11
Good morning,
transitioning to Java from Labview. This is our first attempt in setting a practice bot using Java.

We installed Eclipse, Java and all driver stations stuff. So far so good.

We used Robot Builder plugin and create a simple project with 4 motor drive subsystem and a compressor subsystem.

We have Left Front, Left Rear, Right Front & Right Rear. Using Talon SRX with CAN to drive 4 CIMs on the wheeled drive chassis.

I am successful in downloading the code on the roboRIO, enable test mode and open the smartdashboard to test the device. Each motor display as expected on the Smartdashboard.

Left Front and Right Front work just fine. Each one has the PercenVBus selected and we apply percentage using the slider.... motor is moving fwd/bwd as expected....

Left Rear and Right Rear are not moving... The LEDs on the Talon SRX are changing as they should.

I swapped the motors... Left Front became Left Rear.... nothing is moving... LED are working as expected... i see flashing green when we command to move fwd and flashing red when we command bwd....

Kinda stuck on why it behave this way... any idea would be appreciated...

Thanks in advance.

Bkeeneykid
30-06-2016, 11:52
It looks like you have a physical disconnect between your rear motor controllers and your rear motor. I could be wrong, but if the lights are indicating the desired direction, that is the output. Try using a multimeter at various points on the connection between the motor controller and motor to find the problem connection. This doesn't sound like any sort of programming issue. To make sure this theory is correct, you can go into the web dashboard on the Rio (go to roborio-5860-frc.local in Internet Explorer), and run a self test on one of the affected SRXs while you putting the desired control into it.

euhlmann
30-06-2016, 12:13
To verify that hardware is the problem, check the output current of the talon. It should be on the test page, otherwise use the getOutputCurrent method. If the current is zero, you have a bad connection somewhere.

mikets
30-06-2016, 12:13
If you swapped the motors and the problem remains and since the lights on the motor controllers are functioning properly, it means the problem is either in the wiring, most likely the connectors or the motor controller itself. I assume you are using Anderson connectors, you may examine the contacts inside the connectors. Sometimes, the contacts may have slipped out on the controller side. If everything still looks fine, you may want to replace the motor controllers in question.

Coach Seb
04-07-2016, 10:53
Thank you everyone... dahhhhh.... wiring issues... its now fix and let's move to the next issues which is controlling with joystick...

Ouroboroz
06-07-2016, 17:01
Thank you everyone... dahhhhh.... wiring issues... its now fix and let's move to the next issues which is controlling with joystick...

So what exactly is your issue with the joystick?

To use the joystick to move you can either pull axis values from the Joystick or some methods like arcadeDrive directly take the Joystick object as a parameter.