Hello Guest it is March 28, 2024, 06:08:34 AM

Author Topic: Hole cutting code  (Read 3192 times)

0 Members and 1 Guest are viewing this topic.

Hole cutting code
« on: July 11, 2016, 01:03:13 PM »
Hi
I'm very much an amateur with gCode and have a question. I am trying to cut an 8mm hole with a 2mm bit. Following some study of various YouTube clips I have come up with the following code - trouble is it doesn't work. I am getting an error just before the G3 mode that the arc is different to the size in Line? I can't read it fully on the status window. Anyway, can someone there look at this and tell me what's wrong? Its probably something very basic.
Thanks in advance


G17 G21 G40 G49 G64 G90 G94
S1000
M6
M30

(Hole No1)

G0 Z30
G0 X59 Y0 A180
G0 Z20
G1 Z11 F50
G1 X63
G3 X-63 Y0 I-3 J0 F100
G3 X63 Y0 I3 J0
G1 Z9
G3 X-63 Y0 I-3 J0 F100
G3 X63 Y0 I3 J0
G1 Z7
G3 X-63 Y0 I-3 J0 F100
G3 X63 Y0 I3 J0
G1 Z5
G3 X-63 Y0 I-3 J0 F100
G3 X63 Y0 I3 J0
G1 Z3
G3 X-63 Y0 I-3 J0 F100
G3 X63 Y0 I3 J0
G1 Z1
G3 X-63 Y0 I-3 J0 F100
G3 X63 Y0 I3 J0
G1 Z0
G3 X-63 Y0 I-3 J0 F100
G3 X63 Y0 I3 J0

G0 X59 Y0
G0 Z30
G0 X30

M05
M30
%

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Hole cutting code
« Reply #1 on: July 11, 2016, 01:27:37 PM »
First thing to say is you have a M30 at the beginning, I am presuming this was just a typo when posting to the forum as you would get absolutely nothing at all showing and would certainly not get as far as the G3 line.

So your problem, you must have Mach in Incremental IJ mode and the code is Absolute IJ Mode. You can change the default setting on General Config page. However it is much better to do it in the code, reason being if you have it in  the G Code then when  you load code it will set the correct mode.
 So if you put a G90.1 on the second line of your code it should work fine.
Hood

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Hole cutting code
« Reply #2 on: July 11, 2016, 02:05:06 PM »
Is the Z reference correct?

My code would run from 0 to -9mm

Just wondering ;)
Re: Hole cutting code
« Reply #3 on: July 11, 2016, 05:14:22 PM »
Thanks Hood. I'll give that a try- and apologies for the confusing M30 typo.
Dave0974 - The Z reference is positive because I am cutting holes in a cylinder and Z0 runs along the centre axis of the cylinder.
Re: Hole cutting code
« Reply #4 on: July 12, 2016, 05:48:57 AM »
OK so I'm still in trouble here (I did say I wasn't great at this)
I'm trying to cut an 8mm hole in a cylindrical part and have the G21 in there. Trouble is the radius is huge and I suspect that I might be cutting an 8inch hole instead. Can't figure out why though.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Hole cutting code
« Reply #5 on: July 12, 2016, 06:01:45 AM »
Why not just use the Cut Circle wizard in Mach to get the code?
Hood
Re: Hole cutting code
« Reply #6 on: July 12, 2016, 06:06:06 AM »
I tried it but its cutting the hole about 1.5mm too small for some reason.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Hole cutting code
« Reply #7 on: July 12, 2016, 07:27:27 AM »
Strange, does your machine cut to size for other operations?
Hood
Re: Hole cutting code
« Reply #8 on: July 12, 2016, 08:47:49 AM »
Yes. The machine is pretty accurate overall.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Hole cutting code
« Reply #9 on: July 12, 2016, 09:33:47 AM »
The circle wizard code looks fine to me.

Also remember you need to account for the dia of the cutter on the circles diameter.

Hood