Originally Posted by EddiesCouch
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.
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.