Skip to content

Commit

Permalink
Merge branch 'develop' into STEAPP-869
Browse files Browse the repository at this point in the history
  • Loading branch information
frylock34 authored Jan 29, 2024
2 parents eb84814 + ade0d94 commit b2a4bcd
Show file tree
Hide file tree
Showing 12 changed files with 310 additions and 80 deletions.
14 changes: 9 additions & 5 deletions HTE750-0-0-23.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,22 @@ path: /home/ste/uploads
[include stereotech_config/750/module_3d_macros.cfg]
[include stereotech_config/750/module_5d.cfg]

[include stereotech_config/750/probe_main.cfg]
[include stereotech_config/750/probe_v3.cfg]
# sections probe
[include stereotech_config/750/calibrate/probe_750.cfg]
[include stereotech_config/750/calibrate/probe_v3.cfg]
[include stereotech_config/calibrate/probe_3d.cfg]
[include stereotech_config/calibrate/probe_5d.cfg]
[include stereotech_config/calibrate/probe_5d_tool.cfg]
[include stereotech_config/calibrate/probe_5d_template.cfg]

[include stereotech_config/750/print_macros.cfg]
[include stereotech_config/common/variables.cfg]
# [include stereotech_config/750/diagnostics.cfg]

[gcode_macro CONSTANTS]
description: Holds printer constants
variable_probe_a_horizontal: 301, 328, 57
# variable_probe_a_vertical: 301, 328, 107
variable_probe_a_vertical: 301, 328, 57
variable_probe_a_horizontal: 303, 329, 57
variable_probe_a_vertical: 303, 325, 55
variable_offsets_sensor: -60, -6, 29.0
variable_extruder_load_length: 210
variable_extruder1_load_length: 1650
Expand Down
6 changes: 5 additions & 1 deletion stereotech_config/530/chamber_2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ gcode:
{% set blue_value = blue_input - white_value %}
M400
SET_LED_TEMPLATE LED=case_led TEMPLATE=led_color param_red={red_value / 255} param_green={green_value / 255} param_blue={blue_value / 255} param_white={white_value / 255}
G4 P100
;SET_LED LED=case_led RED={red_value / 255} GREEN={green_value / 255} BLUE={blue_value / 255} WHITE={white_value / 255}
{% if duration > 0 %}
UPDATE_DELAYED_GCODE ID=return_color DURATION={duration}
Expand All @@ -80,6 +81,7 @@ gcode:
gcode:
M400
SET_LED_TEMPLATE LED=case_led TEMPLATE=led_color param_red={printer["gcode_macro M150"].current_red_value} param_green={printer["gcode_macro M150"].current_green_value} param_blue={printer["gcode_macro M150"].current_blue_value} param_white={printer["gcode_macro M150"].current_white_value}
G4 P100
;SET_LED LED=case_led RED={printer["gcode_macro M150"].current_red_value} GREEN={printer["gcode_macro M150"].current_green_value} BLUE={printer["gcode_macro M150"].current_blue_value} WHITE={printer["gcode_macro M150"].current_white_value}

[gcode_macro TOGGLE_LIGHT]
Expand All @@ -100,9 +102,11 @@ gcode:

[gcode_macro STATUS_LED]
gcode:
{% set status = params.STATUS|default(printing) %}
{% set status = params.STATUS|default("printing") %}
{% if status == "started" %}
M400
SET_LED_TEMPLATE LED=case_led TEMPLATE=led_heatup
G4 P100
{% elif status == "paused" %}
M150 R255 G255 B0 D5
{% elif status == "completed" %}
Expand Down
6 changes: 4 additions & 2 deletions stereotech_config/630/chamber.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ gcode:

[gcode_macro STATUS_LED]
gcode:
{% set status = params.STATUS|default(printing) %}
{% set status = params.STATUS|default("printing") %}
M400
{% if status == "started" %}
{% set heater = params.HEATER|default(extruder) %}
{% set heater = params.HEATER|default("extruder") %}
SET_LED_EFFECT EFFECT=heatup_{heater} REPLACE=1 FADETIME=2.0
{% else %}
SET_LED_EFFECT EFFECT={status} REPLACE=1 FADETIME=2.0
{% endif %}
G4 P100

