129 lines
2.4 KiB
Plaintext
Executable File
129 lines
2.4 KiB
Plaintext
Executable File
#<_z_clearance> = 0.2
|
|
|
|
M03
|
|
G20 ; G21 mm, G20 inches
|
|
G91.1 ; absolute IJK
|
|
G54 ; absolute coordinates
|
|
|
|
#<_z_ctr> = 0.550
|
|
#<_x_start> = 0.0
|
|
#<_x_end> = 7.0
|
|
#<_r> = 0.945
|
|
|
|
#<_x_step> = 0.05
|
|
|
|
#<x> = #<_x_start>
|
|
|
|
#<op> = 21
|
|
|
|
|
|
o200 sub ;[Y][Z]
|
|
G0 Z[#<_z_clearance>]
|
|
G0 X[#<_x_start>-#5410] Y[#1]
|
|
G0 Z[#2]
|
|
G1 X[#<_x_end>+#5410]
|
|
G0 Y[-#1]
|
|
G1 X[#<_x_start>-#5410]
|
|
o200 endsub
|
|
|
|
#<_r_adj> = [#<_r> - #5410/2]
|
|
#<theta> = ACOS[[#<_z_ctr>-#5410/2]/#<_r_adj>]
|
|
;#<z_bot> = [#<_z_ctr> - #<_r_adj>]
|
|
#<y_top> = [#<_r_adj>*SIN[#<theta>]]
|
|
|
|
|
|
o10 if [#<op> EQ 1]
|
|
F5
|
|
|
|
o200 call [0][-.35]
|
|
o200 call [0.1][-.25]
|
|
o200 call [0.2][-.10]
|
|
|
|
o10 elseif [#<op> EQ 2]
|
|
F10
|
|
|
|
G0 Z#<_z_clearance>
|
|
G0 X#<_x_start> Y0
|
|
G0 Z0
|
|
|
|
#<t> = #<theta>
|
|
; o105 while [#<t> LT #<theta>]
|
|
o200 call [SIN[#<t>]*#<_r_adj>][#<_z_ctr>-COS[#<t>]*#<_r_adj>-#5410/2]
|
|
|
|
#<t> = [#<t> + 2]
|
|
; o105 endwhile
|
|
|
|
o10 elseif [#<op> EQ 3]
|
|
F30
|
|
|
|
G0 Z#<_z_clearance>
|
|
G0 X#<_x_start> Y0
|
|
G0 Z0
|
|
|
|
G90.1; use IJK absolute
|
|
G19; use YZ plane for round moves
|
|
|
|
#<x> = #<_x_start>
|
|
#<i> = 0
|
|
o100 while [#<x> LT #<_x_end>]
|
|
#<x> = [#<x> + #<_x_step>]
|
|
#<i> = [#<i> + 1]
|
|
|
|
;G1 X#<x>
|
|
|
|
o101 if [#<i> MOD 2]
|
|
G1 X#<x> Y+#<y_top> Z0
|
|
G2 X#<x> Y-#<y_top> Z0 J0 K[#<_z_ctr>-#5410/2]
|
|
|
|
o101 else
|
|
G1 X#<x> Y-#<y_top> Z0
|
|
G3 X#<x> Y+#<y_top> Z0 J0 K[#<_z_ctr>-#5410/2]
|
|
|
|
o101 endif
|
|
|
|
o100 endwhile
|
|
|
|
o10 elseif [#<op> EQ 11]
|
|
F4
|
|
#<_z_top> = 0.0
|
|
#<_z_bot> = -0.4
|
|
;o<slot_chop> call [1.476][-.232] [1.476][+.232] [5.5/25.4] [0.0][-0.4]
|
|
o<slot> call [0] [2.264][-.232] [2.264][+.232] [7.0/25.4]
|
|
o<slot> call [0] [2.264][-.232] [2.264][+.232] [8.5/25.4]
|
|
o<slot> call [0] [2.264][-.232] [2.264][+.232] [10.0/25.4]
|
|
;o<slot_chop> call [3.051][-.232] [3.051][+.232] [5.5/25.4] [0.0][-0.4]
|
|
|
|
o10 elseif [#<op> EQ 12]
|
|
F4
|
|
#<_z_top> = 0.0
|
|
#<_z_bot> = -3.2/25.4
|
|
o<slot> call [0] [1.476][-.232] [1.476][+.232] [9.5/25.4]
|
|
o<slot> call [0] [2.264][-.232] [2.264][+.232] [14/25.4]
|
|
o<slot> call [0] [3.051][-.232] [3.051][+.232] [9.5/25.4]
|
|
|
|
o10 elseif [#<op> EQ 21]
|
|
#<_rc> = 0.3
|
|
#<_yr> = 1.005
|
|
|
|
F10
|
|
|
|
#<t> = 0
|
|
o300 while [#<t> LT 90]
|
|
|
|
#<y> = [#<_yr>-#<_rc>+[#<_rc>+#5410/2]*COS[#<t>]]
|
|
#<z> = [-#<_rc>+[#<_rc>+#5410/2]*SIN[#<t>]-#5410/2]
|
|
|
|
o200 call [#<y>][#<z>]
|
|
|
|
#<t> = [#<t> + 10]
|
|
o300 endwhile
|
|
|
|
|
|
o10 endif
|
|
|
|
|
|
|
|
G0 Z#<_z_clearance>
|
|
|
|
M05
|
|
M30 |