Determinating max stepper speed.

I have a stepper, 23LC051-025-8W, controlled by a M415C controller.
As the data sheet has no information about the max speed that this stepper can reach, is there a method or sketch to determinate the maximum speed and acceleration using AccelStepper library.

Regards

Harry

That's because the speed depends on the driver, the driver's supply voltage, microstepping,
and the load and its resonances.

The max acceleration depends on the MoI/momentum of the hardware being driven
by the motor.

OK i understand that, but then how can i create a correct sketch using AccelStepper. h commands:

// Steppers , see AccelStepper documotation for more information
AccelStepper stepperX(1,XAxisPWM,XAxisDIR);
AccelStepper stepperY(1,YAxisPWM,YAxisDIR);
int xMotorSpeed            = 500;  // Maximum steps per second
int yMotorSpeed            = 500;  // Maximum steps per second
int xMotorAccel            =  25;  // Steps per second for acceleration
int yMotorAccel            =  25;  // Steps per second for acceleration

void setup() {
  stepperX.setMaxSpeed(xMotorSpeed);        // Set the X rotor-motor maximum speed
  stepperX.setAcceleration(xMotorAccel);    // Set the X rotor-motor acceleration speed
  stepperY.setMaxSpeed(yMotorSpeed);        // Set the Y rotor-motor maximum speed
  stepperY.setAcceleration(yMotorAccel);    // Set the Y rotor-motor acceleration speed
}

So how should determinate the relationship between the two?

Assuming the sketch you have posted works then I think all you can do is try a range of values and see what works in your circumstances. If you run at absolute maximum I suspect you will run the risk of missing steps.

...R

Attach the full mechanical load to the motor.

Set the speed to a value it can cope with (perhaps 1/2 the maximum you have that
works), then start increasing the acceleration to the point you get missed steps.
Back off the acceleration by 25%, and start increasing the max velocity till you get
missed steps, back off 25% or so on that...

Double check for reliable operation, back off the values a bit more if needed.

I'd recommend a test pattern of oscillating backwards and forwards one turn or so
to get lots of acceleration as well as reaching max speed. Attach a pointer to the shaft to
check its returning the starting point after many cycles if need be.