|
Re: Limit Switches
Hi,
Let me see if I have this correct. You are currently for a lift up/down command, setting a value of +/-1, and then trying to correct that value depending on whether the limit switch on the top/bottom is pressed.
I would recommend a different approach. After getting a command to lift, check first if the limit switch is pressed. if it is, do nothing; if it is not, assign the correct +/-1 depending on lift direction.
Hope this helps.
|