Hello Guest it is March 29, 2024, 02:53:01 AM

Author Topic: parametric block with z loop  (Read 4042 times)

0 Members and 1 Guest are viewing this topic.

parametric block with z loop
« on: October 07, 2011, 08:34:33 PM »
made to use with a vertical milling machine

here you can make any size square rectangle etc by adjusting the variables in the beginning of the program. set your cutter dia. and z passes along with desired feed rate.

example;

O001(ADJUSTABLE BLOCK Z LOOP)
(X0,Y0 = CENTER PART)
(Z0=FIN. TOP FACE)
G17G40G80
M110
G0G90G55X0.Y0.
G43Z2.0
#100=1.0(X WIDTH OF SQUARE)
#101=1.0(Y WIDTH OF SQUARE)
#102=0.
#103=.200(CUTTER DIA)
#107=2.(Z PASSES)
#108=20.(FEED RATE)
#1002=[-.015](DOC Z)
#110=2.(Z RETRACT)
#1004=0.(DO NOT ALTER)
M3
M98P05L#107
G04P2000
#1004=0.(RESET TO Z0.)
#107=0.(RESET DOC TO 0.)
M110
M30
%




O05(SUB CUT BLOCK)
(DO MATH)
#104=[#103/2]
#105=[#100/2]
#106=[#101/2]
#109=[#102-#108]
N100(START BLOCK)
Z.1
X[[#105+#103]*-1.]Y[#106+#103]
M98 P10 L1 (call sub to feed down)
X[[#104]*[-1.]]Y[#106+#104]
X[#105+#104]
Y[[#106+#104]*-1.]
X[[#105+#104]*-1.]
Y[#106+#103]
G0Z[#110]
M99


O10(z loop)
#1004=[#1004+#1002](Calc New Z depth)
G1Z[#1004]F#108(MOVE TO CUT DEPTH)
M99