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)

18mfogwell 13-02-2014 09:07

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!!

eddie12390 13-02-2014 09:11

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?

notmattlythgoe 13-02-2014 09:13

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);
}

One thing just for future reference. Convention when writing java is to name your variables with a lowercase letter for the first letter. Also, can I see the code you used to set up the motors? What is the light doing on the motor controller when you try to run it?

P.S. I didn't change anything in the code, just reorganized it a bit.

18mfogwell 13-02-2014 09:16

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?

eddie12390 13-02-2014 09:17

Re: Programming Victors in Java
 
Quote:

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

The part where you say Victor Window = new Victor(port);

notmattlythgoe 13-02-2014 09:18

Re: Programming Victors in Java
 
Quote:

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

It's the part where you did this:

Code:

Victor Window = new Victor(1);
Are the lights on the victors indicating the motors should be moving, are they blinking orange, or are they staying solid orange?

18mfogwell 13-02-2014 09:18

Re: Programming Victors in Java
 
1 Attachment(s)
Here is our whole code.

18mfogwell 13-02-2014 09:19

Re: Programming Victors in Java
 
The victors blink orange.

notmattlythgoe 13-02-2014 09:20

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342331)
The victors blink orange.

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?

18mfogwell 13-02-2014 09:33

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?

notmattlythgoe 13-02-2014 09:34

Re: Programming Victors in Java
 
Quote:

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

It's not a code issue that I can see. What motor controllers are you using for your drivetrain?

18mfogwell 13-02-2014 09:35

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342337)
It's not a code issue that I can see. What motor controllers are you using for your drivetrain?

Jaguars for the driving.

eddie12390 13-02-2014 09:36

Re: Programming Victors in Java
 
Quote:

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

Can you take the PWM cable out of the Window motor Victor and verify that all of the pins are 100% straight? Plugging the PWM cable in correctly can sometimes take a few tries and if the pins are even a little bent they may not have been making good contact.

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


Ether 13-02-2014 09:37

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342336)
Any other ideas?

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

18mfogwell 13-02-2014 10:30

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!

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.

notmattlythgoe 13-02-2014 12:35

Re: Programming Victors in Java
 
Can you swap this in for your window code and tell me what shows up in the netbeans console when you run?

Code:

if(operator.getRawButton(1))
{
        System.out.println("Button 1 Pressed");
        Window.set(-1.0);
}
else if(operator.getRawButton(2))
 {
        System.out.println("Button 2 Pressed");
        Window.set(1.0);
}
else
{
        System.out.println("No Buttons Pressed");
        Window.set(0);
}


18mfogwell 13-02-2014 12:45

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342474)
Can you swap this in for your window code and tell me what shows up in the netbeans console when you run?

Code:

if(operator.getRawButton(1))
{
        System.out.println("Button 1 Pressed");
        Window.set(-1.0);
}
else if(operator.getRawButton(2))
 {
        System.out.println("Button 2 Pressed");
        Window.set(1.0);
}
else
{
        System.out.println("No Buttons Pressed");
        Window.set(0);
}


It downloaded fine, but still did not work. Since the cRIO has connection to it does that mean that its not the Digital Sidecar? or could that be broken?

notmattlythgoe 13-02-2014 12:50

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342484)
It downloaded fine, but still did not work. Since the cRIO has connection to it does that mean that its not the Digital Sidecar? or could that be broken?

What showed up in the console window on netbeans when you were pressing the buttons? That's what I need to know.

18mfogwell 13-02-2014 13:06

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342487)
What showed up in the console window on netbeans when you were pressing the buttons? That's what I need to know.

