|
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
|