Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Pneumatics Coding (http://www.chiefdelphi.com/forums/showthread.php?t=125167)

anthonygraff24 24-01-2014 15:30

Pneumatics Coding
 
In Hauppague High School's guide for coding a compressor, it asks for (in the constructor) int pressureSwitchSlot, int pressureSwitchChannel, int compressorRelaySlot, and int compressorRelayChannel. I assume the slots refer to the slots on the sidecar, but I don't know what the Channels refer to. Any help is greatly appreciated!

notmattlythgoe 24-01-2014 15:31

Re: Pneumatics Coding
 
Quote:

Originally Posted by anthonygraff24 (Post 1331760)
In Hauppague High School's guide for coding a compressor, it asks for (in the constructor) int pressureSwitchSlot, int pressureSwitchChannel, int compressorRelaySlot, and int compressorRelayChannel. I assume the slots refer to the slots on the sidecar, but I don't know what the Channels refer to. Any help is greatly appreciated!

The slots actually refer to which slot the sidecar is plugged into on the cRIO. You should be able to get away with just using the 2 parameter constructor and putting in the relay channel and dio channel you plugged the switch and spike into on the sidecar, usually 1 and 1 for us.

Code:

Compressor compressor = new Compressor(1, 1);
The above code will work as long as your Digital Sidecar is plugged into the first Digital card on the cRIO. If you have a second digital card on the cRIO and are using that one you can use the below code to create your compressor.

Code:

Compressor compressor = new Compressor(2, 1, 2, 1);


All times are GMT -5. The time now is 11:44.

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