View Single Post
  #8   Spotlight this post!  
Unread 24-05-2010, 15:24
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: Swerve vs. Mecanum Programming

He is using analog potentiometers.

This is a subVI. He calls it from his other code when he needs it. I would highly, highly, highly (I can't say this enough) recommend organizing code this way, especially separating mechanism control code from user interface code in separate threads.

Since he has a potentiometer, he has no need for limit switches. It tells him everything he needs to know. I would generally not use his method of "check greater/equal/lesser and set output based on case" and instead use proportional control, LabVIEW has a nice PID block you can use for PID or you can write your own, its just a subtract, multiply, and check range.
__________________
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