Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Button motor control... (http://www.chiefdelphi.com/forums/showthread.php?t=102902)

techno4229 15-02-2012 15:53

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?:confused:

Alan Anderson 16-02-2012 07:59

Re: Button motor control...
 
Search the forums for "motor button" and you'll find lots of suggestions. Here is a good one.

techno4229 16-02-2012 16:12

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 :P

plnyyanks 16-02-2012 16:20

Re: Button motor control...
 
1 Attachment(s)
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.

techno4229 20-02-2012 12:03

Re: Button motor control...
 
Quote:

Originally Posted by plnyyanks (Post 1128265)
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 :P how do i set it?

dcarswell 20-02-2012 12:12

Re: Button motor control...
 
1 Attachment(s)
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

techno4229 21-02-2012 18:47

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

Alan Anderson 21-02-2012 22:57

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.


All times are GMT -5. The time now is 11:21.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi