Go to Post I don't know about you but i would love to have a grilled cheese maker in the workshop. - CMBrandon [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2010, 19:36
Bill Taylor Bill Taylor is offline
Registered User
FRC #0388
 
Join Date: Dec 2008
Location: Grundy, VA
Posts: 12
Bill Taylor is an unknown quantity at this point
Need some Labview help!

I am the primary programmer for our team this year and as far as programming goes I have about a 3rd grader level of expertise. I take that back...my 3 yr old son could probably do better than i am doing. My question is... I am using the out-of-box labview FRC project wizard and switched drive to arcade using 4 motors. This is working fine with no hangups. i want to be able to turn one of those 4 motors (ex.motor #1) on using a joystick button (ex.button#8) independently. essentially, when the robot's arcade drive is parked and the operator is off the stick, push a button to run a single drive motor by itself. if someone could tell me how i might do this it would be appreciated. please be specific or show me a wired diagram as i am apt to miss a step. thanks.
  #2   Spotlight this post!  
Unread 07-02-2010, 19:54
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Need some Labview help!

Interresting. I can only wonder what you would need this for.
There are two ways to do this.

The first way would be to open all of the motors individually, then write the arcade code and send it to each of the four motors (you could open the arcade drive VI if you wanted to copy the algorithm) and then have a case structure when setting the first motor. That would probably be the best way to go if you have little experience with LabVIEW and the WPI library. I would recommend putting your arcade drive code in a subVI.

You could alternatively open Motors.vi (the VI that takes two motors from the Tank Drive and Arcade Drive VI's and sets it to two or four motors; it's in RobotDrive=>Advanced) and find a VI that says "Get PWM Ref". This is used inside the WPIlib to get the PWM ref from an array. Copy it to where you are using it. Feed it the RobotDrive ref, and it will feed you a Motor ref you can use with Set Motor. You could probably put the Arcade Drive in a case and the Get Ref/Set Motor in the other case. This will allow you to keep your Open 4 Motor and keep all of your wiring neat, as well as keeping the existing code as it is.

If you have any other questions, ask.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

Last edited by apalrd : 16-02-2010 at 11:51.
  #3   Spotlight this post!  
Unread 07-02-2010, 19:59
Acshi Acshi is offline
Registered User
FRC #2924
 
Join Date: Jan 2009
Location: WA
Posts: 12
Acshi is an unknown quantity at this point
Re: Need some Labview help!

Darn, apalrd you beat me to answering his question!

I have included the extracted vi, which has to be added to your robot project, as the original version is out of scope -- the library doesn't share it. Also an example and a picture of it.

Good luck
Attached Thumbnails
Click image for larger version

Name:	teleopexample.png
Views:	43
Size:	73.6 KB
ID:	8547  
Attached Files
File Type: vi GetPWMReference.vi (15.2 KB, 19 views)
File Type: vi Teleop.vi (28.7 KB, 22 views)
Closed Thread


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
HELP!!!! we need help w/ compressors/pneumatics for teleop/autonomous in LABVIEW rokenboker NI LabVIEW 9 05-02-2010 17:10
I need some help JakeGallagher Games/Trivia 1 05-05-2004 09:11
hey need some help with writing a code please help me here magical hands Programming 9 01-01-2004 21:46
Need some help Tton Technical Discussion 6 23-10-2003 07:51


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

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