Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   How to properly set up a Limit Switch (http://www.chiefdelphi.com/forums/showthread.php?t=125764)

wildbot3844 03-02-2014 15:50

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?

Ginto8 03-02-2014 16:17

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.

wildbot3844 03-02-2014 22:18

Re: How to properly set up a Limit Switch
 
Our team is just wanting to use it for a safety switch basically.


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

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