Go to Post When a vomit shooter runs out of balls, is it dry heaving? :p - Lil' Lavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2011, 18:30
Left Justified Left Justified is offline
Registered User
AKA: Calvin Norman
FRC #2647
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Phoenix
Posts: 6
Left Justified is an unknown quantity at this point
Multiple buttons on a single motor

Apologies if this seems like a stupid question, but:

My team decided to go with a traditional tankdrive for our bot, and I was wondering if it is possible to set multiple buttons to the same motor.

I was hoping to have the triggers on our joysticks make the motor driving the arm spin in opposite directions, and was having trouble figuring out how to do this.

Thanks in advance.
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2011, 19:59
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: Multiple buttons on a single motor

I'm sure what you are asking for is possible, and it's probably even easy. A more precise description of what you want would help. Do you want the left joystick trigger to run a motor in one direction and the right joystick trigger to run it in the other direction? Do you want the motor to stop when both triggers are released? Do you have any preference for what happens when both triggers are pressed?
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2011, 20:08
bladetech932's Avatar
bladetech932 bladetech932 is offline
Programmer of awesome
AKA: Jon
FRC #0932 (Circuit Chargers)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2009
Location: Tulsa
Posts: 242
bladetech932 is on a distinguished road
Re: Multiple buttons on a single motor

Use the motor devref and just split the wire to go to two different set speed vis in two different case structures
__________________
Expect the best, Prepare for the worst
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2011, 13:28
Left Justified Left Justified is offline
Registered User
AKA: Calvin Norman
FRC #2647
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Phoenix
Posts: 6
Left Justified is an unknown quantity at this point
Re: Multiple buttons on a single motor

Quote:
Originally Posted by Alan Anderson View Post
I'm sure what you are asking for is possible, and it's probably even easy. A more precise description of what you want would help. Do you want the left joystick trigger to run a motor in one direction and the right joystick trigger to run it in the other direction? Do you want the motor to stop when both triggers are released? Do you have any preference for what happens when both triggers are pressed?

@Alan: I want pretty much what you said. I was hoping to have the left trigger make the motor go forward and the right trigger do the opposite.
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2011, 10:56
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: Multiple buttons on a single motor

I was right, what you want is easy.
Click image for larger version

Name:	button motor.jpg
Views:	35
Size:	15.8 KB
ID:	9888
The triangular "Select" functions might be unfamiliar. The help describes them this way:
Quote:
Returns the value wired to the t input or f input, depending on the value of s. If s is TRUE, this function returns the value wired to t. If s is FALSE, this function returns the value wired to f.
So when neither button is pressed, the motor is set to 0. When the forward button is pressed, the motor is set to 1 (full speed forward -- change the constant if you want some other speed). When only the reverse button is pressed, the motor is set to -1 (full speed reverse -- change it if you want).

Last edited by Alan Anderson : 30-01-2011 at 16:37. Reason: corrected the markup
Reply With Quote
Reply


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


All times are GMT -5. The time now is 08:24.

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