Page 1 of 1

Using G91 in homing program

Posted: Fri Aug 29, 2025 2:43 pm
by amegger
I am wanting to move my x-axis after the home position is set but I get an alarm "502 invalid g-code" at the G91. I found a post where someone else was using g91 in the home macro viewtopic.php?t=9199
Any idea why this is giving an alarm?


Code: Select all

N100 ;Check for open home switch
IF !#[50000 + #9822] THEN M225 #100 "HomeAll switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF !#[50000 + #9822] THEN GOTO 100

;Perform Homing commands
M92/X L1
M26/X
G91 G1 X-0.030 F10.0
G90
M91/Z L1
M106/Z P-8 F1.0
M26/Z
M01
M106/Z P8 F1.0

Re: Using G91 in homing program

Posted: Fri Aug 29, 2025 3:01 pm
by CentroidFrog
G91 is not a valid G code for a lathe.
All G codes for lathe can be seen here in the lathe operator manual: https://www.centroidcnc.com/centroid_di ... f#page=198

Re: Using G91 in homing program

Posted: Fri Aug 29, 2025 4:50 pm
by cncsnw
Review the manual as suggested, then try:

Code: Select all

G98 G1 F10 U-0.03