Stepper Project


Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3273
Posted: 05:50am 17 Apr 2026      

Just a guess after looking at the manual.
As it appears to require hardware limits for all 3 axis perhaps you need to set software limits for all 3 as well, even though you are only using 1 axis.
Might not work but easy enough to try.

eg.
STEPPER HWLimits GP23, GP21, GP20, GP19, GP18, GP17
Stepper limits X, 0, 200
Stepper limits Y, 0, 20
Stepper limits Z, 0, 20
Stepper Axis X, GP27, GP25, GP26, 0, 800, 100, 100
Stepper Position X, 0
Stepper run 1
'Stepper Position Home


  Quote  2.3 Limits & Safety
STEPPER HWLIMITS x_min, y_min, z_min [,x_max] [,y_max] [,z_max]
Configures hardware limit switch pins (active low). Pins must be mutually exclusive with
AXIS/SPINDLE/E-STOP, except min and max may share the same pin on the same axis.
STEPPER LIMITS axis, min_mm, max_mm
Sets soft limits for an axis in mm.

  Quote  I have declared X position as 0 but the software is homing the axis in an endless loop

Here is your endless loop:-
do
  RunStepper
loop
Sub RunStepper is being called endlessly.
Maybe try without Do and Loop.
Edited 2026-04-17 16:03 by phil99