|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
"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
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
Re: "Allocating channel or module that is out of range"
Quote:
It looks like you'll have no choice but to use slot 8. |
|
#6
|
|||
|
|||
|
Re: "Allocating channel or module that is out of range"
I still get this error when plugged into slot 8 and no lights turn on on the module
|
|
#7
|
||||
|
||||
|
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. |
|
#8
|
|||
|
|||
|
Re: "Allocating channel or module that is out of range"
Quote:
make what change? |
|
#9
|
||||
|
||||
|
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); Code:
Solenoid *s = new Solenoid(1); |
|
#10
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
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:
Last edited by Bongle : 10-01-2012 at 18:14. |
|
#13
|
|||
|
|||
|
Re: "Allocating channel or module that is out of range"
Quote:
|
|
#14
|
|||||
|
|||||
|
Re: "Allocating channel or module that is out of range"
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
|
||||
|
||||
|
Re: "Allocating channel or module that is out of range"
Quote:
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "Quotes" that were said during build season | Jherbie53 | General Forum | 4842 | 21-01-2017 12:36 |
| "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 |