Skip to content

Commit

Permalink
4.5.23
Browse files Browse the repository at this point in the history
  • Loading branch information
DrumClock committed May 4, 2023
1 parent 538e550 commit 9346119
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
12 changes: 7 additions & 5 deletions 4EX2/SYNC_SWITCHING_TOOL.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ gcode:
{% set target_tool = params.T|default(0)|int %} ; 0

{% if target_tool in [0,1] %}
{% set act_extruder = printer.toolhead.extruder %}
{% set act_extruder = printer.toolhead.extruder %}
{% set systems = 'TOOL' if 'gcode_macro SWITCHING_EXTRUDER' in printer or 'gcode_macro SWITCHING_HOTEND' in printer
else 'EXTRUDER' %}

### define sync tool carriage 0/1
{% set axis = printer.configfile.settings.dual_carriage.axis %} ;x
Expand All @@ -89,7 +91,7 @@ gcode:
#-------------------- SYNC MULTI HOTEND---------------------------------------------

### filament insertion check for SYNC-MULTI hotend during printing
{% if 'gcode_macro MULTI_HOTEND' in printer and 'gcode_macro SYNC_MULTI_HOTEND' in printer %} #and printer['virtual_sdcard'].is_active == true %}
{% if 'gcode_macro MULTI_HOTEND' in printer and 'gcode_macro SYNC_MULTI_HOTEND' in printer and printer['virtual_sdcard'].is_active == true %}
SYNC_MULTI_HOTEND EXTRUDERS={tool_0 + "," + tool_1}
{% endif %}

Expand All @@ -100,20 +102,20 @@ gcode:
SET_GCODE_OFFSET {axis}={user_vars.hotend_offset.3[axis] if t_code == 'T0' else user_vars.hotend_offset.2[axis]} # 'extruder3' / 'extruder2'

### activate tool
ACTIVATE_TOOL EXTRUDER={tool_1} # params.T 0 ='extruder2' / params.T 1 ='extruder3'
ACTIVATE_{systems} EXTRUDER={tool_1} # params.T 0 ='extruder2' / params.T 1 ='extruder3'
APPLY_AXIS_OFFSETS_TOOL T={2 if t_code == 'T0' else 3 } # 'extruder2' / 'extruder3'

### sets Hotends carriage 0
SET_DUAL_CARRIAGE CARRIAGE=0
SET_GCODE_OFFSET {axis}={user_vars.hotend_offset.1[axis] if t_code == 'T0' else user_vars.hotend_offset.0[axis] } # 'extruder1' / # 'extruder'

### activate tool
ACTIVATE_TOOL EXTRUDER={tool_0} # params.T 0 ='extruder' / params.T 1 ='extruder1'
ACTIVATE_{systems} EXTRUDER={tool_0} # params.T 0 ='extruder' / params.T 1 ='extruder1'
APPLY_AXIS_OFFSETS_TOOL T={0 if t_code == 'T0' else 1} # 'extruder' / 'extruder1'

### sync extruders
SYNC_EXTRUDER_MOTION EXTRUDER={user_vars.toolhead[1][0]} MOTION_QUEUE={tool_0} # params.T 0 = 'extruder' / params.T 1 = 'extruder1'
ACTIVATE_EXTRUDER EXTRUDER={tool_0} # params.T 0 = 'extruder' / params.T 1 = 'extruder1'
ACTIVATE_{systems} EXTRUDER={tool_0} # params.T 0 = 'extruder' / params.T 1 = 'extruder1'

### re-activate mode
{% if user_vars.idex_mode.active == 2 %}
Expand Down
8 changes: 4 additions & 4 deletions IDEX/M605_IDEX_mode.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ gcode:
{% endif %}
{% endfor %}

### Reset Switching extruder
{% if printer['gcode_macro SWITCHING_EXTRUDER'] is defined %}
SWITCHING_EXTRUDER E={user_vars.toolhead[0][0]}
SWITCHING_EXTRUDER E={user_vars.toolhead[1][0]}
### Reset Switching extruder / hotend
{% if 'gcode_macro SWITCHING_EXTRUDER' in printer or 'gcode_macro SWITCHING_HOTEND' in printer %}
ACTIVATE_TOOL EXTRUDER={user_vars.toolhead[0][0]}
ACTIVATE_TOOL EXTRUDER={user_vars.toolhead[1][0]}
{% endif %}

#####################################################################
Expand Down
4 changes: 2 additions & 2 deletions MULTI/MULTI_HOTEND.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ gcode:
{% set rest = user_vars.multi_hotend[action] % max_extrude|float %}

### only when printing and heated extruder
{% if printer[act_extruder].can_extrude | lower == 'true' %}
# and printer['virtual_sdcard'].is_active == true %}
{% if printer[act_extruder].can_extrude | lower == 'true'
and printer['virtual_sdcard'].is_active == true %}

SAVE_GCODE_STATE NAME=MULTI_HOTEND
### load/unload activation for "max_extrude_only_distance"
Expand Down
2 changes: 1 addition & 1 deletion save_variables_4ex2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ filament_sensor = {'defined': True, 'count': 4, 'switch': ['extruder', 'extruder
heater = {1: 'heater_1'}
hotend_offset = {0: {'y': 0.0, 'x': 0.0, 'z': 0.0}, 1: {'y': 0.0, 'x': -10.0, 'z': 0.0}, 2: {'y': 0.0, 'x': 0.0, 'z': 0.0}, 3: {'y': 0.0, 'x': -10.0, 'z': 0.0}, 'change_T0': False}
idex_mode = {'active': 1, 'movespeed': 500, 'feedrate': 30000, 'carriage_offset': 0, 'position': {'dupl_max': 120, 'dupl_min': 52, 'mirrored': 240}}
multi_hotend = {1: 'extruder2', 0: 'extruder', 'unload': 40, 'load': 60, 'speed': 25, 'parking': [-32, 278], 'feedrate': 30000, 'gcode_position': {'axis': 'x', 'pos_carr_0': 50.0, 'pos_carr_1': 170.0}}
multi_hotend = {1: 'extruder3', 0: 'extruder1', 'unload': 40, 'load': 60, 'speed': 25, 'parking': [-32, 278], 'feedrate': 30000, 'gcode_position': {'axis': 'x', 'pos_carr_0': 0.0, 'pos_carr_1': 120.0}}
neopixel = {'index': {0: 'axis_X'}, 'RGB': {0: '0,0,0'}, 'enable': True, 'menu': {'active': 0}}
offset_temp = {'extruder3': 0, 'extruder1': 0, 'extruder2': 0, 'extruder': 0}
print_mode = {'active': 1, 'enable': False}
Expand Down

0 comments on commit 9346119

Please sign in to comment.