View Single Post
  #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.