Some general settings....?

Basic Information:

Printer Model: Tronxy 500
MCU / Printerboard: Spider V2.2
klippy.log

Hello!
I have some confusion about setting up the printer.

X/Y/Z=0 the nozzle is on mechanical X/Y/Z = 0
I use the

[stepper_x]
position_endstop: -36
position_min: -36

[stepper_y]
position_endstop: -20
position_min: -20

[bltouch]
x_offset: -23
y_offset: -70
z_offset: 3

are these the correct variables?

for referencing the Z, I use the BL Touch in the middle (250x250)
[safe_z_home] #BL Touch
home_xy_position: 227, 180 # Change coordinates to the center of your print bed

good to go?
printer.cfg (9.2 KB)

If I’m right those positions are the distances of the nozzle tip between the bed edges and when hitting the respective endstops.
So just measure it.
Sometimes it is needed to have the position_min lower/farther away than the position_endstop is so that the print head is able to fully drive into the endstop having it triggered at all.

1 Like

For the Tronxy S5 series there are some official cfgs availability which should also contain the correct endstop positions. See klipper/config at master · Klipper3d/klipper · GitHub

My workflow for determining the X / Y BLTouch offsets:

  • Stick two small pieces of insulating tape on top of each other
  • Put it somewhere on your bed
  • Drive the nozzle gently and slowly into the tape until you leave a mark in the tape. It doesn’t take much. If the nozzle is sticking out on the other side of the bed, it was too far
  • Issue a GET_POSITION and record / write down the current nozzle position
  • Extend the tip of your BLTouch
  • Move the head until the tip of BLT is exactly over the mark in the tape
  • Issue a GET_POSITION and record / write down the current nozzle position
  • Calculate the offset as difference of the two positions

For tuning the Z-Offset refer to Probe calibration - Klipper documentation

1 Like

@LifeOfBrian
I do not think, that this is the correct way.
Endstops are active after referencing and should protect the printer.
I would recommend a reference point independent to endstop. value of reference would be outside ! of the endstop values.

@Sineos
Thanks for you description, I have done this offset first, are the variables I use the correct ones?

Nope.
An endstop usually is only at one end. What protects the other end?
Also: if they should do so, either they have to initiate an interrupt on the MCU. Interrupt able ports are rare. Or the ports have to be polled. Too much MCU load for nothing.

And for verification: I tried during a print, nothing happens.

The endstops are only for homing.

1 Like

Hi,

when I stop the printing, he always wants to move somewhere near max X/Y, how can I stop that?
klippy (2).log (2.2 MB)

You may have a look on your slicers end code.

there I do not finde the code (Cura newest)

M104 S0 ;extruder heater off

M140 S0 ;heated bed heater off (if you have it)

G91 ;relative positioning

G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure

G1 Z+10 F50

;G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more

;G28 Z0

;G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way

M84 ;steppers off

G90 ;absolute positioning

I mean when I stop printing on mainsail

Is there a script that is executed after a print?

And please:

If you upload code snippets, please use

Format

to format the code as code.

script after print? where can I look at?

Sorry, I don’t know. I don’t use Mainsail.

OK, thanks.
If I stop printing via Mainsail, the printerhead goes somewhere maximum ends.
If the print is finished, it does what Cura settings are.

In that snippet, these moves are commented out.
Also the G1 command line is made during relative positioning.

correct, but that is fine, no problem at all
the mainsail - klipper does a movement on stopping the print

You have an PRINT_END macro or one for cancelling a print that needs to be adapted to your needs.
I changed it as well to avoid those movements after stopping a print.

2 Likes

thx! could you please tell me how

I have done some macros to switch on/off led, does it work the same?

Just open the macros.cfg and look for [gcode_macro PRINT_END]

Mine looks like this:

[gcode_macro PRINT_END]
#   Use PRINT_END for the slicer ending script
gcode:
    #   Get Boundaries
    {% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
    
    #   Check end position to determine safe directions to move
    {% if printer.toolhead.position.z < (max_z - 2) %}
        {% set z_safe = 2.0 %}
    {% else %}
        {% set z_safe = max_z - printer.toolhead.position.z %}
    {% endif %}
    
    M400                   ; wait for buffer to clear
    G92 E0                 ; zero the extruder
    G1 E-2.0 F3600         ; retract
    G91                    ; relative positioning
    G0 Z{z_safe} F3600     ; move nozzle up
    G90
    G0 X5 Y-3 F12000       ; move nozzle to remove stringing
    
    M104 S0                ; turn off hotend
    M140 S0                ; turn off bed
    M107                   ; turn off fan
    M84                    ; turn off motors

    #M300 P300 S1000        ;play tone
    #M300 P300 S5000
    #M300 P300 S1000
    Bauraumlicht VALUE=0

    M117 Finished!

The line with

G90
G0 X5 Y-3 F12000       ; move nozzle to remove stringing

moves the print head to the front left corner with absolute coordinates instead of the default back right one.
The respective parameters need to be adapted to your printers ones so carefully check its boundaries first!

Further check mainsail.cfg as well as it should contain at least the [gcode_macro CANCEL_PRINT] macro that is being run when you cancel a print.
This by default sends the print head to a place where I did not wanted it…

1 Like

Thanks a lot !!
where do I find the macro.cfg, need I to create one?
or is it the kiauh_macros.cfg?


printer.cfg (9.2 KB)
mainsail.cfg (2.1 KB)
kiauh_macros.cfg (1.9 KB)

where do I finde macro.cfg ?