[led_effect startup]
autostart: true
Expand Down
93 changes: 93 additions & 0 deletions stereotech_config/750/calibrate/probe_750.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[probe]
pin: !manta_mcu:probe_pin
samples: 4
samples_tolerance_retries: 1
samples_result: median
lift_speed: 10.0
x_offset: 0.0
y_offset: 0.0
z_offset: 0.0

[bed_mesh]
speed: 120
horizontal_move_z: 180
mesh_min: 120, 10
mesh_max: 480, 530
probe_count: 6, 6
fade_start: 1
fade_end: 10
fade_target: 0
algorithm: bicubic
mesh_pps: 1, 1

[bed_mesh module_3d]
version = 1
points =
0.0, 0.0, 0.0, 0.0, 0.0, 0.0
0.0, 0.0, 0.0, 0.0, 0.0, 0.0
0.0, 0.0, 0.0, 0.0, 0.0, 0.0
0.0, 0.0, 0.0, 0.0, 0.0, 0.0
0.0, 0.0, 0.0, 0.0, 0.0, 0.0
0.0, 0.0, 0.0, 0.0, 0.0, 0.0
x_count = 6
y_count = 6
mesh_x_pps = 1
mesh_y_pps = 1
algo = bicubic
tension = 0.2
min_x = 120.0
max_x = 480.0
min_y = 10.0
max_y = 530.0

[skew_correction]

[b_axis_compensation]

[c_axis_align]

[auto_wcs]

[skew_correction module_3d]
xy_skew = 0.0
xz_skew = 0.0
yz_skew = 0.0

[skew_correction module_5d]
xy_skew = 0.0
xz_skew = 0.0
yz_skew = 0.0

[gcode_macro TEST_PROBE]
gcode:
QUERY_PROBE
UPDATE_DELAYED_GCODE ID=test_probe_loop DURATION=1.0

[gcode_macro CANCEL_TEST_PROBE]
gcode:
UPDATE_DELAYED_GCODE ID=test_probe_loop DURATION=0.0
{action_respond_info('Abort check loop')}

[delayed_gcode test_probe_loop]
gcode:
{% if printer["probe"].last_query %}
UPDATE_DELAYED_GCODE ID=test_probe_loop DURATION=0.0
{action_respond_info('Probe pressed, abort check loop')}
{% else %}
{action_respond_info('Probe not pressed')}
QUERY_PROBE
UPDATE_DELAYED_GCODE ID=test_probe_loop DURATION=1.0
{% endif %}

[gcode_macro AUTO_WCS]
gcode:
AUTO_WCS_OFFSET_V2

[gcode_macro AUTO_BASEMENT_WCS]
gcode:
AUTO_BASEMENT_WCS_V2 {rawparams}
MOVE_SERVICE_POSITION_HEAD PARKING=0

[gcode_macro ADJUST_BASEMENT_WCS]
gcode:
; pass
151 changes: 151 additions & 0 deletions stereotech_config/750/calibrate/probe_v3.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
[gcode_macro AUTO_WCS_OFFSET_V2]
description: macro do move for measuring and calculated WCS. Sensor DAC_v_2
gcode:
{% if printer["gcode_button five_axis_module"].state == "PRESSED" %}
; get wcs3_z
PROBE_TEMPLATE_POINT POINT=A_Z
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0
; get wcs3_y
PROBE_TEMPLATE_POINT POINT=B_MY_A0_C30
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=7
PROBE_TEMPLATE_POINT POINT=B_Y_A0_C30
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1
; get wcs3_x
PROBE_TEMPLATE_POINT POINT=C_X
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=2
PROBE_TEMPLATE_POINT POINT=D_MX
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=3
# get wcs4_z
PROBE_TEMPLATE_POINT POINT=A_Z_A90
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=4
# get wcs4_y
PROBE_TEMPLATE_POINT POINT=B_Y_A90_C60
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=5
PROBE_TEMPLATE_POINT POINT=B_MY_A90_C60
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=6
# get wcs4_x
PROBE_TEMPLATE_POINT POINT=B_MX_A90_C60
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=8
PROBE_TEMPLATE_POINT POINT=B_X_A90_C60
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=9
; calculating start wcs coordinates
{% set template_thickness = printer.save_variables.variables.template_thickness|default(10.0)|float %}
{% set auto_wcs_adj = printer.save_variables.variables.auto_wcs_adj|default(0.0)|float %}
CALC_WCS_PARAMS THICKNESS={ template_thickness } ADJUSTMENT={ auto_wcs_adj } SENSOR_VERSION=1
{% endif %}

