Go to Post Remember to drive it like you stole it but be sure that it is in OVERDRIVE. - Steve W [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
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 08-10-2010, 17:03
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Teleop to No Comms?

Hi-

I am at a loss here.

I was able to download and run C++ code just fine on our robot, but when I went to make a small change, something happened...

The Driver Station connects (tethered) to the cRIO, and the "Teleoperated Disabled" message appears, but less than 2 seconds later, it loses communications, and then cycles through this process.

We have tried reformatting the cRIO, and it did not help.

Ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 08-10-2010, 17:05
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Teleop to No Comms?

Forgot to mention, we have tried changing out the battery, and this does not help.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-10-2010, 17:13
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,800
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: Teleop to No Comms?

Code vs hardware

After you reimaged the cRIO
  • Did you get a solid Communications before downloading any code?
  • Did you download and test with unadulterated default code?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-10-2010 at 17:15.
Reply With Quote
  #4   Spotlight this post!  
Unread 08-10-2010, 17:33
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Teleop to No Comms?

We tried default code, with still the same error.

We are able to get solid communications before we downloaded, and after downloading the default code, we get the same problem.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-10-2010, 19:53
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,751
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: Teleop to No Comms?

To help determine if it is user code or something else, you may want to flip the user code dip switch off and reboot to see if the symptom goes away.

Also, when you say you reformatted the cRIO, the dialog is a bit confusing to some, and if it took only a few seconds, it didn't actually reformat. There is a checkbox below for formatting, and it will typically take ten minutes to reformat.

If this seems to be code, look more closely at the latest small code change, work backwards until the issue goes away, or set a breakpoint and step through the new code.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 09-10-2010, 15:08
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Teleop to No Comms?

We solved the issue after several hours of formatting the cRIO and reverting to previous code.

What happened was:

We would
1: Download code to the cRIO.
2: Launch the Driver Station and connect.
3: Get connection (the Robot Code, Connection lights etc) would work, and the Driver Station would display: "Teleop Disabled", for like I said, less than 2 seconds, and it would instantly lose communication.

We would then be unable to connect long enough to the cRIO to download new code, meaning we would format the cRIO everytime.

I flipped the Safe Mode switch and the Console Out switch, and used the cRIO imaging tool to format it. After it formatted the cRIO, I would flip the dip switches back to normal, and use the cRIO imaging tool to set the cRIO for C++.

The same problem would persist, even with default code.

Eventually I got it to work, by using the Safe Mode, Console Out, the IP Reset one, and by holding down the reset button.

I was then able to get default code working, and downloaded code that was working from the day before.

So I guess it was my code doing something. However, the only change I made, right before the cRIO started hating me ( ) was I added 2 printf statements.
One of the printf was displaying the rate of one of our encoders, because I think the encoder might have died.

Would that have caused the issue? Trying to read data from a broken encoder?

Although I think it is weird that my code would effect the robot before it was enabled...
Reply With Quote
  #7   Spotlight this post!  
Unread 09-10-2010, 17:56
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,751
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: Teleop to No Comms?

Like I said in the earlier post, were you really reformatting, or just running the tool to change languages? A true format takes minutes and reboots the controller numerous times.

The dip switches for resetting IP and things like that should have had no impact.

As for how a printf can crash a program? Are you calling functions inside the printf or are you dereferencing pointers or calling copy constructors, constructors, descructors? Those sorts of things can have bugs in them that haven't been visited, then you call them as a side-effect and BOOM.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 09-10-2010, 18:01
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Teleop to No Comms?

Yes, we really re-formatting. We checked the Format check-box.

I was calling the functions inside it, to return a number.

I don't know why, but when we flipped the IP Reset switch and pressed the reset button on the cRIO, it finally worked.

Also, we had a similar problem the day before, but less "severe".

We could get a steady connection, and download the code we used during competition just fine, and it would run the autonomous code without crashing, but as soon as you enabled tele-op, it would lose connection. (This was without any printfs)
Reply With Quote
  #9   Spotlight this post!  
Unread 09-10-2010, 18:12
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,800
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: Teleop to No Comms?

Quote:
Originally Posted by nighterfighter View Post
Although I think it is weird that my code would affect the robot before it was enabled...
Your code is running as soon as the robot finishes booting. It doesn't wait to be Enabled.
Enabled is just another state your code should check for as it's running.

You might want to look at what your code is doing during the disabled states.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 09-10-2010 at 19:54.
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
Camera + DS Comms Sauce Programming 6 21-01-2010 20:11
No comms because of router reset? vivek16 FRC Control System 3 25-08-2009 21:06
No Comms Issue.... JoeyTNT280 FRC Control System 9 11-06-2009 20:32
Teleop Lag Xavier Brandall Programming 14 17-03-2009 18:21


All times are GMT -5. The time now is 23:28.

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