Go to Post One of the many unwritten laws of engineering failure is that the problem will occur in the most inopportune time. - Dave Scheck [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-24-2014, 03:30 PM
anthonygraff24 anthonygraff24 is offline
Registered User
FRC #2872 (CyberCats)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Long Island
Posts: 38
anthonygraff24 is an unknown quantity at this point
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!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-24-2014, 03:31 PM
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,712
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Pneumatics Coding

Quote:
Originally Posted by anthonygraff24 View Post
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);

Last edited by notmattlythgoe : 01-24-2014 at 03:36 PM.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:04 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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