Go to Post studies have shown that postive feedback works better. Driver should get a shock until he obtains target lock, then it stops. Performance incentive :^) - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 05-02-2013, 19:28
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Programmatic way to determine 4-slot vs. 8-slot cRIO?

Greetings!

Is anyone aware of a way in software to determine whether code is running on a 4-slot vs. an 8-slot cRIO at runtime? We only have one 4-slot chassis and that's on the competition 'bot. But, our 8-slot chassis is being used for development and the 2nd solenoid module is in slot 7 on the 8-slot but slot 4 on the 4-slot. Yes, we can do a #define, but it would be convenient to be able to determine the slot count at run time. Anyone have an approach short of allowing something to fail to test it?

TIA,

Mike
  #2   Spotlight this post!  
Unread 05-02-2013, 19:31
RufflesRidge RufflesRidge is online now
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 988
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: Programmatic way to determine 4-slot vs. 8-slot cRIO?

The second solenoid module in both chassis should be referred to as Solenoid module 2. Is there something else you need to detect the difference for?
  #3   Spotlight this post!  
Unread 05-02-2013, 20:07
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,748
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: Programmatic way to determine 4-slot vs. 8-slot cRIO?

At the root of the file system I found a file called FRC_ImageVersion.ini. It gives some info about the image, language, etc. It may be that the FPGA version identifies a 4-slot from an 8-slot. Next to it is a load_out.txt file that tells you the vendor, module, and serial number of each module in the slot. You should be able to look in the file, or even at the size of the file and tell the type of controller you are running on. I'm sure there are APIs for doing this, but the file seems to be pretty simple.

Greg McKaskle
  #4   Spotlight this post!  
Unread 05-02-2013, 21:35
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Programmatic way to determine 4-slot vs. 8-slot cRIO?

Thanks for the info. I'll take a look at that file. You're correct in that the solenoids are now simply references as module 1 and module 2. I was having a senior moment remembering back to when you actually have to specify the slot for some of the I/O constructors.

Thanks!

Mike
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 09:10.

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