Skip to content

Commit

Permalink
fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
frylock34 committed Sep 11, 2023
1 parent 07cbf88 commit 56bdf87
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 43 deletions.
4 changes: 2 additions & 2 deletions stereotech_config/HTE750-0-0-23.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ path: /home/ste/uploads
[include config/v7/main_extruder.cfg]
[include config/v7/second_extruder.cfg]
[include config/v7/fiber_extruder.cfg]
# [include config/v7/filament_control_2.cfg]
# [include config/v7/filament_control_second_2.cfg]
[include config/v7/filament_control.cfg]
[include config/v7/filament_control_second.cfg]
[include config/v7/module_3d.cfg]
[include config/v7/module_5d.cfg]
# [include config/v7/homing.cfg]
Expand Down
9 changes: 7 additions & 2 deletions stereotech_config/v7/board_stm32f4.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ aliases:
air_heat_extruder1_pin=PB10, air_heat_extruder1_pin1=PB11, air_heat_extruder1_sensor_pin=PF5,
chamber_sensor_pin=PF3, chamber_heater_pin=PD12, chamber_fan_pin=PD13,
heater_bed_sensor_pin=PF6,
module_5d_fan1_pin=PE5, module_5d_fan2_pin=PD14, module_5d_fan3_pin=PD15
module_5d_fan1_pin=PE5, module_5d_fan2_pin=PD14, module_5d_fan3_pin=PD15,
door_switch_pin=PG10, e_filament_sensor_pin=PG11, e1_filament_sensor_pin=PG15


[multi_pin air_heat_extruder_heater_pin]
pins: air_heat_extruder_pin, air_heat_extruder_pin1
Expand All @@ -24,4 +26,7 @@ pins: air_heat_extruder_pin, air_heat_extruder_pin1
pins: air_heat_extruder1_pin, air_heat_extruder1_pin1

[multi_pin module_5d_fan]
pins: module_5d_fan1_pin, module_5d_fan2_pin, module_5d_fan3_pin
pins: module_5d_fan1_pin, module_5d_fan2_pin, module_5d_fan3_pin

[multi_pin chamber_heater]
pins: chamber_heater_pin, manta_mcu:chamber_heater_pin1
5 changes: 3 additions & 2 deletions stereotech_config/v7/board_stm32g1b0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ aliases:
e_heater_pin=PE3, e_sensor_pin=PA4,
e1_heater_pin=PB5, e1_sensor_pin=PA3,
e2_heater_pin=PB6, e2_sensor_pin=PA2,
air_pump_pin=PC12, heater_bed_heater_pin=PE6, heater_bed_heater_pin1=PE0,
chamber_led_pin=PB7
air_pump_pin=PC12, heater_bed_heater_pin=PE4, heater_bed_heater_pin1=PB8,
chamber_heater_pin1=PB9,
chamber_led_pin=PB7, e_valve_pin=PE5, e1_valve_pin=PE6, cooling_valve_pin=PE0

[multi_pin heater_bed_heater]
pins: manta_mcu:heater_bed_heater_pin, manta_mcu:heater_bed_heater_pin1
7 changes: 5 additions & 2 deletions stereotech_config/v7/chamber.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[heater_generic chamber_heater]
gcode_id: С
heater_pin: chamber_heater_pin
heater_pin: multi_pin:chamber_heater
sensor_type: ATC Semitec 104GT-2
sensor_pin: chamber_sensor_pin
control: pid
Expand All @@ -20,7 +20,6 @@ heater_temp: 40

[verify_heater chamber_heater]
check_gain_time: 1000

[output_pin chamber_led]
pin: manta_mcu:chamber_led_pin
pwm: True
Expand All @@ -38,6 +37,10 @@ gcode:
SET_GCODE_VARIABLE MACRO=TOGGLE_LIGHT VARIABLE=light VALUE=1
{% endif %}

[gcode_button door_switch]
pin: !door_switch_pin
press_gcode: QUERY_BUTTON BUTTON=door_switch
release_gcode: QUERY_BUTTON BUTTON=door_switch


# [gcode_macro STATUS_LED]
Expand Down
4 changes: 2 additions & 2 deletions stereotech_config/v7/fiber_extruder.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ min_extrude_temp: 0
fiber: true

