View Single Post
  #2   Spotlight this post!  
Unread 24-01-2009, 23:17
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: using a switch/button to turn on a motor

Unless what you want it to do is cause the code to sit doing nothing but set the fan speed while the "fan on" switch is true, and eventually have the watchdog activate and disable everything, I don't think that code will do what you want.

The easiest way to have a button turn a motor on and off is probably to use a "boolean selector" to choose which of two speed values to send to the motor based on the state of the button. (I don't have a copy of LabVIEW available right now, so I can't provide a picture of a simple example.)
Reply With Quote