Go to Post ...if the penalties were not significant and match-deciding then there would not be much incentive to pay attention to them, would there? - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 02-04-2016, 17:15
engbrech engbrech is offline
Registered User
FRC #5434
 
Join Date: Jan 2015
Location: Faribault, Minnesota
Posts: 13
engbrech is an unknown quantity at this point
Robot Communication Lost for odd reason

Hi all,

Sophomore team here getting ready for our initial competition during week 6. Today we were practicing with our shadow bot and ran into a problem that is baffling me.

We have a catapult that uses two CIM motor that draw full power when launching the ball. Over weeks of testing this has caused zero problems.

Today we deployed the program to the roborio such that is would start up on power on. Everything works fine, robot can drive, auto aim, etc... until we launch the catapult. When we do that, the robot shuts down, loses communication and restarts.

Other symptoms seem to indicate that the robot and roborio are simply drawing much more power when program is run at power on than we we deploy it from the computer. voltages drop significantly when the robot is driving though they don't turn it off. but when the catapult is launched, game over. Obviously, this will kill us at competition so I'm hoping for quick and helpful suggestions from some veterans.

Thanks all

Jason Engbrecht
Team 5434
Lead Mentor
Reply With Quote
  #2   Spotlight this post!  
Unread 02-04-2016, 20:30
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Robot Communication Lost for odd reason

Make sure you have a good, fully-charged battery installed. Look for loose power connections between the battery and main breaker and Power Distribution Panel. But my first thought is that you might have the output of one of your motor controllers shorted to something that it shouldn't be. Or maybe you have the wires crossed between the two CIM speed controllers, and the difference in timing when the program is run at startup vs. being run interactively makes it a problem.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-04-2016, 22:59
engbrech engbrech is offline
Registered User
FRC #5434
 
Join Date: Jan 2015
Location: Faribault, Minnesota
Posts: 13
engbrech is an unknown quantity at this point
Re: Robot Communication Lost for odd reason

Thanks for the advice. Working on it right now and I see communications seems to come back but the robot code seems to stop running. Is this the symptom of a RoboRio brownout. I am getting voltage drops that seem particularly large and I think I'll start trying to track that down. But why would this be different in the interactive mode of deploying and the power on start up mode?
Reply With Quote
  #4   Spotlight this post!  
Unread 02-04-2016, 23:42
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: Robot Communication Lost for odd reason

