Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: creep_pea on February 12, 2007, 06:11:08 PM

Title: How do G codes work and can they be changed
Post by: creep_pea on February 12, 2007, 06:11:08 PM
Hi

Is it possible to change a G code i.e. G84 or possibly make a new one.

My machine has a manual spindle start switch and a automatic spindle off via Mach so when you doing a simple tapping routine you can't use G84, as G84 for some reason asks to start the spindle, so you start the spindle it feeds down tapping the hole reaches the bottom of the hole stops the spindle, asks for a spindle start in reverse then feeds up before I've started the spindle breaking my tap, well it would if I let it run.

Thanks

Chris
Title: Re: How do G codes work and can they be changed
Post by: GaryB on February 12, 2007, 06:19:52 PM
You can edit your g-code by clicking on edit on the run screen, your g-code will open in your text editor.
You can also edit your post processor file, if your not comfortable doing that contact your machine/software supplier and have them do it for you.
Title: Re: How do G codes work and can they be changed
Post by: Graham Waterworth on February 13, 2007, 03:22:14 AM
Have you thought about using a TAP-MATIC, using one of these the spindle always runs forward and it auto reverses and comes out of the hole at twice the speed.

There are quite a few posts about this on the forum, including G-Code to do it.

Graham.
Title: Re: How do G codes work and can they be changed
Post by: creep_pea on February 13, 2007, 05:49:02 AM
GaryB

Thanks but I want to know if it's possible to alter what the G84 code actually does in Mach.

Graham

I have thought about using one but I'd still have to alter my program to do it which I'm already doing with my floating tap holders, yes it would save me reversing the spindle a few times and possibly cut the cycle time down but the ones I seen are fairly long so I'd have to drop my table every time I used it, the Z axis movement is very limited (bridgeport series 1).

I thought there might be a simple way of changing the way G84 works so it waits until it's seen spindle movement before feeding out of the hole, I've got a input from the spindle to tell Mach if it's spinning or not.

Here's a example of what I'm currently doing.

N1M00
N2(M4 TAPPING HEAD|TOOL - 34|DIA. OFF. - 34|LEN. - 34|TOOL DIA. - 4.)
N3T34M6
N4G0G90G59P10X-9.Y20.S100M3
N5G43H34Z5.
N6X-9.Y20.F70.
N7M98P001
N8X-45.Y8.
N9M98P001
N10M5
N11G91G28Z0.
N12G28X0.Y0.
N13M30


O001
Z5
G01Z-11.
M5
M4
G01Z5.
M5
M3
G0
M99