Go to Post "The world is not idiot-proof. Pay Attention." - DonRotolo [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 17-01-2009, 16:58
team877's Avatar
team877 team877 is offline
Registered User
FRC #0877 (Cub Robotics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2001
Location: North Dakota
Posts: 52
team877 is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 17-01-2009, 17:05
Booksy Booksy is offline
Registered User
FRC #1244 (Viking Robotics)
Team Role: Programmer
 
Join Date: Apr 2008
Rookie Year: 2007
Location: Great White North
Posts: 97
Booksy will become famous soon enoughBooksy will become famous soon enough
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.
__________________
My favorite CD quote ever(taken out of context of course):
Quote:
Originally Posted by ttldomination
water would be hard to build
Reply With Quote
  #3   Spotlight this post!  
Unread 17-01-2009, 17:18
TotalChaos's Avatar
TotalChaos TotalChaos is offline
Registered User
AKA: Austin
FRC #2837 (Freebird Robotics)
Team Role: College Student
 
Join Date: Apr 2008
Rookie Year: 2006
Location: Gilbert AZ
Posts: 112
TotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud of
Send a message via MSN to TotalChaos
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
__________________
The 39th Aero Squadron - Team 39! (Visit our website!)
Team Role: 3 Years as Driver - College Student/Mentor!


Freebird Robotics - On a 1 year hiatus! (Visit our website!)
Arizona 2009: Semifinalists! (69 and 498), Delphi "Driving Tomorrow's Technology" Award
Reply With Quote
  #4   Spotlight this post!  
Unread 17-01-2009, 17:19
team877's Avatar
team877 team877 is offline
Registered User
FRC #0877 (Cub Robotics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2001
Location: North Dakota
Posts: 52
team877 is an unknown quantity at this point
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?
Reply With Quote
  #5   Spotlight this post!  
Unread 17-01-2009, 17:35
TotalChaos's Avatar
TotalChaos TotalChaos is offline
Registered User
AKA: Austin
FRC #2837 (Freebird Robotics)
Team Role: College Student
 
Join Date: Apr 2008
Rookie Year: 2006
Location: Gilbert AZ
Posts: 112
TotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud of
Send a message via MSN to TotalChaos
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
__________________
The 39th Aero Squadron - Team 39! (Visit our website!)
Team Role: 3 Years as Driver - College Student/Mentor!


Freebird Robotics - On a 1 year hiatus! (Visit our website!)
Arizona 2009: Semifinalists! (69 and 498), Delphi "Driving Tomorrow's Technology" Award
Reply With Quote
  #6   Spotlight this post!  
Unread 17-01-2009, 17:35
Mikesername's Avatar
Mikesername Mikesername is offline
meh.
AKA: Mike Dame
FRC #3044 (Team 0xBE4)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ballston Spa, NY
Posts: 32
Mikesername is an unknown quantity at this point
Send a message via AIM to Mikesername
Re: Labview Joystick Buttons...

Quote:
Originally Posted by team877 View Post
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?
Yea this is where I'm confused also.

edit: oops... posted while austin was

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...
__________________




[ ballston spa robotics | www.team3044.com | team BE4]

Last edited by Mikesername : 17-01-2009 at 17:46.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-01-2009, 17:54
team877's Avatar
team877 team877 is offline
Registered User
FRC #0877 (Cub Robotics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2001
Location: North Dakota
Posts: 52
team877 is an unknown quantity at this point
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
Reply With Quote
  #8   Spotlight this post!  
Unread 17-01-2009, 17:58
The Megan 2207's Avatar
The Megan 2207 The Megan 2207 is offline
Registered User
FRC #2207 (Prime 329)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: White Bear Lake, MN
Posts: 123
The Megan 2207 is just really niceThe Megan 2207 is just really niceThe Megan 2207 is just really niceThe Megan 2207 is just really nice
Re: Labview Joystick Buttons...

Quote:
Originally Posted by team877 View Post
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?
I was working with this today and I found out that (on the joysticks that came with the KoP) axis 1 is the x-axis, axis 2 is the y-axis, and axis 3 is the throttle (the dial at the base of the joystick). As for the buttions, I know they're numbered but I'm not sure if those numbers match the button numbers in Labview. I do know that button 1 is the trigger, though. I hope that helps!
Reply With Quote
  #9   Spotlight this post!  
Unread 17-01-2009, 18:02
Mikesername's Avatar
Mikesername Mikesername is offline
meh.
AKA: Mike Dame
FRC #3044 (Team 0xBE4)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ballston Spa, NY
Posts: 32
Mikesername is an unknown quantity at this point
Send a message via AIM to Mikesername
Re: Labview Joystick Buttons...

Quote:
Originally Posted by The Megan 2207 View Post
I was working with this today and I found out that (on the joysticks that came with the KoP) axis 1 is the x-axis, axis 2 is the y-axis, and axis 3 is the throttle (the dial at the base of the joystick). As for the buttions, I know they're numbered but I'm not sure if those numbers match the button numbers in Labview. I do know that button 1 is the trigger, though. I hope that helps!

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.
__________________




[ ballston spa robotics | www.team3044.com | team BE4]

Last edited by Mikesername : 17-01-2009 at 18:09.
Reply With Quote
  #10   Spotlight this post!  
Unread 17-01-2009, 18:06
team877's Avatar
team877 team877 is offline
Registered User
FRC #0877 (Cub Robotics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2001
Location: North Dakota
Posts: 52
team877 is an unknown quantity at this point
Re: Labview Joystick Buttons...

I'm having the same problem....
Reply With Quote
  #11   Spotlight this post!  
Unread 17-01-2009, 18:09
TotalChaos's Avatar
TotalChaos TotalChaos is offline
Registered User
AKA: Austin
FRC #2837 (Freebird Robotics)
Team Role: College Student
 
Join Date: Apr 2008
Rookie Year: 2006
Location: Gilbert AZ
Posts: 112
TotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud of
Send a message via MSN to TotalChaos
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 )

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
__________________
The 39th Aero Squadron - Team 39! (Visit our website!)
Team Role: 3 Years as Driver - College Student/Mentor!


