View Single Post
  #5   Spotlight this post!  
Unread 25-03-2010, 11:20
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: Compressor and Pneumatics help for 3329

In Begin.VI:

Open Compressor (configure the DIO Port, DIO Slot, Comp Slot, and Comp Relay) -> Compressor Start -> Compressor Set Refnum (name it "compressor" or something like that)

In Periodictasks OR Teleop:

Compressor Get Refnum (same name as before) -> Compressor Start -> Compressor Enabled State -> Indicator of Compressor Enabled State and Compressor State (those help with debugging - make sure the terminal for the indicators is in the loop with the Enabled State.



Run Robot Main.vi by pressing the play button. When it is done downloading and you have Teleop Disabled on the Classmate (with stop button, comm, and code), open Periodic Task.vi and look at the front panel. Compressor Enabled State should always be TRUE, and Compressor State should show what the compressor is doing. Then, enable it. The compressor should turn on.

Whatever you do, do NOT open the compressor more than once. You can use Start more than once, but NOT open. That will throw that DIO Cache error.

Do you have a Watchdog Feed in Teleop? Another thing I recommend - Call Teleop.vi from Disabled.vi. Then, you can see what the code is trying to do without letting it do stuff. Once the code is running from Robot Main (Teleop Disabled on the Classmate) you can probe wires and see what is happening. Be warned - Probing a wire before Robot Code is green will almost certainly cause LabVIEW to crash. Make sure Robot Code is green before probing. When you are done with the probing and indicators, you can do a full Build and Deploy. You must do a Build and Deploy to save the code permanently, so it is required at competition. Generally. I do a full deploy every time I leave or am done debugging.

One more reason for Watchdog errors: Do you have any WAIT's in Teleop, for something like kicker timing? That is a big no-no. You can run your kicker timing loop asynchronously (e.g. Periodictasks or something of the like) and communicate via global variables if you would like.
__________________
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