ant -f C:\\Users\\Developer\\Documents\\NetBeansProjects\ \Competition deploy run
clean:
Deleting directory C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\classes
[crio-compile] ./src, C:/Users/Developer/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/Developer/sunspotfrcsdk\lib\networktables-crio.jar, C:/Users/Developer/sunspotfrcsdk\lib\squawk.jar -> ./build/classes
Compiling 2 source files to C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\classes
compile:
preverify:
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\preverify
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\preverify.raw.util
[crio-preverify] ./build/classes, , C:/Users/Developer/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/Developer/sunspotfrcsdk\lib\networktables-crio.jar, C:/Users/Developer/sunspotfrcsdk\lib\squawk.jar -> ./build/preverify
Expanding: C:\Users\Developer\sunspotfrcsdk\lib\wpilibj.jar into C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\preverify
Expanding: C:\Users\Developer\sunspotfrcsdk\lib\networktables-crio.jar into C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\preverify
jar:
[crio-jar] ./build/preverify, ./resources -> ./build/app.jar
Building jar: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\app.jar
suite:
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
[crio-suite] ./build/app.jar -> ./build/suite/image
CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
[translating suite image [closed: false, parent: squawk] ...]
### Excluding compile: com.sun.squawk.Method::getParameterTypes
### Excluding compile: com.sun.squawk.SymbolParser::getSignatureTypeAt
[Including resource: META-INF/MANIFEST.MF]
[Including resource: META-INF/maven/edu.wpi.first.wpilib.networktables.java/NetworkTablesAzalea/pom.properties]
[Including resource: META-INF/maven/edu.wpi.first.wpilib.networktables.java/NetworkTablesAzalea/pom.xml]
Romizer processed 389 classes and generated 4 files.
Expanding: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\app.jar into C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
Deleting: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\image.suite.api
deploy:
[crio-configure] Configuration files not included in this version of the sdk
[crio-configure] Checking that crio is configured for Java
Host OS: Windows 7 6.1, 6.1
Host JVM: Java HotSpot(TM) Client VM 24.51-b03
Target IP: 10.44.60.2
Network interfaces on host:
Realtek PCIe FE Family Controller: address: 10.44.60.5 netmask: 255.0.0.0 <--- on robot's subnet
Realtek RTL8192CE Wireless LAN 802.11n PCI-E NIC: address: 192.168.1.14 netmask: 255.255.255.254
Connecting FTP @10.44.60.2
[crio-deploy] ./build/suite/image.suite -> 10.44.60.2
Sending local file image.suite
run:
[cRIO] [OTA Server] ********* REBOOTING cRIO *********
[cRIO]
Waiting for cRIO to reboot (1s)
Waiting for cRIO to reboot (2s)
Waiting for cRIO to reboot (3s)
Waiting for cRIO to reboot (4s)
Waiting for cRIO to reboot (5s)
Waiting for cRIO to reboot (6s)
Waiting for cRIO to reboot (7s)
Waiting for cRIO to reboot (8s)
Waiting for cRIO to reboot (9s)
Waiting for cRIO to reboot (10s)
[cRIO]
[cRIO] -> * Loading debug.o: debug
[cRIO] Debugging is up, target server mounted at /tsfs
[cRIO]
[cRIO]
[cRIO] VxWorks
[cRIO]
[cRIO] Copyright 1984-2006 Wind River Systems, Inc.
[cRIO]
[cRIO] CPU: cRIO-FRC II
[cRIO] Runtime Name: VxWorks
[cRIO] Runtime Version: 6.3
[cRIO] BSP version: 1.0/0
[cRIO] Created: May 23 2013, 16:00:09
[cRIO] ED&R Policy Mode: Deployed
[cRIO] WDB Comm Type: WDB_COMM_END
[cRIO] WDB: Ready.
[cRIO]
[cRIO] * Loading nisysrpc.out: nisysrpc
[cRIO] * Loading NiRioRpc.out: NiRioRpc
[cRIO] * Loading nivissvc.out: nivissvc
[cRIO] * Loading nivision.out: nivision
[cRIO] task 0x1830d28 (Service Locator Thread 5) deleted: errno=0 (0) status=0 (0)
[cRIO] NI-RIO Server 13.0 started successfully.
[cRIO] task 0x172b2e0 (NiRioRpc) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading visa32.out: visa32
[cRIO] * Loading niserial.out: niserial
[cRIO] task 0x1a09218 (VISA Jungo Init Thread) deleted: errno=196709 (0x30065) status=-1073807360 (0xbfff0000)
[cRIO] * Loading NiFpgaLv.out: NiFpgaLv
[cRIO] * Loading FRC_FPGA_ChipObject.out: FRC_FPGA_ChipObject
[cRIO] task 0x19db4a0 (Service Locator Thread 6) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x19db4a0 (Service Locator Thread 7) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x19db4a0 (Service Locator Thread 8) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading FRC_NetworkCommunication.outtask 0x13a75e8 (nisysapi-mDns) deleted: errno=0 (0) status=0 (0)
[cRIO] : FRC_NetworkCommunication
[cRIO] FRC_NetworkCommunication version: p4-1.4.0a18
[cRIO] FPGA Hardware GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Software GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Hardware Version: 2012
[cRIO] FPGA Software Version: 2012
[cRIO] FPGA Hardware Revision: 1.6.4
[cRIO] FPGA Software Revision: 1.6.4
[cRIO] * Loading FRC_JavaVM.out: FRC_JavaVM
[cRIO]
[cRIO]
[cRIO] [OTA Server] Version: 2012 FRC, Jan 5 2012, 17:20:48
[cRIO]
[cRIO]
[cRIO] Welcome to LabVIEW Real-Time 13.0
[cRIO] task 0x1792eb8 (sysapi-rpc) deleted: errno=0 (0) status=0 (0)
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Nov 5 2011, 14:34:13
[cRIO] FPGA Hardware GUID: 0x1394f6dc1feb42ec6910e5767ed1d22c
[cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] Default robotInit() method running, consider providing your own
[cRIO] task 0xca7cc8 (worker.0) deleted: errno=0 (0) status=0 (0)

