diff options
author | Dewey Garrett <dgarrett@panix.com> | 2014-03-17 14:24:39 -0700 |
---|---|---|
committer | Dewey Garrett <dgarrett@panix.com> | 2014-03-17 16:30:31 -0700 |
commit | f086107a3a663bcef5a0f45f90fbc9a12d3cf05b (patch) | |
tree | 9d8dc75f8e8d42c51fa947596b85cf0b86cd4edb | |
parent | 9df56f71d696757e84860668c7e7552828838e17 (diff) | |
download | linuxcnc-f086107a3a663bcef5a0f45f90fbc9a12d3cf05b.tar.gz linuxcnc-f086107a3a663bcef5a0f45f90fbc9a12d3cf05b.zip |
loadtool.ngc: provide options for g43 control
loadtool.ngc is a nc_files/ngcgui_lib/utilitysubs/ helper subroutine
for use with ngcgui_lib demonstration subroutines.
Add options for subroutine invocation:
#<use_g43>
#<h_for_g43>
#<verbose>
to allow user to control behavior.
Also, allow toolno==0
Minor: use shorthand names for some call parameters since line length
limit is exceeded with additional items used.
-rw-r--r-- | nc_files/ngcgui_lib/arc1.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/arc2.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/db25.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/helix.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/helix_rtheta.ngc | 7 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/hole_circle.ngc | 9 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/ihex.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/iquad.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/ohex.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/oquad.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/qpex.ngc | 25 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/qpex_mm.ngc | 26 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/qpocket.ngc | 6 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/slot.ngc | 5 | ||||
-rw-r--r-- | nc_files/ngcgui_lib/utilitysubs/loadtool.ngc | 50 |
15 files changed, 127 insertions, 41 deletions
diff --git a/nc_files/ngcgui_lib/arc1.ngc b/nc_files/ngcgui_lib/arc1.ngc index dfa433041..a9bcf7ef5 100644 --- a/nc_files/ngcgui_lib/arc1.ngc +++ b/nc_files/ngcgui_lib/arc1.ngc @@ -51,6 +51,9 @@ o<arc1> sub #<yoff> = #15 (=0) #<scale> = #16 (=1) #<spin_notify> = #17 (=0) +#<use_g43> = #18 (=1) +#<h_for_g43> = #19 (=0) +#<verbose> = #20 (=0) #<min_angle> = 1 ;minimum angle g40; cutter comp off to begin @@ -83,7 +86,7 @@ o<i3> if [#<angle> LT #<min_angle>] m2 o<i3> endif -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 + .001] o<iftool> if [[#<tooldiam> GT #<width>] AND [#<inside> EQ 1]] diff --git a/nc_files/ngcgui_lib/arc2.ngc b/nc_files/ngcgui_lib/arc2.ngc index eedcdcfc8..d003f11eb 100644 --- a/nc_files/ngcgui_lib/arc2.ngc +++ b/nc_files/ngcgui_lib/arc2.ngc @@ -30,6 +30,9 @@ o<arc2> sub #<yctr> = #15 (=0) #<scale> = #16 (=1) #<spin_notify> = #17 (=0) +#<use_g43> = #18 (=1) +#<h_for_g43> = #19 (=0) +#<verbose> = #20 (=0) #<min_separation> = .1 @@ -46,6 +49,6 @@ o<if0> if [#<arc_r> LT #<min_separation>] o<if0> endif -o<arc1>call[#<toolno>][#<dir>][#<inside>][#<rpm>][#<feedrate>][#<zincr>][#<cutdepth>][#<zsafe>][#<zstart>][#<width>][#<angle>][#<arc_r>][#<rotate>][#<xoff>][#<yoff>][#<scale>][#<spin_notify>] +o<arc1>call[#<toolno>][#<dir>][#<inside>][#<rpm>][#<feedrate>][#<zincr>][#<cutdepth>][#<zsafe>][#<zstart>][#<width>][#<angle>][#<arc_r>][#<rotate>][#<xoff>][#<yoff>][#<scale>][#<spin_notify>][#<use_g43>][#<h_for_g43>][#<verbose>] o<arc2> endsub diff --git a/nc_files/ngcgui_lib/db25.ngc b/nc_files/ngcgui_lib/db25.ngc index 9cb997088..b3600f244 100644 --- a/nc_files/ngcgui_lib/db25.ngc +++ b/nc_files/ngcgui_lib/db25.ngc @@ -12,9 +12,12 @@ o<db25> sub #<xoff> = #9 (=0) #<yoff> = #10 (=0) #<rotate> = #11 (=0) +#<use_g43> = #12 (=1) +#<h_for_g43>= #13 (=0) +#<verbose> = #14 (=0) ; reject tools that are too big -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = #5410 o<if0> if [#<tooldiam> Gt 0.12501] (debug, db25: tooldiam too big: #<tooldiam> - EXITING) diff --git a/nc_files/ngcgui_lib/helix.ngc b/nc_files/ngcgui_lib/helix.ngc index c52e684c6..39fd4eb5e 100644 --- a/nc_files/ngcgui_lib/helix.ngc +++ b/nc_files/ngcgui_lib/helix.ngc @@ -16,8 +16,11 @@ o<helix> sub #<d_angle> = #13 (=0 d angle) #<zstart> = #14 (=0) #<spin_notify>= #15 (=0) +#<use_g43> = #16 (=1) +#<h_for_g43> = #17 (=0) +#<verbose> = #18 (=0) -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 + .001] #<hr> = [#<hdiam>/2] diff --git a/nc_files/ngcgui_lib/helix_rtheta.ngc b/nc_files/ngcgui_lib/helix_rtheta.ngc index 9cfd7f19d..24c6d5483 100644 --- a/nc_files/ngcgui_lib/helix_rtheta.ngc +++ b/nc_files/ngcgui_lib/helix_rtheta.ngc @@ -16,11 +16,14 @@ o<helix_rtheta> sub #<theta> = #13 (theta center) #<zstart> = #14 (=0) #<spin_notify>= #15 (=0) +#<use_g43> = #16 (=1) +#<h_for_g43> = #17 (=0) +#<verbose> = #18 (=0) -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 + 0.001] #<x> = [#<r> * COS[#<theta>]] #<y> = [#<r> * SIN[#<theta>]] -o<helix>call [#<toolno>][#<rpm>][#<feedrate>][#<dir>][#<inside>][#<cutdepth>][#<zincr>][#<zsafe>][#<x>][#<y>][#<hdiam>][#<faceangle>][#<d_angle>][#<zstart>][#<spin_notify>] +o<helix>call [#<toolno>][#<rpm>][#<feedrate>][#<dir>][#<inside>][#<cutdepth>][#<zincr>][#<zsafe>][#<x>][#<y>][#<hdiam>][#<faceangle>][#<d_angle>][#<zstart>][#<spin_notify>][#<use_g43>][#<h_for_g43>][#<verbose>] o<helix_rtheta> endsub diff --git a/nc_files/ngcgui_lib/hole_circle.ngc b/nc_files/ngcgui_lib/hole_circle.ngc index 579ad7135..6a40a4f55 100644 --- a/nc_files/ngcgui_lib/hole_circle.ngc +++ b/nc_files/ngcgui_lib/hole_circle.ngc @@ -16,9 +16,12 @@ o<hole_circle> sub #<zstart> = #13 (=0) #<xctr> = #14 (= 0) #<yctr> = #15 (= 0) -#<spin_notify> = #16 (= 0) +#<spin_notify>= #16 (= 0) +#<use_g43> = #17 (=1) +#<h_for_g43> = #18 (=0) +#<verbose> = #19 (=0) -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 + .001] #<i> = 0 @@ -31,7 +34,7 @@ o<l20> while [#<i> LT #<n>] #<x> = [#<xctr> + #<r> * COS[#<theta>]] #<y> = [#<yctr> + #<r> * SIN[#<theta>]] - o<helix>call [#<toolno>][#<rpm>][#<feedrate>][#<dir>][#<inside>][#<cutdepth>][#<zincr>][#<zsafe>][#<x>][#<y>][#<hdiam>][#<faceangle>][#<d_angle>][#<zstart>][#<spin_notify>] + o<helix>call [#<toolno>][#<rpm>][#<feedrate>][#<dir>][#<inside>][#<cutdepth>][#<zincr>][#<zsafe>][#<x>][#<y>][#<hdiam>][#<faceangle>][#<d_angle>][#<zstart>][#<spin_notify>][#<use_g43>][#<h_for_g43>][#<verbose>] #<i> = [#<i> + 1] #<theta> = [#<theta> + #<deltheta>] #<_feature:> = #<i> (using _feature: here disables stop) diff --git a/nc_files/ngcgui_lib/ihex.ngc b/nc_files/ngcgui_lib/ihex.ngc index 3ccaffb7d..954d64c09 100644 --- a/nc_files/ngcgui_lib/ihex.ngc +++ b/nc_files/ngcgui_lib/ihex.ngc @@ -19,13 +19,16 @@ o<ihex> sub #<xoff> = #12 (=0) #<yoff> = #13 (=0) #<spin_notify> = #14 (=0) +#<use_g43> = #15 (=1) +#<h_for_g43> = #16 (=0) +#<verbose> = #17 (=0) o<i0> if [#<scale> EQ 0] #<scale> = 1.0 (debug, scale was 0, setting #<scale>) o<i0> endif -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 + .001] o<dir> if [[#<dir> NE 2] AND [#<dir> NE 3]] diff --git a/nc_files/ngcgui_lib/iquad.ngc b/nc_files/ngcgui_lib/iquad.ngc index 439364ac0..8fea55940 100644 --- a/nc_files/ngcgui_lib/iquad.ngc +++ b/nc_files/ngcgui_lib/iquad.ngc @@ -26,13 +26,16 @@ o<iquad> sub #<xoff> = #19 (=0) #<yoff> = #20 (=0) #<spin_notify> = #21 (=0) +#<use_g43> = #22 (=1) +#<h_for_g43> = #23 (=0) +#<verbose> = #24 (=0) o<i0> if [#<scale> EQ 0] #<scale> = 1.0 (debug, scale was 0, setting #<scale>) o<i0> endif -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 + .001] o<l00> if [[#<dir> NE 2] AND [#<dir> NE 3]] diff --git a/nc_files/ngcgui_lib/ohex.ngc b/nc_files/ngcgui_lib/ohex.ngc index 76c2b5bed..1dd11db27 100644 --- a/nc_files/ngcgui_lib/ohex.ngc +++ b/nc_files/ngcgui_lib/ohex.ngc @@ -18,13 +18,16 @@ o<ohex> sub #<xoff> = #12 (=0) #<yoff> = #13 (=0) #<spin_notify> = #14 (=0) +#<use_g43> = #15 (=1) +#<h_for_g43> = #16 (=0) +#<verbose> = #17 (=0) o<i0> if [#<scale> EQ 0] #<scale> = 1.0 (debug, scale was 0, setting #<scale>) o<i0> endif -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 +.001] o<dir> if [[#<dir> NE 2] AND [#<dir> NE 3]] diff --git a/nc_files/ngcgui_lib/oquad.ngc b/nc_files/ngcgui_lib/oquad.ngc index a62eab944..5db00f278 100644 --- a/nc_files/ngcgui_lib/oquad.ngc +++ b/nc_files/ngcgui_lib/oquad.ngc @@ -25,13 +25,16 @@ o<oquad> sub #<xoff> = #19 (=0) #<yoff> = #20 (=0) #<spin_notify> = #21 (=0) +#<use_g43> = #22 (=1) +#<h_for_g43> = #23 (=0) +#<verbose> = #24 (=0) o<i0> if [#<scale> EQ 0] #<scale> = 1.0 (debug, scale was 0, setting #<scale>) o<i0> endif -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 + .001] o<l00> if [[#<dir> NE 2] AND [#<dir> NE 3]] diff --git a/nc_files/ngcgui_lib/qpex.ngc b/nc_files/ngcgui_lib/qpex.ngc index 2839ed3e8..12a9978f0 100644 --- a/nc_files/ngcgui_lib/qpex.ngc +++ b/nc_files/ngcgui_lib/qpex.ngc @@ -13,8 +13,17 @@ o<qpex> sub #<stepover> = #9 (=0.9) #<g64tol> = #10 (=0.002) #<spin_notify> = #11 (=0) + #<use_g43> = #12 (=1) + #<h_for_g43> = #13 (=0) + #<verbose> = #14 (=0) - #<verbose> = 0 +;shorthand required for call linelength: +#<fr> = #<feedrate> +#<cut>= #<cutdepth> +#<so> = #<stepover> +#<vb> = #<verbose> + +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<vb>] #<x1> = -0.5 #<y1> = -0.5 @@ -30,7 +39,7 @@ o<qpex> sub #<scale> = 1 M110 ; clear axis notifications (debug, square at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<use_g43>][#<h_for_g43>][#<vb>] #<x1> = -0.5 #<y1> = -1.0 @@ -46,7 +55,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, rectangle at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>] #<x1> = -1.0 #<y1> = -0.5 @@ -62,7 +71,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, parallelogram at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>] #<x3> = -1 #<y3> = -1 @@ -77,7 +86,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<rotate> = 0 #<scale> = 1 (debug, kite at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>] #<x1> = 1 #<y1> = -1 @@ -93,7 +102,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, triangle at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>] #<x3> = -1 #<y3> = -1 @@ -109,7 +118,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, kite at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>] #<x3> = -1 #<y3> = -1 @@ -125,6 +134,6 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, dart at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>] o<qpex> endsub diff --git a/nc_files/ngcgui_lib/qpex_mm.ngc b/nc_files/ngcgui_lib/qpex_mm.ngc index f1a809c78..b9adf2746 100644 --- a/nc_files/ngcgui_lib/qpex_mm.ngc +++ b/nc_files/ngcgui_lib/qpex_mm.ngc @@ -1,7 +1,7 @@ (info: qpex_mm: qpocket mm examples, use a 5mm tool) ; for testing qpocket with mm system ; adapted from qpex.ngc and scaled for mm -; too small tools and/or small stepovers may exceed outlinepasslimit +; too small tools and/or small sos may exceed outlinepasslimit o<qpex_mm> sub @@ -16,11 +16,19 @@ o<qpex_mm> sub #<stepover> = #9 (=0.9) #<g64tol> = #10 (=0.002) #<spin_notify> = #11 (=0) + #<use_g43> = #12 (=1) + #<h_for_g43>= #13 (=0) + #<verbose> = #14 (=0) - #<verbose> = 0 +;shorthand required for call linelength: +#<fr> = #<feedrate> +#<cut>= #<cutdepth> +#<so> = #<stepover> +#<vb> = #<verbose> -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<vb>] #<tooldiam> = #5410 +(debug, duh #<tooldiam>) o<chk1> if [#<tooldiam> GT 10] (print, qpex_mm: tooldiam is too big #<tooldiam> - EXITING) (debug, qpex_mm: tooldiam is too big #<tooldiam> - EXITING) @@ -48,7 +56,7 @@ o<chk2> endif #<scale> = 1 M110 ; clear axis notifications (debug, square at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<use_g43>][#<h_for_g43>][#<vb>] #<x1> = [-0.5 * 25.4] #<y1> = [-1.0 * 25.4] #<x2> = [+0.5 * 25.4] @@ -63,7 +71,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, rectangle at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>] #<x1> = [-1.0 * 25.4] #<y1> = [-0.5 * 25.4] #<x2> = [+0.5 * 25.4] @@ -78,7 +86,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, parallelogram at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>] #<x1> = [1 * 25.4] #<y1> = [-1 * 25.4] #<x2> = [0 * 25.4] @@ -93,7 +101,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, triangle at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>] #<x1> = [1 * 25.4] #<y1> = [-1 * 25.4] #<x2> = [0 * 25.4] @@ -108,7 +116,7 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, kite at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>] #<x1> = [1 * 25.4] #<y1> = [-1 * 25.4] #<x2> = [0 * 25.4] @@ -123,6 +131,6 @@ o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#< #<scale> = 1 M110 ; clear axis notifications (debug, dart at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>) -o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<stepover>][#<g64tol>][#<spin_notify>][#<verbose>] +o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>] o<qpex_mm> endsub diff --git a/nc_files/ngcgui_lib/qpocket.ngc b/nc_files/ngcgui_lib/qpocket.ngc index 3cb53aa26..29978df39 100644 --- a/nc_files/ngcgui_lib/qpocket.ngc +++ b/nc_files/ngcgui_lib/qpocket.ngc @@ -82,7 +82,9 @@ o<qpocket> sub #<stepover> = #21 (=0.5) ; tooldiameter fraction #<g64tol> = #22 (=0.002) #<spin_notify> = #23 (=1) ; 1 == prompt user - #<verbose> = #24 (=0) + #<use_g43> = #24 (=1) + #<h_for_g43> = #25 (=0) + #<verbose> = #26 (=0) #<depthpasslimit> = 100 ; outer loop #<outlinepasslimit> = 100 ; inner loop @@ -194,7 +196,7 @@ o<if50> else o<if50> endif ; load tool and establish scaling for first outline pass -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<thetooldiam> = #5410 #<tooldiam> = [#5410 + #<tdelta>] #<r> = [#<tooldiam> / 2] diff --git a/nc_files/ngcgui_lib/slot.ngc b/nc_files/ngcgui_lib/slot.ngc index 05f8c1647..9b0611b5d 100644 --- a/nc_files/ngcgui_lib/slot.ngc +++ b/nc_files/ngcgui_lib/slot.ngc @@ -21,6 +21,9 @@ o<slot> sub #<xoff> = #15 (=0) #<yoff> = #16 (=0) #<spin_notify> = #17 (=0) +#<use_g43> = #18 (=1) +#<h_for_g43> = #19 (=0) +#<verbose> = #20 (=0) o<i0> if [#<scale> EQ 0] #<scale> = 1.0 @@ -29,7 +32,7 @@ o<i0> endif #<width> = [#<width> * #<scale>] -o<loadtool> call [#<toolno>] +o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] #<tooldiam> = [#5410 + .001] o<move> call [#<x1>][#<y1>][#<rotate>][#<scale>][#<xoff>][#<yoff>] diff --git a/nc_files/ngcgui_lib/utilitysubs/loadtool.ngc b/nc_files/ngcgui_lib/utilitysubs/loadtool.ngc index c3995736c..445339ba9 100644 --- a/nc_files/ngcgui_lib/utilitysubs/loadtool.ngc +++ b/nc_files/ngcgui_lib/utilitysubs/loadtool.ngc @@ -1,17 +1,51 @@ -; loadtool: issue Tn M6 G43 if and only if necessary -; this precludes unneeded moves to tool change position +; loadtool: with options for G43 and H o<loadtool> sub (not_a_subfile) -#<toolno> = #1 + #<toolno> = #1 + #<use_g43> = #2 +#<h_for_g43> = #3 + #<verbose> = #4 o<l0> if [#<toolno> EQ 0] - (print, loadtool: EXIT: toolno required not 0) - (debug, loadtool: EXIT: toolno required not 0) - (AXIS,notify, loadtool: EXIT: toolno required not 0) - m2 (quit) + ;Uncomment next 4 lines to require a nonzero toolno + ;(print, loadtool: EXIT: toolno required not 0) + ;(debug, loadtool: EXIT: toolno required not 0) + ;(AXIS,notify, loadtool: EXIT: toolno required not 0) + ;m2 (quit) + (print, loadtool: Warning: toolno is 0) + (debug, loadtool: Warning: toolno is 0) o<l0> endif - T#<toolno> M6 G43 +o<l1> if [#<use_g43> NE 0] +o<l11> if [#<h_for_g43> EQ 0] +o<l12> if [#<verbose> NE 0] + (debug, loadtool:G43 noH) +o<l12> endif + T#<toolno> M6 G43 +o<l11> else +o<l13> if [#<verbose> NE 0] + (debug, loadtool:G43 H#<h_for_g43>) +o<l13> endif + T#<toolno> M6 G43 H#<h_for_g43> +o<l11> endif +o<l1> else +o<l14> if [#<verbose> NE 0] + (debug, loadtool:no G43) +o<l14> endif + T#<toolno> M6 +o<l1> endif o<loadtool> endsub +;G43 without an H word uses the currently loaded tool from the last Tn M6. +;G43 Hn uses the offset for tool n. +;Note +; G43 H0 is a little special. Its behavior is different on random tool +; changer machines and nonrandom tool changer machines +; +; On nonrandom tool changer machines, G43 H0 applies the TLO of the +; tool currently in the spindle, or a TLO of 0 if no tool is in the spindle. +; +; On random tool changer machines, G43 H0 applies the TLO of the tool T0 +; defined in the tool table file (or causes an error if T0 is not defined +; in the tool table). |