forked from diabase/H-Series-Configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtprime2.g
17 lines (14 loc) · 905 Bytes
/
tprime2.g
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; tprime2.g
; Called to prime and clean tool 2
if state.currentTool != 2
if state.currentTool == -1
G60 S0 ; Save current position in the slot reserved for user-stored positions
G92 U{-tools[2].offsets[3]}
else
G92 U{tools[{state.currentTool}].offsets[3]-tools[2].offsets[3]} ; We don't want to move the turret before the first priming rotation, so we falsely set the current turret position to the expected position for Tool 2 which causes tpre-universal.g to skip the Z-hop and turret rotation.
T2 ; Select Tool
if state.previousTool == -1
G92 U{state.restorePoints[0].coords[3]} ; Return the logical U-axis position to the actual position stored above.
else
G92 U{-(tools[{state.previousTool}].offsets[3]-tools[2].offsets[3])} ; Return the logical U-axis position to the actual position
M98 P"tprime-universal.g" ; Call tprime-universal.g