Go to Post It's a process of elimination led by inspiration. - JaneYoung [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2010, 00:12
ecnahc515 ecnahc515 is offline
Registered User
FRC #3192
 
Join Date: Jan 2010
Location: Oregon
Posts: 6
ecnahc515 is an unknown quantity at this point
Wiring JoystickGet Buttons to a custom VI

Okay so I've created our kicking code and I've put it in the teleop VI inside the execute case and everything ect ect.

The code loads it when I press a button and shoots when I press a button + another button, however, I want to just move all this into its own VI, but then I'm not sure how to get the joystick button values wired into the VI I want.

Basically I want to know how to wire the joystick get into a VI I've created, instead of making another joystick get, inside of the VI I've created.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2010, 08:08
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Wiring JoystickGet Buttons to a custom VI

One of the cool features is to select the nodes you want to be in the subVI. Then move to the Edit menu and choose SubVI from Selection.

LV will make parameters for the wires that cross the boundary in and out, and put the nodes into the subVI along with constants and such.

You sometimes want to be careful doing this with control or indicator terminals, and sometimes LV will tell you that there is a reason you may not want to do this, but it is a helpful tool and helps to prevent making editing mistakes.

To do this by hand, by the way, you'd put the code in the subVI, and you'd have a broken wire as the Button input would be missing. You would place a control on the panel to provide the button value, and you'd right click on the panel icon in the corner to show the connector. Then you can click a spot on the connector and wire the control to it.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2010, 08:19
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Wiring JoystickGet Buttons to a custom VI

Depending on how much you need from your Joystick, you can either wire up the cluster of buttons, and the cluster of axes ... or you can wire up individual buttons or axes.

Here's what I would do, if I wanted all the buttons and all the axes:

- right click near the right-hand side of a joystick GET function and create an indicator for the axes, and another for the buttons
- CUT those indicators from that VI and PASTE them into your custom VI
- select the indicators and change them to controls
- on the custom VI's front panel, right-click the VI's icon in the extreme upper-right of the window and select "Show Connector"
- select an available little white square, then select the cluster for either the buttons or the axes, then do the same for the other one.

This allows you to wire up the Joystick GET directly into your VI.

In the attached pic, I clicked on the upper right little square, and the DriverAxes cluster became selected. You can do this to see which ports are wired up to which input or output. Typically, you put Outputs on the Right and Inputs on the Left. (The example pic shows 4 outputs from this VI, yours will probably be on the other/input side)

You have to do this from the front panel.
Attached Thumbnails
Click image for larger version

Name:	vi_IO.jpg
Views:	29
Size:	113.1 KB
ID:	8555  
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2010, 19:03
ecnahc515 ecnahc515 is offline
Registered User
FRC #3192
 
Join Date: Jan 2010
Location: Oregon
Posts: 6
ecnahc515 is an unknown quantity at this point
Re: Wiring JoystickGet Buttons to a custom VI

Thanks this helped a lot by providing a cleaner way to make my VI.
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
Buttons, Buttons and more Buttons (2006) Freddy Schurr Team Organization 11 14-12-2005 21:36
Dumb question about wiring custom controls Adam Y. Electrical 1 18-02-2005 22:57
Wiring a Custom Operator Interface Box JWilliams101 Technical Discussion 2 12-02-2005 22:36
buttons rosebud Electrical 11 12-01-2003 02:02
Wiring custom toggle switches into operator interface DanL Electrical 9 13-02-2002 17:13


All times are GMT -5. The time now is 11:49.

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