Go to Post I am a mechanical engineer. I have known since I was about 12 that I wanted to make complicated mechanisms. - Paul Copioli [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 26-01-2009, 19:04
Mr. E Mr. E is offline
Its physics or stamp collecting
FRC #1883
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Las Vegas
Posts: 38
Mr. E is an unknown quantity at this point
Problem with tank drive

Hi. I basically am learning how to use LabView as i go along, so any help would really be appreciated. I am trying to set up a TeleopTankDrive.vi and a SolenoidControl.vi in hopes of, (obviously,) controlling the robot with two joysticks. I have verified that both joysticks and motors work. Now, here's my problem. Whichever joystick I have plugged into USB port one on the driver station controls both motors. It should only control one. The other joystick should control the other motor, however, it doesn't move either motor at all. When I first tried this, I had the second joystick plugged into USB port 2. I thought that maybe the USP port was broken so i tried port 3, however that didn't fix the problem. I attached my two programs. (Sorry about the quality though, it was too large a file as a .bmp) If you have any further questions about what I'm trying to attempt I will try to explain it better. Again, any help is appreciated. Thanks.
Attached Files
File Type: doc Doc2.doc (79.0 KB, 63 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2009, 19:39
Urban Hawk Urban Hawk is offline
Head of R&D and Head of Scouting
FRC #1886
Team Role: Scout
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Urbana, maryland
Posts: 118
Urban Hawk is infamous around these partsUrban Hawk is infamous around these partsUrban Hawk is infamous around these parts
Re: Problem with tank drive

hi... i haven't done lab view before however i have done programming in both java and visual basic so i may be able to help. the way it is sounding is that the one controller is getting listened to but the other is not. As a means to help u create a small section of programming that will let you see the data as it is going through along specific points. you can use that to figure out where the second controller is getting lost. it is also possible that both of them are imputing into the program however due to the way it is set up it uses only the data received from the first controller for both motors. Also another thing you should try is not to use the first port at all and try it on the 2nd and 3rd ports and see what happens.
__________________
FEAR THE HAWK!!!
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2009, 19:44
ChrisH's Avatar Unsung FIRST Hero
ChrisH ChrisH is offline
Generally Useless
FRC #0330 (Beach 'Bots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 1,230
ChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond reputeChrisH has a reputation beyond repute
Re: Problem with tank drive

If you are using the default code, check the trim tab on the fwd-aft axis on the joystick that is working. It will probably be at one end or the other of its travel. Slide the trim tab to the other end and things will probably work the way you want.

This feature is written into the program to enable teams to try different control configurations with minimal effort, but it is easy to forget it is there. On Saturday we spent 20 miutes trying to figure out why one side of the robot wasn't working. Finally somebody remembered to check the trim tab and fixed it. It was only about the third time this happened, so maybe next time we will remember.
__________________
Christopher H Husmann, PE

"Who is John Galt?"
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2009, 20:01
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Problem with tank drive

It is hard to see in the graphic, but it looks like the second joystick is actually on USB 3. So your description of your configuration and the picture of the code seems to disagree.

By the way, be sure to reset the DS if you unplug/plug USB devices.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2009, 20:55
5n1p3r's Avatar
5n1p3r 5n1p3r is offline
IM 5n1p3r
AKA: Matthew
FRC #0714 (Team Panthera)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Newark, NJ
Posts: 82
5n1p3r will become famous soon enough5n1p3r will become famous soon enough
Send a message via AIM to 5n1p3r
Smile Re: Problem with tank drive

On both joysticks you will see a lever/switch right below it, when moved all the way up i believe it allows you to move that joystick, when moved down it will do the same thing, try centering both those levers/switches, this allows you to move both motors at the same time. Being that you're just learning i feel that would make it alot easier for you since you wont have to program it in. The down side of this of course is that whoever may be driving might accidentally bump the switch and disable one motor ( that could easily be fixed by just centering it again but why the hassle) Hope this helps.
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2009, 21:02
surferacf's Avatar
surferacf surferacf is offline
Student Leader & Electrical Captain
AKA: Aaron F
FRC #3060 (The Fighting Tuna)
Team Role: Leadership
 
Join Date: Sep 2006
Rookie Year: 2004
Location: Thumb Knuckle, Right Palm
Posts: 45
surferacf will become famous soon enough
Re: Problem with tank drive

Are you saving that particular bit of code as a separate .vi, or is it a part of the Basic Robot Main.vi ? I know that the latter has a built in arcade-drive code, which might be superseding your code if you're deploying the entire project to the cRIO, especially with the "Stop" command in the lower right of the while loop set to "Always True"

I'd try changing that constant "True" to an indicator, changing USB 3 to USB 2 as Greg suggested, and deploying just that VI to the cRIO using the run button. If it works under those circumstances but not under a full deployment, you're probably going to have to go into the Robot Main vi and take out the default drive code (or even better, integrate the code you've written into the Robot Main!)

Hope this Helps
__________________
"Curiosity killed the cat, but for a while I was the suspect."
-Stephen Wright
Reply With Quote
  #7   Spotlight this post!  
Unread 27-01-2009, 16:59
Mr. E Mr. E is offline
Its physics or stamp collecting
FRC #1883
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Las Vegas
Posts: 38
Mr. E is an unknown quantity at this point
Re: Problem with tank drive

Thanks everyone. It works now! One of my problems was the USB 3 thing, and the main problem was what surferacf talked about. Thank you very much!
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
Help with programing Tank Drive in Lab View zackcool123 NI LabVIEW 3 18-01-2009 19:49
Tank Drive Idaman323 Programming 14 15-02-2005 09:01
Major problems with tank tread drive Lord Nerdlinger Technical Discussion 13 23-02-2004 21:15
Problem with drive train. Tton General Forum 2 12-02-2003 22:37


All times are GMT -5. The time now is 20:50.

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