[gcode_macro AUTO_BASEMENT_WCS_V2]
description: macro do main moves for get wcs for SPIRAL and FULL modes.
gcode:
RESET_WCS
SET_GCODE_VARIABLE MACRO=CALC_TOOL_PARAMS VARIABLE=length VALUE=999.0
SET_GCODE_VARIABLE MACRO=CALC_TOOL_PARAMS VARIABLE=radius VALUE=999.0
{% set wcs = params.WCS|default(0)|int %}
{% if wcs == 0 %}
MOVE_AUTOCALIBRATE_FULL_V2
{% else %}
MOVE_AUTOCALIBRATE_SPIRAL_V2
{% endif %}
SET_GCODE_VARIABLE MACRO=CALC_TOOL_PARAMS VARIABLE=length VALUE=999.0
SET_GCODE_VARIABLE MACRO=CALC_TOOL_PARAMS VARIABLE=radius VALUE=999.0

[gcode_macro MOVE_AUTOCALIBRATE_FULL_V2]
description: macro do move for measuring and calculated WCS for FULL-SPIRAL mode. Sensor DAC_v_2
gcode:
{% set max_z = printer.toolhead.axis_maximum[2]|float %}
; set approximate radius, length and measuring the wcs_1_z
CALC_TOOL_PARAMS LENGTH=1 APPROXIMATE_RADIUS=1
; checking and apply offset for axis A
ALIGN_A_AXIS_TOOL
; move for measuring the wcs_2_y
PROBE_TOOL_POINT POINT=A_Y_A90
ADJUST_BASEMENT_WCS_V2 WCS=2
; move for measuring the wcs_2_x
PROBE_TOOL_POINT POINT=A_X_A90
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0
PROBE_TOOL_POINT POINT=A_MX_A90
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1
CALC_WCS_TOOL WCS=2 AXIS=0 ADJUST=1
; set radius and measuring the wcs_2_z
CALC_TOOL_PARAMS APPROXIMATE_RADIUS=1 RADIUS=1
; move for measuring the wcs_1_x
PROBE_TOOL_POINT POINT=A_X
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0
PROBE_TOOL_POINT POINT=A_MX
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1
CALC_WCS_TOOL WCS=1 AXIS=0 ADJUST=1
; move for measuring the wcs_1_y
PROBE_TOOL_POINT POINT=A_Y
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0
PROBE_TOOL_POINT POINT=A_MY
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1
CALC_WCS_TOOL WCS=1 AXIS=1 ADJUST=1
; eccentricity correction
APPLY_ECCENTRICITY
; check skew axis X
CHECK_SKEW_TOOL

[gcode_macro MOVE_AUTOCALIBRATE_SPIRAL_V2]
description: macro do move for measuring and calculated WCS for SPIRAL mode. Sensor DAC_v_2
gcode:
{% set max_z = printer.toolhead.axis_maximum[2]|float %}
PROBE
G91
G1 Z25 F1500
G90
; set the wcs_1_z and wcs_2_y
ADJUST_BASEMENT_WCS_V2 WCS=1
; set approximate radius and length
CALC_TOOL_PARAMS LENGTH=1 APPROXIMATE_RADIUS=1 LEN_PROBE=0 APPROXIMATE_RADIUS_PROBE=0
; move to calculate wcs by tool
MOVE_MEASURING_SPIRAL

[gcode_macro MOVE_MEASURING_SPIRAL]
description: This macro do move and calculate wcs for SPIRAL mode.
gcode:
{% set radius = printer['gcode_macro CALC_TOOL_PARAMS'].radius|float %}
{% set tool_length = printer['gcode_macro CALC_TOOL_PARAMS'].length|float %}
{% if radius < 5.0 and tool_length > 35.0 %}
; checking and apply offset for axis A
ALIGN_A_AXIS_TOOL
; move for measuring the wcs_2_x
PROBE_TOOL_POINT POINT=A_X_A90
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0
PROBE_TOOL_POINT POINT=A_MX_A90
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1
CALC_WCS_TOOL WCS=2 AXIS=0 ADJUST=1
; set precise radius and set the wcs_2_z
CALC_TOOL_PARAMS APPROXIMATE_RADIUS=1 RADIUS=1
; check skew axes
CHECK_SKEW_TOOL
{% else %}
{action_respond_info("Radius greater than 5 mm or tool length less 35mm, movement to calculate wcs by tool is not available. Wcs will be calculated from the template.")}
{% endif %}

