File tree Expand file tree Collapse file tree 6 files changed +41
-42
lines changed
config/atc_sim/macros_sim_metric Expand file tree Collapse file tree 6 files changed +41
-42
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,12 @@ o1001 if [#<steps> LT -6]
1919o1001 endif
2020
2121o1003 if [#<steps> GT 0]
22+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.rotate{#<steps>, "ccw"}])
2223 M12 P[#<steps>]
2324
2425o1003 elseif [#<steps> LT 0]
2526 #<steps>=[#<steps> * -1]
27+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.rotate{#<steps>, "cw"}])
2628 M11 P[#<steps>]
2729o1003 endif
2830
Original file line number Diff line number Diff line change @@ -5,20 +5,20 @@ o<m11> sub
55; Parameter #5170 is used to track the current tool pocket (persistently)
66(print, o<M11> P#<p>)
77
8- O100 if [EXISTS[#<p>]]
9- #<Steps_to_move> = #<p>
10- O100 else
11- #<Steps_to_move>=1
12- O100 endif
13-
14- O110 if [#5171 NE 1]
8+ O100 if [#5171 NE 1]
159 (print, atc not homed, homing)
1610 M13
17- O110 endif
11+ O100 endif
1812
19- M68 E10 Q#<Steps_to_move> (tells the atc widget how many steps to move)
20- M64 P13 (sets the direction and start moving)
13+ O110 if [EXISTS[#<p>]]
14+ #<Steps_to_move> = #<p>
15+ O110 else
16+ #<Steps_to_move>=1
17+ (tells the atc widget move 1 step reverse)
18+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.rotate{1, "ccw"}])
19+ O110 endif
2120
21+ (tells the atc widget how many steps to move and start moving reverse)
2222M64 P4 ; Move atc motor REV
2323
2424O120 do
@@ -32,7 +32,7 @@ O120 do
3232O120 while [#<Steps_to_move> GT 0]
3333
3434M65 P4 ; Stop motor
35- M65 P13
35+
3636#<_my_current_pocket> = #5170
3737
3838o<m11> endsub [1]
Original file line number Diff line number Diff line change @@ -5,20 +5,21 @@ o<m12> sub
55; Parameter #5170 is used to track the current tool pocket (persistently)
66(print, o<M12> P#<p>)
77
8- O100 if [EXISTS[#<p>]]
9- #<Steps_to_move> = #<p>
10- O100 else
11- #<Steps_to_move>=1
12- O100 endif
13-
14- O110 if [#5171 NE 1]
8+ O100 if [#5171 NE 1]
159 (print, atc not homed, homing)
1610 M13
11+ O100 endif
12+
13+ O110 if [EXISTS[#<p>]]
14+ #<Steps_to_move> = #<p>
15+ O110 else
16+ #<Steps_to_move>=1
17+ (tells the atc widget move 1 step forward)
18+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.rotate{1, "cw"}])
1719O110 endif
1820
19- M68 E10 Q#<Steps_to_move> (tells the atc widget how many steps to move)
20- M64 P14 (sets the direction and start moving)
2121
22+ (tells the atc widget how many steps to move and start moving forward)
2223M64 P3 ; Move atc motor FWD
2324
2425O120 do
@@ -32,7 +33,7 @@ O120 do
3233O120 while [#<Steps_to_move> GT 0]
3334
3435M65 P3 ; Stop motor
35- M65 P14
36+
3637#<_my_current_pocket> = #5170
3738
3839o<m12> endsub [1]
Original file line number Diff line number Diff line change @@ -3,23 +3,28 @@ o<m13> sub
33; Move tool carousel CW until ATC zero
44; ; Parameter #5170 is used to track the current tool pocket (persistently)
55(print, o<M13> P#<p>)
6- M65 P10 (set atc widget unhomed)
7- M64 P11 (show atc widget referencing msg )
6+
7+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.atc_message{"REFERENCING"}] )
88
99M64 P3 ; Move Motor FWD
1010M66 P3 L1 Q20
11- O120 if [#5399 LT 0]
12- (abort, failed to home carousel)
13- M65 P3; stop motor
14- O120 endif
15- #5170 = 1
11+ O120 if [#5399 LT 0]
12+ (abort, failed to home carousel)
13+ M65 P3; stop motor
14+ O120 endif
15+ #5170 = 1
1616M65 P3 ; Stop motor
1717#5171 = 1
1818
19- M65 P11 (hide atc widget referencing msg)
20- M64 P10 (set atc widget homed)
19+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.atc_message{}])
20+
21+ #1 = 0
22+ o130 while [#1 LT 12]
23+ #1 = [#1+1]
24+ #2 = #[5189+#1]
25+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.store_tool{#1, #2}])
26+ o130 endwhile
2127
22- M14
2328m61 q#5210
2429o<m13> endsub [1]
2530
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ O180 IF [#110 GT 0] ; checks if there is a valid tool in the spindle
6565
6666 M10 P[#<open_pocket>] ; move carousel to an open pocket
6767 M21 ; puts the tool in spindle away into the open pocket
68+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.store_tool{#<open_pocket>, #110}])
6869 #30 = #<open_pocket>
6970 ##30 = #110 ; save tool number in pocket
7071 #5210= 0 ; empty tool in the spindle
@@ -84,6 +85,7 @@ O200 IF [#100 GT 0] ; selected tool is not tool0
8485 O205 endif
8586 M65 P0
8687
88+ (DEBUG, EVAL[vcp.getWidget{"dynatc"}.store_tool{#<next_pocket>, 0}])
8789 M22 ;Carousel out
8890 #25 = #<next_pocket>
8991 ##25 =0 ; empty the pocket
You can’t perform that action at this time.
0 commit comments