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!
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).
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.
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.
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.
Anyone awake?
Thanks Mark,
If we get snowed in tomorrow I’ll give it a try then.
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.
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.
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.
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.
What exactly do you mean by “open them”? It might help to show us your code.