Go to Post Let me tell you, the scariest day ever was the day that I realized since I am a mentor, people actually take my advice and I should be careful of what kind of advice I give. :ahh: - Elgin Clock [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 31-01-2013, 20:19
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
CRIO Slot 4 "Digital module 4 is not present."

We have reimaged the CRIO with the slots in 1,3 and 4 (1=analog,3=pneumatic,4=digital) and deployed code where the speed controllers are declared using
Code:
SpeedController s = new Talon(4,1);
The digital sidecar is powered and works when in slot 2. The digital sidecar is powered and works when in slot 2.

Output when deployed:

Code:
[cRIO] Digital module 4 is not present.
[cRIO] Uncaught exception in Thread.run():
[cRIO]     on thread testing.Test - main
[cRIO] edu.wpi.first.wpilibj.util.AllocationException: PWM channel 1 on module 4 is already allocated
[cRIO]     at edu.wpi.first.wpilibj.PWM.initPWM(PWM.java:116)
[cRIO]     at edu.wpi.first.wpilibj.PWM.<init>(PWM.java:135)
[cRIO]     at edu.wpi.first.wpilibj.SafePWM.<init>(SafePWM.java:43)
[cRIO]     at edu.wpi.first.wpilibj.Talon.<init>(Talon.java:59)
[cRIO]     at testing.Test.<init>(Test.java:26)
[cRIO]     in virtual method #11 of com.sun.squawk.Klass(bci=53)
[cRIO]     at com.sun.squawk.imp.MIDletMainWrapper.main(99)
[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)
We made a new project with only creating objects and it still gave this error. I am 100% sure it does not instantialize the object more than once. Any ideas?

Full code of test:
Code:
public class Test extends IterativeRobot {

    private Joystick j = new Joystick(1);
    private SpeedController s1 = new Talon(4, 1),
            s2 = new Talon(4, 2),
            s3 = new Jaguar(4, 3),
            s4 = new Jaguar(4, 4),
            s5 = new Jaguar(4, 5),
            s6 = new Jaguar(4, 6);

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
        double speed = j.getRawAxis(3);
        SmartDashboard.putNumber("Speed", speed);
        s1.set(speed);
        s2.set(speed);
        s3.set(speed);
        s4.set(speed);
        s5.set(speed);
        s6.set(speed);
    }
}
__________________
All opinions are my own.
 


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 21: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