Go to Post I believe with every fiber of my being that Engineering is an Art. It is a beautiful, wonderful, delightful art. - Joe Johnson [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 10-12-2010, 20:41
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Re: C-Rio cant connect -error

I attached the final code in the attachment. And no it does not work when i connect it directly. It does not work when i press "run". Sometimes it works wirelessly but only after doing build > deploy and run as start up. But that takes too long and i was adviced that only the final code should be done like that. But i had no choice last season but to do it like this, and waste a TON of time. So i want to get this problem fixed before next season
Attached Files
File Type: zip Final Code.zip (899.6 KB, 22 views)

Last edited by whcirobotics : 10-12-2010 at 20:45.
Reply With Quote
  #2   Spotlight this post!  
Unread 10-12-2010, 21:28
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,833
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

I can repeat the problem and it does appear to be a code issue, not the network connection.
I'll see if I can track it down.
Your CPU usage is more than 90% which is really high for doing mostly nothing.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 10-12-2010 at 21:54.
Reply With Quote
  #3   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,833
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:	42
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
  #4   Spotlight this post!  
Unread 12-12-2010, 19:02
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Re: C-Rio cant connect -error

Wow. I will definitely try this tomorrow when we meet and get back on the results. Thanks!
Reply With Quote
  #5   Spotlight this post!  
Unread 13-12-2010, 17:39
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Re: C-Rio cant connect -error

Yes it worked!! Thank you!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FTC]: C-Rio cant connect to target...again whcirobotics FIRST Tech Challenge 3 15-12-2010 21:52
Failed to connect to target Error Rangel C/C++ 4 28-07-2010 17:04
Cant Get C-Rio to talk to Sidecar Megy698 Electrical 2 20-02-2010 15:16
Error: "The NI-RIO software on the remote..." ellisk Programming 1 05-02-2010 22:42
cant get NXT to connect to controller station via bluetooth cougarbotics FIRST Tech Challenge 5 04-12-2008 00:19


All times are GMT -5. The time now is 21:15.

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