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
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.
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
@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.
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
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.
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…