View Single Post
  #5   Spotlight this post!  
Unread 12-12-2010, 15:34
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: C-Rio cant connect -error

Sorry I've taken so long. I got distracted by weekend guests.

When you removed the default framework gyro from your code, you missed a spot where the gyro was used in Disabled.vi. The processing of that error soaked up 25-30% of your available CPU time (on top of the normal load). Take the references to Gyro out of there and you should be fine.

This message on the Driver Station shows the cause of your issue:
Code:
ERROR <Code> -44007 occurred at Gyro.lvlib:RefNum Registry Get.vi>>Disabled.vi>>Robot Main.vi
<time>20:49:59 12/12/2010\par
FRC:  The RefNum you are trying to Get does not exist in this RefNum Registry.
Because the error is in the Disabled code, you'll find that you would not have had a problem using the Run button if you first enable the robot before you pushed the Run button, because that would bypass the Disabled code where the error is.
The robot was so busy it didn't have time to process your code download.

---
Here's a tool that tells you how much CPU time your program is chewing up on the cRIO ONLY when you're using the "Run" button.
In your case where you couldn't use the Run button, you'd keep the downloaded program from running on the cRIO by using the No App DIP switch on the cRIO and resetting. Then when there is no code running on the cRIO your Run button would work.

On any of the LabVIEW windows go to:
Tools -> Real-Time Module -> System Manager
On the System Manager pop-up:
  • click "Track CPU Usage"
  • on the VIs tab unclick "Track VI States"
  • back on the Resources tab again click "Start Monitoring"
You'll see something like the attached plot.
In the photo below
  • the first third of the graph shows just the operating system overhead and the downloading of the "Run" button code
  • the middle third is your running code with the reference to Gyro bypassed
  • the high part for the rest of the time shows your code with the gyro error back in
You can see how much CPU time the error processing is soaking up.
You can use this tool to figure out what takes the most time in your code.

The bottom line is to eliminate any and all errors whenever and wherever they occur...
Attached Thumbnails
Click image for larger version

Name:	SystemManager.jpg
Views:	41
Size:	28.5 KB
ID:	9494  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 12-12-2010 at 19:59.
Reply With Quote