Go to Post Ladies and Gentlemen I believe this is the first time a Fantasy FIRST draft has been completed before it's allotted start time! - Koko Ed [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 16-02-2015, 09:31
BrianAtlanta's Avatar
BrianAtlanta BrianAtlanta is offline
Registered User
FRC #1261
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Atlanta, GA
Posts: 70
BrianAtlanta has a spectacular aura aboutBrianAtlanta has a spectacular aura about
Re: Programming Limit Switches

Also, be aware to check the limit switch before turning on a motor, not just when to turn it off. So, for example, button A raises a lift when held for example. When the lift hits a limit switch, it stops without having the operator releasing the button. Now the lift is at the top. But, if the operator presses the same button again the lift shouldn't move. This is one condition that our new programmers don't think about. They would start the motor and then check to limit switch in the IsFinished method. Which caused the lift to start slowly pulsing up. So, they learned to check the limit switch before starting the motor, and then check in the IsFinished.

This is a great learning experience for them. As I say at work "Programming the Happy path is easy. It's how you handle the unexpected is what makes it hard." Great way for them to learn to think beyond the requirements, to the undocumented requirements.

Brian
Reply With Quote
 


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 10:49.

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