Go to Post Both might accomplish the same "function" or "results" (perhaps a lift of some kind), but there are clear differences in simplicity, in cost, in maintainability, extensibility, and several other "ilities" -- which are a staple of engineering evaluation criteria. - msd [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-08-2012, 16:16
shawn.schwartz's Avatar
shawn.schwartz shawn.schwartz is offline
Lead Systems Engineer
FRC #0004 (Team 4 ELEMENT)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Lake Balboa, CA
Posts: 27
shawn.schwartz is an unknown quantity at this point
Pneumatics Code Help?? - Errors??

Hello CD,

I am trying to get our Pneumatic Gear Shifting Code to work, but every time I deploy to the CRIO, I get this output.

Code:
init:
init:
Deleting directory /Users/Shawn/NetBeansProjects/Drive/build
Deleting directory /Users/Shawn/NetBeansProjects/Drive/suite
Deleting directory /Users/Shawn/NetBeansProjects/Drive/j2meclasses
clean:
Created dir: /Users/Shawn/NetBeansProjects/Drive/build
Compiling 10 source files to /Users/Shawn/NetBeansProjects/Drive/build
compile:
Created dir: /Users/Shawn/NetBeansProjects/Drive/j2meclasses
preverify:
Created dir: /Users/Shawn/NetBeansProjects/Drive/suite
Building jar: /Users/Shawn/NetBeansProjects/Drive/suite/Drive_1.0.0.jar
jar-app:
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]
Romizer processed 182 classes and generated 4 files.
Expanding: /Users/Shawn/NetBeansProjects/Drive/suite/Drive_1.0.0.jar into /Users/Shawn/NetBeansProjects/Drive/suite
Moving 1 file to /Users/Shawn/NetBeansProjects/Drive/suite
Moving 1 file to /Users/Shawn/NetBeansProjects/Drive/suite
Moving 1 file to /Users/Shawn/NetBeansProjects/Drive/suite
Deleting: /Users/Shawn/NetBeansProjects/Drive/image.suite.api
Host OS: Mac OS X 10.8, 10.8
Host JVM: Java HotSpot(TM) 64-Bit Server VM 20.8-b03-424
Target IP: 10.0.4.2
Network interfaces on host:
    en1:  address: 10.148.17.120 netmask: 255.255.248.0
    en0:  address: 10.0.4.6 netmask: 255.0.0.0 <--- on robot's subnet
Connecting FTP @10.0.4.2
upgrade:
Sending local file image.suite
flashapp:
deploy:
init:
[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)
   Waiting for cRIO to reboot (11s)
   Waiting for cRIO to reboot (12s)
[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: MPC5200 -- Wind River Lite5200 BSP.
[cRIO]     Runtime Name: VxWorks
[cRIO]  Runtime Version: 6.3
[cRIO]      BSP version: 2.0/10
[cRIO]          Created: May 27 2011, 11:02:24
[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] NI-RIO Server 4.0.0b8 started successfully.
[cRIO] task 0xe2f758 (NiRioRpc) 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.out: FRC_FPGA
[cRIO] * Loading FRC_NetworkCommunication.out: FRC_NetworkCommunication
[cRIO] FRC_NetworkCommunication was compiled from SVN revision 2923
[cRIO] FPGA Hardware GUID: 0xA14C11BDE4BB64AEF6A86FC52A294CD9
[cRIO] FPGA Software GUID: 0xA14C11BDE4BB64AEF6A86FC52A294CD9
[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_BlackJagBridgePlugin.out: FRC_BlackJagBridgePlugin
[cRIO] FRC_BlackJagBridgePlugin_5200 was compiled from SVN revision 72
[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 11.0rc14
[cRIO] task 0xddbbe0 (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: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] Solenoid module 1 is not present.
[cRIO] Solenoid module 1 is not present.
[cRIO] DIO LoopTiming: 260, expecting: 261
[cRIO] Solenoid module 1 is not present.
[cRIO] Solenoid module 1 is not present.
[cRIO] edu.wpi.first.wpilibj.util.AllocationException: Solenoid channel 1 on module 1 is already allocated
[cRIO]     at edu.wpi.first.wpilibj.Solenoid.initSolenoid(Solenoid.java:33)
[cRIO]     at edu.wpi.first.wpilibj.Solenoid.<init>(Solenoid.java:46)
[cRIO]     at edu.wpi.first.wpilibj.templates.OI.<init>(OI.java:90)
[cRIO]     at edu.wpi.first.wpilibj.templates.commands.CommandBase.init(CommandBase.java:33)
[cRIO]     at edu.wpi.first.wpilibj.templates.RobotTemplate.robotInit(RobotTemplate.java:37)
[cRIO]     at edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:74)
[cRIO]     at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase.java:156)
[cRIO]     in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO]     at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(64)
[cRIO]     at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO]     in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO]     at com.sun.squawk.Isolate.run(1506)
[cRIO]     at java.lang.Thread.run(231)
[cRIO]     in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO]     in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] WARNING: Robots don't quit!
[cRIO] ---> The startCompetition() method (or methods called by it) should have handled the exception above.
Can someone please help me? I tried to trace back the error, but am having trouble, because I have never programmed Pneumatics before. Thank you.
__________________
Shawn Schwartz
Programming/Head of Website & Media, Team 4 ELEMENT
team4element.com
"Innovation distinguishes between a leader and a follower." -Steve Jobs
Reply With Quote
  #2   Spotlight this post!  
