Go to Post there is no such thing as too many parts or useless parts, only parts you dont need yet. - Cuog [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
  #2   Spotlight this post!  
Unread 28-01-2009, 12:24
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,658
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: programming a motor to two buttons

That's... an interesting way of turning a motor on and off with a button. A slightly cleaner and more expandable way is to use the Select function block (in the Programming>Comparison palette), or a set of Case Structures. The Select function block has one boolean input (green wire) and two other inputs that can be of many different types. It selects which of these two other inputs to pass to the output based on whether the boolean is true or false. I've put together the motor control you were looking for in the picture below using some select blocks. This particular wiring forces the forward button to override the reverse button. So if you have both buttons pressed, the motor will move forwards.
Attached Thumbnails
Click image for larger version

Name:	Button control.JPG
Views:	114
Size:	9.6 KB
ID:	7249  
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
 


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
Programming Joystick Buttons to toggle a motor on and off programmr C/C++ 6 25-01-2009 17:47
Programming a single relay to two buttons in easyC Pro? Gizmo2417 Programming 1 17-02-2008 17:10
Help Programming Buttons LordFrz Programming 3 14-02-2008 13:55
Programming Extra Joystick Buttons Inverted Programming 2 08-02-2007 11:45
Is it okay to run one motor in a two motor transmission? NoodleKnight Technical Discussion 27 16-12-2004 07:16


All times are GMT -5. The time now is 09:38.

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