View Single Post
  #6   Spotlight this post!  
Unread 14-02-2013, 08:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Stopping all motors

It isn't clear to me if you want to stop the code and loops, or stop the motors.

It is best to leave the motors being updated in a single place. Anytime you try to coordinate loops to share a motor, it gets unpredictable. So if you want to build a motor override functionality, I'd make a subVI that goes in front of, or even wraps the various calls to update the motor. Pass in the requested motor speed, and in the subVI, check the global override and choose between the requested speed and 0.0. Pass that value to the motor.

If you wish to actually stop the code, I'd look at the Abort or Exit. Not the cleanest, nor what I think you are asking for, but it exists.

Greg McKaskle
Reply With Quote