Go to Post Generally, when you do something stupid and unsafe, it isn't the best idea to go and tell thousands of people on CD about it. :rolleyes: - Cory [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 21-02-2012, 01:52
Wilzdabeast's Avatar
Wilzdabeast Wilzdabeast is offline
WilzDaBeast
FRC #0236 (Techno Ticks)
Team Role: Student
 
Join Date: Apr 2009
Rookie Year: 2000
Location: CT
Posts: 6
Wilzdabeast is an unknown quantity at this point
cRIO not running code the first time

Hi, our team ran into a problem and we're looking for some help. We were testing our code, but when we deploy it onto the cRIO after booting it up, the CPU usage jumps up to 100% and a bunch of refnum errors pop up on the diagnostics tab. However, if we stop the code and run it again, the errors go away and the code works perfectly. We tried reimaging the cRIO, but that didn't work, and neither did building the code and running it as startup on the cRIO (in that case it acted the same as it does the first time code is run after the cRIO boots up- super laggy, 100% CPU and loads of refnum errors).
I checked all the refnums and they're all correct. Any idea what could be causing this behavior?
__________________
}-Wilzdabeast-{
  #2   Spotlight this post!  
Unread 21-02-2012, 07:42
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,756
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: cRIO not running code the first time

Perhaps if you are powering up the robot, some devices aren't booted yet -- I'm thinking the camera. That would cause refnum issues.

It would be useful to post the errors that are showing up. It might also be useful to know what language you are using.

Greg McKaskle
  #3   Spotlight this post!  
Unread 21-02-2012, 09:52
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,906
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: cRIO not running code the first time

Any modifications to Robot Main?

I found some people decoupled Begin from the main loop, because they didn't understand why there would be a wire seemingly going nowhere.
That particular ill advised edit will cause the symptoms you are seeing.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 21-02-2012 at 09:59.
  #4   Spotlight this post!  
Unread 21-02-2012, 10:50
Wilzdabeast's Avatar
Wilzdabeast Wilzdabeast is offline
WilzDaBeast
FRC #0236 (Techno Ticks)
Team Role: Student
 
Join Date: Apr 2009
Rookie Year: 2000
Location: CT
Posts: 6
Wilzdabeast is an unknown quantity at this point
Re: cRIO not running code the first time

Were using labview and getting the -4407 refnum error, as well as The -44061 robotdrive not running fast enough error and an error with the camera (which we don't have plugged in right now, but that error appears both the first time and the subsequent times that the code works)
__________________
}-Wilzdabeast-{
  #5   Spotlight this post!  
Unread 21-02-2012, 11:29
Wilzdabeast's Avatar
Wilzdabeast Wilzdabeast is offline
WilzDaBeast
FRC #0236 (Techno Ticks)
Team Role: Student
 
Join Date: Apr 2009
Rookie Year: 2000
Location: CT
Posts: 6
Wilzdabeast is an unknown quantity at this point
Re: cRIO not running code the first time

Ok, we fixed it. The problem was that it didn't finish initializing everything in begin before we called them in our various loops (we put all of our code to run motors, pids, solenoids, etc in seperate loops to save processing power)
To fix it we put all those loops, along with periodic tasks and vision in a flat diagram that runs after begin
__________________
}-Wilzdabeast-{
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 01:43.

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