Go to Post I would not want the task of devising a system that 50,000 very smart people try to outwit. - texarkana [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 30-01-2012, 15:05
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
cRIO v43 == fail

Hi everyone,

We've had some problems. We had some drive code on our old robot. After updating to the new firmware and recompiling/deploying the code, we have an issue. We are getting an error:

>>>> ERROR: Allocating module that is out of range or not found: Digital Module 6
...in InitPWM() in C:/WindRiver/workspace/WPILib/pwm.cpp at line 33
WPILib was compiled from SVN revision 2993

Looking at the source for WPILib, this call goes back to SensorBase::CheckDigitalModule(). So this call:

nLoadOut::getModulePresence(nLoadOut::kModuleType_ Digital, 6 - 1)

is returning false, but it should return true. I can confirm that we do have a digital sidecar in slot 6. The cRIO Imaging Tool also says that the module is OK. I can't find the source for getModulePresence either.

Should I report this as a bug to WPILib? Since the source for getModulePresence doesn't appear to be in WPILib, it seems like it would be out of their control (at least, I can't find the definition with a find | xargs grep getModulePresence). I could try commenting the check out and see if that works...

I have quadruple checked the module, and everything looks good. The imaging tool says the module is installed correctly. But the runtime check is failing. Why... all these silly updates- the last version that worked correctly for me was v28... anyway, if anyone has ideas, your help would be MUCH appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2012, 15:12
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: cRIO v43 == fail

Due to the attempted compatibility with the cRio-FRC II and the cRio-FRC (the one you're using) you'll need to pass in a module number to your objects. Since your sidecar is in slot 6 you'll have to pass in a 2 (the second group of slots).

For instance,

Code:
Servo *pan = new Servo(2, PAN_PWM_PORT);
Relevant links:

http://mmrambotics.ca/wpilib/class_s...a533a54f4b7909

http://www.usfirst.org/sites/default...20System_2.pdf (page 12)
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2012, 15:13
gr8dragon's Avatar
gr8dragon gr8dragon is offline
Registered User
AKA: Parth Patel
no team
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Toronto,Canada
Posts: 39
gr8dragon is a glorious beacon of lightgr8dragon is a glorious beacon of lightgr8dragon is a glorious beacon of lightgr8dragon is a glorious beacon of lightgr8dragon is a glorious beacon of light
Re: cRIO v43 == fail

Do you also have a module plugged into port 2? also the new image has changed the numbering for modules. So check if you have it coded correctly. If you have a digital in slot 6 in your program it should be module number 2 not 6. And the digital in slot 2 should be value of 1 in your code.
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2012, 16:11
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: cRIO v43 == fail

Once you recognize that the modules are not addressed by slot number in the 2012 image, it all makes a lot more sense. The first module of any type is number 1; the second one is number 2.
Reply With Quote
  #5   Spotlight this post!  
Unread 31-01-2012, 10:27
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: cRIO v43 == fail

Quote:
Originally Posted by Alan Anderson View Post
Once you recognize that the modules are not addressed by slot number in the 2012 image, it all makes a lot more sense. The first module of any type is number 1; the second one is number 2.
I missed that. So it's 1, 2 - not 0, 1? And these will corrospond to the first/second sidecars?

Thanks!

As a side note, I like it better when they're addressed by absolute slot number. Makes coordination between electrical and programming easier, and that way you can keep track of what's on what slot (it'll look like the analog and digitals are on the same slot now). But if that's how it's done now...
Reply With Quote
  #6   Spotlight this post!  
Unread 31-01-2012, 14:51
codedr codedr is offline
Registered User
FRC #0537
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Wisconsin
Posts: 71
codedr will become famous soon enoughcodedr will become famous soon enough
Re: cRIO v43 == fail

Yes, it's a step backwards.

I don't know what FIRST is thinking, but I suspect they are 'making it easier' when they are really making it harder.

I also suspect that FIRST wants to hardcode the slot locations so they don't have to probe the cRIO bus to find the analog and digital modules. The embedded FIRST code wants to address the analog module to get the battery voltage, and the digital module to flash the status indicator.
Reply With Quote
  #7   Spotlight this post!  
Unread 31-01-2012, 22:10
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: cRIO v43 == fail

Quote:
Originally Posted by codedr View Post
I don't know what FIRST is thinking, but I suspect they are 'making it easier' when they are really making it harder.
It's a way to make team code consistent between the 8-slot and 4-slot cRIOs.
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 03:04.

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