Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Compressor programming (http://www.chiefdelphi.com/forums/showthread.php?t=91912)

Robby Unruh 15-02-2011 16:01

Compressor programming
 
I'm trying to program our team's compressor. It's hooked up to channel 7 on the IO. I'm doing the bare minimum code of

Code:

Compressor compressor = new Compressor(7,1);
compressor.start();

But that doesn't seem to be working. Any tips?

Patrickwhite 15-02-2011 21:34

Re: Compressor programming
 
Does any of the code work, or does the robot die on starting? If it dies, it is probably an indication that the channels you've listed are incorrect somehow - perhaps not wired right?
Where does this code run - in the initialization method?

Robby Unruh 15-02-2011 21:55

Re: Compressor programming
 
Quote:

Originally Posted by Patrickwhite (Post 1023954)
Does any of the code work, or does the robot die on starting? If it dies, it is probably an indication that the channels you've listed are incorrect somehow - perhaps not wired right?
Where does this code run - in the initialization method?

All of it is done in robotInit and the robot loads up just fine, no errors.

- edit -
actually, our compressor is wired in to PWM 4. Just to clarify, that would be (4,4); correct?

Patrickwhite 15-02-2011 22:01

Re: Compressor programming
 
Actually, the compressor has two distinct parts to it: the pressure switch (reads the pressure gauge) and the relay (turns the compressor on or off). The constructor for Compressor expects the location of the pressure switch first, and the relay second. Are you sure you're getting both of them in the right place?
Quote:

Originally Posted by javadoc
Compressor(int pressureSwitchChannel, int compressorRelayChannel)
Compressor constructor.
Compressor(int pressureSwitchSlot, int pressureSwitchChannel, int compresssorRelaySlot, int compressorRelayChannel)
Compressor constructor.


kinganu123 17-02-2011 23:36

Re: Compressor programming
 
Are you sure you don't have a relay in between the compressor and the dsc and pd board?
Because then you'd need this
Code:

Relay relay = new Relay(1);
relay.setDirection(Forward);
relay.set(true);


Robby Unruh 20-02-2011 15:58

Re: Compressor programming
 
Our spike relay is plugged in to channel 1 on our sidecar on the 'relay' side. In the code I have our compressor programmed like so:

Code:

Compressor compressor = new Compressor(4,1);
// as in pressure switch on channel 4, spike relay on relay-1?

I've tried the above relay code- with no luck. Anyone else have any clue what could be wrong?

- EDIT -
False alarm, we moved our relay to PWM 5, and moved some wires. Compressor works beautifully. Thanks everyone.


All times are GMT -5. The time now is 22:18.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi