-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
complete_example.cfg
110 lines (85 loc) · 4.58 KB
/
complete_example.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Under development
# Example of a KTC configuration file for a 5 tool printer and 2 toolchangers.
# This assumes that the printer is configured with 2 extruders and 2 part cooling fans:
# - [extruder0] and [fan_generic partfan_t0] for the first extruder and part cooling fan
# - [extruder1] and [fan_generic partfan_t1] for the second extruder and part cooling fan
# - This asumes that the printer also has a ERCF MMU unit with 3 gates configured with HappyHare.
# Object tree inheritance:
# - KTC
# Jubilee
# Tool 0
# ERCF
# Tool 2
# Tool 3
# Tool 4
# Tool 1
[ktc_toolchanger Jubilee]
[ktc_tool 0]
tool_number: 0
heater: extruder
fans: partfan_t0
params_park:198,50, 0
[ktc_tool 1]
tool_number: 1
heater: extruder1
fans: partfan_t1
params_park:198,150, 0
[ktc_toolchanger ERCF]
parent_tool: 0
tool_deselect_gcode:
# This code will be inherited by ktc_tool 2, 3 and 4.
MMU_EJECT
[ktc_tool 2]
tool_select_gcode:
# This code will not be inherited.
MMU_CHANGE_TOOL TOOL=0 STANDALONE=1
[ktc_tool 3]
tool_select_gcode:
MMU_CHANGE_TOOL TOOL=1 STANDALONE=1
[ktc_tool 4]
tool_select_gcode:
MMU_CHANGE_TOOL TOOL=2 STANDALONE=1
[ktc]
default_toolchanger = Jubilee
# Tool change gcode that will be inherited by all tools not overriding it.
tool_select_gcode:
# myself will be replaced with the tool that is selected
# This code will be inherited by Jubillee and on untill overriden by tool 2, 3 or 4.
KTC_TOOL_SET_TEMPERATURE TOOL={myself.name} CHNG_STATE=2 # Put tool heater in Active mode so heating while moving
SAVE_GCODE_STATE NAME=TOOL_PICKUP # Save GCODE state. Will be restored at the end of pickup code
G90
############## Move in to parking spot ##############
G0 X150 F40000 # Fast move X inside the safezone, so we don't crash into other tools.
G0 Y{myself.zone[1]} F40000 # Fast move Y in front of parking spot.
G0 X{myself.params_park[0]} F3000 # Slow Move to the pickup position for tool.
############## Atach Tool ##############
# Asume attached
############## Tool Z Offset ##############
SET_GCODE_OFFSET Z={myself.offset[2]} MOVE=1 # Set and move the Z offset. Avoid crashing into bed when moving out later.
############## Wait for heater ##############
{% if myself.heater_names|length > 0 %} # If the tool has an extruder:
ACTIVATE_EXTRUDER EXTRUDER={myself.heater_names[0]} # Activate the extruder
KTC_TEMPERATURE_WAIT_WITH_TOLERANCE TOOL={myself.name} # Wait for tool to reach target temperature.
{% endif %} # /
############## Move out ##############
G0 X150 F6000 # Slow Move to the zone position for tool.
############## Finnish up ##############
M400 # Wait for current moves to finish.
RESTORE_GCODE_STATE NAME=TOOL_PICKUP MOVE=0 # Restore GCODE state. Was saved at thebegining of SUB_TOOL_PICKUP_START. Move fast to last location.
# Set the toolhead offsets. Needs to be after any RESTORE_GCODE_STATE!
SET_GCODE_OFFSET X={myself.offset[0]} Y={myself.offset[1]} Z={myself.offset[2]} MOVE=0
tool_deselect_gcode:
# myself will be replaced with the tool that is deselected
# This code will be inherited by Jubillee and on untill overriden by ERCF.
SET_GCODE_OFFSET X=0 Y=0 # Set XY offset to 0 so we park the tool right.
SAVE_GCODE_STATE NAME=TOOL_DROPOFF # Save GCode state.
G90 # Absolute positions
############## Move in to parking spot ##############
G0 X150 F40000 # Move X and
G0 Y{myself.zone[1]} F40000 # Fast move Y in front of parking spot.
G0 X{myself.park[0]} F3000 # Slow Move to the dropoff position for tool.
############## Detach Tool ##############
G0 Y{myself.zone[1]|float - 15} F40000 # Detach tool
G0 X150 F40000 # Fast Move to the general pickup position for tools.
RESTORE_GCODE_STATE NAME=TOOL_DROPOFF MOVE=0 # Restore Gcode state
SET_GCODE_OFFSET Z=0 # Set Z offset to 0 after too is parked.