[servo cutter_servo]
pin: manta_mcu:PB15
pin: manta_mcu:PC6
initial_angle: 180

# [gcode_macro T1]
Expand All @@ -38,7 +38,7 @@ initial_angle: 180

[gcode_macro CUT_FIBER]
gcode:
{% if printer.toolhead.extruder == 'extruder1' %}
{% if printer.toolhead.extruder == 'extruder2' %}
M400
SET_SERVO SERVO=cutter_servo ANGLE=0
G4 P1000
Expand Down
208 changes: 188 additions & 20 deletions stereotech_config/v7/filament_control.cfg
Original file line number Diff line number Diff line change
@@ -1,21 +1,189 @@
# [filament_motion_sensor extruder_sensor]
# extruder: extruder
# detection_length: 10.5
# event_delay: 60.0
# switch_pin: filament_control_1
# pause_on_runout: False
# runout_gcode:
# {% if printer.virtual_sdcard.is_active %}
# {action_respond_warning('411: The filament has run out or there is a problem with its supply at the Extruder 1.')}
# # PAUSE TURN_OFF_EXTRUDERS=0 E=0
# {% else %}
# FILAMENT_ERROR EXTRUDER=extruder
# {% endif %}
[filament_motion_sensor extruder_sensor]
extruder: extruder
detection_length: 10.5
event_delay: 15.0
switch_pin: e_filament_sensor_pin
pause_on_runout: False
runout_gcode:
{% if printer.virtual_sdcard.is_active %}
M117 trigered_filament_sensor0
{action_respond_warning('411: The filament has run out or there is a problem with its supply at the Extruder0.')}
;RECOVER_EXTRUSION SENSOR='extruder_sensor'
{% else %}
FILAMENT_ERROR EXTRUDER=extruder
{% endif %}

# [gcode_macro FILAMENT_ERROR]
# gcode:
# {% if params.EXTRUDER == 'extruder' %}
# {action_raise_error('401: Filament error on Extruder0')}
# {% else %}
# {action_raise_error('402: Filament error on Extruder1')}
# {% endif %}
[gcode_macro FILAMENT_ERROR]
gcode:
{% if params.EXTRUDER == 'extruder' %}
{action_raise_error('401: Filament error on Extruder0')}
{% else %}
{action_raise_error('402: Filament error on Extruder1')}
{% endif %}

[gcode_macro SET_FILAMENT_SENSOR]
rename_existing: SET_FILAMENT_SENSOR_OLD
gcode:
SET_FILAMENT_SENSOR_OLD SENSOR={params.SENSOR} ENABLE={params.ENABLE}
SAVE_VARIABLE VARIABLE={params.SENSOR} VALUE={params.ENABLE}

