|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
I have found many post's but no answers on this subject.
Please dont give me outside links or links to other topics here I would just like to know how to spesifiy witch button on the joystick i am useing. Thanks, 1141 |
|
#2
|
||||
|
||||
|
Re: Buttons on a Attack 3 Joystick useing LABView
Right click on the "Buttons" cluster -- Go to the "Cluster Pallette -- Click unbundle -- wire that to the Button out -- wire to the button you want.
Hope that helps. |
|
#3
|
||||
|
||||
|
Re: Buttons on a Attack 3 Joystick useing LABView
Here's a bit more of a visual in case you're using the basic framework (Pretty much what DHR2o said):
Go to your palette and go to "WPI Robotics Library" > "DriverStation" > "Joystick" and add a "Get.vi" .. hook it up to the connector shown below: ![]() Go to your palette and go to "Programming" > "Cluster, Class & Variant" and add an "Unbundle by name". Hook it up to the pink output of the get VI as shown below: ![]() ![]() Now from the cluster outputs you have access to all of the buttons. ![]() Good luck! - Austin |
|
#4
|
|||
|
|||
|
Thanks, me and the other programer found a salution but this is alot better.
|
|
#5
|
||||
|
||||
|
Re: Buttons on a Attack 3 Joystick useing LABView
wait, what's the difference between using get and get raw for the buttons?
|
|
#6
|
||||
|
||||
|
Re: Buttons on a Attack 3 Joystick useing LABView
As far as the buttons go, nothing. The only difference I know of is the joystick axis output ranges from like -30000 something to +30000 something in increments of 256 or 512 or something around there...
- Austin |
|
#7
|
||||
|
||||
|
Re: Buttons on a Attack 3 Joystick useing LABView
lol, k. thanks.
|
|
#8
|
||||
|
||||
|
The joystick ranges from -1 to 0 to 1. If it is scaled to 127 (which it is set to by default) then the joystick ranges from -127 to 0 to 127. Which gives you a more finer control over a motor.
|
|
#9
|
||||
|
||||
|
Re: Buttons on a Attack 3 Joystick useing LABView
Quote:
- Austin |
|
#10
|
|||
|
|||
|
Re: Buttons on a Attack 3 Joystick useing LABView
what is the joystick axis output?? it is really -1 to 1??? or is it 0 to 256 or -158 to 158
|
|
#11
|
|||
|
|||
|
Re: Buttons on a Attack 3 Joystick useing LABView
-1 to 1. If you have a running system, don't forget that in LV you can open the panel and watch the values as they flow through. Many times that is a good way to understand the values being sent.
Greg McKaskle |
|
#12
|
|||
|
|||
|
Re: Buttons on a Attack 3 Joystick useing LABView
I want to program in a way that when i press the trigger the motor works at half speed...
I don't know how to do it.. I did a little bit of the steps that were mentioned above and it really didn't help. So can you tell me how to do it?? If you can provide pictures with that I would really appreciate.. Thank you.. Mohit |
|
#13
|
|||
|
|||
|
Re: Buttons on a Attack 3 Joystick useing LABView
Create a case structure. Wire the button input to the case structure's "?" node. Then make the "True" case have a 0.5 constant in it. Make the "False" case have a 0 constant in it. Wire both the constants out of the case structure to the Set Motor VI. Voila!
|
|
#14
|
|||
|
|||
|
Re: Buttons on a Attack 3 Joystick useing LABView
Thank you for the help..
I'll let you know if it works once I get to school tommorow and start working on it.. |
|
#15
|
||||
|
||||
|
Re: Buttons on a Attack 3 Joystick useing LABView
Here's a shot of something that doesn't do exactly what you want, but it's close and easily modifyable ... our trigger overrides the throttle and sets it to full speed.
In the pic, the case structure shows the FALSE case, where the throttle goes straight thru, but when button 1 is pressed, the TRUE case has a hard constant 1.0 wired up into the throttle output of that case structure, ignoring the actual joystick throttle until the button is released. In your case, you'd wanna' wire up a 0.5 constant to it, if you want half-speed. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do you program joystick buttons in LabVIEW? | darkpheonix | NI LabVIEW | 10 | 13-04-2014 10:20 |
| Joystick buttons access | byteit101 | C/C++ | 3 | 14-01-2009 19:38 |
| buttons in LabView | Pneumaticsman | NI LabVIEW | 4 | 12-01-2009 18:14 |
| Buttons to Pins on Joystick | yarb65 | Electrical | 1 | 24-08-2007 20:39 |
| Assigning Joystick buttons.... | archiver | 2001 | 5 | 24-06-2002 00:59 |