Help with gcode

Looking for some help with generating a couple lines of gcode for using my keyhole bit.

I was able to jog the machine to get a few keyhole slots cut but I’d like to have some actual gcode so the bit moves at like 40/in min, instead of the default jog speed which is real fast and adrupt for cutting.

I need something that will move the z axis down say… .35" / y axis forward .5" / y axis back .5" / z axis up .35" , at that 40/in per min

Any help would be appreciated.

This thread has it

S12000 M3
G1 Z -0.35 F40
G1 Y 0.5
G1 Y -0.5
G1 Z 0.35

This does what you asked…turns on spindle…cuts…and turns off spindle

Always test above the work (air cut) to make sure it does what you want. The code does what you asked, but look at what Allen linked…

Could you explain the lines of code so I could get a better understanding?

G17 - default XY plane
G20 - inches
G91 - relative position
S12000 M3 - spindle 12k rpm M3 - spindle on
G1 - linear move at F40 - 40 inches per minute
M5 - spindle off
M2 - end

This example requires you to position the bit directly over the start position of the slot…again, check out Allen’s link above to cleanly cut a slot. This example will just plow through for half an inch…the link above will nibble the wood.

1 Like

G-code is pretty straight-forward. Page on it here: