View Single Post
  #2   Spotlight this post!  
Unread 17-02-2010, 23:26
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Update Problem and Stuttering Compressor

Quote:
Originally Posted by EddiesCouch View Post
Now, after fixing a portion of the programing, it won't let me build because the robot main .vi is 'broken'.
Click the "run" arrow on the Robot Main vi. It should present you with a list of things that it considers broken; double-click on one to be taken directly to the offending spot in the block diagram.

Quote:
So starting from the beginning, how would you set up compressor programing so that it reaches 120 psi, stops, then starts up again once the pressure drops?
Follow the pattern in the Solenoid With Compressor Example, moving the initialization and cleanup to the proper places in the competition code framework:

In Begin.vi, place a Compressor Open, telling it which DIO has the pressure switch connected, and which Relay is controlling the compressor. Wire the resulting Device Reference to a Compressor Start, then to a Compressor RefNum Registry Set, giving an appropriate name like "Compressor".

In Finish.vi, place a Compressor RefNum Registry Get, giving it the same name you gave the Set. Wire the Device Reference into the first frame of the Flat Sequence, where you will place a Compressor Stop, then a Compressor Close.

That's it. Don't open the DIO or Relay anywhere else. Let the background compressor task take care of turning things on and off as needed.
Reply With Quote