Skip to content

Commit

Permalink
ATC sub: use Z heights from INI settings if available
Browse files Browse the repository at this point in the history
  • Loading branch information
dpslwk committed Dec 1, 2023
1 parent efb676d commit ecd6d4f
Show file tree
Hide file tree
Showing 24 changed files with 183 additions and 46 deletions.
10 changes: 8 additions & 2 deletions configs/atc_sim/macros_sim_inch/extendatc.ngc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
o<extendatc> sub

; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_clearance_height> ; move z to clear height

Expand Down
10 changes: 8 additions & 2 deletions configs/atc_sim/macros_sim_inch/m21.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ o<m21> sub
; Move Carousel to the tool change position - OUT
; then unload any tool in the spindle into the current pocket
; Parameter #3991 is used to track the current tool loaded it in the spindle (persistently)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)
(PRINT, o<M21>)

#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

M65 P1 ; switch off carousel in solenoid
M66 P1 L3 Q1
Expand Down
10 changes: 8 additions & 2 deletions configs/atc_sim/macros_sim_inch/m22.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ o<m22> sub

; Move Carousel to the home position - IN
; after loading any tool in the current pocket to the spindle
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)
(PRINT, o<M22>)

#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

;M19 R0 Q2
M24
Expand Down
12 changes: 9 additions & 3 deletions configs/atc_sim/macros_sim_inch/move_head_above_carousel.ngc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
o<move_head_above_carousel> sub

; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.1900
#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_clearance_height> ; move z to clear height

Expand Down
12 changes: 9 additions & 3 deletions configs/atc_sim/macros_sim_inch/move_tool_to_carousel_height.ngc
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
o<move_tool_to_carousel_height> sub
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.1900
#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_change_height> ; rapid move to above the tool change height

Expand Down
10 changes: 8 additions & 2 deletions configs/atc_sim/macros_sim_metric/extendatc.ngc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
o<extendatc> sub

; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_clearance_height> ; move z to clear height

Expand Down
10 changes: 8 additions & 2 deletions configs/atc_sim/macros_sim_metric/m21.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ o<m21> sub
; Move Carousel to the tool change position - OUT
; then unload any tool in the spindle into the current pocket
; Parameter #3991 is used to track the current tool loaded it in the spindle (persistently)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)
(PRINT, o<M21>)

#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

M65 P1 ; switch off carousel in solenoid
M66 P1 L3 Q1
Expand Down
10 changes: 8 additions & 2 deletions configs/atc_sim/macros_sim_metric/m22.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ o<m22> sub

; Move Carousel to the home position - IN
; after loading any tool in the current pocket to the spindle
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)
(PRINT, o<M22>)

#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

;M19 R0 Q2
M24
Expand Down
12 changes: 9 additions & 3 deletions configs/atc_sim/macros_sim_metric/move_head_above_carousel.ngc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
o<move_head_above_carousel> sub

; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.1900
#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_clearance_height> ; move z to clear height

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
o<move_tool_to_carousel_height> sub
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.1900
#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_change_height> ; rapid move to above the tool change height

Expand Down
4 changes: 4 additions & 0 deletions configs/atc_sim/vmc_index.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ PATH_APPEND = ./python/python-stdglue/
[ATC]
# Carousel image available for 8, 10, 12, 14, 16, 18, 20, 21, 24
POCKETS = 12
# The Z height you spindle needs to be at to clamp/unclamp a tool form the ATC
Z_TOOL_CHANGE_HEIGHT = -3.9000
# The Z clearance height you spindle needs to be at to safely clear the ATC
Z_TOOL_CLEARANCE_HEIGHT = -0.1

[RS274NGC]
PROGRAM_PREFIX = ~/linuxcnc/nc_files
Expand Down
4 changes: 4 additions & 0 deletions configs/atc_sim/vmc_index_inch.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ PATH_APPEND = ./python/python-stdglue/
[ATC]
# Carousel image available for 8, 10, 12, 14, 16, 18, 20, 21, 24
POCKETS = 12
# The Z height you spindle needs to be at to clamp/unclamp a tool form the ATC
Z_TOOL_CHANGE_HEIGHT = -3.9000
# The Z clearance height you spindle needs to be at to safely clear the ATC
Z_TOOL_CLEARANCE_HEIGHT = -0.1
STEP_TIME = 500

