|
Re: How do you wire a Kick motor in labview?
Instead of running while loops in Autonomous Independent (which is what I think you are doing, pictures would help alot), you can feed the watchdog in the Autonomous Iterative, then put Auton code in Autonomous Independent. Autonomous Iterative will be fed with new data packets, so it will run at 50hz and can feed the watchdog while you do other stuff.
You could put all of your autonomous code in a Flat Sequence Structure, that makes things easy to understand. If you have all of your major robot actions in SubVI's (e.g. drive_x_distance.vi, turn_x_angles.vi, etc). you could alternatively wire a "flow wire" between them, just a wire of any datatype (I use doubles because I like orange), and LabVIEW will make sure they run in sequence because it must follow the path of the data.
Screenshots will help everyone see what you are trying to do much better than text.
I also recommend driving based on distance instead of time, its not really hard to do. See attached VI for example of that. You don't really need to include the X axis processing, it just helps with drift. All of the constants that are 0 need to be tuned.
I also have a state-machine for my kicker, so I can set the state and another loop (similar to PeriodicTasks.vi) will handle the recoil/kicking. I can set the state in a VI, wire the flow wire to a Drive, and the state-machine will run in the background, not blocking the Drive code.
__________________
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
|