Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Labview 2015 joystick help! (http://www.chiefdelphi.com/forums/showthread.php?t=132616)

team2161 11-01-2015 00:46

Labview 2015 joystick help!
 
Hello my name is Justin lead programmer for the Walt Whitman RoboCats in Huntington Station, NY. I recently started programming with the new labview software for the RoboRIO. I am so used to unbundling by name for the joystick buttons and axis, i have no idea how to program using an index array. How would i set up a tank drive configuration using the index array and set up a relay to a button on an xbox controller.
Thanks.

Joe Ross 11-01-2015 00:55

Re: Labview 2015 joystick help!
 
Have you seen this? http://wpilib.screenstepslive.com/s/...e-2014-to-2015

Greg McKaskle 11-01-2015 08:19

Re: Labview 2015 joystick help!
 
Additionally, the robot template code contains a simple teleop that indexes the first two axes from a single joystick/game controller and send it to the arcade driving. In most respects, it is the same. The index array is a growable node. You can wire in a number to each row, telling it what element to return, or if left unwired, it will increment based on the previous row.

Greg McKaskle

Jack Gillespie 17-01-2015 18:52

Re: Labview 2015 joystick help!
 
there are three arrays axis,buttons,POV. What does POV stand for?

Mark McLeod 17-01-2015 19:55

Re: Labview 2015 joystick help!
 
POV=Point of View
It's often called the hat on a game controller.
It's the one that looks like a cross.


FrankenmuthK 18-01-2015 23:35

Re: Labview 2015 joystick help!
 
Quote:

Originally Posted by Mark McLeod (Post 1429865)
POV=Point of View
It's often called the hat on a game controller.
It's the one that looks like a cross.



Do you happen to have a screen shot of what the drive code should look like for the 360?

Greg McKaskle 19-01-2015 06:56

Re: Labview 2015 joystick help!
 
The drive code for TeleOp takes whichever joystick axes you intend to use, potentially scales or conditions them, and sends them to RobotDrive.

Assuming you have a skid-steer robot such as the KoP, the first decision is whether you want a tank, where left and right axes drive the left and right wheels directly much like a tank, a bobcat, or a bulldozer. Or whether you want two generally orthogonal axes that are mixed to determine the left and right motor speeds. This feels much more like video game joystick driving with left/right inputs steering and forward/back inputs going front and back.

Once you have decided that, choose which axes from the 360 controller that you want to use. It may be useful to use the USB tab of the DS to identify the numbers. Then on the TeleOp diagram, index out those elements from the Axes array. Wire those into the RobotDrive that you choose to use.

Greg McKaskle

Mark McLeod 19-01-2015 08:41

Re: Labview 2015 joystick help!
 
Here's an example using Axis 1 & 5 to tank drive with an xBox contoller.

marccenter 20-01-2015 13:18

Re: Labview 2015 joystick help!
 
Mark,

Do you have a similiar picture for the F310 Logitech gamepad controller?

Alan Anderson 20-01-2015 14:00

Re: Labview 2015 joystick help!
 
Quote:

Originally Posted by marccenter (Post 1430997)
Do you have a similiar picture for the F310 Logitech gamepad controller?

The code is the same. The only difference is the number of the axis you want to read. The Driver Station will show you which axis (and button and POV) number responds when you manipulate the gamepad.

Choose the USB tab at the left, and select the gamepad in the list. The axes and buttons will show up to the right of the selected controller.

Mark McLeod 20-01-2015 14:30

Re: Labview 2015 joystick help!
 
Quote:

Originally Posted by marccenter (Post 1430997)
Mark,

Do you have a similiar picture for the F310 Logitech gamepad controller?

A set of game controller mappings are at:
http://www.team358.org/files/program...019/#joysticks

The F310 has a couple of optional settings.

tr6scott 21-01-2015 15:32

Re: Labview 2015 joystick help!
 
A problem I ran into last night, is the xbox controller, has 10 buttons from 0-9, but in the code the button array only has 9 elements from 0-8 . . .

So how do we program control on button9...

Sorry to highjack thread, but this seem a fitting place to ask the question.

Started New Thread, please follow here. http://www.chiefdelphi.com/forums/sh...72&postcount=1

Charles Ononye 21-01-2015 21:01

Re: Labview 2015 joystick help!
 
Here you go:



In case anyone was wondering, you can use an array to cluster converter to connect to unbundle by name to get your buttons.

Pugsly 05-03-2016 13:13

Re: Labview 2015 joystick help!
 
Regarding the "Set Output" of the joystick I am trying to light up an indicator using the Launchpad that was included in last years kit and I can't for the life of me figure out how to wire this up in Labview.

So say for instance I want to light a LED on the launchpad Red or Blue depending on what alliance we are on. Anyone have any ideas on how do do that?


All times are GMT -5. The time now is 03:44.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi