![]() |
Labview Joystick Buttons...
Hi can someone give me a printscreen of the diagrams in labview to make the joystick buttons work with....lets say a relay. I have a good start but I need some reference to complete what i've started
Thanks Team 877 |
Re: Labview Joystick Buttons...
Well, I'm on a mac right now but I can give you an explanation.
if I recall correctly, you need to use joystick->get raw data It gives you an array, if you unbundle by name I think you can access the proper buttons. The unbundle functions can be found under the array section, if you do a right click. Hope you can figure it out from that. If someone is in their dev environment, please post an image or feel free to correct me. |
Re: Labview Joystick Buttons...
As a start you can check out my post in THIS THREAD.
It's not a full reference, but its a bit. I'll see if I can get a better screenshot for you. - Austin |
Re: Labview Joystick Buttons...
i have all that, but some of the concepts i don't understand are which axis does what??? and how do i know that button 1 on my unbundle program is actually working there are too many things i don't understand at this point. also do you have a layout of which button 1-12 goes with what button on the controller?
|
Re: Labview Joystick Buttons...
I don't have a picture handy or know for certain if all of the buttons match up off the top of my head.
However, while I look for one there is a way you can find out for yourself. Instead of sending the data to the unbundle function (or I guess you could just have a second wire), right click on the data output of the "Get" VI and select: Create > Indicator. This should put an indicator with labels on you front panel that shows all of the outputs of the joystick. You cam just press the button and see which one lights up on the front panel. In the meantime I'll keep looking for a full example of what you're looking for. Hope that helps! - Austin |
Re: Labview Joystick Buttons...
Quote:
edit: oops... posted while austin was :P I'll try austin's and reply... edit2: I tried austin's technique and I got the buttons in the front panel, but apparently I can't wire out of the buttons indicator... |
Re: Labview Joystick Buttons...
yeah i can now get a relay to work off my axis....but not off a button. It's as if I can't wire a button anywhere to send the signal to the robot saying engage relay with button 1
|
Re: Labview Joystick Buttons...
Quote:
|
Re: Labview Joystick Buttons...
Quote:
That did help as the trigger is wxactly what I was looking for.. don't know about OP tho... However, I still can't figure out how to wire the button out to say, a motor, so that when that button is pressed it activates that motor... well wait.. with what I had before (where the buttons are put in the front panel) it wouldn't let me wire out... but when I do the actual buttons it does... I'm not making sense, am I. |
Re: Labview Joystick Buttons...
I'm having the same problem....
|
Re: Labview Joystick Buttons...
I know it's a little late, but here's my crudely done diagram:
![]() (Sorry, I did it in paint without a mouse :p ) Give me about 15 minutes or so and I'll get a picture of some way to hook a motor to a button. (It might not be the best way, but I do know a way) - Austin |
Re: Labview Joystick Buttons...
I had it wired to a servo, but I'm sure it wouldn't be too much different to wire it to a motor. I don't remember exactly how I did it right now, but I can figure it out once I install Labview onto this computer. It might take half an hour or so...
|
Re: Labview Joystick Buttons...
Quote:
|
Re: Labview Joystick Buttons...
i'm waiting for that button diagram haha
|
Re: Labview Joystick Buttons...
Ok, here we go.
I have two examples. One is of the standard code altered so that pressing Button 1 would simulate moving the joystick to one side of the x-axis: ![]() This next example get rid of the standard drive code completely and replaces it with a system in which Button 4 and Button 5 contol a left and right motors (respectively) to either on or off. (So like on our practice base, Button 4 would turn one side when pressed, Button 5 the other): ![]() Ok, so as you've probably noticed, the key is this little guy: ![]() This function converts a boolean value to a numerical value, 0 or 1 (0 false, true 1) It can be found by opening the functions palette and going to: Programming > Boolean and selecting "Boolean To (0,1)". I think that's what you guys are looking for. If you have any more question just ask! Good Luck! - Austin [EDIT] - And sorry it took me so long, I was needed elsewhere to help with cutting some stuff :P ) |
| All times are GMT -5. The time now is 21:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi