FIRST Forums  

Go Back   FIRST Forums > General Discussions > FIRST Programs > FIRST LEGO League > The Challenge > Programming

Reply
 
Thread Tools
  #1  
Old 11-12-2011, 02:34 PM
natterbus natterbus is offline
Member
 
Join Date: Jun 2011
Posts: 62
Default program exiting?

I am hoping someone has some advice. My team wrote a program management program to call their 5 missions. All of a sudden last night it started just exiting in the middle of the 1st mission, leaving the robot stranded in the middle of the table. This did not occur in the 1st 20 times they tested it and then all of a sudden it was happening frequently. They went back to using their backed-up version from 2 days earlier and all seemed well, but then at a practice competition today, during their 3rd run, it exited again. They had not made any changes or even re-downloaded the program the entire day.

My fear is that this is some kind of a weird software bug, memory issue, or problem with the brick which will be near impossible for the kids to diagnose and handle in time for our competition in 3 weeks. The inconsistency of it is the odd thing. They can handle dealing with it if it's somehow the program they wrote (though I looked at it and can't fathom how it could just exit in the middle of the program).

Has anyone seen something like this happen or have any suggestions? They will of course run the mission on its own many times and then as part of the management program to see if the mission itself appears to be at fault. Unlikely though since it's probably been run hundreds of time on its own without issue. It exits in the middle of the myblock called to accomplish the rats between a motor and move block, seemingly between a move block and an unlimited motor block.

Thanks! Natterbus

Last edited by natterbus; 11-12-2011 at 02:44 PM.
Reply With Quote
  #2  
Old 11-12-2011, 03:56 PM
timdavid timdavid is offline
Senior Member
 
Join Date: Sep 2009
Location: Minnesota
Posts: 881
Default Re: program exiting?

We had something like that happen at a tournament last year. The problem was that the timeout on the NXT brick had been changed to 30 seconds. That appeared to cause the robot to shut off in the middle of the program. Didn't make a lot of sense to me that a timeout could happen while the robot was executing a program, but that is apparently how it works.

After the timeout was changed to a more reasonable 5 or 10 minutes, we didn't see the problem again.

I believe there is actually an NXT-G block to control the timeout during program execution.
Reply With Quote
  #3  
Old 11-12-2011, 04:05 PM
LOLComets LOLComets is offline
Senior Member
 
Join Date: Apr 2009
Location: Southern California
Posts: 147
Default Re: program exiting?

Quote:
Originally Posted by natterbus View Post
...My fear is that this is some kind of a weird software bug, memory issue, or problem with the brick which will be near impossible for the kids to diagnose and handle in time for our competition in 3 weeks. The inconsistency of it is the odd thing. They can handle dealing with it if it's somehow the program they wrote (though I looked at it and can't fathom how it could just exit in the middle of the program).

Has anyone seen something like this happen or have any suggestions? They will of course run the mission on its own many times and then as part of the management program to see if the mission itself appears to be at fault. Unlikely though since it's probably been run hundreds of time on its own without issue. It exits in the middle of the myblock called to accomplish the rats between a motor and move block, seemingly between a move block and an unlimited motor block.
First, I assume exiting means the program stops and the display on the NXT would be the program name and if you press the orange button, the program would start from the beginning. If that is the case, we've seen this happen ONLY when the Stop Block was used. The other cases we've seen is that when the move or motor blocks power is so low with weak batteries and the robot stalls at that step.

If the STOP block is used, you may want to check the conditions that would cause it to execute and debug the program(s) that way.

If you suspect it is memory problem, the best thing to do is upgrade the firmware (1.28 or higher) which clears all the memory on the nxt and then load the programs and hopefully this will fix the problem.
Reply With Quote
  #4  
Old 11-12-2011, 10:00 PM
natterbus natterbus is offline
Member
 
Join Date: Jun 2011
Posts: 62
Default Re: program exiting?

It is not powering off. Just showing the program name and the word run (but not running/cycling). There is a stop at the end of the myblock but it was supposed to be triggered after a "wait for the orange button". It does make sense that it is something screwy in that part of the program since I think that was a change made shortly before the problem started. It still doesn't make sense that it would happen inconsistently, but it is a good place to start. Thanks! Natterbus
Reply With Quote
  #5  
