Go to Post OK, I have officially been dragged into the 21st century (screaming and kicking the whole way). - KenWittlief [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #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.
  #2   Spotlight this post!  
Unread 31-01-2013, 20:21
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: CRIO Slot 4 "Digital module 4 is not present."

Forgot to mention that CRIO is the 4 slot model. It is properly imaged with v47 of Java image.
__________________
All opinions are my own.
  #3   Spotlight this post!  
Unread 31-01-2013, 20:26
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,107
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: CRIO Slot 4 "Digital module 4 is not present."

The reason that is not working is that when you put a module in slot 4, the code sees that as module 2 of that type. So instead of declaring (4,1) declare (2,1) and it should work. Also there has to be a digital module in slot 2 because of the rules. This is so the RSL light has a place to connect to.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
  #4   Spotlight this post!  
Unread 31-01-2013, 20:29
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: CRIO Slot 4 "Digital module 4 is not present."

Thanks. Solved.
__________________
All opinions are my own.
  #5   Spotlight this post!  
Unread 01-02-2013, 11:52
Secretspy97 Secretspy97 is offline
Registered User
FRC #1126
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2009
Location: New York
Posts: 25
Secretspy97 is an unknown quantity at this point
Re: CRIO Slot 4 "Digital module 4 is not present."

As of 2012, instead of declaring each slot number, you now have to only say if the module is in it primary position (1), or its secondary position (2).
__________________
WHAT TIME IS IT?
1126
  #6   Spotlight this post!  
Unread 01-02-2013, 13:01
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,554
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: CRIO Slot 4 "Digital module 4 is not present."

Quote:
Originally Posted by joelg236 View Post
Thanks. Solved.
Please pay close attention to what the previous poster said about digital side car position.

In 2011, we thought we were able to put it in the secondary slot (we had some dimensional interferences with it in the first slot). At inspection, we found that you MUST have one in the first slot. Your robot may work fine other than the signal light, but you will not pass inspection if your inspector is on the ball.
  #7   Spotlight this post!  
Unread 01-02-2013, 13:03
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: CRIO Slot 4 "Digital module 4 is not present."

Quote:
Originally Posted by Tom Line View Post
Please pay close attention to what the previous poster said about digital side car position.

In 2011, we thought we were able to put it in the secondary slot (we had some dimensional interferences with it in the first slot). At inspection, we found that you MUST have one in the first slot. Your robot may work fine other than the signal light, but you will not pass inspection if your inspector is on the ball.
We're aware of the rule. It is easier to do it in slot 4 for testing (cord to sidecar is really short). Thanks.
__________________
All opinions are my own.
Closed Thread


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 02:24.

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