Hi Ali, Andy is currently resting as you must have overloaded him with questions.

When Mach keeps resetting when the driver board is connected you may have an input active high or vice versa

Connect your machine a bit at a time then you will find the thing that is miss configured

Have the motors NOT fitted to the machine so there are no accidents

Phil