How do i program compressor

I give up trying to program the thing. I have the pressure switch hooked up to DIO channel 1, and the relay to relay channel 1. Both are on slot 4. How do I program the compressor?

What happens when you place the “Compressor Open” and “Compressor Start” in the Begin.vi with the correct DIO’s and channels selected for the switch and relay?

Additionally, when you probe the signals, what does it show for the switch input and the direction command to the relay?

How do I set that up? I tried the following with no luck.

In Begin:
Compressor open—>Compressor Start—>Compressor Refnum set

In Finish:
Compressor Refnum Get—>Compressor Stop—>Compressor Close

Is that right? How do I do it?

That sounds correct. My understanding is that is all it would take to make it work, that is, if you made sure to have the DIO’s and channels correct, which it sounds like you did.
Also, make sure your DSC has power and the there is a circuit breaker feeding the relay and you have replaced the fuse in the spike with a 20amp circuit breaker.

If this doesn’t work, which it never did for us, reply back and I’ll post what we did to get it to work. BTW, search for issues with compressors. There are several threads about it and some also have solutions.

We also had many difficulties running the compressor example codes and our code. What worked for us in the code was to incorporate a teleop vi also.

In Begin:
Compressor open—>Compressor Start—>Compressor Refnum set

In Teleop:
Compressor Refnum Get—> Compressor Enabled

In Finish:
Compressor Refnum Get—>Compressor Stop—>Compressor Close

From my understanding you need to have the compressor enabled vi in order to run the compressor. Some teams open it in the begin vi before the Refnum set, but mine works fine in the teleop

If it still doesnt work, I have some tests to help you pinpoint the problem.

Ok I got it. I thought that digital inputs were pulled down, turns out they are pulled up. |P
I touched the ground wire to the wire hooked up to “A” on DIO 1, and the compressor turned on. smacks self on forehead

Don’t feel bad my friend. I’m a EE and I still need to remind myself each year whether the system looks for an open or closed contact to be considered active. Pulled up sometimes, pulled down others. Testing the result is the only sure way I know.