View Single Post
  #5   Spotlight this post!  
Unread 15-02-2011, 09: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: Program 2 coil solenoid

Quote:
Originally Posted by DavidGitz View Post
With your code the while loop only executes once, so why even have it?
There is a valid reason to use a "run-once" loop (though Dyson's code doesn't do it). It lets you use a shift register to remember a value between runs of the surrounding vi. If you have a bunch of such values you need to keep around, a single loop surrounding the relevant functions can be a little cleaner than a bunch of feedback nodes.
Reply With Quote