Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Programming Victors in Java (http://www.chiefdelphi.com/forums/showthread.php?t=126379)

notmattlythgoe 13-02-2014 10:33

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342381)
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!

The reason that I'm confident that its not the code is the fact that

Code:

Victor Scoop = new Victor(4);  //The motor in port 4 of the DS is called Flap
Victor Window = new Victor(5);  //The motor in port 5 of the DS is called Lift
Victor Pulley = new Victor(6);  //The motor in port 6 of the DS is called Roll

those three lines alone would cause the Victors' lights to become a steady orange when the robot is enabled. The fact that they are blinking orange makes me believe something is going on elsewhere. Unless of course there are errors appearing in the console when you run that we're not aware of. Are there any errors in the netbeans console when you run the code?

18mfogwell 13-02-2014 10:39

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342384)
The reason that I'm confident that its not the code is the fact that

Code:

Victor Scoop = new Victor(4);  //The motor in port 4 of the DS is called Flap
Victor Window = new Victor(5);  //The motor in port 5 of the DS is called Lift
Victor Pulley = new Victor(6);  //The motor in port 6 of the DS is called Roll

those three lines alone would cause the Victors' lights to become a steady orange when the robot is enabled. The fact that they are blinking orange makes me believe something is going on elsewhere. Unless of course there are errors appearing in the console when you run that we're not aware of. Are there any errors in the netbeans console when you run the code?

No, there are no errors

notmattlythgoe 13-02-2014 10:44

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342388)
No, there are no errors

Any chance we could get a picture of the connections on both ends of the pwm cables for the victors? Meaning the one end going into the Victors and the other end going into the Digital Sidecar?

Also, you said that you verified that you are pretty sure it is a code issue. What steps did you take to verify this?

MamaSpoldi 13-02-2014 10:51

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342381)
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!

I looked at the code as well and see no errors in it.

I also agree with the others who have pointed out that the flashing orange light on the Victors is an indication that it is not getting any signal. You could think of this as meaning that it is not "attached" to the software. This will occur when you have not programmed in that device yet (ie. you have no declaration that specifies that PWM port number) or if the cable is faulty or not connected properly. Have you verified that they are plugged in correctly (ie. not backwards, signal pin in the correct position).

18mfogwell 13-02-2014 11:36

Re: Programming Victors in Java
 
When we place the victor into a drive port (ports 1, 2, 9, or 10 via PWM) it works fine, so we are thinking maybe something in the code is preventing the digital sidecar from giving power to any other ports. Also, when it is in its regular port the cRIO can connect to it (the orange light is solid) it just doesn't move.

Any ideas??

Thanks!!!

notmattlythgoe 13-02-2014 11:40

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342423)
When we place the victor into a drive port (ports 1, 2, 9, or 10 via PWM) it works fine, so we are thinking maybe something in the code is preventing the digital sidecar from giving power to any other ports. Also, when it is in its regular port the cRIO can connect to it (the orange light is solid) it just doesn't move.

Any ideas??

Thanks!!!

Ok, so not it is solid orange and not blinking? Was this always the case?

Are you sure the buttons you are getting from the joystick are the correct ones? What are you expecting the behavior of the motors to be when you press these buttons?

18mfogwell 13-02-2014 11:46

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342426)
Ok, so not it is solid orange and not blinking? Was this always the case?

Are you sure the buttons you are getting from the joystick are the correct ones? What are you expecting the behavior of the motors to be when you press these buttons?

No, it wasn't always the case. It just started being solid light.
We are expecting the motor to move forward and backwards at 100% power.

notmattlythgoe 13-02-2014 11:49

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342434)
No, it wasn't always the case. It just started being solid light.
We are expecting the motor to move forward and backwards at 100% power.

When you do what exactly? Walk me through the process.

18mfogwell 13-02-2014 11:50

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342436)
When you do what exactly? Walk me through the process.

What did we do to get the light to be solid? Is that what you are asking?

notmattlythgoe 13-02-2014 11:53

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342437)
What did we do to get the light to be solid? Is that what you are asking?

No. Walk me through what your operator should do to get the motor to turn full forward/backward. Which button they are going to press and are they just pressing it or are they holding it? What should happen when they let the button go?

18mfogwell 13-02-2014 11:56

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342440)
No. Walk me through what your operator should do to get the motor to turn full forward/backward. Which button they are going to press and are they just pressing it or are they holding it? What should happen when they let the button go?

Okay, the buttons are buttons 1 & 2. Not sure which makes it go forward, which one backwards. So if they press it, it will move until they let go. When our driver lets go, it wont move.

notmattlythgoe 13-02-2014 11:59

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342443)
Okay, the buttons are buttons 1 & 2. Not sure which makes it go forward, which one backwards. So if they press it, it will move until they let go. When our driver lets go, it wont move.

Ok, your code seems to include that logic in it correctly. A couple of things to check, are you sure the buttons that are getting pressed are actually mapped to buttons 1 and 2, and have you checked to make sure your operator joystick is in slot 3 in the setup tab of the driver station?

18mfogwell 13-02-2014 12:10

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342447)
Ok, your code seems to include that logic in it correctly. A couple of things to check, are you sure the buttons that are getting pressed are actually mapped to buttons 1 and 2, and have you checked to make sure your operator joystick is in slot 3 in the setup tab of the driver station?

Yea we are doing that correctly, do you know of anything in the code preventing the power from going to slots 3-8? because 1, 2, 9, and 10 work fine. But even though they don't move the cRIO can still see them.

notmattlythgoe 13-02-2014 12:24

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342459)
Yea we are doing that correctly, do you know of anything in the code preventing the power from going to slots 3-8? because 1, 2, 9, and 10 work fine. But even though they don't move the cRIO can still see them.

Not that I can tell. When you hold down button 1 or button 2 on the operator joystick what does the light on the Window Victor do? Does it stay a solid orange?

18mfogwell 13-02-2014 12:30

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342469)
Not that I can tell. When you hold down button 1 or button 2 on the operator joystick what does the light on the Window Victor do? Does it stay a solid orange?

Yes, it blinks until it is enabled. Then it stays solid whether we press it or not.


All times are GMT -5. The time now is 18:31.

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