[Solved] Set z endstop as a trigger.
-
Recently I changed the z endstop to a BLTouch probe. Now, to take advantage of the old endstop, i want it to use as a trigger if the BLTouch fails, but reading the olds posts and dozuki, I don't get anything clear.
I have the Zendstop connected to the Zendstop in the duet 2 wifi. In the code of the config i have:
M574 Z1 S2 ; Define Z to use Probe. Home to Min
for use the probe andM950 J1 C"zstop"
M581 T2 J1 S1
To launch a macro associated with the activation of the zendstop but I can't get it to work properly.Any advise? Thank you.
-
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
-
@Fatalis22
I recently switched to a BLTouch as well. My first thought is that when activating S2 (define Z to use probe), the Zstop is not activated.I take that you also have your deploy and retract macros that you have uploaded to your Duet?
You could use the pinheaders on the connection hub for the EBOB. There are multiple PWM pins that you can use to use an extra endstop.also, what is the J1 doing in your M581 command?
-
@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
-
@fcwilt said in Set z endstop as a trigger.:
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.
-
This post is deleted! -
@fatalis22 said in Set z endstop as a trigger.:
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?
You configure your Z endstop(s) just like you would if you had never heard of a Z probe.
And you home Z much like X and Y using G1 H1 commands, but on the Z axis of course.
You do not use G30 to home the Z axis.
You configure your Z probe as you normally would.
The Z probe will still be used...
- with G30 to set the Z=0 datum
- with G29 to probe the bed and create the height map
- with G32 to level the bed either manually or automatically
All three of my printers have Z endstops and Z probes and they all work just fine.
Frederick
-
@fcwilt
I just set it up as it was before changing home to use the probe, as you say and it works perfectly.
Just before posting my previous comment I had tried to do a mesh compensation and the probe had been blinking blocked, but now it works perfectly. I don't know, something strange will have happened.Anyway, that's it, thank you very much for everything.
The truth is that this is the best, the ease and speed of making a home with the endstop along with the compensation and the mapping of the sensor. -
@fatalis22 said in Set z endstop as a trigger.:
The truth is that this is the best, the ease and speed of making a home with the endstop along with the compensation and the mapping of the sensor.
Great! My first convert!
Frederick