When you change either of the delay values in the FOR loop, you are essentially changing the wait time between each step pulse, which is the reason why your motor’s step rate decreases when you increase those values. It sounds like your stepper motor stalled when you changed the second delay to be less than 500us, so I suspect 500us between each step is close to the top speed for you stepper motor. You could try looking at this forum post for adjustments you could make to your system to increase the maximum step speed.
As for you last question, the FOR loop in your code will step the stepper motor 10,001 steps. However, since that FOR loop is nested inside the void loop() function in your code, it will just keep repeating, so the motor will never stop stepping.
- Amanda
