Please refer to How-To Ask for Help, Move out of range: X Y Z [E] and Understanding X and Y Axes Limits and Homing