提交 xyzbc-trt 界面与验证更新
This commit is contained in:
6619
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/LatheMacro.svg
vendored
Normal file
6619
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/LatheMacro.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 326 KiB |
103
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/boring.ngc
vendored
Normal file
103
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/boring.ngc
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
; MACROCOMMAND=Finish Diameter,Surface Speed,DOC,FPR,Finish Length,Radius,Angle,Tool Number, Max RPM
|
||||
; MACRODEFAULTS=1,500,.02,.007,-2,0,0,1,1500
|
||||
; MACROSVG=LatheMacro.svg,1
|
||||
|
||||
; MACROOPTIONS=load:yes,save:yes,default:default.txt,path:~/macros
|
||||
; O<boring> call [${bore.x-f}] [${bore.sf-f}] [${bore.cut-f}] [${bore.feed-f}] [${bore.z-f}] [${bore.rad-f}] [${bore.angle-f}] [${bore.tool-s}]
|
||||
|
||||
; #1 finish diameter
|
||||
; #2 surface speed
|
||||
; #3 depth of cut
|
||||
; #4 feed/rpm
|
||||
; #5 finish length
|
||||
; #6 radius
|
||||
; #7 angle
|
||||
; #8 tool number
|
||||
; #9 max RPM
|
||||
|
||||
;boring
|
||||
|
||||
O<boring> sub
|
||||
|
||||
O110 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL sizes)
|
||||
O110 ELSE
|
||||
(MSG, METRIC sizes)
|
||||
O110 ENDIF
|
||||
|
||||
|
||||
(debug, Start Diameter %.3f#<_x>)
|
||||
(debug, Finish Diameter %.3f#1)
|
||||
(debug, Z Start %.3f#<_z>)
|
||||
(debug, Z Finish %.3f#5)
|
||||
|
||||
O107 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL ON)
|
||||
#1 = [#1 * 25.4]; X
|
||||
#2 = [#2 * 3.28]; surface speed
|
||||
#3 = [#3 * 25.4]; doc
|
||||
#4 = [#4 * 25.4]; feed
|
||||
#5 = [#5 * 25.4]; length
|
||||
#6 = [#6 * 25.4]; radius
|
||||
O107 ENDIF
|
||||
|
||||
M73 ;save/restore codes
|
||||
|
||||
G8 ; Radius mode (easier maths)
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
G91.1 ; but not for arcs
|
||||
|
||||
#1 = [#1 / 2] ; because of radius mode
|
||||
|
||||
#14 = [#<_x>] (starting X)
|
||||
#13 = #<_z> (starting Z)
|
||||
|
||||
#20 = [#6 * SIN[#7]]
|
||||
#21 = [-#6 * COS[#7]]
|
||||
#22 = [#6 / COS[#7]]
|
||||
#23 = [#5 + #6 - #20]
|
||||
#24 = [[#23 - #13] * TAN[#7]]
|
||||
|
||||
(MSG, Unpause To Start Boring Macro)
|
||||
m0
|
||||
|
||||
M6 T#8 G43
|
||||
|
||||
G96 D#9 S#2 ; Constant Surface Speed Mode
|
||||
m3 ;Start Spindle
|
||||
g95 F#4 ; Feed-Per-Rev Mode
|
||||
|
||||
g4p1 ; Wait to reach speed
|
||||
|
||||
(debug, Turning finish dia #1 start dia #14 start length #13 finish length #5)
|
||||
O100 WHILE [#14 LT [#1 - #3]]
|
||||
g0 X #14
|
||||
#14=[#14 + #3]
|
||||
G1 X #14
|
||||
G1 Z #23 X[#14 + #24]
|
||||
O101 IF [#6 GT 0]
|
||||
G3 Z#5 X[#14 + #24 + #21] I#21 K#20
|
||||
G1 X[#14 + #24 + #21 - #3]
|
||||
O101 ELSE
|
||||
G1 X[#14 + #24 - [#3 * 1.5]]
|
||||
O101 ENDIF
|
||||
G0 Z[#13]
|
||||
O100 ENDWHILE
|
||||
|
||||
G0 x#1
|
||||
G1 Z #23 X[#1 + #24]
|
||||
O102 IF [#6 GT 0]
|
||||
G3 Z#5 X[#1 + #24 + #21] I#21 K#20
|
||||
G1 X[#1 + #24 + #21 - #3]
|
||||
O102 ELSE
|
||||
G1 X[#1 + #24 - #3]
|
||||
O102 ENDIF
|
||||
G0 Z #13
|
||||
G0 X #1 ; For touch-off
|
||||
M5
|
||||
G7
|
||||
O<boring> endsub
|
||||
|
||||
M2
|
||||
102
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/chamfer.ngc
vendored
Normal file
102
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/chamfer.ngc
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
; MACROCOMMAND=X,SFM,DOC,Z,Tool Number,Chamfer size,Front Outside,Front Inside,Back Outside,Max RPM
|
||||
; MACRODEFAULTS=1,300,.5,1,1,.015,true,false,false,1500
|
||||
; MACROSVG=LatheMacro.svg,4
|
||||
|
||||
; O<chamfer>call [${chamfer.x-f}] [${chamfer.sf-f}] [0.5] [${chamfer.z-f}] [${chamfer.tool-s}] [${chamfer.size-f}] [${chamfer.fo}] [${chamfer.fi}] [${chamfer.bo}]
|
||||
|
||||
; #1 chamfer x
|
||||
; #2 surface speed *
|
||||
; #3 doc
|
||||
; #4 chamfer z
|
||||
; #5 tool number
|
||||
; #6 chanfer size
|
||||
; #7 front outside switch *
|
||||
; #8 front inside switch *
|
||||
; #9 back outside switch *
|
||||
; #10 Max RPM
|
||||
|
||||
;chamfer
|
||||
|
||||
O<chamfer> sub
|
||||
|
||||
O107 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL ON)
|
||||
#1 = [#1 * 25.4]; X
|
||||
#2 = [#2 * .3048] ; sf/m to m/m
|
||||
#3 = [#3 * 25.4]; doc?
|
||||
#4 = [#4 * 25.4]; Z
|
||||
#6 = [#6 * 25.4]; chanfer size
|
||||
O107 ENDIF
|
||||
|
||||
M73 ; save/restore codes
|
||||
|
||||
G8 ; Lathe radius Mode
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
|
||||
|
||||
#1 = [#1 / 2] ; because of radius mode
|
||||
|
||||
#14 = [#<_x>] (starting X)
|
||||
#13 = [#<_z>] (starting Z)
|
||||
|
||||
(MSG, Unpause To start Chamfer Macro)
|
||||
m0
|
||||
|
||||
M6 T#5 G43
|
||||
|
||||
G96 D#10 S#2 ; Constant Surface Speed Mode
|
||||
M3
|
||||
g95 F0.1 ; Feed-Per-Rev Mode
|
||||
|
||||
#20 = 0
|
||||
O101 if [#7 GT 0.5] ; front outside
|
||||
o100 while [[#20 + #3] lt #6]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 - #20] z#13
|
||||
g1 z#4
|
||||
g1 x#1 z[#4 - #20]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o100 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 - #6]
|
||||
g1 z#4
|
||||
g1 x#1 z[#4 - #6]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 elseif [#8 GT 0.5] ; front inside
|
||||
o102 while [[#20 + #3] lt #6]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 + #20] z#13
|
||||
g1 z#4
|
||||
g1 x#1 z[#4 - #20]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o102 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 + #6]
|
||||
g1 z#4
|
||||
g1 x#1 z[#4 - #6]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 elseif [#9 GT 0.5] ; back outside
|
||||
o103 while [[#20 + #3] lt #6]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 - #20] z#13
|
||||
g1 z#4
|
||||
g1 x#1 z[#4 + #20]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o103 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 - #6]
|
||||
g1 z#4
|
||||
g1 x#1 z[#4 + #6]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 endif
|
||||
G7
|
||||
O<chamfer> endsub
|
||||
m2
|
||||
86
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/drill.ngc
vendored
Normal file
86
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/drill.ngc
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
; MACROCOMMAND= Drill Diameter,Finish Depth,SFM,FPR,Tool Number,Peck Depth,Retract Depth
|
||||
; MACRODEFAULTS=1.0,-1.0,300.0,.007,1,0.2,.1
|
||||
; MACROSVG=LatheMacro.svg,6
|
||||
; O<drill> call [${drill.diameter-f}] [${drill.zdepth-f}] [${drill.sf-f}] [${drill.feed-f}] [${drill.tool-s}] [${drill.peck-f}] [${drill.retract-f}]
|
||||
|
||||
; #1 drill diameter
|
||||
; #2 zdepth
|
||||
; #3 surface speed
|
||||
; #4 feed/rpm
|
||||
; #5 tool number
|
||||
; #6 peck amount
|
||||
; #7 peck retract amount - not used right now
|
||||
|
||||
O<drill> sub
|
||||
|
||||
O100 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL sizes)
|
||||
(MSG, )
|
||||
#<diam> = [#1 * 25.4]
|
||||
#<zDepth> = [#2 * 25.4]
|
||||
#<surfaceSpeed> = [#3 * .3048] ; sf/m to m/m
|
||||
#<fpr> = [#4 * 25.4]
|
||||
#<peck> = [#6 * 25.4]
|
||||
#<retract> = [#7 * 25.4]
|
||||
#10 = [[#3 *12] / [3.1415 * #1]] ; RPM from sfm request
|
||||
|
||||
(debug, Drill Diameter: %d#1 in)
|
||||
(debug, Peck Increment: %.3f#6 in)
|
||||
(debug, Start Z: %.3f#<_z> in)
|
||||
(debug, Finish Z: %.3f#2 in)
|
||||
(debug, Feed: %.3f#4 in/rev)
|
||||
(debug, Tool: %d#5)
|
||||
(debug, Speed: %d#3 sfm @ %d#10 rpm)
|
||||
O100 ELSE
|
||||
(MSG, METRIC sizes)
|
||||
#<diam> = #1
|
||||
#<zDepth> = #2
|
||||
#<surfaceSpeed> = #3 ;m/m
|
||||
#<fpr> = #4
|
||||
#<peck> = #6
|
||||
#<retract> = #7
|
||||
#10 = [#<surfaceSpeed> / [3.1415 * #<diam>]] ; rpm from m/m request
|
||||
|
||||
(debug, Drilling Diameter: %d#<diam> mm)
|
||||
(debug, Peck Distance: %.2f#<peck> mm)
|
||||
(debug, Start Z: %.2f#<_z> mm)
|
||||
(debug, Finish depth: %.2f#<zDepth> mm)
|
||||
(debug, Feed: %.2f#<fpr> mm/rev)
|
||||
(debug, Tool: %d#5)
|
||||
(debug, Speed %d#<surfaceSpeed> m/min @ #10 rpm)
|
||||
O100 ENDIF
|
||||
|
||||
M73 ; save state, restore on exit
|
||||
|
||||
G7 ; diameter mode
|
||||
G17 ; XY Plane
|
||||
G21 ; Metric Units don't change units!
|
||||
G90 ; Absolute Distance
|
||||
|
||||
#<zStart> = #<_z> (starting Z)
|
||||
|
||||
(MSG, Unpause To start Drilling Macro)
|
||||
m0
|
||||
|
||||
M6 T#5 G43
|
||||
|
||||
G97 S#10 ; Constant RPM mode
|
||||
M3 ;Start Spindle
|
||||
G95 F#<fpr> ; Feed-Per-Rev Mode
|
||||
|
||||
g4p1 ; Wait to reach speed
|
||||
|
||||
G0 X0 ; must drill from the centerline. Tool should be zeroed here
|
||||
G00 Z #<zStart>
|
||||
G98
|
||||
G83 Z#<zDepth> R#<zStart> Q#<peck>
|
||||
G80
|
||||
|
||||
G0 Z #<zStart>
|
||||
M5
|
||||
G7
|
||||
|
||||
(MSG,Done Drilling Macro)
|
||||
O<drill> endsub
|
||||
|
||||
M2
|
||||
74
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/facing.ngc
vendored
Normal file
74
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/facing.ngc
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
; MACROCOMMAND=Face Diameter,SFM,DOC,FPR,Z Length,Angle,Tool Number, Max RPM
|
||||
; MACRODEFAULTS=1,500,.02,.007,-2,0,1,1500
|
||||
; MACROSVG=LatheMacro.svg,2,10
|
||||
|
||||
; O<facing>call [${face.x-f}] [${face.sf-f}] [${face.cut-f}] [${face.feed-f}] [${face.z-f}] [${face.angle-s}] [${face.tool-s}]
|
||||
|
||||
; #1 face diameter
|
||||
; #2 surface speed
|
||||
; #3 DOC
|
||||
; #4 feed/rpm
|
||||
; #5 Face Z length
|
||||
; #6 face angle
|
||||
; #7 tool number
|
||||
; #8 max RPM
|
||||
;Facing
|
||||
|
||||
O<facing> sub
|
||||
|
||||
O10 IF [#6 NE 0]
|
||||
(MSG, Angled facing isn't supported yet)
|
||||
M2
|
||||
O10 ENDIF
|
||||
|
||||
O107 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL ON)
|
||||
#1 = [#1 * 25.4]
|
||||
#2 = [#2 * .3048] ; sf/m to m/m
|
||||
#3 = [#3 * 25.4]
|
||||
#4 = [#4 * 25.4]
|
||||
#5 = [#5 * 25.4]
|
||||
O107 ENDIF
|
||||
|
||||
M73
|
||||
|
||||
G7 ; Lathe Diameter Mode
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
|
||||
|
||||
#14 = [#<_x> * 2] (starting X)
|
||||
#13 = #<_z> (starting Z)
|
||||
|
||||
(debug, Facing start X #14 mm, Start Z #13 mm)
|
||||
(debug, Finish Z #5 mm)
|
||||
(MSG, Unpause To start Facing Macro)
|
||||
m0
|
||||
|
||||
M6 T#7 G43
|
||||
|
||||
G96 D#8 S#2 ; Constant Surface Speed Mode
|
||||
M3
|
||||
g95 F#4 ; Feed-Per-Rev Mode
|
||||
|
||||
g4p1 ; Wait to reach speed
|
||||
|
||||
O200 WHILE [#13 GT #5 + #3]
|
||||
|
||||
#13=[#13-#3]
|
||||
G1 Z#13
|
||||
G1 X#1
|
||||
G0 Z[#13+#3]
|
||||
G0 X#14
|
||||
G0 Z#13
|
||||
O200 ENDWHILE
|
||||
|
||||
G1 Z#5
|
||||
G1 X#1
|
||||
G0 Z[#13+#3]
|
||||
G0 X[#14+#3]
|
||||
G0 Z#5 ; For touch-off
|
||||
M5
|
||||
O<facing> endsub
|
||||
M2
|
||||
30
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/go_to_position.ngc
vendored
Normal file
30
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/go_to_position.ngc
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
; MACROCOMMAND=xinc,zinc
|
||||
; MACRODEFAULTS=0.0,0.0
|
||||
; MACROIMAGE=go_to_position.png
|
||||
; MACROOPTIONS =load:yes,save:yes
|
||||
; Testfile go to position
|
||||
; will jog the machine to a given position
|
||||
|
||||
O<go_to_position> sub
|
||||
|
||||
G17
|
||||
G20
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Z-Pos>
|
||||
|
||||
(DEBUG, %fWill now move machine to X = #1 , Z = #2)
|
||||
(MSG, Unpause To Start Go-To-Position Macro)
|
||||
m0
|
||||
|
||||
G0 X #1 Z #2
|
||||
|
||||
O<go_to_position> endsub
|
||||
|
||||
M2
|
||||
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/go_to_position.png
vendored
Normal file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/go_to_position.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1,2 @@
|
||||
go_to_position0,1.0, xinc
|
||||
go_to_position1,3.5, zinc
|
||||
85
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/probe-hole.ngc
vendored
Normal file
85
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/probe-hole.ngc
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
; MACROCOMMAND=r1 Max,Fast Feed,Slow Feed,d1 (mm)
|
||||
; MACRODEFAULTS=1,25,.1,6
|
||||
; MACROSVG=LatheMacro.svg,8,9
|
||||
; O<probe-hole> call [Max Radius] [slow_feed] [fast_feed] [diameter]
|
||||
|
||||
; #1 Max radius
|
||||
; #2 fast probe speed
|
||||
; #3 slow probe feed
|
||||
; #5 probe diameter (in mm)
|
||||
|
||||
O<probe-hole> sub
|
||||
|
||||
; Fast feed for roughing in measurements
|
||||
G20 F#2
|
||||
|
||||
#1000=#1 ;max radius
|
||||
|
||||
G91 G38.3 Z.00001
|
||||
#1001=#5061
|
||||
#1002=#5062
|
||||
|
||||
G91 G38.2 X#1000
|
||||
#1003=#5061
|
||||
G90 G0 X#1001
|
||||
G91 G38.2 X[0-#1000]
|
||||
#1004=#5061
|
||||
#1001=[[#1003+#1004]/2]
|
||||
G90 G0 X#1001
|
||||
|
||||
G91 G38.2 Y#1000
|
||||
#1005=#5062
|
||||
G90 G0 Y#1002
|
||||
G91 G38.2 Y[0-#1000]
|
||||
#1006=#5062
|
||||
#1002=[[#1005+#1006]/2]
|
||||
G90 G0 Y#1002
|
||||
|
||||
|
||||
G91 G38.2 X#1000
|
||||
#1003=#5061
|
||||
G90 G0 X#1001
|
||||
G91 G38.2 X[0-#1000]
|
||||
#1004=#5061
|
||||
#1001=[[#1003+#1004]/2]
|
||||
G90 G0 X#1001
|
||||
|
||||
G91 G38.2 Y#1000
|
||||
#1005=#5062
|
||||
G90 G0 Y#1002
|
||||
G91 G38.2 Y[0-#1000]
|
||||
#1006=#5062
|
||||
#1002=[[#1005+#1006]/2]
|
||||
G90 G0 Y#1002
|
||||
|
||||
; Slow probe for accuracy
|
||||
F#3
|
||||
|
||||
G90 G0 X[#1003-0.005]
|
||||
G91 G38.2 X0.010
|
||||
#1003=#5061
|
||||
G90 G0 X[#1004+0.005]
|
||||
G91 G38.2 X-0.010
|
||||
#1004=#5061
|
||||
#1001=[[#1003+#1004]/2]
|
||||
G90 G0 X#1001
|
||||
|
||||
G90 G0 Y[#1005-0.005]
|
||||
G91 G38.2 Y0.010
|
||||
#1005=#5062
|
||||
G90 G0 Y[#1006+0.005]
|
||||
G91 G38.2 Y-0.010
|
||||
#1006=#5062
|
||||
#1002=[[#1005+#1006]/2]
|
||||
G90 G0 Y#1002
|
||||
G91 G1 F1 X[0-#5071] Y[0-#5072]
|
||||
G90
|
||||
|
||||
#1007=[#1003-#1004+[#5/25.4]]
|
||||
#1008=[#1005-#1006+[#5/25.4]]
|
||||
#1009=[[#1007+#1008]/2]
|
||||
#1010=[atan[#1002]/[#1001]]
|
||||
#1011=[sqrt[[#1001*#1001]+[#1002*#1002]]]
|
||||
|
||||
(debug,Dia #1009 Ang #1010 Dist #1011)
|
||||
O<probe-hole> endsub
|
||||
85
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/radius.ngc
vendored
Normal file
85
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/radius.ngc
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
; MACROCOMMAND=X,SFM,DOC,Z,Tool Number,Radius,Front Outside,Front Inside,Back Outside
|
||||
; MACRODEFAULTS=1,300,.5,1,.1,.015,true,false,false
|
||||
; MACROSVG=LatheMacro.svg,3
|
||||
|
||||
; O<radius> call [${radius.x-f}] [${radius.sf-f}] [0.5] [0][${radius.z-f}] [${radius.tool-s}] [0] [${radius.rad-f}] [${radius.fo}] [${radius.fi}] [${radius.bo}]
|
||||
|
||||
O<radius> sub
|
||||
|
||||
O107 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL ON)
|
||||
#1 = [#1 * 25.4]; X
|
||||
#2 = [#2 * 3.28]; surface speed
|
||||
#3 = [#3 * 25.4]; doc
|
||||
#4 = [#4 * 25.4]; Z
|
||||
#6 = [#6 * 25.4]; radius
|
||||
O107 ENDIF
|
||||
|
||||
M73 ; save/restore codes
|
||||
|
||||
G8 ; Lathe radius Mode
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
|
||||
|
||||
M6 T#6 G43
|
||||
|
||||
#1 = [#1 / 2] ; because of radius mode
|
||||
#14 = [#<_x>] (starting X)
|
||||
#13 = [#<_z>] (starting Z)
|
||||
|
||||
G96 D1500 S#2 ; Constant Surface Speed Mode
|
||||
M3
|
||||
g95 F0.1 ; Feed-Per-Rev Mode
|
||||
|
||||
#20 = 0
|
||||
O101 if [#9 GT 0.5] ; Front outside
|
||||
o100 while [[#20 + #3] lt #8]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 - #20] z#13
|
||||
g1 z#5
|
||||
g3 x#1 z[#5 - #20] K[-#20]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o100 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 - #8]
|
||||
g1 z#5
|
||||
g3 x#1 z[#5 - #8] K[-#8]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 elseif [#10 GT 0.5] ; front inside
|
||||
o102 while [[#20 + #3] lt #8]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 + #20] z#13
|
||||
g1 z#5
|
||||
g2 x#1 z[#5 - #20] K[-#20]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o102 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 + #8]
|
||||
g1 z#5
|
||||
g2 x#1 z[#5 - #8] K[-#8]
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 elseif [#11 GT 0.5] ; back outside
|
||||
o103 while [[#20 + #3] lt #8]
|
||||
#20 = [#20 + #3]
|
||||
g0 x[#1 - #20] z#13
|
||||
g1 z#5
|
||||
g2 x#1 z[#5 + #20] K#20
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
o103 endwhile
|
||||
g0 x#14 z#13
|
||||
g0 x[#1 - #8]
|
||||
g1 z#5
|
||||
g2 x#1 z[#5 + #8] K#8
|
||||
g1 x #14
|
||||
g0 z#13
|
||||
O101 endif
|
||||
G7
|
||||
O<radius> endsub
|
||||
m2
|
||||
93
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/threading.ngc
vendored
Normal file
93
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/threading.ngc
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
; MACROCOMMAND=Thread X, SFM, Tool Number, Pitch, Z, Internal, External
|
||||
; MACRODEFAULTS=1,300,1,.015,1,False,true
|
||||
; MACROSVG=LatheMacro.svg,5
|
||||
|
||||
; O<threading>call [${thread.x-f}] [${thread.sf-f}] [${thread.tool-s}] [${thread.pitch-f}] [${thread.z-f}] [${thread.internal}] [${thread.external}]
|
||||
; #1=thread.x
|
||||
; #2=thread.sf
|
||||
; #3=thread.tool-s
|
||||
; #4=thread.pitch-f
|
||||
; #5=thread.z-f
|
||||
; #6=thread.internal
|
||||
; #7=thread.external
|
||||
|
||||
;threading
|
||||
|
||||
O<threading> sub
|
||||
|
||||
O107 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL ON)
|
||||
#1 = [#1 * 25.4] ; start X
|
||||
#2 = [#2 * .3048] ; sf/m to m/m
|
||||
#4 = [#4 * 25.4] ; pitch
|
||||
#5 = [#5 * 25.4] ; z finish
|
||||
O107 ENDIF
|
||||
|
||||
G7 ; Lathe Diameter Mode
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
|
||||
#14 = [#<_x> * 2] (starting X)
|
||||
#13 = #<_z> (starting Z)
|
||||
|
||||
O50 IF [#6 GT 0.5]
|
||||
(debug, INTERNAL Threading thread dia-#1)
|
||||
(debug, start-#13)
|
||||
(debug, finish-#5)
|
||||
(debug, Pitch-#4)
|
||||
(debug, Depth-#3)
|
||||
O50 ELSE
|
||||
#<OD> = [#1 - 0.108 * #4]
|
||||
#<ID> = [#1 - 1.0825 * #4]
|
||||
(debug, EXTERNAL Threading OD = #<OD> ID = #<ID>)
|
||||
O50 ENDIF
|
||||
|
||||
(MSG, Unpause To start Threading Macro)
|
||||
m0
|
||||
|
||||
M6 T#3 G43
|
||||
|
||||
G96 D200 S#2 ; Constant Surface Speed Mode
|
||||
M3
|
||||
g95 F0.1 ; Feed-Per-Rev Mode
|
||||
|
||||
g4p1 ; Wait to reach speed
|
||||
|
||||
;Threading
|
||||
; Internal
|
||||
O51 IF [#6 GT 0.5]
|
||||
#<OD> = [#1]
|
||||
#<ID> = [#1 - 1.3 * #4]
|
||||
;g1X [#<ID> - 1] ;thread truncation
|
||||
;g0 Z #13
|
||||
;g1 X #<ID>
|
||||
;g1 Z #5
|
||||
G0 X[#<ID> - 1]
|
||||
g0 Z #13
|
||||
#3 = [#4 * 1.3]
|
||||
|
||||
g1X [#<ID> - 1]
|
||||
g76 p#4 z#5 i1 j0.2 k#3 h3 r1.5 q29.5 e0 l0
|
||||
|
||||
; External
|
||||
O51 ELSE
|
||||
#<OD> = [#1 - 0.108 * #4]
|
||||
#<ID> = [#1 - 1.0825 * #4]
|
||||
; EXTERNAL Threading OD = #<OD> ID = #<ID>)
|
||||
#3 = [#4 * 1.0825]
|
||||
g1X [#<OD> + 1] ;final thread truncation
|
||||
g0 z#13
|
||||
g1 X #<OD>
|
||||
g1 Z #5
|
||||
G0 X[#<OD> +1]
|
||||
G0 Z #13
|
||||
g76 p#4 z#5 i-1 j0.2 k#3 h3 r1.5 q29.5 e0 l0
|
||||
|
||||
O51 ENDIF
|
||||
|
||||
G0 Z #13
|
||||
m5
|
||||
O<threading> endsub
|
||||
|
||||
M2
|
||||
109
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/turning.ngc
vendored
Normal file
109
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/lathe/turning.ngc
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
; MACROCOMMAND=Finish Diameter,SFM,DOC,FPR,Finish Length,Radius,Angle,Tool Number, Max RPM
|
||||
; MACRODEFAULTS=1.0,500.0,.02,.007,-2.0,0.0,0.0,1,1500
|
||||
; MACROSVG=LatheMacro.svg,0,11
|
||||
|
||||
; O<turning> call [${turn.x-f}] [${turn.sf-f}] [${turn.cut-f}] [${turn.feed-f}] [${turn.z-f}] [${turn.rad-f}] [${turn.angle-f}] [${turn.tool-s}]
|
||||
|
||||
; #1 finish diameter
|
||||
; #2 speed
|
||||
; #3 depth of cut
|
||||
; #4 feed/rpm
|
||||
; #5 finish length
|
||||
; #6 radius
|
||||
; #7 angle
|
||||
; #8 tool number
|
||||
; #9 max RPM
|
||||
|
||||
;Turning
|
||||
|
||||
O<turning> sub
|
||||
|
||||
O110 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL sizes)
|
||||
O110 ELSE
|
||||
(MSG, METRIC sizes)
|
||||
O110 ENDIF
|
||||
|
||||
(debug, Start Diameter %.3f#<_x>)
|
||||
(debug, Finish Diameter %.3f#1)
|
||||
(debug, Z Start %.3f#<_z>)
|
||||
(debug, Z Finish %.3f#5)
|
||||
|
||||
O107 IF [#<_imperial>]
|
||||
(MSG, IMPERIAL ON)
|
||||
#1 = [#1 * 25.4]
|
||||
#2 = [#2 * .3048] ; sf/m to m/m
|
||||
#3 = [#3 * 25.4]
|
||||
#4 = [#4 * 25.4]
|
||||
#5 = [#5 * 25.4]
|
||||
#6 = [#6 * 25.4]
|
||||
O107 ENDIF
|
||||
|
||||
M73 ;save/restore codes
|
||||
|
||||
G8 ; Radius mode (easier maths)
|
||||
G18 ; XZ Plane
|
||||
G21 ; Metric Units
|
||||
G90 ; Absolute Distance
|
||||
G91.1 ; but not for arcs
|
||||
|
||||
#<finishDiam> = #1
|
||||
#1 = [#1 / 2] ; because of radius mode
|
||||
#14 = [#<_x>] (starting X)
|
||||
#<startDiam> = [#14 *2]
|
||||
#13 = [#<_z>] (starting Z)
|
||||
|
||||
#20 = [#6 * SIN[#7]]
|
||||
#21 = [#6 * COS[#7]]
|
||||
#22 = [#6 / COS[#7]]
|
||||
#23 = [#5 + #6 - #20]
|
||||
#24 = [[#13 - #23] * TAN[#7]]
|
||||
|
||||
|
||||
(MSG, Unpause To Start Turning Macro)
|
||||
m0
|
||||
|
||||
M6 T#8 G43
|
||||
|
||||
G96 D#9 S#2 ; Constant Surface Speed Mode
|
||||
m3 ;Start Spindle
|
||||
g95 F#4 ; Feed-Per-Rev Mode
|
||||
|
||||
|
||||
g4p1 ; Wait to reach speed
|
||||
|
||||
|
||||
O100 WHILE [#14 GT [#1 + #3 / 2]]
|
||||
g0 X #14
|
||||
#14=[#14-#3 / 2]
|
||||
G1 X #14
|
||||
G1 Z #23 X[#14 + #24]
|
||||
O101 IF [#6 GT 0]
|
||||
G2 Z#5 X[#14 + #24 + #21] I#21 K#20
|
||||
G1 X[#14 + #24 + #21 + #3/2]
|
||||
O101 ELSE
|
||||
G1 X[#14 + #24 + [#3 * .6]]
|
||||
O101 ENDIF
|
||||
O104 IF [#7 LT 0]
|
||||
G0 X#14
|
||||
O104 ENDIF
|
||||
G0 Z[#13]
|
||||
O100 ENDWHILE
|
||||
|
||||
G0 x#1
|
||||
G1 Z #23 X[#1 + #24]
|
||||
O102 IF [#6 GT 0]
|
||||
G2 Z#5 X[#1 + #24 + #21] I#21 K#20
|
||||
G1 X[#1 + #24 + #21 + #3]
|
||||
O102 ELSE
|
||||
G1 X[#1 + #24 + #3]
|
||||
O102 ENDIF
|
||||
O106 IF [#7 LT 0]
|
||||
G0 X#14
|
||||
O106 ENDIF
|
||||
G0 Z #13
|
||||
G0 X #1 ; For touch-off
|
||||
M5
|
||||
G7
|
||||
O<turning> endsub
|
||||
M2
|
||||
13
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_home.ngc
vendored
Normal file
13
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_home.ngc
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
; MACROCOMMAND=
|
||||
; MACRODEFAULTS=
|
||||
; MACROIMAGE=go_to_home.svg,1,1
|
||||
|
||||
O<go_to_home> sub
|
||||
|
||||
G0 G53
|
||||
G28 Z0
|
||||
G28 X0 Y0
|
||||
|
||||
O<go_to_home> endsub
|
||||
|
||||
M2
|
||||
82
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_home.svg
vendored
Normal file
82
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_home.svg
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg3820"
|
||||
width="144"
|
||||
height="72"
|
||||
viewBox="0 0 144 72"
|
||||
sodipodi:docname="go_to_home.svg"
|
||||
inkscape:version="0.91 r13725">
|
||||
<metadata
|
||||
id="metadata3826">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3824" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="997"
|
||||
id="namedview3822"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="144.02568"
|
||||
inkscape:cy="31.732601"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1">
|
||||
<image
|
||||
style=""
|
||||
width="144"
|
||||
height="72"
|
||||
preserveAspectRatio="none"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAABICAYAAAAZK3z6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz AAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAOJSURB VHic7d29ThxXGMbx/2FmgAIhviQWm8IGVkqgSJPO2tjyWqKIVsoVOJeQC0iVIn0uIdxBPkiBFKME y5ILF64mEuwWNIAAJ6y0BXi9Z1LsbDTWzswezRQbxPOTjkDLFKd49J6vPYNh2DPgOfAFUAGmUp6R u+MGOAMOgB3gRdaDC8BvQKSmltN+BeaJmfjnAvAK+MQY061UKn+ura29qVQq59PT0++RO+v6+nry 9PR0udVqfX5+fv44iiIf+At4BPwzCNAu8GUQBO/q9foP1Wr1ZGw9lv+tw8PD1f39/W+63e4C/cw0 DFAHfjfGdLe3t79XeCTP0dHR/b29vW/jSlT3gO+Az1ZWVl7WarXX9Ic1NbXUtri42Dk+Pp7tdDoP AOMDNYCNjY23wAQiI1Sr1bdnZ2dPgJoPrAAsLy//DXjj7JjcDnFWAO75xPs8QRBYVIHEQZwVgCl/ 8KExxqAAiYM4KwD4ic89NISJm/9ykqxAE6gCiYM4K8DHFUgBElfDAYpTpSFMRkqtQFEUqQKJkzgr QCJA1toJa60CJCMlc6JVmBShVZgUp1WYlKVVmBSnCiRlZVYgBUhGyqpAWoWJq9RVmE7jxUnWafxE sjSJ5NAcSIpLnQNZa70oijQHkpGstcNzIDSEiTsNYVJc5kaihjBxlF6BNISJCx1lSFnaiZZS0ldh qAKJm9Q5kI4yxIkuFkpZGsKkFG0kSnF598I0hMlIqffC0BAm7hQgKUUbiVKKVmFSilZhUlzeYaqG MHGhSbSUoiFMisu7WGiHHxcZkroK02m8uBo+jdcr7sRV1lGGR/8fiomMojeUSXH6Ur2UpQBJKdqJ llIyNxI1iZaR8uZACpC4yFzGi7jQTrSUMrwTrRcriKusWxkeiWSJZMm7lSHiIj1AiSvPInky31Cm BImLjybRN8BUr9fTF8rESa/XG1SgGx84AR62221vdnZ2jN2S26Ldbg/2gU584CXwsNVqTa6urr4f Y7/klmg2m5Pxrwc+sAM8D8PQ39ra6i0tLek4QzJdXl6aMAwHc+edwWToF6AxMzMTNRqNDwqRpLm4 uDC7u7t+p9MxwM/AV4MAzQOvgE89z2NzczNaX1+P5ubmoiAIxtZhGb9ut8vV1ZVpNpsmDENjrQUI gUfAVfLZefqVKFJTy2k/0c8KkH508RT4GqgB94CplGfk7rihv1I/AH4E/kj+8V9yReInMiHUiAAA AABJRU5ErkJggg== "
|
||||
id="image3828"
|
||||
x="0"
|
||||
y="0" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
|
||||
x="35"
|
||||
y="31"
|
||||
id="text3855"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3853"
|
||||
x="35"
|
||||
y="31">Go To </tspan><tspan
|
||||
sodipodi:role="line"
|
||||
x="35"
|
||||
y="61"
|
||||
id="tspan3857">Home</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
27
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_position.ngc
vendored
Normal file
27
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_position.ngc
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
; MACROCOMMAND=xinc,yinc,zinc
|
||||
; MACRODEFAULTS=0,0,0
|
||||
; MACROIMAGE= go_to_position.png
|
||||
; Testfile go to position
|
||||
; will jog the machine to a given position
|
||||
|
||||
O<go_to_position> sub
|
||||
|
||||
G17
|
||||
G20
|
||||
G54
|
||||
G61
|
||||
G40
|
||||
G49
|
||||
G80
|
||||
G90
|
||||
|
||||
;#1 = <X-Pos>
|
||||
;#2 = <Y-Pos>
|
||||
;#3 = <Z-Pos>
|
||||
|
||||
(DEBUG, Will now move machine to X = #1 , Y = #2 , Z = #3)
|
||||
G0 X #1 Y #2 Z #3
|
||||
|
||||
O<go_to_position> endsub
|
||||
|
||||
M2
|
||||
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_position.png
vendored
Normal file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_position.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
18
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_zero.ngc
vendored
Normal file
18
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_zero.ngc
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
; MACROCOMMAND=
|
||||
; MACRODEFAULTS=
|
||||
; MACROIMAGE=go_to_zero.png
|
||||
; will jog the machine to zero
|
||||
|
||||
o<go_to_zero> sub
|
||||
|
||||
o<100> if [#5422 LT 0]
|
||||
G0 Z0
|
||||
G0 X0 Y0
|
||||
o<100> else if [#5422 GE 0]
|
||||
G0 X0 Y0
|
||||
G0 Z0
|
||||
o<100> endif
|
||||
|
||||
o<go_to_zero> endsub
|
||||
|
||||
M2
|
||||
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_zero.png
vendored
Normal file
BIN
web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/linuxcnc/nc_files/macros/mill/go_to_zero.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Reference in New Issue
Block a user