Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Incorporating Tank Drive (http://www.chiefdelphi.com/forums/showthread.php?t=81114)

Sauce 25-01-2010 18:06

Incorporating Tank Drive
 
1 Attachment(s)
Our team has edited Teleop.vi to use tank drive, opening the second joystick, reading Y axes and closing the joysticks. Two of the 4 jaguars recieved signal but didn't change upon moving the joysticks.

screenshot of the code attached. Sorry I didn't clean it up. I tried to but it made it look completely illegible.

Vikesrock 25-01-2010 18:21

Re: Incorporating Tank Drive
 
Did you open Begin.VI and change the Open 2 Motor VI to an Open 4 Motor VI?

Also, you will want to open the second joystick in Begin.VI instead of inside the case statement in Teleop. Look at the code that is already there for an example of how to open the Joystick then store it as a refnum.

Then in Teleop.VI you would need to put a Refnum Registry Get.VI from the Joystick section on the outside of the case statement (looks very similar to the icon already there for Drive.)

Someone else may be able to explain this in a more elegant manner if you're still having trouble.

Sauce 25-01-2010 19:29

Re: Incorporating Tank Drive
 
alright thanks, got it working

Alan Anderson 25-01-2010 20:11

Re: Incorporating Tank Drive
 
It's a good thing the Joystick Close vi doesn't really do much. You definitely shouldn't have it in the Teleop vi. It, along with all the other Close vis should go in the Finish vi.


All times are GMT -5. The time now is 02:00.

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