Go to Post Amazing what you can find with a quick video and the unlimited power of the internet! - AveryLevin. [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
  #16   Spotlight this post!  
Unread 17-01-2009, 19:09
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...

thank you so much
Reply With Quote
  #17   Spotlight this post!  
Unread 17-01-2009, 19:11
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...

I can't wire it from the boolean to 0,1 to the close. I have drive close on the outside of my main loop, and it's wired to the drivedevref global variable, but when I try to wire to it the wire goes dotted. When I try to make another drive close inside the loop and wire to it I get the same problem

Edit: Or is it not possible to set it to drive close? I just wanted to do that so I could test the button input at our next meeting...
__________________




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

Last edited by Mikesername : 17-01-2009 at 19:16.
Reply With Quote
  #18   Spotlight this post!  
Unread 17-01-2009, 19: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...

The only thing that needs to be sent to the Close VI is the DevRef wire, which is the pink wire that comes out of the "Open Jaguar" or "Open 2 Motor", etc, VI.



- 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
  #19   Spotlight this post!  
Unread 17-01-2009, 19:42
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 can get the relay to turn off but not able to engage it...so when I press the button the relay shuts off
Reply With Quote
  #20   Spotlight this post!  
Unread 17-01-2009, 19:46
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...

So you want to press a button to turn the relay on, release the button and do whatever else you need then be able to hit the same button to turn it off?

Or maybe I'm still misunderstanding 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
  #21   Spotlight this post!  
Unread 17-01-2009, 21:29
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...

What about pressing a button to turn on the compressor?

Then pressing another one to turn it off?

Sorry if I'm derailing the thread, but I figured it was still somewhat related so instead of starting [another] thread on joystick buttons...
__________________




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

Last edited by Mikesername : 17-01-2009 at 21:33.
Reply With Quote
  #22   Spotlight this post!  
Unread 18-01-2009, 14:37
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 don't want to turn the relay on and off. I want it always on. But i want it to either have a forward polarity or a reverse polarity. (indicated by green for forward and red for reverse on the spike itself) Can you explain to me how to do this?
Reply With Quote
  #23   Spotlight this post!  
Unread 18-01-2009, 14:47
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...

Oh, ok, I think I'm getting a better understanding.. Are you trying to make one button that toggles between forward and reverse, or are you trying to do one button for forward and another for reverse?

- Austin

EDIT - Or forward when held down, reversed when unpressed?
__________________
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
  #24   Spotlight this post!  
Unread 18-01-2009, 14:50
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 would like to know how to do both!!! haha
Reply With Quote
  #25   Spotlight this post!  
Unread 18-01-2009, 15:02
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...

Quote:
Originally Posted by team877 View Post
I would like to know how to do both!!! haha
You could use a case structure attached to the button, or one of those boolean selectors with the question mark.

For the case structure, you would just put the relay function in the C/S, then wire a constant to the input.
The boolean selector would be similar but smaller and simpler, and if you know what Im talking about, I'd use it.

Go here for how to use the relay function (as well as any other first function):http://decibel.ni.com/content/docs/DOC-2631
If you right click on the input node and select create->constant it will put an enum there with forward and reverse settings. Because it is an enum, the three states will be 0, 1, 2 for forward, reverse and off, I think (in no particular order, check the enum for the real values).

Hope that helps get you on your way. That should be enough to do both of those scenarios.
__________________
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
  #26   Spotlight this post!  
Unread 18-01-2009, 15:29
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...

A picture of this would be much appreciated
Reply With Quote
  #27   Spotlight this post!  
Unread 18-01-2009, 16:33
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...

Can anyone just make one of these programs and make a printscreen.
I'm desperate to figure this out and so far i've been unsuccessful.
I need to use a joystick button to engage a relay forward, and reverse, and off....Please help!
Reply With Quote
  #28   Spotlight this post!  
Unread 18-01-2009, 16:38
ShotgunNinja's Avatar
ShotgunNinja ShotgunNinja is offline
Programming Mentor, FRC 4247
AKA: Nicholas Iannone
FRC #4247 (CougarBOTS)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Milwaukee, WI
Posts: 160
ShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the rough
Re: Labview Joystick Buttons...

Hey all, a bit late, but I have made a simple VI for retrieving a single button's boolean state based on it's enumerated value. It hooks up just like the Get Axis sub-VI, but with an Unsigned Byte (8-bit) input hook for a button enumerator control.

Here's a screenshot:



Here's a copy of the VI:
Attached Files
File Type: vi Joystick Get Button.vi (18.0 KB, 91 views)
__________________
Team #2970 Alum
Team #1652 Alum
2006: School Mascot for Team 1652
2007-2008: Programmer for Team 1652 (Robot Mafia)
2009: Programmer on Team 1652 (Robot Mafia), Programmer on Team 2970 (eSchool eBots)
2010-2016: Volunteer, Wisconsin Regional
2017: Programming Mentor, FRC 4247 (CougarBOTS, Obama SCTE, Milwaukee, WI)

Last edited by ShotgunNinja : 18-01-2009 at 16:53.
Reply With Quote
  #29   Spotlight this post!  
Unread 18-01-2009, 17:14
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...

Quote:
Originally Posted by team877 View Post
Can anyone just make one of these programs and make a printscreen.
I'm desperate to figure this out and so far i've been unsuccessful.
I need to use a joystick button to engage a relay forward, and reverse, and off....Please help!
Ok, I whipped up something as an example. I haven't had a chance to test this code on our base so there's no guarantees, but as far as the general idea goes I think its a good example.

Usually I would just post a screenshot and explain in the post, but since there's cases inside of cases I wouldn't be able to show you everything without a screenshot for every possible combination, so Instead you can just download the code. (I'll attatch it to this post) I have comments in the code that explain everything I did and why. I don't know that this is the best or most efficient way to do what you are trying to do, but it is one solution. If you have and questions about the code feel free to ask! And if you find any errors please let me know!

- Austin
Attached Files
File Type: vi Basic Robot Main.vi (92.9 KB, 87 views)
__________________
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
  #30   Spotlight this post!  
Unread 18-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...

this is what i have so far if anyone can build from this that would be absolutely amazing
Attached Thumbnails
Click image for larger version

Name:	pic.JPG
Views:	157
Size:	127.6 KB
ID:	7174  
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 13:14.

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