Go to Post I'd just give you the URL, but then you wouldn't learn to look for yourself. - DonRotolo [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 03-02-2014, 15:50
wildbot3844 wildbot3844 is offline
Registered User
AKA: James Helton
FRC #3844 (Kentucky Wildbots)
Team Role: Programmer
 
Join Date: Mar 2013
Rookie Year: 2012
Location: Kentucky
Posts: 11
wildbot3844 is an unknown quantity at this point
How to properly set up a Limit Switch

I was just wondering the properly way to program and set up a digital/limit switch in Command Based Programming, does any one know the proper way to set it up?
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2014, 16:17
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: How to properly set up a Limit Switch

That depends on how you use it. In our code (eg. this file from last year), we make the DigitalInput part of the subsystem, then access it from outside with a more significant name (isForward() in this case). By doing it this way, the rest of the code does not have to care too much about the internal details, and if it turns out that the limit switch indicates the opposite of what you think, you can negate it in that named method, so it only has to be done in one place.
__________________
I code stuff.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-02-2014, 22:18
wildbot3844 wildbot3844 is offline
Registered User
AKA: James Helton
FRC #3844 (Kentucky Wildbots)
Team Role: Programmer
 
Join Date: Mar 2013
Rookie Year: 2012
Location: Kentucky
Posts: 11
wildbot3844 is an unknown quantity at this point
Re: How to properly set up a Limit Switch

Our team is just wanting to use it for a safety switch basically.
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 11:00.

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