Stepper Motor Speed is too slow

  • richcolvin
  • richcolvin's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
More
08 Oct 2025 18:59 - 08 Oct 2025 19:00 #336112 by richcolvin
Stepper Motor Speed is too slow was created by richcolvin
I am at a loss.  I cannot get the stepper motors on my axes to run at the speeds they are set to run.  The axis seems to run at 0.0001 in/sec, not 10 in/sec.

I have them hooked to Stepper Online DM542T drivers, so these are the values in the INI file.
# For the DM542T, these are 5 μs = 5,000 ns
DIRHOLD              = 5000
DIRSETUP             = 5000
# For the DM542T, these are 2.5 μs = 2,500 ns
STEPLEN                = 2500
STEPSPACE            = 2500

The DM542Ts are set to use 6,400 pulses / rev, and the leadscrew moves 8 mm per revolution.  Thusly, I set the STEP_SCALE and ENCODER_SCALE using this calculation
  • STEP_SCALE = 6,400 step/rev  x 1 rev / 8 mm  x  25.4 mm / in 
    • STEP_SCALE = 20,320 steps/in

      For [AXIS_l] 
      TYPE                            = LINEAR
      MAX_VELOCITY         = 10.0

      For [JOINT_#], 
      TYPE                            = LINEAR
      UNITS                          = INCH
      ENCODER_SCALE       = 20320
      STEP_SCALE               = 20320
      MAX_VELOCITY          = 10.0
      STEPGEN_MAXVEL    = 12.50


      Please help me understand what I am missing.
Last edit: 08 Oct 2025 19:00 by richcolvin.

Please Log in or Create an account to join the conversation.

More
08 Oct 2025 19:03 #336114 by PCW
Replied by PCW on topic Stepper Motor Speed is too slow
Can you post your complete hal/ini files, or al least the joint sections of both?

 

Please Log in or Create an account to join the conversation.

  • richcolvin
  • richcolvin's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
More
08 Oct 2025 19:20 #336115 by richcolvin
Replied by richcolvin on topic Stepper Motor Speed is too slow
These are the files.  The .INC files were renamed to be .INI so that they could be attached.

I've attached one spindle file:  that one and the one for Spindle1 all work exactly as expected.

I also attached only two of the axis files:  U & Y (due to the file limit).

Please Log in or Create an account to join the conversation.

More
08 Oct 2025 20:40 - 08 Oct 2025 20:43 #336117 by PCW
Replied by PCW on topic Stepper Motor Speed is too slow
The PID setup is missing key values so I would not think you would get
any motion, for example X:

#****************************
# AXIS X JOINT 0 CHANNEL 02
#****************************
setp pid.x.FF1 1
setp pid.x.Pgain 1000

setp pid.x.error-previous-target true
setp pid.x.maxerror 0.000500
net x-index-enable => pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output

 
Last edit: 08 Oct 2025 20:43 by PCW.

Please Log in or Create an account to join the conversation.

More
08 Oct 2025 20:47 #336118 by meister
Replied by meister on topic Stepper Motor Speed is too slow
If I calculate it right, that's >15m/min

I think it's not possible to reach this speed with steppers

Please Log in or Create an account to join the conversation.

More
08 Oct 2025 21:11 #336121 by PCW
Replied by PCW on topic Stepper Motor Speed is too slow
Yes, 8mm/turn = 3.175 turns per inch so ~1900 RPM at 10 IPS
which is at the edge of stepper capability (at least with usable torque)

Perhaps the OP does not know that the hal/ini velocity settings are
in machine units (inch in this case)  per second rather the minute
 

Please Log in or Create an account to join the conversation.

  • richcolvin
  • richcolvin's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
More
09 Oct 2025 01:19 #336128 by richcolvin
Replied by richcolvin on topic Stepper Motor Speed is too slow
10 in/sec is well beyond what we ever need; indeed, I'd be surprised if we need to achieve even 0.1 in/sec.  That was just an attempt to see if changing that value would drive the needed speed.

As for commenting out the PID stuff, that was due to the way I understood them to be only needed for servo motors, and not for stepper motors.  This is based on my reading of section 2.13.2. Servos in the manual (linuxcnc.org/docs/stable/html/config/ini...ub:ini:sec:joint-num).

Quite probably, I misunderstood the manual.

I will add the PID stuff back into the configuration and test tomorrow, and then report back.

Please Log in or Create an account to join the conversation.

  • richcolvin
  • richcolvin's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
More
09 Oct 2025 17:49 #336165 by richcolvin
Replied by richcolvin on topic Stepper Motor Speed is too slow
ACTIONS TAKEN:
I re-added these lines to the HAL file:

setp pid.u.Pgain                            [JOINT_4]P
setp pid.u.Igain                            [JOINT_4]I
setp pid.u.Dgain                            [JOINT_4]D
setp pid.u.bias                             [JOINT_4]BIAS
setp pid.u.FF0                              [JOINT_4]FF0
setp pid.u.FF1                              [JOINT_4]FF1
setp pid.u.FF2                              [JOINT_4]FF2
setp pid.u.deadband                         [JOINT_4]DEADBAND
setp pid.u.maxoutput                        [JOINT_4]MAX_OUTPUT

and these to the INI file

BIAS                 = 0.0
DEADBAND             = 0.00005
MAX_OUTPUT           = 10.0
OUTPUT_SCALE         = 1.000
OUTPUT_OFFSET         = 0.000
P                    = 1000.0
I                    = 0.0
D                    = 0.0
FF0                  = 1.0
FF1                  = 1.0
FF2                  = 0.0

RESULTS:
That seems to have fixed the speed problem I was having. However, a new problem has now arisen:  When I initiate the move, either by jogging (e.g., 0.1") or using the Gcode (e.g., G0 u-0.1 f1), the stepper motor
  1. moves the piece some distance (let's assume it is 0.1"),
  2. reverses back that same distance,
  3. then re-executes steps 1-2 until I stop LinuxCNC.

Please Log in or Create an account to join the conversation.

More
09 Oct 2025 19:35 #336172 by PCW
Replied by PCW on topic Stepper Motor Speed is too slow
FF0 should be 0

Please Log in or Create an account to join the conversation.

Time to create page: 0.086 seconds
Powered by Kunena Forum