Do your communications come back almost instantly? If so, that indicates that your code is actually crashing. (maybe you inadvertently divided by zero, referenced an object that wasn't there, etc)

A full reboot if you actually lost comms should take 30 seconds to a minute, depending on what rebooted (roboRIO vs radio).
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
Reply With Quote
  #5   Spotlight this post!  
Unread 02-04-2016, 23:45
kevin.li.rit's Avatar
kevin.li.rit kevin.li.rit is offline
Imaginary Friend
AKA: Kevin Li
FRC #0596 (SciClones)
Team Role: Student
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Hopkinton, Massachusetts
Posts: 936
kevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond repute
Send a message via Yahoo to kevin.li.rit
Re: Robot Communication Lost for odd reason

Double check to make sure the power to the RoboRiot is wired into the proper slot on the PDP. If its wired into the slots for the VRM or PCM, I believe those connections are unregulated.
__________________
Kevin Li

596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers
Reply With Quote
  #6   Spotlight this post!  
Unread 03-04-2016, 01:02
engbrech engbrech is offline
Registered User
FRC #5434
 
Join Date: Jan 2015
Location: Faribault, Minnesota
Posts: 13
engbrech is an unknown quantity at this point
Re: Robot Communication Lost for odd reason

Thanks for more suggestions.

Here is more info as I trouble shoot.

The roborio was in the wrong spot. However, changing didn't seem to help.

Communication going down is variable. Sometimes yes sometimes no. It doesn't come back when it goes down even after a couple minutes.

Robot code always breaks until the power on the robot is reset.

I could certainly have a robot code issue but I can't be sure where to look for it. The issue never shows up when I deploy the code from the computer, only when I boot it on power up on the roborio.

I see voltage drops of about 3 volts (from 12 to 9) with current draws of about 100A as measure by the DS. Seems high to me, maybe others can direct if that is out of the ordinary. Doesn't depend upon the battery I put in.

I'm going to keep trying things. Suggestions are welcome.
Reply With Quote
  #7   Spotlight this post!  
Unread 03-04-2016, 01:12
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: Robot Communication Lost for odd reason

Quote:
Originally Posted by engbrech View Post
Robot code always breaks until the power on the robot is reset.
Do you mean that the Driver Station says "No Robot Code" until you powercycle the rio? And then it works until you fire the catapult, and it crashes back to "No Robot Code"?

If so, that's a code issue. (Unless it's something to do with LabVIEW deploy vs run, I'm not familiar with LabVIEW.)

If you're using a camera to autoaim, make sure when you do any calculations on the camera data, it actuslly exists. For example, in C++, we are using GRIP to get camera information via NetworkTables. If the camera doesn't see a target, GRIP doesn't publish any information to the network table.
Attempting to use those non-existant numbers results in the rio crashing and rebooting, while showing "No Robot Code". To fix that, we simply have an if block around that code saying "if (!table.empty())"


However, if you are actually losing power to the rio or Radio, it sounds like you have a short circuit somewhere. 9V is low, but not reboot everything low.

I'd suggest pulling breakers out of the PDP, one by one, until you isolate the issue.

Edit: When pulling breakers, be careful that you don't overload a motor. For example, if your catapult requires both motors to draw back, and having only one will stall the motor pull both breakers.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)

Last edited by nighterfighter : 03-04-2016 at 01:19.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-04-2016, 01:25
engbrech engbrech is offline
Registered User
FRC #5434
 
Join Date: Jan 2015
Location: Faribault, Minnesota
Posts: 13
engbrech is an unknown quantity at this point
Re: Robot Communication Lost for odd reason

That is what I mean nighterfighter. Those are messages on the DS.

I wasn't suspecting a code issue but I'm going to look into that. The whole "works when deployed but now when run from power on" absolutely baffles me. There are a couple reasons to think it could be related to vision so your post is leading me in that direction for a bit. We do program in Labview.

As to the drop to 9 volts, it happens with both the catapult and drive motors as far as I can tell. So I think if it is a wiring problem it is happening before the PDP. I'm also going to check that out as time allows.

Thanks for the feedback. Hopefully I'm on the right track.
Reply With Quote
  #9   Spotlight this post!  
Unread 03-04-2016, 01:42
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: Robot Communication Lost for odd reason

No Robot Code definitely means that something code wise is broken.

it might be a deploy setting. Someone more versed with LabVIEW will have to help with that part. When you imaged the roboRIO, was the little checkbox for "run code at startup" (or something similar to that name) checked?

It also sounds like you might have 2 separate problems. The robot code crashing is one, and the losing comms for long periods of time is the other. Losing comms sounds like a wiring/power issue.

Try performing a "tap test" on the main breaker. With the robot powered on, tap on the red button on the breaker (not hard enough to fully press it down though). If your lights on the electronics flicker, the main breaker needs to be replaced.

If both your drive train and catapult drop you to 9V separately, trying to run both at the same time will most likely cause a brownout. Your drive train should not drop you to 9V. What is your drive train (wheels, treads, etc) and how is it geared? How many motors per gearbox? (If more than 1, make sure they aren't fighting each other in the same gearbox)
I don't think that your catapult should drop you to 9V either, but CIMS draw quite a bit of current. Maybe surgical tubing/pneumatics might help alleviate some load off the CIMS? (Just spit balling an idea for that)

Finally, just for a sanity check: Leave all the hardware on your bot alone. Go back to the way it was working (deploy instead of startup I believe), and see if the robot still loses comms/code. If nothing fails, then we know it's something to do with the deploy/startup settings, assuming the order of robot operations remains the same. (Ex: Arm moves here then this motor turns for 5 seconds. If order of operations change, and something fails then you might have a shorted lead that only makes contact under certain conditions.) Or it might crash because an object/variable is being initialized a different order than what you expected.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
Reply With Quote
  #10   Spotlight this post!  
Unread 03-04-2016, 02:15
engbrech engbrech is offline
Registered User
FRC #5434
 
Join Date: Jan 2015
Location: Faribault, Minnesota
Posts: 13
engbrech is an unknown quantity at this point
Re: Robot Communication Lost for odd reason

Have done the sanity check a few times. Can go back and forth between deploying and run on boot repeatedly and the problems comes and goes with that. Seems like a coding issue but a baffling one. I don't have a clue where to start on how the code might be executing differently in the two cases. But obviously I ought to look at the catapault code as a starter.

As for the voltage drop. Seems like that might be A problem but not necessarily THE problem. The drive (four mecanum wheels with a CIM each on 8.65:1) does not operate at the same time as the catapult so it isn't that the two combine for a large voltage drop.

Tap test causes no problems.
__________________
Jason Engbrecht
Team 5434
Lead Mentor
Reply With Quote
  #11   Spotlight this post!  
Unread 03-04-2016, 04:29
thatnameistaken thatnameistaken is offline
Programmer/Driver
AKA: Joshua Johnston
FRC #2191 (Flux Core)
Team Role: Leadership
 
Join Date: Oct 2012
Rookie Year: 2013
Location: Hamilton, NJ
Posts: 45
thatnameistaken is on a distinguished road
Re: Robot Communication Lost for odd reason

If you'd like another person to check the code, I'm decently experienced in LabVIEW and am willing to give it a look.
Reply With Quote
  #12   Spotlight this post!  
Unread 03-04-2016, 08:29
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,117
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Robot Communication Lost for odd reason

If your RoboRio wiring was wrong, then check your Radio wiring. It should be plugged in to the 12v2A socket, and nothing else on the other 12v2A connection.

If launching the catapult causes the robot to crash, then that is where I would start to look for code problems.

If it works when deployed, but not when rebooting, then look for:
1) access to devices that may not be there.
2) access to devices that may not have yet been initialized.
3) access to variables/network tables/etc that may not yet been initialized.

