Skip to content

Commit 3193d36

Browse files
committed
Subroutines: improve abort messages, especially 'tool not in carousel'
1 parent ecd6d4f commit 3193d36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+234
-110
lines changed

configs/atc_sim/macros_sim_inch/clamptool.ngc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ M65 P2 ; clamp the tool
44

55
M66 P5 L3 Q2 ; check the clamped tool sensor
66
o100 if [#5399 LT 0]
7-
(abort, failed to release tool) ; abort if the sensor does not activate in 2 seconds
7+
(abort, Failed to release tool) ; abort if the sensor does not activate in 2 seconds
88
o100 endif
99

1010
o<clamptool> endsub [1]

configs/atc_sim/macros_sim_inch/extendatc.ngc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ M64 P0 ; Move Carousel OUT
2020
M66 P1 L3 Q5 ; check for carousel out position sensor
2121
o100 if [#5399 LT 0]
2222
M65 P0 ; switch off atc out solenoid
23-
(abort, atc not in position)
23+
(abort, ATC not in position)
2424
o100 endif
2525

2626
o<extendatc> endsub [1]

configs/atc_sim/macros_sim_inch/m10.ngc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ o<m10> sub
44
; Parameter #3989 is used to track if the carousel is homed (M13) (volatile)
55
; Parameter #3990 is used to track the current tool pocket (persistently)
66
; #<number_of_pockets>: The number of pockets in the ATC is automaticity pulled from the INI via #<_ini[atc]pockets>
7-
(PRINT, o<M10> P#<p>)
7+
(PRINT, o<m10> P#<p>)
88

99
o100 if [#3989 NE 1]
1010
M13
@@ -17,7 +17,7 @@ o101 if [EXISTS[#<_ini[atc]pockets>]]
1717
o101 endif
1818

1919
#<steps> = [#3990 - #<p>]
20-
(PRINT, o<M10> P#<p>, steps=#<steps>)
20+
(PRINT, o<m10> P#<p>, steps=#<steps>)
2121
o110 if [#<steps> GT [#<number_of_pockets> / 2]]
2222
#<steps>=[#<steps> - #<number_of_pockets>]
2323
o110 endif
@@ -31,6 +31,7 @@ o130 elseif [#<steps> LT 0]
3131
M11 P[#<steps>]
3232
o130 endif
3333

34+
(PRINT, o<m10> endsub)
3435
o<m10> endsub [1]
3536

3637
M2

configs/atc_sim/macros_sim_inch/m11.ngc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ o<m11> sub
55
; Parameter #3989 is used to track if the carousel is homed (M13) (volatile)
66
; Parameter #3990 is used to track the current tool pocket (persistently)
77
; #<number_of_pockets>: The number of pockets in the ATC is automaticity pulled from the INI via #<_ini[atc]pockets>
8-
(PRINT, o<M11> P#<p>)
8+
(PRINT, o<m11> P#<p>)
99

1010
o100 if [#3989 NE 1]
1111
(PRINT, atc not homed, homing)
@@ -34,7 +34,7 @@ o120 do
3434
M66 P4 L1 Q3 ; wait for rising edge on rotation index
3535
o130 if [#5399 LT 0]
3636
M65 P4 ; Stop atc motor
37-
(abort, failed to get rotation index)
37+
(abort, Failed to get rotation index)
3838
o130 endif
3939
#3990 = [[[#3990+2] MOD #<number_of_pockets>]-1] ; Pocket is no.1-#<number_of_pockets>
4040
#<steps_to_move> = [#<steps_to_move>-1]
@@ -44,6 +44,7 @@ M65 P4 ; Stop motor
4444

4545
#<_my_current_pocket> = #3990
4646

47+
(PRINT, o<m11> endsub)
4748
o<m11> endsub [1]
4849

4950
M2

configs/atc_sim/macros_sim_inch/m12.ngc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ o<m12> sub
55
; Parameter #3989 is used to track if the carousel is homed (M13) (volatile)
66
; Parameter #3990 is used to track the current tool pocket (persistently)
77
; #<number_of_pockets>: The number of pockets in the ATC is automaticity pulled from the INI via #<_ini[atc]pockets>
8-
(PRINT, o<M12> P#<p>)
8+
(PRINT, o<m12> P#<p>)
99

1010
o100 if [#3989 NE 1]
1111
(PRINT, atc not homed, homing)
@@ -34,7 +34,7 @@ o120 do
3434
M66 P4 L1 Q3 ; wait for rising edge on rotation index
3535
o130 if [#5399 LT 0]
3636
M65 P3 ; Stop atc motor
37-
(abort, failed to get rotation index)
37+
(abort, Failed to get rotation index)
3838
o130 endif
3939
#3990 = [[[#3990-2] MOD #<number_of_pockets>]+1] ; Pocket is no.1-#<number_of_pockets>
4040
#<steps_to_move> = [#<steps_to_move>-1]
@@ -44,6 +44,7 @@ M65 P3 ; Stop motor
4444

4545
#<_my_current_pocket> = #3990
4646

47+
(PRINT, o<m12> endsub)
4748
o<m12> endsub [1]
4849

4950
M2

configs/atc_sim/macros_sim_inch/m13.ngc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ o<m13> sub
44
; Parameter #3989 is used to track if the carousel is homed (M13) (volatile)
55
; Parameter #3990 is used to track the current tool pocket (persistently)
66
; #<number_of_pockets>: The number of pockets in the ATC is automaticity pulled from the INI via #<_ini[atc]pockets>
7-
(PRINT, o<M13>)
7+
(PRINT, o<m13>)
88

99
(DEBUG, EVAL[vcp.getWidget{"dynatc"}.atc_message{"REFERENCING"}])
1010

1111
M64 P3 ; Move Motor FWD
1212
M66 P3 L1 Q20 ; wait for rising edge on home index
1313
o100 if [#5399 LT 0]
1414
M65 P3 ; stop motor
15-
(abort, failed to home carousel)
15+
(abort, Failed to home carousel)
1616
o100 endif
1717

1818
#3990 = 1
@@ -36,6 +36,7 @@ o120 endwhile
3636

3737
M61 Q#3991 G43 H#3991 #5210 = 0
3838

39+
(PRINT, o<m13> endsub)
3940
o<m13> endsub [1]
4041

4142
M2

configs/atc_sim/macros_sim_inch/m21.ngc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ o<m21> sub
55
; Parameter #3991 is used to track the current tool loaded it in the spindle (persistently)
66
; #<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)
77
; #<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)
8-
(PRINT, o<M21>)
8+
(PRINT, o<m21>)
99

1010
#<atc_z_tool_change_height> = -3.9000
1111
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
@@ -29,7 +29,7 @@ M64 P0 ; Move Carousel out
2929
M66 P1 L3 Q5 ; check for carousel out sensor
3030
o100 if [#5399 LT 0]
3131
M65 P0 ; switch off atc out solenoid
32-
(abort, atc not in position)
32+
(abort, ATC not in position)
3333
o100 endif
3434

3535
M24 ; activate drawbar, release the tool
@@ -39,6 +39,7 @@ G0 G53 Z#<atc_z_tool_clearance_height> ; move z to clear height
3939

4040
#3991 = 0; save fact there is now no tool in the spindle
4141

42+
(PRINT, o<m21> endsub)
4243
o<m21> endsub [1]
4344

4445
M2

configs/atc_sim/macros_sim_inch/m22.ngc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ o<m22> sub
44
; after loading any tool in the current pocket to the spindle
55
; #<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)
66
; #<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)
7-
(PRINT, o<M22>)
7+
(PRINT, o<m22>)
88

99
#<atc_z_tool_change_height> = -3.9000
1010
o101 if [EXISTS[#<_ini[atc]z_tool_change_height>]]
@@ -24,18 +24,19 @@ M65 P2 ; release the drawbar to clamp the tool
2424
M5
2525
M66 P5 L3 Q1 ; check the tool clamped sensor
2626
o100 if [#5399 LT 0]
27-
(abort, failed to reclamp tool)
27+
(abort, Failed to reclamp tool)
2828
o100 endif
2929

3030
M65 P0 ; Move Carousel home
3131
M66 P0 L3 Q4 ; check carousel in position sensor
3232
o110 if [#5399 LT 0]
3333
M65 P1 ; turn off the solenoid to send atc home
34-
(abort, failed to send carousel home) ; abort if the sensor does not activate in 5 seconds
34+
(abort, Failed to send carousel home) ; abort if the sensor does not activate in 5 seconds
3535
o110 endif
3636

3737
;M65 P1
3838

39+
(PRINT, o<m22> endsub)
3940
o<m22> endsub [1]
4041

4142
M2

configs/atc_sim/macros_sim_inch/m24.ngc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ o100 if [#5399 LT 0]
88
(abort, failed to release tool) ; abort if the sensor does not activate in 3 seconds
99
o100 endif
1010

11+
(PRINT, o<m24> endsub)
1112
o<m24> endsub [1]
1213

1314
M2

configs/atc_sim/macros_sim_inch/m25.ngc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ M64 P0 ; Move Carousel out
66
M66 P1 L3 Q5 ; check for carousel out sensor
77
o100 if [#5399 LT 0]
88
M65 P0 ; switch off atc out solenoid
9-
(abort, atc not in position)
9+
(abort, ATC not in position)
1010
o100 endif
1111

12+
(PRINT, o<m25> endsub)
1213
o<m25> endsub [1]
1314

1415
M2

0 commit comments

Comments
 (0)