move slowly Z axes to endstop (low switch)



  • how can change the speed of Z axis on the way to endstop (low switch) to a slow speed last cm, to endstop. The same slow speed, as on the x and y axis. I have this config.g
    //Christian

    ; Configuration file for Duet WiFi (firmware version 2.03)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Thu Feb 20 2020 13:12:07 GMT+0100 (centraleuropeisk normaltid)
    
    ; General preferences
    G90                                     ; send absolute coordinates...
    M83                                     ; ...but relative extruder moves
    M550 P"My Printer"                      ; set printer name
    
    ; Network
    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 S1                              ; physical drive 1 goes forwards
    M569 P2 S0                              ; physical drive 2 goes backwards
    M569 P3 S0                              ; physical drive 3 goes forwards
    M584 X0 Y1 Z2 E3                        ; set drive mapping
    M350 X16 Y16 Z16 E16 I1                 ; configure microstepping with interpolation
    M92 X160.00 Y160.00 Z2560.00 E873.08    ; set steps per mm
    M566 X900.00 Y900.00 Z12.00 E120.00     ; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X400.00 Y500.00 Z20.00 E250.00     ; set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30            ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                 ; Set idle timeout
    
    ; Axis Limits
    M208 X-33 Y-10 Z0 S1                    ; set axis minima
    M208 X230 Y230 Z240 S0                  ; set axis maxima
    
    ; Endstops
    M574 X1 Y1 Z1 S0                        ; set active high endstops
    
    ; Z-Probe
    M558 P0 H5 F120 T6000                   ; disable Z probe but set dive height, probe speed and travel speed
    M557 X-18:215 Y5:195 S20                ; define mesh grid
    
    ; Heaters
    M305 P0 T100000 B4138 R4700             ; set thermistor + ADC parameters for heater 0
    M143 H0 S120                            ; set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4138 R4700             ; set thermistor + ADC parameters for heater 1
    M143 H1 S280                            ; set temperature limit for heater 1 to 280C
    
    ; Fans
    M106 P0 S0 I0 F500 H-1                  ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45               ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    
    ; Tools
    M563 P0 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
    T0
    ; Custom settings are not defined
    
    

    and the homez.g

    homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Fri Feb 21 2020 13:36:08 GMT+0100 (centraleuropeisk normaltid)
    G91               ; relative positioning
    G1 H2 Z5 F6000    ; lift Z relative to current position
    G1 H1 Z-245 F1800 ; move Z down until the endstop is triggered
    G92 Z0            ; set Z position to axis minimum (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
    
    

    homeX.g

    Homex.G
    
    G91 ; relative mode
    G1 S2 Z4 F200 ; raise head to avoid dragging nozzle over the bed
    G1 S1 X-240 F3000 ; move up to 240mm in the -X direction, stopping if the homing switch is triggered
    G1 X4 F600 ; move slowly 4mm in the +X direction
    G1 S1 X-10 ; move slowly 10mm in the -X direction, stopping at the homing switch
    G1 S2 Z-4 F200 ; lower the head again
    G90 ; back to absolute mode
    


  • The F in home files G1 H2 Z5 F6000 (or similar) is the feedrate. Lower that number to move slower. Try cutting it in half, adjust to your taste from there.



  • @Danal said in move slowly Z axes to endstop (low switch):

    G1 H2 Z5 F6000

    G1 H2 Z5 F6000 should change to G1 H2 Z5 F3000 (for example) only in homez.g file?
    Thanks.



  • Yes. Change it wherever you want the physical behavior of the printer to change.



  • @Danal said in move slowly Z axes to endstop (low switch):

    Yes. Change it wherever you want the physical behavior of the printer to change.

    I am a little confused, have changed to in all home filles, homeall.g, homex.g homez.g, homey.g, but still X axis has the same speed on the way down to endstop. if you want to check my home files, would be grateful for that.

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Fri Feb 21 2020 13:36:07 GMT+0100 (centraleuropeisk normaltid)
    G91                     ; relative positioning
    G1 H2 Z5 F6000          ; lift Z relative to current position
    G1 H1 X-268 Y-245 F800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 H2 X5 Y5 F3000       ; go back a few mm
    G1 H1 X-268 Y-245 F360  ; move slowly to X and Y axis endstops once more (second pass)
    G1 H1 Z-245 F160        ; move Z down stopping at the endstop
    G90                     ; absolute positioning
    G92 Z0                  ; set Z position to axis minimum (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
    
    
    ; homex.g
    ; called to home the X axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Fri Feb 21 2020 13:36:07 GMT+0100 (centraleuropeisk normaltid)
    G91               ; relative positioning
    G1 H2 Z5 F6000    ; lift Z relative to current position
    G1 H1 X-268 F1800 ; move quickly to X axis endstop and stop there (first pass)
    G1 H2 X5 F3000    ; go back a few mm
    G1 H1 X-268 F360  ; move slowly to X axis endstop once more (second pass)
    G1 H2 Z-5 F160   ; lower Z again
    G90               ; absolute positioning
    
    
    
    ; homey.g
    ; called to home the Y axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Fri Feb 21 2020 13:36:08 GMT+0100 (centraleuropeisk normaltid)
    G91               ; relative positioning
    G1 H2 Z5 F6000    ; lift Z relative to current position
    G1 H1 Y-245 F1800 ; move quickly to Y axis endstop and stop there (first pass)
    G1 H2 Y5 F6000    ; go back a few mm
    G1 H1 Y-245 F360  ; move slowly to Y axis endstop once more (second pass)
    G1 H2 Z-5 F160   ; lower Z again
    G90               ; absolute positioning
    
    
    
    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Fri Feb 21 2020 13:36:08 GMT+0100 (centraleuropeisk normaltid)
    G91               ; relative positioning
    G1 H2 Z5 F3000    ; lift Z relative to current position
    G1 H1 Z-245 F160 ; move Z down until the endstop is triggered
    G92 Z0            ; set Z position to axis minimum (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
    
    
    

    Regards Christian


  • Moderator

    It's the F values that dictate the speed of movement (limited to the max speed set in config.g with M203).

    So if you want a move to be faster you'd have to change it for each move.



  • @chris4 said in move slowly Z axes to endstop (low switch):

    change the speed of Z axis on the way to endstop (low switch) to a slow speed last cm, to endstop. The same slow speed, as on the x and y axis. I have this config.g

    I want to change the speed of Z axis on the way to endstop (low switch) to a slow speed last cm, to endstop. The same slow speed, as on the x and y axis. I have this config.g


  • Moderator

    @chris4 said in move slowly Z axes to endstop (low switch):

    G91 ; relative positioning
    G1 H2 Z5 F3000 ; lift Z relative to current position
    G1 H1 Z-245 F160 ; move Z down until the endstop is triggered
    G92 Z0 ; set Z position to axis minimum (you may want to adjust this)

    G91               ; relative positioning
    G1 H2 Z5 F3000    ; lift Z relative to current position
    G1 H1 Z-245 F3000 ; move Z down until the endstop is triggered
    G1 Z5 ; back off 5mm
    G1 H1 Z-25 F360 ; move back to endstop again slowly
    G92 Z0            ; set Z position to axis minimum (you may want to adjust this)
    

    Something like this, similar to how you have x?

    EDIT: Fixed G1 H1 Z5 to be G1 Z5.



  • Thanks, I'll try.


  • Moderator

    @chris4 I had an error in there. I had H1 Z5 ; back off 5mm but you'd of course need G1 H1 Z5 ; back off 5mm



  • @chris4 said in move slowly Z axes to endstop (low switch):

    I want to change the speed of Z axis on the way to endstop (low switch) to a slow speed last cm, to endstop. The same slow speed, as on the x and y axis. I have this config.g

    Prior to hitting an endstop (i.e. 'homing') the machine does not know where it is. Therefore, it cannot run at one speed and the switch to another speed for the last cm, because it does not know where the last cm starts.

    It IS possible to run two homing switches, and slow down after the first one is passed... but even this is not a universal solution... what if the machine is "in between" the switches when it powers up? To solve this, the "go fast until here" switch MUST remain triggered while the machine is still moving toward the "final" endstop.

    So... an optical endstop, with a "blade" or "gate" on the moving part of the machine such that it triggers 1cm from final, and stays triggered, plus a final endstop switch. That is one potential solution. The same thing can be accomplished via inductive switches and long metal plates. If you are willing to set something like this up mechanically, a "fast then slow" can be configured to work consistently.

    Most people aren't willing to do this. A single switch with a medium speed approach, a back off, and a slow final, that works so well it has become a de-facto standard.


  • administrators

    @Phaedrux said in move slowly Z axes to endstop (low switch):

    @chris4 I had an error in there. I had H1 Z5 ; back off 5mm but you'd of course need G1 H1 Z5 ; back off 5mm

    And H2 in that command, not H1.


  • Moderator

    @dc42 ah yes. I think I intended to have just g1 z5 since it would be homed, but then corrected my typo with another error.



  • @Phaedrux said in move slowly Z axes to endstop (low switch):

    corrected my typo with another error.

    Wow, I've NEVER done that!!! 🙂


Log in to reply