|
Re: need help with compressor code
C++ or LabView???
For C++, you need three lines of code:
// put as part of your robot class or global, not in function
Compressor *compressor;
// in constructor [alter Compressor() parameters to match your setup]
compressor = new Compressor( PressureSwitchChannel, CompressorRelayChannel );
compressor->Start();
If you have this in, you should see the green LED for the compressor relay light on the Sidecar. If lit, the compressor relay should be energized and the compressor should run. Also, the PressureSwitch digital input needs to be wired up correctly. Make sure port numbers are correct for both relay and pressure switch.
Two things to check:
1) Make sure you have a good PWM cable going to the compressor relay. They are notoriously bad.
2) Make sure the PWM cables are plugged in correctly. With the new digital sidecar, it is very easy to plug them in one pin off.
If the Relay LED on the sidecar that matches your compressor relay is green and the compressor is not running, a PWM cable issue is usually the problem.
Even if you have LabView (I can't help you there) all the non-code issues I mentioned are still valid.
Steve C.
|