[gcode_macro ADJUST_BASEMENT_WCS_V2]
gcode:
{% set wcs = params.WCS|default(0)|int %}
{% set point = printer.probe.last_result %}
{% set offsets = printer.probe.offsets %}
{% set wcs_0 = printer.gcode_move.wcs_offsets[3] %}
{% set x = point[0] + offsets[0] - printer.gcode_move.homing_origin.x %}
{% set y = point[1] + offsets[1] - printer.gcode_move.homing_origin.y %}
{% set z = point[2] - offsets[2] - printer.gcode_move.homing_origin.z %}
{% set wcs_1 = printer.gcode_move.wcs_offsets[4] %}
{% set old_z = wcs_0[2] %}
{% set old_y = wcs_1[1] %}
{% set probe_backlash_y = printer.auto_wcs.probe_backlash_y|default(0.0)|float %}
{% set tool_length = printer['gcode_macro CALC_TOOL_PARAMS'].length|float %}
{% set radius = printer['gcode_macro CALC_TOOL_PARAMS'].radius %}
{% set auto_wcs_adj = printer.save_variables.variables["auto_wcs_adj"]|default(0.0)|float %}
{% if wcs == 0 %}
G10 L2 P2 Z{z + auto_wcs_adj}
G10 L2 P3 Y{old_y - (z - old_z)}
{% elif wcs == 1 %}
G10 L2 P3 Y{y}
G10 L2 P2 Z{old_z - (y - old_y)}
{% elif wcs == 2 %}
G10 L2 P3 Y{y + probe_backlash_y}
{% elif wcs == 3 %}
G10 L2 P3 Z{z - radius + auto_wcs_adj}
{% endif %}
53 changes: 11 additions & 42 deletions stereotech_config/750/chamber.cfg
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
# [fan_generic chamber_fan]
# pin: second_mcu: cooling_fan_heat

# for fan webcam
# FOR FAN WEBCAM
# [fan_generic webcam_fan]
# pin: second_mcu: cooling_fan_heat
[heater_generic chamber_heater]
gcode_id: C
heater_pin: multi_pin:chamber_heater
sensor_type: ATC Semitec 104GT-2
sensor_pin: chamber_sensor_pin
control: pid
pid_Kp: 44.327
pid_Ki: 0.211
pid_Kd: 2332.142
min_temp: -150
max_temp: 200

[heater_fan chamber_fan]
pin: chamber_fan_pin
heater: chamber_heater
heater_temp: 40

#ONLY FOR DEBUG
[verify_heater chamber_heater]
check_gain_time: 1000

[output_pin chamber_led]
pin: manta_mcu:chamber_led_pin
Expand Down Expand Up @@ -52,28 +29,20 @@ rename_existing: M106.1
gcode:
{% set p = params.P|default(0)|int %}
{% set s = params.S|default(0)|int %}
{% if p == 3 %}
HEATER_FAN_TEST FAN=chamber_fan SPEED=1.0
{% else %}
M106.1 S255 ;TURN ON PUMP
{% if p == 1 %}
SET_PIN PIN=extruder1_cooling_valve VALUE=1
{% else %}
SET_PIN PIN=extruder_cooling_valve VALUE=1
{% endif %}
M106.1 S255 ;TURN ON PUMP
{% if p == 0 %}
SET_PIN PIN=extruder_cooling_valve VALUE=1
{% elif p == 1 %}
SET_PIN PIN=extruder1_cooling_valve VALUE=1
{% endif %}

[gcode_macro M107]
rename_existing: M107.1
gcode:
{% set p = params.P|default(0)|int %}
{% if p == 3 %}
HEATER_FAN_TEST FAN=chamber_fan SPEED=0.0
{% else %}
M107.1 ;TURN OFF PUMP
{% if p == 1 %}
SET_PIN PIN=extruder1_cooling_valve VALUE=0
{% else %}
SET_PIN PIN=extruder_cooling_valve VALUE=0
{% endif %}
M107.1 ;TURN OFF PUMP
{% if p == 0 %}
SET_PIN PIN=extruder_cooling_valve VALUE=0
{% elif p == 1 %}
SET_PIN PIN=extruder1_cooling_valve VALUE=0
{% endif %}
Loading

0 comments on commit b2a4bcd

Please sign in to comment.