18mfogwell 13-02-2014 13:07

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342487)
What showed up in the console window on netbeans when you were pressing the buttons? That's what I need to know.

Is this what you wanted?

notmattlythgoe 13-02-2014 13:11

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342495)
Is this what you wanted?

Yes. Did you enable the robot before copying the log?

18mfogwell 13-02-2014 13:16

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342496)
Yes. Did you enable the robot before copying the log?

I think so.

[cRIO] Robot Drive... Output not updated often enough.

That is the only line that is not in the previous post, i don't know when it appeared.

notmattlythgoe 13-02-2014 13:18

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342502)
I think so.

[cRIO] Robot Drive... Output not updated often enough.

That is the only line that is not in the previous post, i don't know when it appeared.

And you got just one of those lines?

18mfogwell 13-02-2014 13:21

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342504)
And you got just one of those lines?

Yes, only one.

notmattlythgoe 13-02-2014 13:24

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342508)
Yes, only one.

At the bottom of your operatorControl method can you change the catch block to this:

Code:

catch(Exception e)
{
        e.printStackTrace();
}


18mfogwell 13-02-2014 13:28

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342510)
At the bottom of your operatorControl method can you change the catch block to this:

Code:

catch(Exception e)
{
        e.printStackTrace();
}


Yup I did.

notmattlythgoe 13-02-2014 13:30

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342513)
Yup I did.

Did anything else print out when you loaded the code an enabled?

18mfogwell 13-02-2014 13:33

Re: Programming Victors in Java
 
no

notmattlythgoe 13-02-2014 13:37

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342519)
no

What joystick are you using to control this? Is the joystick that you are using to scale the speed of the drive train working when you press the button?

Have you verified that the operator joystick actually works?

18mfogwell 13-02-2014 13:42

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342521)
What joystick are you using to control this? Is the joystick that you are using to scale the speed of the drive train working when you press the button?

Have you verified that the operator joystick actually works?

Yes, we are using the joystick that controls the drive train.

18mfogwell 13-02-2014 13:53

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342521)
What joystick are you using to control this? Is the joystick that you are using to scale the speed of the drive train working when you press the button?

Have you verified that the operator joystick actually works?

We are assuming that the operator joystick works considering the driver station can see it. In the setup tab, when we press any button, we get feedback (the *****)

notmattlythgoe 13-02-2014 14:00

Re: Programming Victors in Java
 
Quote:

Originally Posted by 18mfogwell (Post 1342538)
We are assuming that the operator joystick works considering the driver station can see it. In the setup tab, when we press any button, we get feedback (the *****)

