![]() |
labview adding button from joystick
2 Attachment(s)
Hello I am having a issues with adding a button into labview 2013. This is what i got so far in the programming I have no idea if this is even right thanks.
|
Re: labview adding button from joystick
Assuming you initialized the joystick in the begin vi (it is if you didn't modify the default code), it looks ok.
It looks like you are checking button 1 of the joystick. If it is true (ie pressed) you stop the motor, else false you pass the values from the axis to your motor. |
Re: labview adding button from joystick
Precisely.Well the button works in the simulator and the motor stops but nothing is moving. Basically its for our launcher press button 1 and the 2 motor start and the drive motors stop.
|
Re: labview adding button from joystick
It looks like you have the "drive motors stop" part, but you are missing "the 2 motor start" part.
|
Re: labview adding button from joystick
1 Attachment(s)
so do i add something like this?
|
Re: labview adding button from joystick
1 Attachment(s)
Try this.
Attachment 14079 |
Re: labview adding button from joystick
Quote:
|
Re: labview adding button from joystick
1 Attachment(s)
Add this to your Begin.VI
|
Re: labview adding button from joystick
would the buttons work in the simulator? and THe robot just spins in cercles in the simulator.
|
Re: labview adding button from joystick
2 Attachment(s)
here the begin and teleop updated
|
Re: labview adding button from joystick
1 Attachment(s)
teleop true
|
Re: labview adding button from joystick
1 Attachment(s)
To use the 2 Motor Open with a Tank drive for your launcher.
|
Re: labview adding button from joystick
what value do i add in the false statement?
|
Re: labview adding button from joystick
In Teleop you need to rename the two "My Motor Refnum" to "shooter 1" and shooter2".
Be VERY careful with the Ref Names string! Pay attention to spaces you use in them. "shooter2" is not the same as "shooter 2" In fact make it a rule not to use any spaces. Call them "shooter_1" and "shooter_2" I should have used "Launcher_Motor_1" and "Launcher_Motor_2" in my example that I posted. |
Re: labview adding button from joystick
Quote:
I assume you want them the stop when you release the joystick button as write out 0 (zero) The snipplets that I posted you can copy them to your desk top and them drag them on to any block diagram and you will have the code just as I created it. |
| All times are GMT -5. The time now is 12:13. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi