@fcwilt said in Set z endstop as a trigger.:
@fatalis22
I don't know why folks who had a Z endstop don't keep using it for homing even with a Z probe installed. It actually allows simpler gcode and a faster homing.
Anyway as to your question.
Did you create the trigger2.g file and put some commands in it (like M117) so you would know it executed?
Frederick
Can you have the BLtouch sensor and home with the z endstop? How? I tried but when I run a mesh compensation (G29) the BLTouch does not work and stays blinkling. I thought you could only use one of the two.
This is part of my code:
Config:
; Endstops
M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop
M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop
M574 Z1 S1 P"zstop" ; configure active-high endstop for low end on Z via pin zstop
;M574 Z1 S2 ; Define Z to use Probe. Home to Min*
; Z-Probe
M307 H3 A-1 C-1 D-1 ; disable heater on PWM channel for BLTouch
M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch
M558 P9 C"^zprobe.in" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds
G31 P500 X-43 Y-13 Z1.6 ; set Z probe trigger value, offset and trigger height
M557 X15:220 Y15:220 S20 ; define mesh grid
*This line depends if i want to home with the probe or with the endstop, if i want to home with one the other remains uneseful.
And the homeall.g
; generated by RepRapFirmware Configuration Tool v3.2.3 on Sun May 02 2021 15:59:31 GMT+0200 (hora de verano de Europa central)
G91 ; relative positioning
G1 H2 Z5 F6000 ; lift Z relative to current position
G1 H1 X-240 Y-240 F3000 ; move quickly to X and Y axis endstops and stop there (first pass)
G1 H2 X5 Y5 F6000 ; go back a few mm
G1 H1 X-240 Y-240 F240 ; move slowly to X and Y axis endstops once more (second pass)
G1 H1 Z-265 F240 ; move Z down stopping at the endstop
G90 ; absolute positioning
;G1 X100 Y120 F4000 ; Move probe to middle of bed
;G30 ; home Z by probing the bed
G92 Z0 ; set Z position to axis minimum (you may want to adjust this)
The commented lines are for home with the z probe.
So...how do you home with the z endstops and keep the probe functional so you can use mesh compensation?
@phaedrux said in Set z endstop as a trigger.:
@peterartechno said in Set z endstop as a trigger.:
My first thought is that when activating S2 (define Z to use probe), the Zstop is not activate
The M574 Z1 S2 is irrelevant and can be left out entirely. The command doesn't define a pin at all, so even with it in place, the zstop pin is still free.
There's no reason you couldn't use the zstop pin as an estop as described, but M581 would need to be configured correctly.
@peterartechno said in Set z endstop as a trigger.:
also, what is the J1 doing in your M581 command?
I'd like to know as well. It's not an accepted parameter for M581.
https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_RepRapFirmware_3_01RC2_and_later
In theory it is supposed to respond to a signal from the pin defined before with M950, the problem is that I do not quite understand the operation of the commands and the definition of pins. Anyway I'm interested in the way it says @fcwilt, how do you home with the z endstop and use the probe for mesh compensation?
To clarify, yes, i have the 2 probes files need and before trying what fcwilt said, the BLTouch sensor was working fine.