Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: PvdBos on October 24, 2015, 07:35:45 AM

Title: 360 circle with Z drive slow down
Post by: PvdBos on October 24, 2015, 07:35:45 AM
Hello all

an question about milling a hole.
I wil like to mill a round hole of 38 mm with a milling tool of 2.6 mm that go 5 times round the circle  and that the Z access 2mm going down 0.2 mm per 360/circle.
here is my code:

but this code make a circle of 80mm and not 38mm wath's wrong?

(--38mm gat--)
G00 G17 G21 G49 G80 G90
(-- FREES 2.6MM --)
T1 M06
G00 G17 G90 G54 X0 Y0 S8000 M03
G43 H0 Z2 M08
#1 = 1.0  ( Safe Z )
#2 = -0.2 ( Engraving Depth Z )
G00 X17.7 Y40
M98 P1000 L1
G00 Z#1
G00 X17.7 Y-40
M98 P1000 L1
G00 Z#1
G00 Z20
M30
(--CONTOUR--)
O1000
G03 Z#2 F450 I0 J0 
#2=[#2-0.2]
M99
Title: Re: 360 circle with Z drive slow down
Post by: RICH on October 24, 2015, 07:47:19 AM
Why not just use one of the wizards to generate the code?

RICH
Title: Re: 360 circle with Z drive slow down
Post by: PvdBos on October 24, 2015, 09:20:18 AM
The wizard create code that is to lang for my DEMO of Mach3.....
Title: Re: 360 circle with Z drive slow down
Post by: ger21 on October 24, 2015, 09:58:10 AM
Where is the center of the hole?
Title: Re: 360 circle with Z drive slow down
Post by: PvdBos on October 24, 2015, 10:24:28 AM
there are two holes with the same diameter one X0 Y40 and one X0 y-40
and the diameter is 38mm and 2 deep.
Title: Re: 360 circle with Z drive slow down
Post by: ger21 on October 24, 2015, 11:06:03 AM
G43 H0 Z2 M08
S8000 M3
G0 Z3
G0 X0.0000 Y57.7000 Z0.1250
G1 X0.0000 Y57.7000 Z0.0000 F150
G3 X0.0000 Y57.7000 Z-0.2000 I0.0000 J-17.7000 F450
G3 X0.0000 Y57.7000 Z-0.4000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-0.6000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-0.8000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-1.0000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-1.2000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-1.4000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-1.6000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-1.8000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-2.0000 I0.0000 J-17.7000
G3 X0.0000 Y57.7000 Z-2.0000 I0.0000 J-17.7000
G0 X0.0000 Y57.7000 Z3
G0 X0.0000 Y-22.3000 Z3
G1 X0.0000 Y-22.3000 Z0.0000 F150
G3 X0.0000 Y-22.3000 Z-0.2000 I0.0000 J-17.7000 F450
G3 X0.0000 Y-22.3000 Z-0.4000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-0.6000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-0.8000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-1.0000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-1.2000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-1.4000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-1.6000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-1.8000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-2.0000 I0.0000 J-17.7000
G3 X0.0000 Y-22.3000 Z-2.0000 I0.0000 J-17.7000
G0 X0.0000 Y-22.3000 Z3
M5
M9
M30
Title: Re: 360 circle with Z drive slow down
Post by: BR549 on October 24, 2015, 11:20:55 AM
IF you are trying to learn Parameteric Gcode I can help you . IF you are just trying to beat the Demo limit then Gerry gave you what you needed.

(;-) TP
Title: Re: 360 circle with Z drive slow down
Post by: PvdBos on October 24, 2015, 12:35:33 PM
Br439 and Gerry thanks for the code it's forking fine but the code is not flexible. What I want is that the "L" gifs the deep in 0.2mm per circle
L10 is 2MM deep etc.

I want to gifs an X and Y value and an radius and the code make the hole.
 
Title: Re: 360 circle with Z drive slow down
Post by: BR549 on October 24, 2015, 01:34:41 PM
The first thing you need to learn is HOW the I J code works with arcs . It is easiest to work in Abs code until you get to teh circles then switch to INC code  as it is much easier to deal with for circles and IJs.

(;-) TP
Title: Re: 360 circle with Z drive slow down
Post by: BR549 on October 24, 2015, 02:43:32 PM
(--38mm gat--)
G00 G17 G21 G49 G80 G90 G54 (Safety Block)

(Program the Parameters)
#1 = 1.0  ( Safe Z )
#2 = -0.2 ( Engraving Depth Z )
#3 = [38 - [2.6/2]]
#4 = #2
( Start the Process)

G00  X0 Y0
M03  S8000 M8


G00 Z#1   ( go to safeZ)
G00 X17.7 Y40  ( go to Center of circle)

G91   (Switch to INC)
G00 X#3   ( offset teh X)
G00 Z[-1*#1] ( Move to Z zero)

M98 P1000 L10   ( Call Sub, loop 10 times)
G90  ( Reset To ABS)
G00 Z#1
G00 X17.7 Y40  ( go to Center of circle)
M30

O1000
G1 Z #4 F450
G03 X0 Y0   I [-1*#3] J0  F850
M99
%
Title: Re: 360 circle with Z drive slow down
Post by: PvdBos on October 24, 2015, 03:40:04 PM
BR549 thank you verry verry much for the code.
Title: Re: 360 circle with Z drive slow down
Post by: PvdBos on October 25, 2015, 09:05:04 AM
Hello again.

I have study  this code but this is not wat I want.
I have now the code working but only nust I create the holes on multiple places
CODE:
(--38mm gat--)
G00 G17 G21 G49 G80 G90 G54 (Safety Block)

(Program the Parameters)
#1 = 1.0  ( Safe Z )
#2 = -0.2 ( Engraving Depth Z )
( Start the Process)

G00 X17.7 Y0 Z1
M03  S8000 M8
G01 Z0 F50 ( Move to Z zero)
M98 P1000 L10  ( Call Sub, loop 10 times)
G00 Z#1
X0 Y0
M30

O1000
G03 X17.7 I0 Z#2 F850
#2=[#2-0.2]
M99
%
Thanks
Title: Re: 360 circle with Z drive slow down
Post by: BR549 on October 25, 2015, 02:25:00 PM
It was just an example of how to do it .

(;-) TP