Go to Post I think all we need now is Jenny Craig for Robots. - ErichKeane [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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.
 


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
Code error causing robot to go into programming mode. MJD Programming 14 30-10-2007 14:21
CMU / RC / programming error N7UJJ Programming 3 18-02-2005 17:05
yet another programming error hawk_11 Programming 2 13-02-2005 15:57
programming error agenova Programming 1 20-02-2002 13:00


All times are GMT -5. The time now is 01:49.

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