nema34 8.5nm 1.8 degree, DM556y driver, simple application and I beg for help

I need to make this motor spin slower. Nema34 200 steps per spin 1.8 degrees. 48v and 5.amps works well. dm556y drive. Arduino UNO. Matching power supply. I just need to make it spin one direction til I say stop. It drives a chain drive to move paddles to stir nuts. It has an encoder on it to to use with a hybrid stepper drive but this doesnt seem to agree with the arduino. I dont need the encoder. position is not relevant and encoder and motor are seperate systems.
The code below works but any value below 500 in Setmaxspeed makes motor stutter. I Need the motor to run slower else the nuts fly out of the bowl.I have invested many hours in this but cut and paste and edit is my coding skills. I can machine and solder and weld and cook nuts but.. I cant code. Please can some one who can throw me a bone on this. I have tried to follow the rules and hope I have provided enough information

#include <AccelStepper.h>
// Define stepper motor connections and motor interface type. Motor interface type must be set to 1 when using a driver:
#define dirPin 2
#define stepPin 3
#define motorInterfaceType 1
// Create a new instance of the AccelStepper class:
AccelStepper stepper = AccelStepper(motorInterfaceType, stepPin, dirPin);
void setup() {
  // Set the maximum speed and acceleration:
  stepper.setMaxSpeed(500);
  stepper.setAcceleration(200);
}
void loop() {
  // Set the target position:
  stepper.moveTo(200000000000000000);
  // Run to target position with set speed and acceleration/deceleration:
  stepper.runToPosition();
  
  // Move back to zero:
  
}

I believe the stepper.runSpeed() function will work at a constant speed without any need to specify a move.

Alternatively just write your own code to create a step pulse at appropriate intervals.

...R
Stepper Motor Basics
Simple Stepper Code

Robin2:
I believe the stepper.runSpeed() function will work at a constant speed without any need to specify a move.

Alternatively just write your own code to create a step pulse at appropriate intervals.

...R
I appreciate that you give this advice freely. I dont see stepper.runSpeed() any were in the code
I am also trying to get my head around step pulse intervals.
Thanks for reply, just wish I understood it...
Stepper Motor Basics
Simple Stepper Code

I dont see stepper.runSpeed() any were in the code

You have to put it there.

It could replace

  stepper.moveTo(200000000000000000);
  // Run to target position with set speed and acceleration/deceleration:
  stepper.runToPosition();

except that there is no reason to put the command in loop(). It could go in setup() instead.

loop() might be used simply to check some input (button, or serial monitor) that allows the operator to start and stop the motor.

I am also trying to get my head around step pulse intervals.

What is the problem?

If the motor steps once every second, and there are 200 steps in one revolution, then the shaft speed is 1 revolution per 200 seconds.

bullpeters:
I dont see stepper.runSpeed() any were in the code

You need to study the AccelStepper library documentation.

I am also trying to get my head around step pulse intervals.

Whether you use a library or your own code a stepper motor moves one step every time the stepper driver gets a step pulse from the Arduino. The interval between pulses determines the speed of the motor,

...R

Don't recommend using runSpeed(), it doesn't ramp so you'll have stalling issues with it maybe...

Use setMaxSpeed(), setAcceleration(), run(), moveTo(), and get the full benefit of its non-blocking
ramped speed profiling.

  stepper.moveTo(200000000000000000);

No, that's not going to work properly, moveTo() requires a long, which is 32 bit. You're
expecting a 64 bit constant to make sense here which is doesn't.

perhaps:

#include <limits.h>

  stepper.moveTo (LONG_MAX) ;

Give this a try, has acceleration and low speed (50 steps per second, 15 RPM), runs continuously:

#include <AccelStepper.h>
// Define stepper motor connections and motor interface type. Motor interface type must be set to 1 when using a driver:
#define dirPin 2
#define stepPin 3
#define motorInterfaceType 1
// Create a new instance of the AccelStepper class:
AccelStepper stepper = AccelStepper(motorInterfaceType, stepPin, dirPin);
void setup() {
  // Set the maximum speed and acceleration:
  stepper.setMaxSpeed(50);
  stepper.setAcceleration(40);
}
void loop() {
  if (stepper.distanceToGo() == 0);
    stepper.move(200);
  stepper.run();
}

Have you tried setting the microsteps higher, like 8 or 16?

You absolutely need microstepping to tame noise and vibration with a large stepper motor, by the way.
x8 or x16 is a good starting point as JCA34F mentions.