Go to Post Wait, we have to be logical? - JaneYoung [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 15-02-2012, 15:53
techno4229 techno4229 is offline
Registered User
AKA: marcus
FRC #4170
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: ca
Posts: 12
techno4229 is an unknown quantity at this point
Button motor control...

Hey were a rookie team and im trying to configure the default file of labview and what im trying to do is have ex: button 6 move 1 motor forward, then assign button 7 to move the same motor but reverse? how do i do it?
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2012, 07: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: Button motor control...

Search the forums for "motor button" and you'll find lots of suggestions. Here is a good one.
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2012, 16:12
techno4229 techno4229 is offline
Registered User
AKA: marcus
FRC #4170
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: ca
Posts: 12
techno4229 is an unknown quantity at this point
Re: Button motor control...

Where is the "buttons" control and where are those triangle shaped codes? cant find anywhere btw ty for post helpful just rookie
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2012, 16:20
plnyyanks's Avatar
plnyyanks plnyyanks is online now
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: Button motor control...

The triangle thing is a Select Node. If the boolean wired to the middle is true, then it will output the value wired to the top input. If the boolean is false, it will return the value wired to the bottom input.

The "buttons control" is an Unbundle By Name function. It takes a cluster input (the output to Joystick Get) and will "split" it up into its individual values.

As for controlling a motor via two buttons, I like to do it the attached way.
Attached Thumbnails
Click image for larger version

Name:	button motor drive.png
Views:	103
Size:	12.5 KB
ID:	11929  
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #5   Spotlight this post!  
Unread 20-02-2012, 12:03
techno4229 techno4229 is offline
Registered User
AKA: marcus
FRC #4170
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: ca
Posts: 12
techno4229 is an unknown quantity at this point
Re: Button motor control...

Quote:
Originally Posted by plnyyanks View Post
The triangle thing is a Select Node. If the boolean wired to the middle is true, then it will output the value wired to the top input. If the boolean is false, it will return the value wired to the bottom input.

The "buttons control" is an Unbundle By Name function. It takes a cluster input (the output to Joystick Get) and will "split" it up into its individual values.

As for controlling a motor via two buttons, I like to do it the attached way.
ty helped alot now i need 1 more thing... setting the pwm control to a number how do i set it?
Reply With Quote
  #6   Spotlight this post!  
Unread 20-02-2012, 12:12
dcarswell's Avatar
dcarswell dcarswell is offline
FRC Mentor/Old Dominion University
AKA: DeAndre Carswell
FRC #3359 (Royal Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2006
Location: Portsmouth, VA
Posts: 36
dcarswell is an unknown quantity at this point
Re: Button motor control...

this is another way of approaching the problem you are having..and as you can see you can change the speed of the motor, to your liking..we needed to slow a motor down, so instead of using 1 and -1, we used .4 and -.4
Attached Thumbnails
Click image for larger version

Name:	Motor Example to Button.jpg
Views:	114
Size:	13.5 KB
ID:	12009  
Reply With Quote
  #7   Spotlight this post!  
Unread 21-02-2012, 18:47
techno4229 techno4229 is offline
Registered User
AKA: marcus
FRC #4170
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: ca
Posts: 12
techno4229 is an unknown quantity at this point
Exclamation Re: Button motor control...

just realized... umm, we need to control a total of 2 motors but separte funtctions ex:

motor 1 (move when one of the 2 buttons pushed) 2 way funtion - button
1fwd and button 2reverse
motor 2 (move when one of the 2 buttons pushed) 2 way funtion - button
3fwd and button 4reverse

but on buttons so if i use this on the robot main config file and put it in the teleop file, how can i do that its not just one motor is two in same project but seperat... so i can save pwm's
Reply With Quote
  #8   Spotlight this post!  
Unread 21-02-2012, 22:57
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: Button motor control...

If you want to control one motor with two buttons, and another motor with two other buttons, just put another copy of the code next to the first one and change the buttons and refnum name.
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 11:21.

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