Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Multiple Joystick Help (http://www.chiefdelphi.com/forums/showthread.php?t=100219)

EagleBotBC 14-01-2012 19:05

Multiple Joystick Help
 
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

Re: Multiple Joystick Help
 
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

Re: Multiple Joystick Help
 
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

Re: Multiple Joystick Help
 
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

Re: Multiple Joystick Help
 
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

Re: Multiple Joystick Help
 
Anyone awake?:D

Mark McLeod 16-01-2012 22:27

Re: Multiple Joystick Help
 
Like this:



Some other examples are here

waddell 17-01-2012 00:56

Re: Multiple Joystick Help
 
Thanks Mark,
If we get snowed in tomorrow I'll give it a try then.

RoboMaster 17-01-2012 01:00

Re: Multiple Joystick Help
 
Quote:

Originally Posted by Joe Ross (Post 1105836)
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

Re: Multiple Joystick Help
 
Quote:

Originally Posted by RoboMaster (Post 1107505)
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

Re: Multiple Joystick Help
 
Quote:

Originally Posted by tilky (Post 1105625)
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

Re: Multiple Joystick Help
 
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

Re: Multiple Joystick Help
 
Quote:

Originally Posted by Mark McLeod (Post 1107848)
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

Re: Multiple Joystick Help
 
Quote:

Originally Posted by EagleBotBC (Post 1107830)
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.


All times are GMT -5. The time now is 09:31.

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