Log in

View Full Version : Multiple Joystick Help


EagleBotBC
14-01-2012, 19:05
I am trying to figure out tank drive for our robot and whenever I try to open a new joystick on Begin.vi it changes the USB port on the 1st joystick as well. I have tried changing the name of the joystick, but it changes both of them when I do. Please help me!

tilky
14-01-2012, 19:46
what you have to do is open two under begin vi, with a different name for each. Under teleop, you use two get refnames (one for each).

Joe Ross
15-01-2012, 00:08
It sounds like you are changing the the values on the front panel of the joystick open vi, rather then wiring a constant into the joystick open input in begin.vi.

DominickC
15-01-2012, 14:26
All you need to do to configure tank drive is open teleop.vi, change out the Arcade drive block for Tank drive (WPI Library>Robot>Tank Drive), and wire in the second joystick.

waddell
16-01-2012, 10:48
DominckC,
So, for a total noob with NO programming experience, I'm the mechanical coach, what would the diagrams look like?
I found the Tank Drive block.

waddell
16-01-2012, 21:55
Anyone awake?:D

Mark McLeod
16-01-2012, 22:27
Like this:

http://team358.org/files/programming/ControlSystem2009-/LabVIEW/TankDriveExample.jpg

Some other examples are here (http://team358.org/files/programming/ControlSystem2009-/LabVIEW/)

waddell
17-01-2012, 00:56
Thanks Mark,
If we get snowed in tomorrow I'll give it a try then.

RoboMaster
17-01-2012, 01:00
It sounds like you are changing the the values on the front panel of the joystick open vi, rather then wiring a constant into the joystick open input in begin.vi.

Quoted for emphasis. Sounds like the OP's problem.

Mark, your section for the Begin VI is missing a pair of joystick open and set joystick reference VIs.

Mark McLeod
17-01-2012, 08:02
Mark, your section for the Begin VI is missing a pair of joystick open and set joystick reference VIs.
That's because it's from a series of examples. A previous example describes the Joystick open.
I use the series for teaching and the students are expected to learn to apply prior examples in building block fashion to subsequent examples.
Also, for brevity's sake subsequent examples don't repeat all the prior examples. Otherwise it gets very unwieldy in later compound examples and loses the independent point each is trying to make.

It's a teaching style choice.

EagleBotBC
17-01-2012, 16:29
what you have to do is open two under begin vi, with a different name for each. Under teleop, you use two get refnames (one for each).

My problem is in the begin.vi. When I open them the refnames change simultaneously, so that when I change one the other changes as well.

Mark McLeod
17-01-2012, 16:54
Did you create the new joystick from scratch or copy it somehow?

Do you know how to get the wirespool cursor when you hover over the name node, right-click and choose Create -> Constant?

EagleBotBC
17-01-2012, 17:05
Did you create the new joystick from scratch or copy it somehow?

Do you know how to get the wirespool cursor when you hover over the name node, right-click and choose Create -> Constant?

At first I was trying to copy and paste, but then once I created it from scratch they still seemed to be linked. I have tried Create -> Constant as well.

Alan Anderson
17-01-2012, 22:50
My problem is in the begin.vi. When I open them the refnames change simultaneously, so that when I change one the other changes as well.

What exactly do you mean by "open them"? It might help to show us your code.