|
Re: Autonomous limit switch
Aside from the loop problems, it seems like the First Limit Switch always starts off as pressed and will immediately override the .6 motor speed setting right in the beginning.
The motor needs some time to run before you start checking that first limit switch.
Also, make sure that the limit switch wiring matches the way it is checked in the code. Limit switches can be wired either Normally-Open (NO) or Normally-Closed (NC) and the code check might be reversed. I've had new electrical crew members wire one switch one way and the next switch the opposite, so double check. It's best to run in debug the first time and probe the value you are getting.
I'd think this process would be better described as a flat sequence.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 13-03-2013 at 10:35.
|