I'd make the same assumption too, so you're right it is probably working.

Could you put the following line right before your operatorControl while loop and run the code, then send me the log as you did before.

Code:

System.out.println("Starting operator control");
while ( isOperatorControl() && isEnabled() )


18mfogwell 13-02-2014 15:28

Re: Programming Victors in Java
 
Quote:

Originally Posted by notmattlythgoe (Post 1342544)
I'd make the same assumption too, so you're right it is probably working.

Could you put the following line right before your operatorControl while loop and run the code, then send me the log as you did before.

Code:

System.out.println("Starting operator control");
while ( isOperatorControl() && isEnabled() )


ant -f C:\\Users\\Developer\\Documents\\NetBeansProjects\ \Competition deploy run
clean:
Deleting directory C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\classes
[crio-compile] ./src, C:/Users/Developer/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/Developer/sunspotfrcsdk\lib\networktables-crio.jar, C:/Users/Developer/sunspotfrcsdk\lib\squawk.jar -> ./build/classes
Compiling 2 source files to C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\classes
compile:
preverify:
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\preverify
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\preverify.raw.util
[crio-preverify] ./build/classes, , C:/Users/Developer/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/Developer/sunspotfrcsdk\lib\networktables-crio.jar, C:/Users/Developer/sunspotfrcsdk\lib\squawk.jar -> ./build/preverify
Expanding: C:\Users\Developer\sunspotfrcsdk\lib\wpilibj.jar into C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\preverify
Expanding: C:\Users\Developer\sunspotfrcsdk\lib\networktables-crio.jar into C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\preverify
jar:
[crio-jar] ./build/preverify, ./resources -> ./build/app.jar
Building jar: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\app.jar
suite:
Created dir: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
[crio-suite] ./build/app.jar -> ./build/suite/image
CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
[translating suite image [closed: false, parent: squawk] ...]
### Excluding compile: com.sun.squawk.Method::getParameterTypes
### Excluding compile: com.sun.squawk.SymbolParser::getSignatureTypeAt
[Including resource: META-INF/MANIFEST.MF]
[Including resource: META-INF/maven/edu.wpi.first.wpilib.networktables.java/NetworkTablesAzalea/pom.properties]
[Including resource: META-INF/maven/edu.wpi.first.wpilib.networktables.java/NetworkTablesAzalea/pom.xml]
Romizer processed 389 classes and generated 4 files.
Expanding: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\app.jar into C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\Comp etition\build\suite
Deleting: C:\Users\Developer\Documents\NetBeansProjects\Comp etition\image.suite.api
deploy:
[crio-configure] Configuration files not included in this version of the sdk
[crio-configure] Checking that crio is configured for Java
Host OS: Windows 7 6.1, 6.1
Host JVM: Java HotSpot(TM) Client VM 24.51-b03
Target IP: 10.44.60.2
Network interfaces on host:
Realtek PCIe FE Family Controller: address: 10.44.60.5 netmask: 255.0.0.0 <--- on robot's subnet
Realtek RTL8192CE Wireless LAN 802.11n PCI-E NIC: address: 192.168.1.14 netmask: 255.255.255.254
Connecting FTP @10.44.60.2
[crio-deploy] ./build/suite/image.suite -> 10.44.60.2
Sending local file image.suite
run:
[cRIO] [OTA Server] ********* REBOOTING cRIO *********
[cRIO]
Waiting for cRIO to reboot (1s)
Waiting for cRIO to reboot (2s)
Waiting for cRIO to reboot (3s)
Waiting for cRIO to reboot (4s)
Waiting for cRIO to reboot (5s)
Waiting for cRIO to reboot (6s)
Waiting for cRIO to reboot (7s)
Waiting for cRIO to reboot (8s)
Waiting for cRIO to reboot (9s)
Waiting for cRIO to reboot (10s)
[cRIO]
[cRIO] -> * Loading debug.o: debug
[cRIO] Debugging is up, target server mounted at /tsfs
[cRIO]
[cRIO]
[cRIO] VxWorks
[cRIO]
[cRIO] Copyright 1984-2006 Wind River Systems, Inc.
[cRIO]
[cRIO] CPU: cRIO-FRC II
[cRIO] Runtime Name: VxWorks
[cRIO] Runtime Version: 6.3
[cRIO] BSP version: 1.0/0
[cRIO] Created: May 23 2013, 16:00:09
[cRIO] ED&R Policy Mode: Deployed
[cRIO] WDB Comm Type: WDB_COMM_END
[cRIO] WDB: Ready.
[cRIO]
[cRIO] * Loading nisysrpc.out: nisysrpc
[cRIO] * Loading NiRioRpc.out: NiRioRpc
[cRIO] task 0x188c3a8 (VISA Jungo Init Thread) deleted: errno=196709 (0x30065) status=-1073807360 (0xbfff0000)
[cRIO] * Loading nivissvc.out: nivissvc
[cRIO] * Loading nivision.out: nivision
[cRIO] task 0x18efe68 (Service Locator Thread 5) deleted: errno=0 (0) status=0 (0)
[cRIO] NI-RIO Server 13.0 started successfully.
[cRIO] task 0x1737848 (NiRioRpc) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x1a03b78 (Service Locator Thread 6) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x1a03b78 (Service Locator Thread 7) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x1a03b78 (Service Locator Thread 8) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x162ea90 (nisysapi-mDns) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading visa32.out: visa32
[cRIO] * Loading niserial.out: niserial
[cRIO] * Loading NiFpgaLv.out: NiFpgaLv
[cRIO] * Loading FRC_FPGA_ChipObject.out: FRC_FPGA_ChipObject
[cRIO] * Loading FRC_NetworkCommunication.out: FRC_NetworkCommunication
[cRIO] FRC_NetworkCommunication version: p4-1.4.0a18
[cRIO] FPGA Hardware GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Software GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Hardware Version: 2012
[cRIO] FPGA Software Version: 2012
[cRIO] FPGA Hardware Revision: 1.6.4
[cRIO] FPGA Software Revision: 1.6.4
[cRIO] * Loading FRC_JavaVM.out: FRC_JavaVM
[cRIO]
[cRIO]
[cRIO] [OTA Server] Version: 2012 FRC, Jan 5 2012, 17:20:48
[cRIO]
[cRIO]
[cRIO] Welcome to LabVIEW Real-Time 13.0
[cRIO] task 0x18647d0 (sysapi-rpc) deleted: errno=0 (0) status=0 (0)
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Nov 5 2011, 14:34:13
[cRIO] FPGA Hardware GUID: 0x1394f6dc1feb42ec6910e5767ed1d22c
[cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] edu.wpi.first.wpilibj.networktables2.server.Server ConnectionAdapter@e entered connection state: GOT_CONNECTION_FROM_CLIENT
[cRIO] edu.wpi.first.wpilibj.networktables2.server.Server ConnectionAdapter@e entered connection state: CONNECTED_TO_CLIENT
[cRIO] Default robotInit() method running, consider providing your own
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] task 0xc8cb30 (worker.0) deleted: errno=0 (0) status=0 (0)

notmattlythgoe 13-02-2014 15:33

Re: Programming Victors in Java
 
I am utterly confused right now. The line that I had you add should have printed when you enabled the robot in teleop, but it didn't. You are enabling in teleop correct? If you are, I have no idea what the problem is. Have you tried creating another project and trying some code from there?

MamaSpoldi 13-02-2014 16:14

Re: Programming Victors in Java
 
If it is not even printing that initial statement, then maybe you are failing to deploy the code update and therefore not actually running the code that has the print statement in it. That could also account for the fact that for a long time the orange lights were flashing but now they are remaining solid... that could have been a result of finally deploying that code update.

Joe Ross 13-02-2014 16:19

Re: Programming Victors in Java
 
Is this the location of the project you are trying to run?
Code:

C:\\Users\\Developer\\Documents\\NetBeansProjects\ \Competition

18mfogwell 13-02-2014 17:30

Re: Programming Victors in Java
 
Okay, thanks for everybodies help!!
We found that the problem was that we have 2 programs under the same project.

Thank you to everyone!


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