Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   C-Rio cant connect -error (http://www.chiefdelphi.com/forums/showthread.php?t=87873)

whcirobotics 10-12-2010 20:26

C-Rio cant connect -error
 
The problem is here.! again...

We are able to to deploy our code to the robot with the ip address 10.15.14.02 while connected to the wireless router and doing the build > deploy > run as startup method.

But We know and knew that there is a easier way then waiting 10 -15 minutes just testing the code. And that was the "run" button on top of the robot main. But whenever we press it, it gives us the deployment window, and as it continues, in halfway it gives the error " Waiting for real time target (RT compaq rio target) to respond." ...

And it never responds. Why may this be the case? We can deploy the code and it works, but when we try to do it via the "run" button it never works. This has been the case since the last season and we want to fix it so it isnt as hard to test code as it had been the last season. Help Needed please.

{WHCI robotics}

Mark McLeod 10-12-2010 20:31

Re: C-Rio cant connect -error
 
Care to zip the code project you're having trouble with to see if others of us see the same behavior?

I might be due to unconstrained loops in the code, although I'd expect that to affect the regular downloads as well.

Does it work if you connect the laptop as directly as possible to the cRIO, rather than using wireless? It might be transmission delay related.

whcirobotics 10-12-2010 20:41

Re: C-Rio cant connect -error
 
1 Attachment(s)
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 :)

Mark McLeod 10-12-2010 21:28

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.

Mark McLeod 12-12-2010 15:34

Re: C-Rio cant connect -error
 
1 Attachment(s)
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...

whcirobotics 12-12-2010 19:02

Re: C-Rio cant connect -error
 
Wow. I will definitely try this tomorrow when we meet and get back on the results. Thanks! :)

whcirobotics 13-12-2010 17:39

Re: C-Rio cant connect -error
 
Yes :) it worked!! Thank you! :)


All times are GMT -5. The time now is 10:08.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi