Go to Post I'm somewhat fond of saying, if your robot dosen't weigh 119.99 pounds, you forgot something. - Francis-134 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2010, 23:02
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Need help with tank drive

I need some help with my tank drive code, I originally took the default code that was provided and changed all of the vi's for tank drive in the tele-op vi. In the begin I placed the second joystick function. We kept the 2 motor vi because we have one motor driving one side and another driving the other side. Now the problem I am having is that when I run the code, when I push Joystick 1 both left side motor and right side motor are moving, but when I push Joystick 2 nothing happens. I checked that everything is plugged in and that the Joystick is in the right usb port. If I need to provide anymore information, just let me know.
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2010, 00:11
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Need help with tank drive

Double check the names you gave the joysticks in Begin.vi and in Teleop.vi
They may be mixed up.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2010, 10:34
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Need help with tank drive

Now do u need to add a second joystick read in the tele-op vi, because the code shows a broken arrow without it there? Because the second get axis is not hooked up.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2010, 20:44
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Need help with tank drive

Arcade drive uses the X and Y axis from one joystick. Tank drive uses the Y axes from two joysticks. You definitely need to have two different Joystick Get vi blocks, one for the reference to each joystick, and each followed by an unbundle by name to get the Y axis. The two values go to the inputs of the Tank Drive vi.

Don't use the stock Joystick Read vi to get your Y values. It only looks at one joystick. You can ignore it, or you can open it up and modify it to read your two joysticks.
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2010, 20:48
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Need help with tank drive

In teleop.vi the inner "False" case Tank Drive icon needs wires running from:
  • a Joystick 1 Get Axis 2 (y)
  • a Joystick 2 Get Axis 2 (y)
You don't need to wire the x axis anywhere.

See if any of this helps any.

P.S. What Alan said...
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 30-01-2010 at 20:50. Reason: Too much daydreaming...
Reply With Quote
  #6   Spotlight this post!  
Unread 02-02-2010, 10:12
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Need help with tank drive

We are also having problems with our robot... When we download our program (which is tank drive) it only uses one joystick... Do you have an idea how we can fix this...

Thanks for your help Zebrabots
Reply With Quote
  #7   Spotlight this post!  
Unread 02-02-2010, 11:17
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Need help with tank drive

Thanks for the reply... I am sorry that the pictures wont fit one to one screen shot because i have to swich computers...

Here they are:


It continues into another screenshot






Reply With Quote
  #8   Spotlight this post!  
Unread 02-02-2010, 11:18
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Need help with tank drive

Here is the rest




Reply With Quote
  #9   Spotlight this post!  
Unread 02-02-2010, 11:28
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Need help with tank drive

Quote:
Originally Posted by zebrabots View Post
We are also having problems with our robot... When we download our program (which is tank drive) it only uses one joystick... Do you have an idea how we can fix this...
How does the robot behave when you move the joystick in various directions?
How are you downloading it?
Have you tried clicking the "run" arrow on the Robot Main vi and using probes to see what values are being fed to the Tank Drive inputs?

Last edited by Alan Anderson : 02-02-2010 at 11:31.
Reply With Quote
  #10   Spotlight this post!  
Unread 02-02-2010, 11:50
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Need help with tank drive

Quote:
Originally Posted by zebrabots View Post
We are also having problems with our robot... When we download our program (which is tank drive) it only uses one joystick... Do you have an idea how we can fix this...
Out of curiosity, have you installed the mandatory LabVIEW Update 2.0?
Reply With Quote
  #11   Spotlight this post!  
Unread 02-02-2010, 12:26
tbuo1's Avatar
tbuo1 tbuo1 is offline
Registered User
AKA: Bill
FRC #0066 (Flyers)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 1998
Location: Ypsilanti, Michigan
Posts: 6
tbuo1 is on a distinguished road
Re: Need help with tank drive

Hi everyone!

I am trying to get tank drive too, but my .vi files look completely different than the ones showed above. What did I do wrong? I installed the Update2.0 according to the instructions online. Please help!

Thank you!
Reply With Quote
  #12   Spotlight this post!  
Unread 02-02-2010, 13:02
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Need help with tank drive

Quote:
Originally Posted by tbuo1 View Post
I am trying to get tank drive too, but my .vi files look completely different than the ones showed above.
The code posted by zebrabots has had a lot of things changed and added from the default project. Don't worry if yours doesn't end up looking at all like it.
Reply With Quote
  #13   Spotlight this post!  
Unread 02-02-2010, 13:24
tbuo1's Avatar
tbuo1 tbuo1 is offline
Registered User
AKA: Bill
FRC #0066 (Flyers)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 1998
Location: Ypsilanti, Michigan
Posts: 6
tbuo1 is on a distinguished road
Re: Need help with tank drive

I think the original .vi that the Zebras used to code was different. When I read other peoples posts, it seems as though they are using a different version or framework than I have. My original teleop.vi looks like this:

http://decibel.ni.com/content/thread/5882?tstart=0

(the picture at the bottom)

My other .vi Team Code, such as begin.vi, are different than ones I've seen people post about as well. I'm new to LABVIEW and I am not sure what is going on, haha.

Thanks for your help!
Reply With Quote
  #14   Spotlight this post!  
Unread 02-02-2010, 15:15
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Need help with tank drive

Quote:
Originally Posted by tbuo1 View Post
I think the original .vi that the Zebras used to code was different.
It looks to me like it started out with exactly the same structure, but has had most of the guts removed and replaced with the team's own code.

Your picture on the NI site looks like what I remember as an unmodified default Teleop vi. (The comment about button 2 next to the Gyro Reset block doesn't match what I think the code actually does, but I don't know whether my memory is playing tricks on me or not.)
Reply With Quote
  #15   Spotlight this post!  
Unread 02-02-2010, 15:34
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Need help with tank drive

The joystick acts as though it was in arcade mode and only used one joystick.

Do I not have the most updated version??? My partner says that he has updated it.

We put the code on via build under the build specifications tab. We have not tried to click run and see if it works.

Thanks for the quick responses everyone.
I am sorry that I have not been able to get back on sooner because of school.

Zebrabots programmer TyAdley
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tank Drive with Advanced Framework in Labview finman NI LabVIEW 4 30-01-2009 13:35
Problem with tank drive Mr. E NI LabVIEW 6 27-01-2009 16:59
Help with programing Tank Drive in Lab View zackcool123 NI LabVIEW 3 18-01-2009 19:49
Tank Drive help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Idaman323 Programming 3 18-02-2005 15:17
Major problems with tank tread drive Lord Nerdlinger Technical Discussion 13 23-02-2004 21:15


All times are GMT -5. The time now is 22:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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