First is the program that holds the variables I use in the macro. This is the program that you run:
Code: Select all
(Inside Circle Program)
(Date: 25/10/2014 Pertneer)
#100 = 2.0 (Circle Radius)
#101 = 0.0 (X Position of circle)
#102 = 0.0 (Y Position of circle)
#103 = 75.0 (Fast feed rate)
#104 = 45.0 (Small Radius Feed Rate)
#110 = .064 (Kerf Width)
#111 = .135 (Switch Offset)
#112 = .15 (Pierce Height)
#113 = 40.0 (Touch Off Feed Rate)
#114 = .500 (Clearance Height)
#115 = .06 (Cut Height)
#116 = .4 (Pierce Delay)
#120 = [#100 - [#110/2]]
#130 = [#100 - [#110]]
M98 (O0002.tap)
M30
Code: Select all
(Inside Circle Program)
(Date: 25/10/2014 Pertneer)
#100 = 2.0 (Circle Radius)
#101 = 0.0 (X Position of circle)
#102 = 0.0 (Y Position of circle)
#103 = 75.0 (Fast feed rate)
#104 = 45.0 (Small Radius Feed Rate)
#110 = .064 (Kerf Width)
#111 = .135 (Switch Offset)
#112 = .15 (Pierce Height)
#113 = 40.0 (Touch Off Feed Rate)
#114 = .500 (Clearance Height)
#115 = .06 (Cut Height)
#116 = .4 (Pierce Delay)
#120 = [#100 - [#110/2]]
#130 = [#100 - [#110]]
M98 (O0002.tap)
#100 = 4.0 (Circle Radius)
#101 = 6.0 (X Position of circle)
#102 = 0.0 (Y Position of circle)
#120 = [#100 - [#110/2]]
#130 = [#100 - [#110]]
M98 (O0002.tap)
M30
This next code is placed in the subroutines directory within the Mach3 install directory. So if Mach3 is installed in C:/Mach then the location of this directory is C:/Mach/subroutines.
Code: Select all
O0002(Filename: O0002.tap)
(Inside Circle Macro)
(Date: 25/10/2014 Pertneer)
(Variables)
(#100 = Radius)
(#101 = X location)
(#102 = Y Location)
(#103 = Fast feed rate)
(#104 = Small Radius Feed Rate)
(#110 = Kerf Width)
(#111 = Switch Offset)
(#112 = Pierce Height)
(#113 = Touch Off Feed Rate)
(#114 = Clearance Height)
(#115 = Cut Height)
(#116 = Pierce Delay)
G20 (Units: Inches)
G53 G90 G40
G55
F1
(Part: circle)
(Process: Inside Offset, MODEL, T160: 45A, .16thick .064 Kerf)
G00 X[[#110]*-1] Y[[#100 - [#110*1.5]]*-1] (Radius * .064 = X dimension; Radius * .904 = Y dimension)
G28.1 Z0.12 F[#113]
G92 Z0.0
G00 Z[#111]
G92 Z0.0
G00 Z[#112]
M03
G04 P[#116]
G01 Z[#115] F[#113]
G03 X[#101] Y[[#120]*-1] I[#110] J0.0000 F[#104]
I0.0000 J[#120] F[#103]
X[#110/2] Y[[#130]*-1] I0.0000 J[#110/2] F[#104]
M05
G00 Z[#114]
X[#101] Y[#102]
M05
M99