How to modify the below code that the motor works (Turns on) for tamount of time

Yes, I can compile exactly program without removing the testing part.

Regards