H1 command for an endstop switch (microswitch)
-
@jay_s_uk Ungefähr 18.000.000 Ergebnisse (0,30 Sekunden)
Deutsch
EnglischApparently it recognizes both, see the screenshot...I made different "K" assignments in config.g and both react. I only want to use the microswitch for the auto z-offset...since the puck is 15mm high, do I have to set the z-offset to -15? (see config.g but commented out)...so I thought I'd let the printhead go to a certain position, set the microswitch/puck darunger : G1 x300 y300 z30 and do the H1 command, and set the Z to 0 (G92 z0) then I run the capacitive sensor over the puck and read the offset via G30 S-1. Is this the right way or will I crash my bed?
; Z-Probe two of them
M558 K0 P1 C"!zprobe.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds
M558 K1 P8 A2 S0.2 C"zstop" H5 F80 T3000
G31 P1000 X-1 Y-61 Z2.9 ; set Z probe trigger value, offset and trigger height
;G31 P1000 X50 Y50 Z-15 ; Second Z-offset
M557 X0:740 Y-27:611 S35 ; define mesh grid -
@axiom so you mean probes and not endstops. That's different, you can have more than one. Just make sure you use the correct K value when using G30 and you'll be fine
-
@axiom it sounds to me that your "endstops" are actually configured as Z probes. You can indeed have more than one Z probe.
The usual way of homing using a Z probe is to use the G30 command, and you can provide a K parameter with this command to tell it which Z probe to use.
If the microswitch triggers when the nozzle if 15mm higher than the bed then you should set the G31 Z parameter for that probe to 15. For historical reasons the Z parameter isn't the offset, it's the trigger height (the negative of the offset). Again, use the K parameter of the G31 command to specify which probe that command refers to.
-
@dc42 I have now made the following entry in cofig.g:
; Z-Probe two of them
M558 K0 P1 C"!zprobe.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds
M558 K1 P8 A2 S0.2 C"zstop" H5 F80 T3000
G31 P1000 K0 X-1 Y-61 Z2.3 ; set Z probe trigger value, offset and trigger height
G31 P1000 K1 X0 Y0 Z15 ; Second Z offset
M557 X0:740 Y-27:602 S35 ; define mesh gridWhen I first go to z=50 (G1 z50= and enter G30 K1 via the console, I get the message: "Error: Probe already triggered at start of probing move"
-
@axiom are you using the normally-open or normally-closed microswitch contacts?
Your DWC screen shot indicates that Z probe K1 is registered as triggered (the value is 1000). Was that correct?
-
@dc42 I don't quite understand that...how do I recognize that?...if I bring the contacts of the microswitch (puck) together (bring them into contact...i.e. nozzle and puck) the display for the probe goes to zero.. .that's actually correct, isn't it?
-
P1000 means triggered
P0 means not triggered -
@Phaedrux got it... just had to say "!" put in front of the name of the connection. G30 K1 works. But I would like to read the value and set this value minus the 15mm (height of the puck) as Z=0.
-
@axiom said in H1 command for an endstop switch (microswitch):
But I would like to read the value and set this value minus the 15mm (height of the puck) as Z=0.
I don't understand what you mean exactly.
-
@Phaedrux I would like to use it to automatically measure the z-offset...so I no longer have to put paper underneath it
-
@Phaedrux so I need to be able to set the trigger value as z=0.
-
What is the puck you mention? Can you show a photo of your setup?
-
@Phaedrux
The part with the blue cap is the capacitive sensor, the part on the glass plate on the heatbed is the "puck/microswitch". Contact with the printhead triggers it...that works