Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: enytned1 on July 20, 2009, 09:30:58 AM
-
Does anyone have a pocket macro in g-code (fanuc or mach) style? Looking for something that will have a length, width, depth x,y position. Any and all help would be much appreciated.
-
have you looked at the Wizards?
RICH
-
I know there are wizards, i need the actual macro written in g-code with if or while commands. Is there a way to see the source code for the wizards?
-
MACH cannot do direct conditional gcode programing, (;-(. BUT I may have something you can use to cut squareish pockets.
(;-) TP
-
This is not for a Mach control. I will use this on a Fanuc router.
-
You can look at the VB in the wizards by going into the wizard you wish and then Operator menu the Edit Button script. The Post code button should flash and when you look it should open the editor with the VB in it.
Whether that will be any use for your Fanuc I dont know.
Hood
-
Try THis
#1=100(LENGTH)(A)
#2=200(WIDTH)(B)
#3=6.5(DEPTH)(C)
#17=20.6(TOOL DIA.)(Q)
#8=.7(TO CUT LESS THEN 1/2 CUTTER FOR OVERLAP)(E)
#21=2(Z PICK)(U)
#9=200(FEED)(F)
#23=.5(FINISH STOCK ON WALLS)(W)
#20=10(TOOL NUMBER)(T)
O0001(MAIN PROGRAM)
G65P9000A100B200C6.5Q20.6E.7U2F200W.5T10
M30
O9000(RECT. POCKET MACRO)
M6T#20
#10=[#17/2]-#8
#1=#1/2
#2=#2/2
#17=#17/2
#11=0(Y COUNTER)
#12=#21(Z COUNTER)
N100G0G90X0Y0Z1.
Z.1
G1Z-#12F#9
N200
WHILE[#11LT[#1-#17-#23]]DO1
#11=#11+#10
IF[#11GE[#1-#17/2-#23]]TH#11=[#1-#17-#23]
X-[#2-#17-#23]
Y-[#11-#23]
X[#2-#17-#23]
Y[#11-#23]
X-[#2-#17-#23]
Y0
END1
IF[#12EQ#3]GOTO300
#12=#12+#21
IF[#12GE#3]TH#12=#3
#11=0
GOTO100
N300
IF[#23EQ0]GOTO400
#23=0
GOTO200
N400G0Z1.
M99
(;-0 TP