It has been sometime since I have written simple macros and was hoping to find a little help here.
I seen this problem presented in another post but this would have strayed off topic.
He was wanting to machine a profile to a depth of Z-2.55 in .05 depths of cuts.
I have taken it one step farther to allow different depths and depth of cuts by using a macro.
I have not had the chance to run this into a controller to see if it works or not but I would like imput on writing macros, I know there are other ways to accomplish but I am looking for information on macros.
%
O1001
G65P1000 A-2.55 B-.05
M30
%
%
O1000
(G65P1000A-2.55B-.05)
#101=0 (ENSURE COUNTER IS CLEAR)
#100=#1(DEPTH)
#101=#2(STEP DEPTH)
G0G20G40G80G90
T21 M06
(1.25 3 FLUTE)
G90 G58 G00 X3.25 Y5.
M88 ( I AM NOT FAMILIAR WITH M88)
S1800 M03
G43 H21 Z1. M08
N100 (BEGIN LOOP ADDING TO - DEPTH
#101+#2(COUNTER)
IF[#101 LT #100] THEN [#101=#100]
G01 Z#101 F15.
G90 G41 G01 X2.375 Y4. D21
G01 Y3.077
G03 X2.7606 Y2.174 R1.25
G02 X2. Y0.2794 R1.1
G02 X1.2394 Y2.174 R1.1
G03 X1.625 Y3.077 R1.25
G01 Y3.7294
G01 X2.5
G40 X3.25 Y5. F25.
IF[#101 EQ #100] GOTO200
GOTO100
N200
G0Z2.M9
G91G28Y0Z0
G90
M30
%


LinkBack URL
About LinkBacks




