PDA

View Full Version : Please Help, Don't Know How to Implement Tank Drive in LabView


CVassos
12-22-2008, 07:21 PM
Please help, me and my team have just started programming in labview and we don't know much about it, anything really.We're all very adjusted to C/C++. We are trying to implement tank drive in the default code included with labview, the basic and advanced templates for the frc robot project template. We realize that there is a tank drive vi included in the WPI libraries but our real problem is getting a second joystick to be included in the code. Any help would be incredibly helpful. It doesn't matter whether the help is with the basic or advanced template, anything that works would be helpful.

Jon236
12-22-2008, 08:29 PM
Are you using the Basic Framework? If so, simply select the one Open Joystick vi and hold the Ctrl key while dragging the copy to a space just below. Create a constant and choose usb port 2. Click on the lower of the two joystick clusters going into the Joystick-Get Axis vi and delete it. Now wire the Joystick cluster (the think brown line at the upper left) from the new Open Joystick vi to the same Get Axis vi. Select axis 2 for each one. Wire them into the left and right values of the Tank Drive vi and there you go!

CVassos
12-24-2008, 09:20 AM
Thanks, the help is much appreciated. I'm still curious as to how that would be done in the advanced framework as well. If anybody has any knowledge on that it would be great, just for curiosities sake.

Jon236
12-24-2008, 10:16 AM
Just use the open vi's for the joysticks and motors in Begin.vi, making sure their Device Reference type def is copied into RobotData type def. Then use them in Teleop.vi as the provided example shows.

samir13k
12-24-2008, 10:21 AM
our team had done the advanced framework, and we actually just copied and pasted a second joystick in. we also did that for all the motors and axis.

Ctrl+C Copy
Ctrl+V Paste

keen101
12-24-2008, 03:55 PM
I haven't actually programmed anything yet, but these video's are pretty helpful. You could probably skip the first one.

http://www.lvmastery.com/files/FIRSTDec12_Part1/FIRSTDec12_Part1(2).html

---------------------------------------------------------------------

http://www.lvmastery.com/files/FirstDec12_Part2/FirstDec12_Part2.html

---------------------------------------------------------------------

http://www.lvmastery.com/files/FirstDec12_Part3b/FirstDec12_Part3b.html