Corexy Steppers Behaving like Cartesian Steppers

Basic Information:

Printer Model: TRONXY X5SA
MCU / Printerboard: BTT SKR MINI E3 V2.0
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

I have been running klipper on my X5SA using the stock Chitu v6 controller and it has been working great. For reasons I won’t go into now I decided to upgrade to a BTT SKR MINI E3 V2.0 controller. Lots of fun trying to get this to work and most of it is except for one small problem … the printer steppers are moving as if they are in a Cartesian configuration not a corexy configuration. In a corexy if I send a x axis move command both steppers should move at the same time but only the x stepper is moving in my case. Same with a y move. Can’t figure it out … perhaps some one can help. Thanks

Starting Klippy…
Args: [‘/home/pi/klipper/klippy/klippy.py’, ‘/home/pi/printer_data/config/printer.cfg’, ‘-l’, ‘/home/pi/printer_data/logs/klippy.log’, ‘-I’, ‘/home/pi/printer_data/comms/klippy.serial’, ‘-a’, ‘/home/pi/printer_data/comms/klippy.sock’]
Git version: ‘v0.11.0-304-gf7567a0d’
Branch: master
Remote: origin
Tracked URL: GitHub - Klipper3d/klipper: Klipper is a 3d-printer firmware
CPU: 4 core ARMv7 Processor rev 4 (v7l)
Python: ‘3.9.2 (default, Mar 12 2021, 04:06:34) \n[GCC 10.2.1 20210110]’
Start printer at Wed Nov 15 18:20:54 2023 (1700090454.3 2554.7)
===== Config file =====
[virtual_sdcard]
path = ~/printer_data/gcodes
on_error_gcode = CANCEL_PRINT

[pause_resume]

[display_status]

[respond]

[gcode_macro CANCEL_PRINT]
description = Cancel the actual running print
rename_existing = CANCEL_PRINT_BASE
gcode =

{% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
{% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
{% set retract = client.cancel_retract|default(5.0)|abs %}

{% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
else "X=" ~ client.park_at_cancel_x %}
{% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
else "Y=" ~ client.park_at_cancel_y %}
{% set custom_park = park_x|length > 0 or park_y|length > 0 %}


{% if printer['gcode_macro PAUSE'].restore_idle_timeout > 0 %}
SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro PAUSE'].restore_idle_timeout}
{% endif %}
{% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
_CLIENT_RETRACT LENGTH={retract}
TURN_OFF_HEATERS
M106 S0

SET_PAUSE_NEXT_LAYER ENABLE=0
SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
CANCEL_PRINT_BASE

[gcode_macro PAUSE]
description = Pause the actual running print
rename_existing = PAUSE_BASE
variable_restore_idle_timeout = 0
gcode =

{% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
{% set idle_timeout = client.idle_timeout|default(0) %}
{% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0%}
{% set restore = False if printer.toolhead.extruder == ''
else True  if params.RESTORE|default(1)|int == 1 else False %}

SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"

{% if idle_timeout > 0 %}
SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
{% endif %}
PAUSE_BASE
_TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}

[gcode_macro RESUME]
description = Resume the actual running print
rename_existing = RESUME_BASE
variable_last_extruder_temp = {‘restore’: False, ‘temp’: 0}
gcode =

{% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
{% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
{% set sp_move = client.speed_move|default(velocity) %}


{% if printer['gcode_macro PAUSE'].restore_idle_timeout > 0 %}
SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro PAUSE'].restore_idle_timeout}
{% endif %}
{% if printer.idle_timeout.state|upper == "IDLE" %}
{% if last_extruder_temp.restore %} M109 S{last_extruder_temp.temp} {% endif %}
{% endif %}
_CLIENT_EXTRUDE
RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}

[gcode_macro SET_PAUSE_NEXT_LAYER]
description = Enable a pause if the next layer is reached
gcode =
{% set pause_next_layer = printer[‘gcode_macro SET_PRINT_STATS_INFO’].pause_next_layer %}
{% set ENABLE = params.ENABLE|default(1)|int != 0 %}
{% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE=“{{ ‘enable’: ENABLE, ‘call’: MACRO }}”

[gcode_macro SET_PAUSE_AT_LAYER]
description = Enable/disable a pause if a given layer number is reached
gcode =
{% set pause_at_layer = printer[‘gcode_macro SET_PRINT_STATS_INFO’].pause_at_layer %}
{% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
else params.LAYER is defined %}
{% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
{% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE=“{{ ‘enable’: ENABLE, ‘layer’: LAYER, ‘call’: MACRO }}”

[gcode_macro SET_PRINT_STATS_INFO]
rename_existing = SET_PRINT_STATS_INFO_BASE
description = Overwrite, to get pause_next_layer and pause_at_layer feature
variable_pause_next_layer = { ‘enable’: False, ‘call’: “PAUSE” }
variable_pause_at_layer = { ‘enable’: False, ‘layer’: 0, ‘call’: “PAUSE” }
gcode =
{% if pause_next_layer.enable %}
RESPOND TYPE=echo MSG=‘{“%s, forced by pause_next_layer” % pause_next_layer.call}’
{pause_next_layer.call}
SET_PAUSE_NEXT_LAYER ENABLE=0
{% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
RESPOND TYPE=echo MSG=‘{“%s, forced by pause_at_layer [%d]” % (pause_at_layer.call, pause_at_layer.layer)}’
{pause_at_layer.call}
SET_PAUSE_AT_LAYER ENABLE=0
{% endif %}
SET_PRINT_STATS_INFO_BASE {rawparams}

[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
gcode =

{% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
{% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
{% set use_custom     = client.use_custom_pos|default(false)|lower == 'true' %}
{% set custom_park_x  = client.custom_park_x|default(0.0) %}
{% set custom_park_y  = client.custom_park_y|default(0.0) %}
{% set park_dz        = client.custom_park_dz|default(2.0)|abs %}
{% set sp_hop         = client.speed_hop|default(15) * 60 %}
{% set sp_move        = client.speed_move|default(velocity) * 60 %}

{% set origin    = printer.gcode_move.homing_origin %}
{% set act       = printer.gcode_move.gcode_position %}
{% set max       = printer.toolhead.axis_maximum %}
{% set cone      = printer.toolhead.cone_start_z|default(max.z) %}
{% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
else False %}

{% set z_min = params.Z_MIN|default(0)|float %}
{% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
{% set x_park = params.X       if params.X is defined
else custom_park_x  if use_custom
else 0.0            if round_bed
else (max.x - 5.0) %}
{% set y_park = params.Y       if params.Y is defined
else custom_park_y  if use_custom
else (max.y - 5.0)  if round_bed and z_park < cone
else 0.0            if round_bed
else (max.y - 5.0) %}

_CLIENT_RETRACT
{% if "xyz" in printer.toolhead.homed_axes %}
G90
G1 Z{z_park} F{sp_hop}
G1 X{x_park} Y{y_park} F{sp_move}
{% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
{% else %}
RESPOND TYPE=echo MSG='Printer not homed'
{% endif %}

[gcode_macro _CLIENT_EXTRUDE]
description = Extrudes, if the extruder is hot enough
gcode =

{% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
{% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
{% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
{% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
{% set absolute_extrude = printer.gcode_move.absolute_extrude %}

{% if printer.toolhead.extruder != '' %}
{% if printer[printer.toolhead.extruder].can_extrude %}
{% if use_fw_retract %}
{% if length < 0 %}
G10
{% else %}
G11
{% endif %}
{% else %}
M83
G1 E{length} F{(speed|float|abs) * 60}
{% if absolute_extrude %}
M82
{% endif %}
{% endif %}
{% else %}
RESPOND TYPE=echo MSG='Extruder not hot enough'
{% endif %}
{% endif %}

[gcode_macro _CLIENT_RETRACT]
description = Retracts, if the extruder is hot enough
gcode =
{% set client = printer[‘gcode_macro _CLIENT_VARIABLE’]|default({}) %}
{% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
{% set speed = params.SPEED|default(client.speed_retract)|default(35) %}

_CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}

[mcu]
serial = /dev/serial/by-id/usb-Klipper_stm32f103xe_33FFD7053046473332620443-if00
restart_method = command

[printer]
kinematics = corexy
max_velocity = 300
max_accel = 3000
max_z_velocity = 25
max_z_accel = 30
square_corner_velocity = 10.0

[stepper_x]
step_pin = PB13
dir_pin = PB12
enable_pin = !PB14
microsteps = 16
rotation_distance = 20
endstop_pin = ^!PC0
position_endstop = -1
position_min = -1
position_max = 350
homing_speed = 50
homing_retract_dist = 10
second_homing_speed = 10.0

[tmc2209 stepper_x]
uart_pin = PC11
tx_pin = PC10
uart_address = 0
run_current = 0.580
stealthchop_threshold = 999999

[stepper_y]
step_pin = PB10
dir_pin = PB2
enable_pin = !PB11
microsteps = 16
rotation_distance = 20
endstop_pin = ^!PC1
position_endstop = 0
position_max = 330
homing_retract_dist = 10
homing_speed = 50.0
second_homing_speed = 10.0

[tmc2209 stepper_y]
uart_pin = PC11
tx_pin = PC10
uart_address = 2
run_current = 0.580
stealthchop_threshold = 999999

[stepper_z]
step_pin = PB0
dir_pin = PC5
enable_pin = !PB1
microsteps = 16
rotation_distance = 4
endstop_pin = probe:z_virtual_endstop
position_max = 400
position_min = -2

[tmc2209 stepper_z]
uart_pin = PC11
tx_pin = PC10
uart_address = 1
run_current = 0.580
stealthchop_threshold = 999999

[extruder]
step_pin = PB3
dir_pin = !PB4
enable_pin = !PD2
microsteps = 16
rotation_distance = 35.520
nozzle_diameter = 0.400
filament_diameter = 1.750
heater_pin = PC8
sensor_type = ATC Semitec 104GT-2
sensor_pin = PA0
min_temp = 0
max_temp = 250
max_extrude_only_distance = 300
control = pid
pid_kp = 12.906
pid_ki = 0.265
pid_kd = 157.291

[tmc2209 extruder]
uart_pin = PC11
tx_pin = PC10
uart_address = 3
run_current = 0.650
stealthchop_threshold = 999999

[heater_bed]
heater_pin = PC9
sensor_type = EPCOS 100K B57560G104F
sensor_pin = PC3
min_temp = 0
max_temp = 130
control = pid
pid_kp = 74.097
pid_ki = 1.176
pid_kd = 1167.026

[heater_fan hotend_fan]
pin = PC7

[fan]
pin = PC6

[safe_z_home]
home_xy_position = 165, 165
speed = 50
z_hop = 10
z_hop_speed = 5

[bed_screws]
screw1 = 5, 5
screw2 = 320, 5
screw3 = 5, 315
screw4 = 320, 315

[bed_mesh]
speed = 120
probe_count = 5, 5
horizontal_move_z = 5
algorithm = lagrange
mesh_min = 20, 20
mesh_max = 310, 310
mesh_pps = 0

[bltouch]
sensor_pin = ^PC14
control_pin = PA1
x_offset = -45.0
y_offset = -10.0
z_offset = 0
speed = 20
samples = 1
sample_retract_dist = 8.0

[mcu rpi]
serial = /tmp/klipper_host_mcu

Extruder max_extrude_ratio=0.266081
mcu ‘mcu’: Starting serial connect
webhooks client 1965034008: New connection
webhooks client 1965034008: Client info {‘program’: ‘Moonraker’, ‘version’: ‘v0.8.0-188-ga71c5c1’}
mcu ‘mcu’: got {‘oid’: 11, ‘next_clock’: 583672192, ‘value’: 31478, ‘#name’: ‘analog_in_state’, ‘#sent_time’: 2555.88106814, ‘#receive_time’: 2555.904336994}
mcu ‘mcu’: got {‘oid’: 19, ‘next_clock’: 589432192, ‘value’: 31450, ‘#name’: ‘analog_in_state’, ‘#sent_time’: 2555.932494025, ‘#receive_time’: 2555.983370223}
Loaded MCU ‘mcu’ 112 commands (v0.11.0-304-gf7567a0d / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.34-4+rpi1+14) 2.34)
MCU ‘mcu’ config: ADC_MAX=4095 BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c1a=PB8,PB9 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi3=PB4,PB5,PB3 CLOCK_FREQ=72000000 INITIAL_PINS=!PA14 MCU=stm32f103xe PWM_MAX=255 RESERVE_PINS_USB=PA11,PA12 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1
mcu ‘rpi’: Starting connect
mcu ‘mcu’: got {‘oid’: 11, ‘next_clock’: 605272192, ‘value’: 31484, ‘#name’: ‘analog_in_state’, ‘#sent_time’: 2556.146087098, ‘#receive_time’: 2556.204148713}
mcu ‘mcu’: got {‘oid’: 19, ‘next_clock’: 611032192, ‘value’: 31450, ‘#name’: ‘analog_in_state’, ‘#sent_time’: 2556.146087098, ‘#receive_time’: 2556.284253869}
mcu ‘rpi’: got {‘count’: 134, ‘sum’: 95565, ‘sumsq’: 344697, ‘#name’: ‘stats’, ‘#sent_time’: 2556.331135431, ‘#receive_time’: 2556.331267931}
mcu ‘mcu’: got {‘oid’: 11, ‘next_clock’: 626872192, ‘value’: 31479, ‘#name’: ‘analog_in_state’, ‘#sent_time’: 2556.146087098, ‘#receive_time’: 2556.50440814}
mcu ‘mcu’: got {‘oid’: 19, ‘next_clock’: 632632192, ‘value’: 31446, ‘#name’: ‘analog_in_state’, ‘#sent_time’: 2556.146087098, ‘#receive_time’: 2556.583283921}
Loaded MCU ‘rpi’ 111 commands (v0.11.0-205-g5f0d252b / gcc: (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110 binutils: (GNU Binutils for Raspbian) 2.35.2)
MCU ‘rpi’ config: ADC_MAX=4095 CLOCK_FREQ=50000000 MCU=linux PCA9685_MAX=4096 PWM_MAX=32768 STATS_SUMSQ_BASE=256
Configured MCU ‘mcu’ (1024 moves)
Configured MCU ‘rpi’ (1024 moves)
Starting heater checks for heater_bed
bed_mesh: generated points
Index | Tool Adjusted | Probe
0 | (65.0, 30.0) | (20.0, 20.0)
1 | (137.5, 30.0) | (92.5, 20.0)
2 | (210.0, 30.0) | (165.0, 20.0)
3 | (282.5, 30.0) | (237.5, 20.0)
4 | (355.0, 30.0) | (310.0, 20.0)
5 | (355.0, 102.5) | (310.0, 92.5)
6 | (282.5, 102.5) | (237.5, 92.5)
7 | (210.0, 102.5) | (165.0, 92.5)
8 | (137.5, 102.5) | (92.5, 92.5)
9 | (65.0, 102.5) | (20.0, 92.5)
10 | (65.0, 175.0) | (20.0, 165.0)
11 | (137.5, 175.0) | (92.5, 165.0)
12 | (210.0, 175.0) | (165.0, 165.0)
13 | (282.5, 175.0) | (237.5, 165.0)
14 | (355.0, 175.0) | (310.0, 165.0)
15 | (355.0, 247.5) | (310.0, 237.5)
16 | (282.5, 247.5) | (237.5, 237.5)
17 | (210.0, 247.5) | (165.0, 237.5)
18 | (137.5, 247.5) | (92.5, 237.5)
19 | (65.0, 247.5) | (20.0, 237.5)
20 | (65.0, 320.0) | (20.0, 310.0)
21 | (137.5, 320.0) | (92.5, 310.0)
22 | (210.0, 320.0) | (165.0, 310.0)
23 | (282.5, 320.0) | (237.5, 310.0)
24 | (355.0, 320.0) | (310.0, 310.0)
Starting heater checks for extruder
webhooks: registering remote method ‘shutdown_machine’ for connection id: 1965034008
webhooks: registering remote method ‘reboot_machine’ for connection id: 1965034008
webhooks: registering remote method ‘pause_job_queue’ for connection id: 1965034008
webhooks: registering remote method ‘start_job_queue’ for connection id: 1965034008

Sigh.

You were given the instructions when you wrote the post to attach your klippy.log not edited and formatted it as you see fit.

Please reply with your klippy.log attached. If it’s too big, .zip it and attach the .zip file.

2 Likes

Hi,
Your response was a bit curt. I did not edit the log however I did clear the log and restart Klipper to keep it short. The existing log had multiple restarts and was quite large. I thought that I was being courteous to the readers but clearly it was not perceived this way. I will resent a complete log and zip it as requested.

I guess this largely depends on the perception. From the view of the regular supporters who need to mention exactly the same stuff over and over again, I would call the answer “concise”.

Also, from the perspective of those who seek support: We would very much appreciate if the few lines of instructions of a new topic would simply be followed, since they have a reason:

  • As in your case, you did not use formatting tags and the result is a pain to read and analyze
  • Opening a complete log allows searching and easily scrolling through it
  • What you consider relevant, might not be the view of the supporters
4 Likes

I will try to do better next time I have an issue. In the mean time I have solved my problem.

And the issue was?

1 Like

I’m happy to hear that you figured it out - anyway, please post your fix so that it can help somebody in the future.

Actually my system was OK but I was using the STEPPER_BUZZ command to make sure my steppers were moving in the right direction. I assumed that the STEPPER_BUZZ command would use the corexy algorithm but it does not. It only moves the stepper that is requested to move

1 Like

That is in fact what the command is designed/used for and what its description says.

Tell me Brian, what motivated you to respond to me with your comments re the STEPPER_BUZZ command?

The fact that you seemingly did not properly read its description/use case:
https://www.klipper3d.org/Config_checks.html?h=stepper#verify-stepper-motors
We are all here to learn stuff about Klipper.

Your comments are not useful to me or others. Your just like calling me out because I made a mistake. All your comments will do is make others hesitate to report a problem for fear they will get flamed. You are not a good person!

We can discuss about a lot of things - but there is no way for insulting.

It can’t be wrong to read through documentation.
This is more helpful than insulting others. Canadians are nice guys aren’t they?
I just wanted to point to the documentation as this is the main source of information people put very much effort in.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.