Stepper Project


Author Message
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2080
Posted: 05:22am 17 Apr 2026      

Ok still having fun so I decided to setup my scope and set channel 1 to the step pin but haven't seen any action on the scope.

It does seem it's going in an endless state

Stepper initialized - 100KHz timer active
Warning: Soft limits not configured. Use STEPPER LIMITS to set working area.
Hardware limit switches configured
Stepper armed - executing buffered commands
Homing axes...


The code

OPTION EXPLICIT

On error skip
Stepper close
Stepper Init 0.05, 150, GP22

'setpin GP27, Dout
'setpin GP25, dout
'setpin gp26, dout

'const dir = "GP25"
'const steppin = "GP27"
'const enable = "GP26"
const E_Stop = "GP22"


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


do


RunStepper

loop


Sub RunStepper



Stepper gc g28 x0 f100
Stepper gc g1 x100 f100
Stepper gc g1 x0 f100
end sub


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