Stepper Project


Author Message
Bryan1

Guru

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

Ok did the Stepper Limits X, 0, 200 also the same for Y and Z now when I run it got the error Y axis wasn't set so commented Y and Z out.

Now when I removed the do loop

Stepper initialized - 100KHz timer active
Warning: Soft limits not configured. Use STEPPER LIMITS to set working area.
Hardware limit switches configured
X axis limits: 0.000 to 200.000 mm (0 to 160000 steps)
Stepper armed - executing buffered commands]


Then it goes straight to the prompt so it exits the stepper program

Now with the Do Loop

Stepper initialized - 100KHz timer active
Warning: Soft limits not configured. Use STEPPER LIMITS to set working area.
Hardware limit switches configured
X axis limits: 0.000 to 200.000 mm (0 to 160000 steps)
Stepper armed - executing buffered commands
[44] Stepper gc g1 x0 f100
Error : G-code buffer full


Now I did put a Stepper Clear in so the buffer was reset

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 Axis X, GP27, GP25, GP26, 0, 800, 100, 100
Stepper limits X, 0, 200
'Stepper Limits Y, 0, 200
'Stepper Limits Z, 0, 200
Stepper Position X, 0
Stepper run 1
Stepper Clear
'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

Edited 2026-04-17 16:42 by Bryan1