How to execute functions simultaneously in this case?

but a "for" loop doesn't need to be used to step the motor 3000 times