Programming Compressor

The pneumatics and compressor are all hooked up, and the solenoid and compressor are hooked up and run with the basic code previded in labview, but it starts then stops and then starts again, and repeats that process many times.

make sure your opens and closes for the compressor aren’t inside loops. if they are it will open and close the signal for the compressor repeatedly.

the start and stop are not inside loops and the starting and stopping are random and very in length.

The compressor should be responding to the pressure switch. Can you watch the 120 psi pressure gauge while the compressor is cycling. The compressor should turn on when the pressure is below approximately 95 PSI and turn off when it reaches 120psi. If you have a leak in your pneumatic system, it could be cycling in that way.

there is no leak, the spike relay just randomly goes on and off instead of staying on till it reaches its max.

This is the program:

We found our problem. We misconnected a wire to the pressure switch so instead of signal and ground we had power and ground.

another problem could be that you set the compressor loop to run every 100 miliseconds make it run until doner and then reset by adding a condition