View Single Post
  #4   Spotlight this post!  
Unread 11-02-2009, 18:52
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
Re: limit switch help

Can you post your own code so I can take a look?

If you want to debug your code, you can turn on highlighting (the lightbulb button), you should be able to see that the limit switch causes the while loop to exit and then the motor should set the speed to zero causing the motion to stop.

One issue may be that I'm assuming the DIO input goes True when you want your motor to stop. If the opposite is what you want, then right click the while loop stop sign and select "Continue if True".

-Nate
Reply With Quote