View Single Post
  #17   Spotlight this post!  
Unread 25-02-2009, 15:24
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,926
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: Programming Error

You have a While loop that should normally, by default, keep you running when the Run button is pushed.

The default for such a loop is "Stop if True" (looks like the left picture below).
Did you by any chance change it to a "Continue if True" (the middle picture)?

Either type can be used, but you have to be careful to have the correct default value going in. In one case it should default to True, while in the other it should default to False. That's a common reason for the program to run only once (taking only milliseconds to complete). People sometimes change the loop type, but forget to reverse the default True/False. In the middle case below, the loop will run only once (very fast) because the button feeding it would have to be held down to make it loop.

For instance, the third picture is what the Basic Framework uses and it keeps the loop going because it defaults to True and uses "Continue if True."
Attached Thumbnails
Click image for larger version

Name:	StopIfTrue2.jpg
Views:	24
Size:	2.0 KB
ID:	7563  Click image for larger version

Name:	ContinueIfTrue.jpg
Views:	18
Size:	1.9 KB
ID:	7564  Click image for larger version

Name:	ContinueIfTrue2.jpg
Views:	21
Size:	2.8 KB
ID:	7565  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 25-02-2009 at 15:43.