Unread 08-08-2012, 16:34
connor.worley's Avatar
connor.worley connor.worley is offline
Registered User
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley/San Diego
Posts: 601
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Pneumatics Code Help?? - Errors??

Is the SOlenoid module in the correct slot? IIRC it must be in slot 3, even on the 8 slot cRIOs running 2012 firmware.
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
Reply With Quote
  #3   Spotlight this post!  
Unread 08-08-2012, 21:09
shawn.schwartz's Avatar
shawn.schwartz shawn.schwartz is offline
Lead Systems Engineer
FRC #0004 (Team 4 ELEMENT)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Lake Balboa, CA
Posts: 27
shawn.schwartz is an unknown quantity at this point
Re: Pneumatics Code Help?? - Errors??

Quote:
Originally Posted by connor.worley
Is the SOlenoid module in the correct slot? IIRC it must be in slot 3, even on the 8 slot cRIOs running 2012 firmware.
So, the blue and silver module has to be in the 3rd slot of the cRIO, right?
__________________
Shawn Schwartz
Programming/Head of Website & Media, Team 4 ELEMENT
team4element.com
"Innovation distinguishes between a leader and a follower." -Steve Jobs
Reply With Quote
  #4   Spotlight this post!  
Unread 08-08-2012, 21:26
connor.worley's Avatar
connor.worley connor.worley is offline
Registered User
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley/San Diego
Posts: 601
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Pneumatics Code Help?? - Errors??

Quote:
Originally Posted by shawn.schwartz View Post
So, the blue and silver module has to be in the 3rd slot of the cRIO, right?
Yes, it should be the one with LEDs on its side.
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
Reply With Quote
  #5   Spotlight this post!  
Unread 08-08-2012, 22:02
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,190
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Pneumatics Code Help?? - Errors??

Quote:
Originally Posted by connor.worley View Post
Yes, it should be the one with LEDs on its side.
It should say 9472.
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 09-08-2012, 00:06
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Pneumatics Code Help?? - Errors??

The error that you're getting has to do with your code. You are initializing the object on that port more than once. Try and find where you initialize the object for the solenoid and find out why that code is being run more than once. (If you're not familiar with instances in java, I'd suggest you look into it - quick summary - 'objectName = new Object()' is the initialization of the object)

Once you find it, I'd suggest using singleton instances of all physical components of your robot. Works much better and prevents errors like this.

Example of singleton instance :
Code:
RobotDrive driveInstance
public static RobotDrive getRobotDrive() {
    if(drive == null) {
        drive = new RobotDrive(1,2,3,4);
    }
    return drive;
}
__________________
All opinions are my own.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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