What sometimes causes the "works when deployed, but not when rebooting" (or some other similar type combination) is that you are referencing a variable with an undefined value. Sometimes you are lucky, and sometimes you are not. On reboot, the memory addresses are usually in a default state that doesn't seem to work for you. On Redeploy, the deploy process may leave memory in a state that just happens to work for you.

Something as simple as a while loop conditioned on a new variable that is not first used until inside the while loop.

Last edited by rich2202 : 03-04-2016 at 08:33.
Reply With Quote
  #13   Spotlight this post!  
Unread 03-04-2016, 10:08
engbrech engbrech is offline
Registered User
FRC #5434
 
Join Date: Jan 2015
Location: Faribault, Minnesota
Posts: 13
engbrech is an unknown quantity at this point
Re: Robot Communication Lost for odd reason

I decided a little sleep was important but no I am back and troubleshooting.

Just ran a test with the voltage on the catapult reduced by a factor of 10 in order to learn if this was a power or coding issue. The code still showed the "deploy works, boot on power does not" problem making me quite certain now this is a coding issue.

I have a good bit of Labview coding experience so I'm going to spend some time looking for the issues (which I didn't do before because I thought is was a power issue). I'll post again when I've either located the issue or post the code if I feel lost again.

Thanks for the suggestions.
__________________
Jason Engbrecht
Team 5434
Lead Mentor
Reply With Quote
  #14   Spotlight this post!  
Unread 03-04-2016, 12:32
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Robot Communication Lost for odd reason

Just a shot in the dark -- have you recently copied or moved your LabVIEW project to another folder? If so, you might not be sending the program you think you are to be run at startup. Make sure the FRC Robot Boot-up Deployment settings have the right Local destination directory. I can't think of a simple way for things to get messed up so you're building to one folder and "deploying" from another, but it might be possible.
Reply With Quote
  #15   Spotlight this post!  
Unread 04-04-2016, 12:08
engbrech engbrech is offline
Registered User
FRC #5434
 
Join Date: Jan 2015
Location: Faribault, Minnesota
Posts: 13
engbrech is an unknown quantity at this point
Re: Robot Communication Lost for odd reason

Well I seem to have alleviated the issue but I don't really understand the reason. The catapult was being launched in the periodic task loop in a Labview subVi. It's launched was controlled with a timed loop structure. Switching that loop to a regular while loop with a "wait until next 10ms" control seemed to fix the job.

No more crashing the code.

Think are most working now except a vision problem that may or may not be related. I'm going to post that separately as I think that is now a new question.


Thanks for the advice. It was a heck of a problem to troubleshoot and being pushed away from a power problem into a code problem was what I needed.

Cheers
__________________
Jason Engbrecht
Team 5434
Lead Mentor
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


All times are GMT -5. The time now is 22:04.

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