Select between limit switches as function of current position and destination