# can't get y motor to run separate number of revolutions

I have Adruino Uno with CNC Shield V 3.00 and Chipset 4988 with 2) Kuman 17HD48002H-22B .These motors are Bipolar 4 Wire (no common) stepper motors.

Motor in the X axis works perfectly. It does it’s 25000 steps CW and CCW direction.
The Y motor which goes in Clockwise direction work good except I would like to extend the number of rotations, separately from the X motor steps.

On the 3rd last line of the script, I have re-itereated the following line:
step (true, Y_DIR, Y_STP, steps); // y axis motor forward 1 laps, the 200 step is a circle.[/b]
This causes the Y motor to go 25000 steps stop and go another 25000 stop etc etc.
I would like for it to have a smooth motion (no stopping) say for 100000 steps.
Does anyone have idea how I can do this by modifying the following script.

Thanks
Gerry

// The following is a simple stepper motor control procedures

# define Y_STP 3 // y -axis stepper control

#ifndef limits_h
#define limits_h

// initialize the limits module
void limits_init();

// perform the homing cycle
void limits_go_home();

#endif
//// *
/// / Function : step . function: to control the direction of the stepper motor , the number of steps .
/// / Parameters : dir direction control , dirPin corresponding stepper motor DIR pin , stepperPin corresponding stepper motor " step " pin , Step number of step of no return value.
////
int N = 20;
int delayUs = 400;
int steps = 25000;

void step (boolean dir, byte dirPin, byte stepperPin, int steps)
{
digitalWrite (dirPin, dir);
delay (250);
for (int i = 0; i < steps; i ++)
{
digitalWrite (stepperPin, HIGH);
delayMicroseconds (delayUs);
digitalWrite (stepperPin, LOW);
delayMicroseconds (delayUs);
}
}

void setup () { // The stepper motor used in the IO pin is set to output
pinMode (X_DIR, OUTPUT);
pinMode (X_STP, OUTPUT);
pinMode (Y_DIR, OUTPUT);
pinMode (Y_STP, OUTPUT);

pinMode (EN, OUTPUT);
digitalWrite (EN, LOW);

Serial.begin(115200);
Serial.println(“Start1”);

Serial.println(“Start”);
}

void loop () {
Serial.println(“reverse-” + String(N));
step (false, X_DIR, X_STP, steps); // X axis motor reverse 1 ring, the 200 step is a circle.

Serial.println(“forward-” + String(2));
step (true, X_DIR, X_STP, steps); // X axis motor forward 1 laps, the 200 step is a circle.
step (true, Y_DIR, Y_STP, steps); // y axis motor forward 1 laps, the 200 step is a circle.
step (true, Y_DIR, Y_STP, steps); // y axis motor forward 1 laps, the 200 step is a circle.
step (true, Y_DIR, Y_STP, steps); // y axis motor forward 1 laps, the 200 step is a circle.

N++;

}