|
Re: PID help
The comment about the limit switch using its own value for the encoder was more specific to the upper one.
If the elevator is at the upper limit and sends 29 to the PID, then the motor lowers it just below the upper switch, it would be confusing if that encoder value were 30 or 27. So I guess I was just trying to help with imagining things to test and either prevent, or make the code tolerant.
I'm assuming the encoder is relative and needs to be reset at some point. Doing it each time is fine provided it isn't a false signal.
Greg McKaskle
|