Do i need the solenoid from the compressor with solenoid example vi, I am running a lot of solenoids in the main program, and Just need to know whether or not I need that solenoid from the example in the program. Also, exactly where in the main vi do I put the compressor program?
I’m not too sure about the solenoid example vi, but if you are using the advanced framework, the easiest way to set up the compressor is to put a Compressor Open.vi and then a Compressor Start.vi in Begin.vi.
If you add a CompressorDevRef to RobotData.ctl, you can then wire the CompressorDevRef of the compressor Open to the compressor Start and then into your RobotData in Begin.vi.
Then, place a Compressor Close.vi in your Finish.vi and wire the CompressorDevRef from RobotData into it.
If you are using the basic framework, place a Compressor Open.vi and a Compressor Start.vi to the left of the top while loop in Basic Robot Main.vi.
Place a Compressor Close.vi to the right of the loop (near Drive Close and Joystick Close).
Finally, wire the CompressorDevRef from Compressor Open to Compressor Start and wire the CompressorDevRef from Compressor Start through the while loop and out the other side to the Compressor Close.
You shouldn’t have to to anything more than open the compressor and start it. It will handle itself if you open it with the correct pressure switch and relay channels.
Hope that helps!
that’s great and all, but how do I get the pressure switch to work then?
If you connect its pneumatic port to the high-pressure (120 PSI) part of your pneumatic piping, the pressure switch works without any further effort required on your part.
Prepare an appropriate length of servo (“PWM”) cable by cutting the male (with pins) end off and leaving the female (with holes) end connected to the cable. Wire one of the pressure switch’s terminals to the black wire of the cable and the other terminal to the white wire, leaving the red wire disconnected (and suitably insulated with electrical tape to prevent its 5 volt power from touching anything by accident). Plug the end of the cable into the DIGITAL I/O port on the Digital Sidecar that matches the port number you told the Compressor Open VI.