Stepper Motor control with 1 limit switch

Can you please give me an example?
Thank you very much