Old 11-12-2011, 10:10 PM
LOLComets LOLComets is offline
Senior Member
 
Join Date: Apr 2009
Location: Southern California
Posts: 147
Default Re: program exiting?

Quote:
Originally Posted by natterbus View Post
It is not powering off. Just showing the program name and the word run (but not running/cycling). There is a stop at the end of the myblock but it was supposed to be triggered after a "wait for the orange button". It does make sense that it is something screwy in that part of the program since I think that was a change made shortly before the problem started. It still doesn't make sense that it would happen inconsistently, but it is a good place to start. Thanks! Natterbus
We had a similar problem last year and it was as simple as the orange button being stuck when pressed down. First we changed the trigger from "Pressed" to "Bumped" and last summer got the brick replaced from Lego. Another solution is to use a touch sensor instead of the orange button.
Reply With Quote
  #6  
Old 11-13-2011, 04:28 PM
BremenBotz! BremenBotz! is offline
Member
 
Join Date: Sep 2008
Location: Bremen, IN, USA
Posts: 72
Default Re: program exiting?

Anytime we use an NXT button press, we follow it with a wait for the same button to be released. That keeps the team from inadvertently holding the button too long and triggering a second push somewhere else in the program...

We also don't ever stop the program (inside the code). The only way to stop it is to press the grey button on the NXT. At the end of the match, it sits at the menu waiting for the operator to press an arrow to select a program or the orange button to run it...

Les Turner
Coach, Bremen Botz! 318
Reply With Quote
  #7  
Old 11-13-2011, 09:56 PM
Dean Hystad Dean Hystad is offline
Senior Member
 
Join Date: Sep 2008
Location: Minnesota
Posts: 1,700
Default Re: program exiting?

Quote:
Originally Posted by BremenBotz! View Post
Anytime we use an NXT button press, we follow it with a wait for the same button to be released. That keeps the team from inadvertently holding the button too long and triggering a second push somewhere else in the program...

We also don't ever stop the program (inside the code). The only way to stop it is to press the grey button on the NXT. At the end of the match, it sits at the menu waiting for the operator to press an arrow to select a program or the orange button to run it...

Les Turner
Coach, Bremen Botz! 318
Why not use button bumped? That is a wait for press/wait for release in one easy block.
Reply With Quote
  #8  
Old 11-13-2011, 10:06 PM
hastypete hastypete is offline
Senior Member
 
Join Date: Jun 2009
Location: San Jose, CA
Posts: 218
Default Re: program exiting?

We have had trouble with "bumped". It works, but sometimes if you do a quick press, it will not register. It seems to always work better when the button is held for just an bit. Waiting for a press then waiting for a release is a good method.
Reply With Quote
  #9  
Old 11-13-2011, 11:36 PM
Dean Hystad Dean Hystad is offline
Senior Member
 
Join Date: Sep 2008
Location: Minnesota
Posts: 1,700
Default Re: program exiting?

Quote:
Originally Posted by hastypete View Post
We have had trouble with "bumped". It works, but sometimes if you do a quick press, it will not register. It seems to always work better when the button is held for just an bit. Waiting for a press then waiting for a release is a good method.
I don't think I have ever had "bumped" fail. Just how fast are you?
Reply With Quote
  #10  
Old 11-14-2011, 03:17 AM
hastypete hastypete is offline
Senior Member
 
Join Date: Jun 2009
Location: San Jose, CA
Posts: 218
Default Re: program exiting?

I think it fails in the menu program my team uses, which is a simple loop with multiple switch blocks each looking for a button press (left, center, right, touch). Maybe you have to actually bump it while it is looking at that sensor? Don't know, but it has been an issue. If you hold the button and release it works fine, but a quick touch does not work every time. I have not measured the speed of the touch, but it is not so short as a jab. Closer to pressing a button on a remote control.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB 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
How Do You Track Program Versions? esanjays Programming 12 12-08-2011 08:34 PM
Program problem 2010FRC2343 Robot 3 02-09-2010 02:00 PM


All times are GMT -4. The time now is 10:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.