Homing with Z-max endstop
-
Hi,
From the M574 docs for v2 firmware:
Parameters
Xnnn Position of X endstop: 0 = none, 1 = low end, 2 = high end.
Ynnn Position of Y endstop: 0 = none, 1 = low end, 2 = high end.
Znnn Position of Z endstop: 0 = none, 1 = low end, 2 = high end.Snnn Endstop type: 0 = active low endstop input, 1 = active high endstop input, 2 = Z probe, 3 = motor load detection
So for a Z max endstop it would be M574 Z2 S0 or M547 Z2 S1 depending on the active state of your endstop hardware.
Frederick
-
@fcwilt thank u, i ll try this
-
@adhanabal Hi
When i use this use this config. the z bed is trying to move against Z end stop.
When we use zmin as end stop, before homing it goes 5mm down and comes back to home right?
When we use zmax as end stop should we have to remove z dive? -
@adhanabal said in Homing with Z-max endstop:
@adhanabal Hi
When i use this use this config. the z bed is trying to move against Z end stop.
When we use zmin as end stop, before homing it goes 5mm down and comes back to home right?
When we use zmax as end stop should we have to remove z dive?I don't understand your question.
When homing you of course have to move in the correct direction. The G1 H1 moves are towards the endstop sensor. The G1 move is away from the endstop sensor.
See the generic examples below:
; *** Homing to Z min *** G91 ; relative moves G1 H1 Z-999 F600 ; move toward endstop sensor at faster speed G1 Z20 ; backoff a small amount G1 H1 Z-25 F300 ; move toward endstop sensor at slower speed
; *** Homing to Z max *** G91 G1 H1 Z999 F600 G1 Z-20 G1 H1 Z25 F300
-
@fcwilt okay thank you i will check this
-
Post your config.g and homing files along with the results of M122 and M98 P"config.g" if you want more detailed help.
-
This post is deleted! -
-
Can you verify that when you send G1 Z10 it will move the Z axis away from the nozzle?
And G1 Z-10 towards the nozzle?
Is the amount of movement actually 10mm?
I don't see anything wrong with your config file. The homing file should move the Z axis towards Z max.
Can you test the state of the endstops by sending M119? Send it twice, once when the Z endstop is not triggered and again when you are manually triggering it.
Do the LEDs on the mainboard change when the endstop is clicked?
-
It's easier on us all if you post your files using the </> tag.
That way we don't all have to download the files.
Here is your homeZ.g file:
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Thu Mar 04 2021 17:26:50 GMT+0530 (India Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Z215 F1800 ; move Z up until the endstop is triggered G92 Z210 ; set Z position to axis maximum (you may want to adjust this) ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
Was that actually created using the configuration tool?
It's a bit messed up.
Frederick
-
@Phaedrux Sure i will reach my office shortly, will tell you the results. regards
-
@fcwilt yes from config tool and next time i will upload the files in the mentioned way.
-
@adhanabal said in Homing with Z-max endstop:
@fcwilt yes from config tool and next time i will upload the files in the mentioned way.
Thanks.
While the homeZ.g file you post will work it's a bit odd.
A more usual version would look something like this:
G91 ; relative positioning G1 H1 Z215 F1800 ; move Z toward Z max until the endstop is triggered (fast) G1 Z-20 ; backoff a bit G1 H1 Z25 F600 ; move Z toward Z max until the endstop is triggered (slow) G92 Z210 ; set Z position to match actual Z position when endstop was triggered
Notice the G1 H2 command has been removed - it serves no purpose when homing the Z axis.
Now the second G1 H1 is not required but it is common, the idea being that doing a second one at a slower speed will be a bit more accurate.
The G92 is there because the result of the G1 H1 command is to set the Z position (in this case) to the value of Z min or Z max, depending on the location (low or high) of the Z endstop.
Often the endstop triggers at a position somewhat different from Z min or Z max and the actual Z position at which it triggered can be set with the G92.
In this example the Z max value is used even though it may not be exactly correct.
Frederick
-
I re-posted your config.g file here.
; Configuration file for Duet WiFi (firmware version 2.03) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Thu Mar 04 2021 17:26:50 GMT+0530 (India Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"fabforge v1" ; set printer name ; Network M551 P"fabforge" ; set password M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards M569 P1 S0 ; physical drive 1 goes forwards M569 P2 S1 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M584 X0 Y1 Z2 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X125.98 Y125.98 Z1600.00 E436.54 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X7200.00 Y7200.00 Z600.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X1200 Y1200 Z1200 E1000 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X210 Y210 Z210 S0 ; set axis maxima ; Endstops M574 X1 Y1 Z2 S1 ; set active high endstops ; Z-Probe M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed M557 X15:180 Y15:180 S20 ; define mesh grid ; Heaters M305 P0 T100000 B3950 R4700 ; set thermistor + ADC parameters for heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M305 P1 T100000 B3950 R4700 ; set thermistor + ADC parameters for heater 1 M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M106 P0 C"Part Fan" S0 I0 F500 H-1 ; set fan 0 name, value, PWM signal inversion and frequency. Thermostatic control is turned off ; Tools M563 P0 S"Head 1" D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous M501 ; load saved parameters from non-volatile memory M911 S22 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss