Go to Post FIRST is one strange world.... - Wayne C. [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 11-02-2009, 21:04
Parthenon Parthenon is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Mississauga
Posts: 10
Parthenon is an unknown quantity at this point
"Allocating channel or module that is out of range"

I recently attempted to code pnuematics and I get this strange error in the console when i run C++ code in WindRiver



What i think is the problem is that my solenoid module is inserted in module 6. However, the default is 8. If it is in module 6, then the lights turn on. Otherwise, they do not turn on.

I have tried basically everything I can think of, yet it has not solved the problem.

I have also commented out the solenoid code in an effort to get Joystick input, but that does not work either.

Any help is appreciated.
  #2   Spotlight this post!  
Unread 11-02-2009, 22:23
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: "Allocating channel or module that is out of range"

The WPI Library expects that the solenoid module is in slot 8, and only slot 8. You might be able to make it work by changing the modulePopulation constant in SensorBase.cpp to have a 9472 module selected at the desired index.

I don't see any specific rules against doing this, but I also don't quite understand why you'd need to move it to slot 6.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #3   Spotlight this post!  
Unread 11-02-2009, 22:25
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: "Allocating channel or module that is out of range"

Not only does the WPILib code assume slot eight, but more importantly so does the FPGA.

Greg McKaskle
  #4   Spotlight this post!  
Unread 11-02-2009, 22:25
Parthenon Parthenon is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Mississauga
Posts: 10
Parthenon is an unknown quantity at this point
Re: "Allocating channel or module that is out of range"

specifically how can i do that?

it just happened to be in slot 6 at the time and it turned on ....
  #5   Spotlight this post!  
Unread 11-02-2009, 22:30
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: "Allocating channel or module that is out of range"

Quote:
Originally Posted by Greg McKaskle View Post
Not only does the WPILib code assume slot eight, but more importantly so does the FPGA.

Greg McKaskle
I was actually just wondering that after looking into the source code further. Thanks for verifying it.

Quote:
Originally Posted by Parthenon View Post
specifically how can i do that?

it just happened to be in slot 6 at the time and it turned on ....
It looks like you'll have no choice but to use slot 8.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #6   Spotlight this post!  
Unread 11-02-2009, 22:32
Parthenon Parthenon is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Mississauga
Posts: 10
Parthenon is an unknown quantity at this point
Re: "Allocating channel or module that is out of range"

Quote:
Originally Posted by MattD View Post
It looks like you'll have no choice but to use slot 8.
I still get this error when plugged into slot 8 and no lights turn on on the module
  #7   Spotlight this post!  
Unread 11-02-2009, 22:46
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: "Allocating channel or module that is out of range"

If you still see that error on slot 8, it's probably because you may have forgot to make this change in the code when allocating a Solenoid object. If this isn't it, posting your code may help us help you.

Unfortunately, I don't think I can help very much with the lights not turning on.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #8   Spotlight this post!  
Unread 11-02-2009, 22:49
Parthenon Parthenon is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Mississauga
Posts: 10
Parthenon is an unknown quantity at this point
Re: "Allocating channel or module that is out of range"

Quote:
Originally Posted by MattD View Post
If you still see that error on slot 8, it's probably because you may have forgot to make this change in the code when allocating a Solenoid object. If this isn't it, posting your code may help us help you.

Unfortunately, I don't think I can help very much with the lights not turning on.

make what change?
  #9   Spotlight this post!  
Unread 11-02-2009, 22:54
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: "Allocating channel or module that is out of range"

I'm assuming that when you were trying to use slot 6, you had code that may have looked something like this:

Code:
Solenoid *s = new Solenoid(6, 1);
However, when you tried out module 8 again, you didn't change that. If you try to use a slot other than 8 in the software, it will generate that fatal error. Since by default module 8 is selected, the simplest thing to do is only provide one parameter: the channel number.

Code:
Solenoid *s = new Solenoid(1);
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #10   Spotlight this post!  
Unread 11-02-2009, 22:58
Parthenon Parthenon is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Mississauga
Posts: 10
Parthenon is an unknown quantity at this point
Re: "Allocating channel or module that is out of range"

I tried that and I still got the error. I also unplugged the slot and commented out all solenoid code and still got the error =(
  #11   Spotlight this post!  
Unread 16-02-2009, 12:31
Parthenon Parthenon is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Mississauga
Posts: 10
Parthenon is an unknown quantity at this point
Re: "Allocating channel or module that is out of range"

We've found a solution

We discovered the code wasn't compiling properly, so after we deleted the PPC603gnu folder, it began compiling again. This removed the error.

Secondly we plugged in the solenoid module into module 8. Initially I didn't think it needed power, but it actually did, so we hooked up a wago connector to it in 12v input on the power dist. board and everything was working
  #12   Spotlight this post!  
Unread 10-01-2012, 18:10
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: "Allocating channel or module that is out of range"

2012-version thread resurrection

We are getting this from our cRio when running the SimpleTemplate sample code:
Quote:
>>>>>ERROR: Allocating module that is out of range or not found: Digital Module 1 ...in InitPWM() in C:/WindRiver/workspace/WPILib/PWM.cpp at line 33
We tried the RobotDrive(SpeedController&, SpeedController&, SpeedController&, SpeedController&) constructor with our own Jaguar classes and we got the error for each SpeedController that we constructed. We got it with just the basic RobotDrive(int,int) constructor (it chooses slot 1 as a default, and errors out).

Last edited by Bongle : 10-01-2012 at 18:14.
  #13   Spotlight this post!  
Unread 10-01-2012, 18:37
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 990
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: "Allocating channel or module that is out of range"

Quote:
Originally Posted by Bongle View Post
2012-version thread resurrection

We are getting this from our cRio when running the SimpleTemplate sample code:


We tried the RobotDrive(SpeedController&, SpeedController&, SpeedController&, SpeedController&) constructor with our own Jaguar classes and we got the error for each SpeedController that we constructed. We got it with just the basic RobotDrive(int,int) constructor (it chooses slot 1 as a default, and errors out).
Do you have a Digital Module in slot 2 of your cRIO?
  #14   Spotlight this post!  
Unread 10-01-2012, 22:43
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: "Allocating channel or module that is out of range"

Quote:
Originally Posted by Bongle View Post
...with just the basic RobotDrive(int,int) constructor (it chooses slot 1 as a default, and errors out).
Watch out for a difference in numbering systems this year. It's not the cRIO "slot" that's important to the code. The "module number" is going to be 1 for the first Analog module (in slot 1), the first Digital module (in slot 2), and the [optional] first Solenoid module (in slot 3). On a 4-slot cRIO-II, the [optional] module in slot 4 is number 2; on an 8-slot cRIO, the [optional] modules in slots 5-7 are number 2.
  #15   Spotlight this post!  
Unread 11-01-2012, 07:23
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: "Allocating channel or module that is out of range"

Quote:
Originally Posted by Alan Anderson View Post
Watch out for a difference in numbering systems this year. It's not the cRIO "slot" that's important to the code. The "module number" is going to be 1 for the first Analog module (in slot 1), the first Digital module (in slot 2), and the [optional] first Solenoid module (in slot 3). On a 4-slot cRIO-II, the [optional] module in slot 4 is number 2; on an 8-slot cRIO, the [optional] modules in slots 5-7 are number 2.
Excellent, we will try that at our next opportunity. Do you know where the documentation is for that change?

Edit: Found it. We had glossed over the "setting up the control system" section because it said veteran teams were probably good to go with an old robot.

Last edited by Bongle : 11-01-2012 at 07:25.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Quotes" that were said during build season Jherbie53 General Forum 4874 Today 20:57
"This" or "That" Game! Chief Pride Games/Trivia 72 19-07-2012 16:36
"Prototype This" on Discovery Channel Dick Linn General Forum 15 25-10-2008 23:24
Recent movies that make you say..."wow" Greg Perkins Chit-Chat 18 03-11-2006 10:23


All times are GMT -5. The time now is 21:53.

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