[RS274NGC]
Expand Down
4 changes: 4 additions & 0 deletions configs/atc_sim/vmc_index_metric.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ PATH_APPEND = ./python/python-stdglue/
[ATC]
# Carousel image available for 8, 10, 12, 14, 16, 18, 20, 21, 24
POCKETS = 12
# The Z height you spindle needs to be at to clamp/unclamp a tool form the ATC
Z_TOOL_CHANGE_HEIGHT = -3.9000
# The Z clearance height you spindle needs to be at to safely clear the ATC
Z_TOOL_CLEARANCE_HEIGHT = -0.1

[RS274NGC]
RS274NGC_STARTUP_CODE = F10 S300 G21 G17 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
Expand Down
4 changes: 4 additions & 0 deletions configs/probe_basic/probe_basic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
[ATC]
# Carousel image available for 8, 10, 12, 14, 16, 18, 20, 21, 24
POCKETS = 12
# The Z height you spindle needs to be at to clamp/unclamp a tool form the ATC
Z_TOOL_CHANGE_HEIGHT = -3.1900
# The Z clearance height you spindle needs to be at to safely clear the ATC
Z_TOOL_CLEARANCE_HEIGHT = -0.1
STEP_TIME = 500

[RS274NGC]
Expand Down
10 changes: 8 additions & 2 deletions configs/probe_basic/subroutines/extendatc.ngc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
o<extendatc> sub

; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_clearance_height> ; move z to clear height

Expand Down
10 changes: 8 additions & 2 deletions configs/probe_basic/subroutines/m21.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ o<m21> sub
; Move Carousel to the tool change position - OUT
; then unload any tool in the spindle into the current pocket
; Parameter #3991 is used to track the current tool loaded it in the spindle (persistently)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)
(PRINT, o<M21>)

#<atc_z_tool_change_height> = -3.1900
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

M65 P1 ; switch off carousel in solenoid
M66 P1 L3 Q1
Expand Down
10 changes: 8 additions & 2 deletions configs/probe_basic/subroutines/m22.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ o<m22> sub

; Move Carousel to the home position - IN
; after loading any tool in the current pocket to the spindle
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)
(PRINT, o<M22>)

#<atc_z_tool_change_height> = -3.1900
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

;M19 R0 Q2
M24
Expand Down
10 changes: 8 additions & 2 deletions configs/probe_basic/subroutines/move_head_above_carousel.ngc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
o<move_head_above_carousel> sub

; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.1900
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_clearance_height> ; move z to clear height

Expand Down
10 changes: 8 additions & 2 deletions configs/probe_basic/subroutines/move_tool_to_carousel_height.ngc
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
o<move_tool_to_carousel_height> sub
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.1900
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_change_height> ; rapid move to above the tool change height

Expand Down
10 changes: 8 additions & 2 deletions configs/probe_basic_lathe/subroutines/extendatc.ngc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
o<extendatc> sub

; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (adjust to your needs)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (adjust to your needs)
; #<atc_z_tool_change_height> is the height you spindle needs to be at to clamp/unclamp a tool form the ATC (Set via INI [ATC]Z_TOOL_CHANGE_HEIGHT)
; #<atc_z_tool_clearance_height> is the clearance height you spindle needs to be at to safely clear the ATC (Set via INI [ATC]Z_TOOL_CLEARANCE_HEIGHT)

#<atc_z_tool_change_height> = -3.9000
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
#<atc_z_tool_change_height> = #<_ini[atc]z_tool_change_height>
o101 endif
#<atc_z_tool_clearance_height> = [#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
o102 if [EXISTS[#<_ini[atc]z_tool_clearance_height>]]
#<atc_z_tool_clearance_height> = #<_ini[atc]z_tool_clearance_height>
o102 endif

G0 G53 Z#<atc_z_tool_clearance_height> ; move z to clear height

Expand Down
Loading

0 comments on commit ecd6d4f

Please sign in to comment.