Freebird Robotics - On a 1 year hiatus! (Visit our website!)
Arizona 2009: Semifinalists! (69 and 498), Delphi "Driving Tomorrow's Technology" Award
Reply With Quote
  #12   Spotlight this post!  
Unread 17-01-2009, 18:12
The Megan 2207's Avatar
The Megan 2207 The Megan 2207 is offline
Registered User
FRC #2207 (Prime 329)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: White Bear Lake, MN
Posts: 123
The Megan 2207 is just really niceThe Megan 2207 is just really niceThe Megan 2207 is just really niceThe Megan 2207 is just really nice
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...
Reply With Quote
  #13   Spotlight this post!  
Unread 17-01-2009, 18:18
Mikesername's Avatar
Mikesername Mikesername is offline
meh.
AKA: Mike Dame
FRC #3044 (Team 0xBE4)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ballston Spa, NY
Posts: 32
Mikesername is an unknown quantity at this point
Send a message via AIM to Mikesername
Re: Labview Joystick Buttons...

Quote:
Originally Posted by team877 View Post
I'm having the same problem....
The diagram helped... but let's say we want the trigger to link to the "drive close" vi... wiring that gives an error that you can't wire boolean into that.
__________________




[ ballston spa robotics | www.team3044.com | team BE4]

Last edited by Mikesername : 17-01-2009 at 18:21.
Reply With Quote
  #14   Spotlight this post!  
Unread 17-01-2009, 18:47
team877's Avatar
team877 team877 is offline
Registered User
FRC #0877 (Cub Robotics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2001
Location: North Dakota
Posts: 52
team877 is an unknown quantity at this point
Re: Labview Joystick Buttons...

i'm waiting for that button diagram haha
Reply With Quote
  #15   Spotlight this post!  
Unread 17-01-2009, 18:59
TotalChaos's Avatar
TotalChaos TotalChaos is offline
Registered User
AKA: Austin
FRC #2837 (Freebird Robotics)
Team Role: College Student
 
Join Date: Apr 2008
Rookie Year: 2006
Location: Gilbert AZ
Posts: 112
TotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud of
Send a message via MSN to TotalChaos
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 )
__________________
The 39th Aero Squadron - Team 39! (Visit our website!)
Team Role: 3 Years as Driver - College Student/Mentor!


Freebird Robotics - On a 1 year hiatus! (Visit our website!)
Arizona 2009: Semifinalists! (69 and 498), Delphi "Driving Tomorrow's Technology" Award

Last edited by TotalChaos : 17-01-2009 at 19:05.
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

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
Buttons on a Attack 3 Joystick useing LABView morg102 NI LabVIEW 14 02-02-2010 23:28
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


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

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