#[gcode_macro RECOVER_EXTRUSION]
#variable_enable_offset: 1
#variable_enable_prime: 1
#variable_enable_second_extruder: 0
#variable_count_trigered_sensor: 0
#gcode:
# {% set sensor = params.SENSOR %}
# {% if params.RESET %}
# RECOVER_EXTRUSION_BY_OFFSET RESET=1
# RECOVER_EXTRUSION_BY_PRIME SENSOR={sensor} RESET=1
# {% if printer["gcode_macro RECOVER_EXTRUSION"].enable_second_extruder %}
# RECOVER_EXTRUSION_BY_SECOND_EXTRUDER RESET=1
# {% endif %}
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_offset VALUE=1
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_prime VALUE=1
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_second_extruder VALUE=0
# SET_PRINT_STATS_INFO COUNT_TRIGERED_SENSOR={printer["gcode_macro RECOVER_EXTRUSION"].count_trigered_sensor}
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=count_trigered_sensor VALUE=0
# {% else %}
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=count_trigered_sensor VALUE={printer["gcode_macro RECOVER_EXTRUSION"].count_trigered_sensor + 1}
# {% if printer.print_stats.info.current_layer == 0 and printer["gcode_macro RECOVER_EXTRUSION"].enable_offset and printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made < printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].check_count %}
# {action_respond_warning('412: Recover extrusion by offset %s' % printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made)}
# RECOVER_EXTRUSION_BY_OFFSET SENSOR={sensor}
# {% else %}
# {% if printer["gcode_macro RECOVER_EXTRUSION"].enable_offset %}
# RECOVER_EXTRUSION_BY_OFFSET RESET=1
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_offset VALUE=0
# {% endif %}
# {% if not printer.pause_resume.is_paused %}
# PAUSE TURN_OFF_EXTRUDERS=0 E=0
# {% endif %}
# {% if printer["gcode_macro RECOVER_EXTRUSION"].enable_prime and (printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].checks_made < printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].check_count or printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].use_cooldown) %}
# RECOVER_EXTRUSION_BY_PRIME SENSOR={sensor}
# {% else %}
# {% if printer["gcode_macro RECOVER_EXTRUSION"].enable_prime %}
# RECOVER_EXTRUSION_BY_PRIME SENSOR={sensor} RESET=1
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_prime VALUE=0
# {% endif %}
# {% if printer["gcode_macro RECOVER_EXTRUSION"].enable_second_extruder and sensor == 'extruder_sensor' and printer["filament_motion_sensor extruder1_sensor"] and not printer["gcode_macro RECOVER_EXTRUSION_BY_SECOND_EXTRUDER"].enabled %}
# RECOVER_EXTRUSION_BY_SECOND_EXTRUDER
# {% else %}
# {% if printer["gcode_macro RECOVER_EXTRUSION"].enable_second_extruder and sensor == 'extruder_sensor' %}
# {action_respond_warning('413: Switch to second extruder and resume printing.')}
# RECOVER_EXTRUSION_BY_SECOND_EXTRUDER RESET=1
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_second_extruder VALUE=0
# {% endif %}
# #Set timeout and wait for user
# {action_respond_warning('414: All attempt to extrude failed.')}
# M117 all_attempt_extrude_failed
# UPDATE_DELAYED_GCODE ID=TURN_OFF_EXTRUDERS_DELAYED DURATION=300
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_offset VALUE=1
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_prime VALUE=1
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=enable_second_extruder VALUE=0
# {% endif %}
# {% endif %}
# {% endif %}
# {% endif %}
#
#[delayed_gcode RECOVER_EXTRUSION_DELAY]
#gcode:
# RECOVER_EXTRUSION SENSOR='extruder_sensor'
#
#[gcode_macro RECOVER_EXTRUSION_BY_OFFSET]
#variable_check_count: 3
#variable_checks_made: 0
#variable_check_value: 0.1
#gcode:
# {% set sensor = params.SENSOR %}
# {% if params.RESET %}
# {% set reset_value = printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].check_value * printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made %}
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_OFFSET VARIABLE=checks_made VALUE=0
# {% if printer.gcode_move.current_wcs == 0 %}
# SET_GCODE_OFFSET Z_ADJUST=-{reset_value} MOVE=1
# {% else %}
# G10 L2 P0 R1 Z-{reset_value}
# {% endif %}
# {% else %}
# M117 recover_extrusion_by_offset_attempt_{printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made + 1}
# {% if printer.gcode_move.current_wcs == 0 %}
# SET_GCODE_OFFSET Z_ADJUST={printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].check_value} MOVE=1
# {% else %}
# G10 L2 P0 R1 Z{printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].check_value}
# {% endif %}
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_OFFSET VARIABLE=checks_made VALUE={printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made + 1}
# UPDATE_STATE_FILAMENT_RUNOUT_POSITION SENSOR={sensor}
# {% endif %}
#
#[gcode_macro RECOVER_EXTRUSION_BY_PRIME]
#variable_check_count: 3
#variable_checks_made: 0
#variable_use_cooldown: 1
#gcode:
# {% set sensor = params.SENSOR %}
# {% set extruder = 'extruder' if sensor == 'extruder_sensor' else 'extruder1' %}
# {% if params.RESET %}
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_PRIME VARIABLE=checks_made VALUE=0
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_PRIME VARIABLE=use_cooldown VALUE=1
# {% else %}
# {% if printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].use_cooldown and printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].checks_made >= printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].check_count %}
# {% set extruder_temp = printer["gcode_macro PAUSE"].extruder_temp if extruder == 'extruder' else printer["gcode_macro PAUSE"].extruder1_temp %}
# {action_respond_warning('415: Recover extrusion after cooling and heating.')}
# M106 S255
# M109 S50
# M107
# M109 S{extruder_temp}
# M400
# G4 P3000
# LOAD_MATERIAL
# LOAD_MATERIAL
# M400
# G4 P3000
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_PRIME VARIABLE=use_cooldown VALUE=0
# CHECK_FILAMENT_MOTION_SENSOR SENSOR={sensor}
# {% else %}
# {action_respond_warning('416: Recover extrusion do extrude attempt %s' % printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].checks_made)}
# M117 try_do_extrude_{printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].checks_made + 1}
# M400
# G4 P3000
# LOAD_MATERIAL
# LOAD_MATERIAL
# M400
# G4 P3000
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_PRIME VARIABLE=checks_made VALUE={printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].checks_made + 1}
# CHECK_FILAMENT_MOTION_SENSOR SENSOR={sensor}
# {% endif %}
# {% endif %}
#
#[gcode_macro CHECK_FILAMENT_MOTION_SENSOR]
#gcode:
# {% set sensor = params.SENSOR %}
# {% set filament_detected = printer['filament_motion_sensor ' ~ sensor].filament_detected %}
# {% if filament_detected %}
# {action_respond_warning('417: Extruding attempt completed successfully, resuming printing.')}
# M117 resume_after_trigered_sensor
# RESUME
# {% else %}
# UPDATE_DELAYED_GCODE ID=RECOVER_EXTRUSION_DELAY DURATION=1
# {% endif %}
#
#[gcode_macro RECOVER_EXTRUSION_BY_SECOND_EXTRUDER]
#variable_enabled: 0
#gcode:
# {% if params.RESET and printer["gcode_macro RECOVER_EXTRUSION_BY_SECOND_EXTRUDER"].enabled %}
# SET_GCODE_OFFSET X_ADJUST=25.0 MOVE=1
# ENABLE_CONSTRAIN ENABLE=0
# SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=current_extruder VALUE=0
# SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=extruder1_temp VALUE=0
# SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=extruder_temp VALUE={printer["gcode_macro PAUSE"].extruder_temp}
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_SECOND_EXTRUDER VARIABLE=enabled VALUE=0
# {% else %}
# M117 resume_print_another_extruder
# SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_SECOND_EXTRUDER VARIABLE=enabled VALUE=1
# SET_GCODE_OFFSET X_ADJUST=-25.0 MOVE=1
# ENABLE_CONSTRAIN ENABLE=1
# SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=current_extruder VALUE=1
# SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=extruder1_temp VALUE={printer["gcode_macro PAUSE"].extruder_temp}
# SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=extruder_temp VALUE=0
# RESUME
# {% endif %}
#
27 changes: 14 additions & 13 deletions stereotech_config/v7/filament_control_second.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# [filament_motion_sensor extruder1_sensor]
# extruder: extruder1
# detection_length: 10.5
# event_delay: 60.0
# switch_pin: filament_control_2
# pause_on_runout: False
# runout_gcode:
# {% if printer.virtual_sdcard.is_active %}
# {action_respond_warning('411: The filament has run out or there is a problem with its supply at the Extruder 2.')}
# # PAUSE TURN_OFF_EXTRUDERS=0 E=0
# {% else %}
# FILAMENT_ERROR EXTRUDER=extruder1
# {% endif %}
[filament_motion_sensor extruder1_sensor]
extruder: extruder1
detection_length: 10.5
event_delay: 15.0
switch_pin: e1_filament_sensor_pin
pause_on_runout: False
runout_gcode:
{% if printer.virtual_sdcard.is_active %}
M117 trigered_filament_sensor1
{action_respond_warning('411: The filament has run out or there is a problem with its supply at the Extruder2.')}
;RECOVER_EXTRUSION SENSOR='extruder1_sensor'
{% else %}
FILAMENT_ERROR EXTRUDER=extruder1
{% endif %}
9 changes: 9 additions & 0 deletions stereotech_config/v7/printhead.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@ gcode:
G4 P500
SET_SERVO SERVO=tool_change_servo ANGLE=180
M400

[output_pin extruder_cooling_valve]
pin: manta_mcu:e_valve_pin

[output_pin extruder1_cooling_valve]
pin: manta_mcu:e1_valve_pin

[output_pin printhead_cooling_valve]
pin: manta_mcu:cooling_valve_pin

0 comments on commit 56bdf87

Please sign in to comment.