Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Change feed rate during Z homing

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    7
    17
    693
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Former User?
      A Former User
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • infiniteloopundefined
        infiniteloop @deckingman
        last edited by

        @deckingman

        I do an initial fast move to get somewhere close (about 40mm or so), then home Z at "normal" speeds.

        My arrangement is similar, I use a simple switch to ensure Z being around 30 mm above the bed. That happens once when I power-up my printer (usually during homeall.g) and is almost unnoticeable within all the X and Y moves. After that, I redefine my (opto-mechanical) probe to take the part of the Z switch (just as @dc42 proposes in his above post). So, all subsequent homez.g calls just run the "second half" of the sequence, I.e. a precise homing at the center of the bed.

        It is an intriguing idea to smoothen the Z speed while it travels from an unknown position to a switch and then forth to the final probing position, but in practice, the initial move to the Z switch is only needed once to establish a coordinate system. All subsequent homing moves operate from a known position in space and just use the Z probe.

        1 Reply Last reply Reply Quote 0
        • deckingmanundefined
          deckingman
          last edited by

          Just for info, I used to have a second micro switch on a sort of swinging arm arrangement, so I'm used to doing a fast home to the first switch, followed by a second home at lower speed to the second switch. Actually that's not quite true because I stupidly forgot that I could home to the first switch and instead had it set as a trigger. So I used to do a fast 100mm move, check the trigger, and repeat as necessary. But whatever....

          The older I get, the more my memory fails me but IIRC, DC's IR probe (being an analogue device) used to slow down the feed rate when the output reached a certain level (proximity to the bed). So if I'm right and my memory isn't playing tricks, then the firmware used to exist. So I was just wondering if that behaviour could be reinstated or replicated with the caveat being that the the feed rate change would happen when a second switch triggered rather than when an analogue input reaches a threshold value.

          I'm reluctant to do the high speed homing straight to the "nozzle as probe " switch in case that switch should fail. Being a heavy lead screw driven bed, I can only drive it at high speed using high motor current, so bad things would happen. By having a second switch, then both switches would need to fail for a high speed homing move to cause extensive and expensive damage.

          But it's no big deal and two separate homing moves will work well enough - it was just a thought......

          Ian
          https://somei3deas.wordpress.com/
          https://www.youtube.com/@deckingman

          OwenDundefined 1 Reply Last reply Reply Quote 0
          • OwenDundefined
            OwenD @deckingman
            last edited by

            @deckingman said in Change feed rate during Z homing:

            The older I get, the more my memory fails me but IIRC, DC's IR probe (being an analogue device) used to slow down the feed rate when the output reached a certain level (proximity to the bed). So if I'm right and my memory isn't playing tricks, then the firmware used to exist.

            Well the docs for the sensor indicate that behaviour.
            Doesn't prove you're not losing your marbles, but you should be able to find your keys 🤪

            Always use a P value of 500. When the probe is triggered, the Z probe reading will be about 535. When it is slightly higher than the trigger height, the reading will be about 465. With a P value of 500, when the Duet sees the reading of about 465, it knows it is getting close to target height and it will slow down the Z motor.

            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @deckingman
              last edited by

              @deckingman said in Change feed rate during Z homing:

              Sure but that still involves two separate moves at different feed rates does it not? I was asking about one fluid move with a feed rate change after (or rather while) the first end stop triggers or is triggered. i.e. the Z move commences at a fast feed rate, continues at that feed rate until the first (optical) switch triggers, then finishes that same move at a lower feed rate.

              What's wrong with using two separate moves? First a G1 H1 move using the optical switch as the endstop; then configure the nozzle switch to be the endstop instead and use a second G1 H1 move at a lower speed. The only difference is that the Z axis will stop when the first move finishes; but if the second move is at a slow speed, the stop may not be noticeable anyway.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              deckingmanundefined 1 Reply Last reply Reply Quote 0
              • deckingmanundefined
                deckingman @dc42
                last edited by

                @dc42 said in Change feed rate during Z homing:

                @deckingman said in Change feed rate during Z homing:

                What's wrong with using two separate moves?
                ...........

                There is nothing wrong with it all. But as I mentioned in my very first post which you don't seem to gave have bothered reading, I simply asked if it would be possible to replicate the behaviour of the IR probe, as that seems to be quite an elegant solution.

                A simple "no it isn't possible" would have sufficed.

                If I'd known that such a simple question would lead to an argument, I wouldn't have bothered asking the question.

                Ian
                https://somei3deas.wordpress.com/
                https://www.youtube.com/@deckingman

                1 Reply Last reply Reply Quote 0
                • deckingmanundefined
                  deckingman
                  last edited by

                  Sorry to re-visit this topic which seemed to cause such a furore, but I've started to commission my new printer and have additional data.

                  Homing moves to a switch, of necessity cannot have a deceleration phase. So the answer to the question "what is wrong with using two separate moves" is that when one has a large heavy bed weighing several Kgs, an instantaneous stop from even a modest speed such as 20mm/sec, results in a violent jerk which can cause belts to jump, thus destroying any bed levelling that might have been done, and in the longer term is likely to cause irreparable damage to both the lead screws and their nuts.

                  In the short term, I'll revert back to the original method of using the first end stop as a trigger and using a conditional loop to do a series of fast 100mm or so moves, and checking the trigger state after each iteration. This does involve even more moves, but at least each one begins and ends with an acceleration and a deceleration phase, thus preventing the violent and "damage causing" sudden stop.

                  In the longer term, and when funds allow, I might buy an IR probe and position this somewhere/somehow so that I can use this as the first end stop. This will/might give me the feed rate change that I was tentatively enquiring about in my opening post.

                  Ian
                  https://somei3deas.wordpress.com/
                  https://www.youtube.com/@deckingman

                  dc42undefined 1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators @deckingman
                    last edited by

                    @deckingman said in Change feed rate during Z homing:

                    Homing moves to a switch, of necessity cannot have a deceleration phase. So the answer to the question "what is wrong with using two separate moves" is that when one has a large heavy bed weighing several Kgs, an instantaneous stop from even a modest speed such as 20mm/sec, results in a violent jerk which can cause belts to jump, thus destroying any bed levelling that might have been done, and in the longer term is likely to cause irreparable damage to both the lead screws and their nuts.

                    This is already logged as a requested enhancement on github, https://github.com/Duet3D/RepRapFirmware/issues/746.

                    @deckingman said in Change feed rate during Z homing:

                    In the short term, I'll revert back to the original method of using the first end stop as a trigger and using a conditional loop to do a series of fast 100mm or so moves, and checking the trigger state after each iteration. This does involve even more moves, but at least each one begins and ends with an acceleration and a deceleration phase, thus preventing the violent and "damage causing" sudden stop.

                    That sounds a good solution to me.

                    @deckingman said in Change feed rate during Z homing:

                    In the longer term, and when funds allow, I might buy an IR probe and position this somewhere/somehow so that I can use this as the first end stop. This will/might give me the feed rate change that I was tentatively enquiring about in my opening post.

                    I'm sorry, support for changing the feed rate during probing when using a probe with analog output was removed several versions ago. It was replaced with the ability to configure repeated Z probing using a faster feed rate the first time. I appreciate that this doesn't solve your issue.

                    T3P3 created this issue in Duet3D/RepRapFirmware

                    open Controlled deceleration when a homing switch is triggered #746

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    deckingmanundefined 1 Reply Last reply Reply Quote 0
                    • deckingmanundefined
                      deckingman @dc42
                      last edited by

                      @dc42 To be clear on the use case for this, I like to do all homing at reduced motor currents so that if a switch fails, the motor will stall before too much damage occurs. This is especially true in my case whereby I use the nozzle tip as the switch/probe with only about 5mm of movement in the kinetic mount. The hot end is a Slice Engineering Mosquito so too much upward pressure on the nozzle would cause extensive (and expensive) damage to the extremely thin walled heat breaks.

                      A realistic initial homing move for a screw driven heavy bed at reduced motor currents is about 300mm/minute (5mm/sec) and I follow this up with a fine homing move at 60mm/minute (1 mm/sec).

                      But I have about 600mm of vertical travel in the Z direction so if I had previously printed something that tall, it would subsequently take 2 minutes (600mm at 300mm/minute) just to do the initial Z homing. Hence the need/desire to do a much faster move, at full motor current, to get the bed somewhere close to the print head prior to homing proper.

                      The new slotted optical switch is more elegant than the older micro-switch on a swinging arm arrangement that I had before. I have now reverted back to the old way of doing things (a series of fast 80mm moves checking the status of the trigger at each iteration) and it is working well but the ability to change feed rate at a trigger point somewhere during one continuous move would be even more elegant.

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/@deckingman

                      1 Reply Last reply Reply Quote 0
                      • The_Mechanicundefined
                        The_Mechanic @dc42
                        last edited by

                        @dc42
                        I nearly created a thread to ask for a solution like @deckingman and your post made me really happy!

                        I applied this method to my routine but it doesn't work like intended.
                        Where do I've the issue?

                        I'm using a Klicky probe on my Voron Switchwire and I want to make a fast probe to get down to the surface, afterwards I want to do three slow and accurate probes.

                        Here's my config and homez file

                        Would be really grateful for some tips or hints!

                        config.g

                        ; Configuration file for Duet 3 Mini 5+ (firmware version 3)
                        ; executed by the firmware on start-up
                        ;
                        ; General preferences
                        M111 S0
                        M575 P1 S1 B57600                                         ; enable support for PanelDue 
                        G21
                        G90                                                   	  ; send absolute coordinates...
                        M83                                                   	  ; ...but relative extruder moves
                        M550 P"Voron Switchwire"                                  ; set printer name
                        M669 K2 X-1:0:-1 Z-1:0:1
                        
                        ; Network
                        M552 S1                                               	  ; enable network
                        M586 P0 S1                                            	  ; enable HTTP
                        M586 P1 S0                                            	  ; disable FTP
                        M586 P2 S0                                           	  ; disable Telnet
                        
                        ; Drives
                        M569 P0.0 S0 D3	V0		
                        M569 P0.1 S0 D3 V0                                 	  	  ; physical drive 0.1 goes forwards
                        M569 P0.2 S1 D3 V0                                  	  ; physical drive 0.2 goes forwards
                        M569 P20.0 S1 D3 V0                                       ; physical drive 0.3 goes forwards
                        M584 X0.0 Y0.2 Z0.1 E20.0                    	          ; set drive mapping
                        M350 X16 Y16 Z16 E16 I1                              	  ; configure microstepping with interpolation
                        M92 X80.00 Y80.00 Z80.00 		               			  ; set steps per mm
                        M92 E741.075
                        M566 X600.00 Y600.00 Z1000.00 E1200.00              	  ; set maximum instantaneous speed changes (mm/min)
                        M203 X30000.00 Y30000.00 Z30000.00 E10000.00              ; set maximum speeds (mm/min)
                        M201 X5000.00 Y5000.00 Z5000.00 E30000.00                 ; set max accelerations (mm/s^2)
                        M906 X1200 Y1700 Z1200 E650 I30                        	  ; set motor currents (mA) and motor idle factor in per cent
                        M84 S30                                               	  ; Set idle timeout
                        
                        ; Axis Limits
                        M208 X0 Y-8 Z0 S1                             			  ; set axis minima
                        M208 X250 Y210 Z205 S0                         			  ; set axis maxima
                        
                        ; Axis compensation
                        ;M556 S50 X0.10
                        ;M579 X1.001717
                        
                        ; Endstops
                        M574 X1 S4                                    			  ; configure sensorless endstop for low end on X
                        M574 Z1 S2                                   			  ; configure sensorless endstop for high end on Z 
                        M574 Y2 S1 P"io5.in"                                      ; configure active-high endstop for low end on Y via pin io5.in
                        
                        ; Z-Probe
                        M558 K0 P5 C"^io6.in" H2 F4000 T9000 A1 S0.02   		  ; set Z probe type to unmodulated and the dive height + speeds
                        M558 K1 P5 C"^io6.in" H2 F100 T9000 A3 S0.01   			  ; set Z probe for a second and more accurate G30
                        G31 P5 X0 Y25                               			  ; set Z probe trigger value, offset and trigger height
                        G31 Z6.20
                        
                        ;Mesh grid
                        M557 X15:231 Y25:210 P7:7                        		  ; define mesh grid
                        
                        ; Heaters
                        M308 S0 P"temp0" Y"thermistor" T100000 B3988              ; configure sensor 0 as thermistor on pin temp0
                        M950 H0 C"out0" T0                                        ; create bed heater output on out0 and map it to sensor 0
                        M307 H0 R0.274 K0.241:0.000 D12.01 E1.35 S1.00
                        M140 H0                                                   ; map heated bed to heater 0
                        M143 H0 S120                                              ; set temperature limit for heater 0 to 120C
                        M308 S1 P"20.temp0" Y"thermistor" T100000 B4725 C7.06e-8  ; configure sensor 1 as thermistor on pin 121.temp0
                        M950 H1 C"20.out0" T1                                     ; create nozzle heater output on 121.out0 and map it to sensor 1
                        M307 H1 B0 S1.00                                          ; disable bang-bang mode for heater  and set PWM limit
                        M143 H1 S295                                              ; set temperature limit for heater 1 to 295C 
                        
                        ; Fans
                        M950 F0 C"20.out1" Q5000                                  ; create fan 0 on pin out3 and set its frequency
                        M106 P0 C"Part cooling"                           	      ; set fan 0 name and value. Thermostatic control is turned on
                        M950 F1 C"20.out2" Q5000                    	          ; create fan 1 on pin out2 and set its frequency, and tacho output on out2.tach
                        M106 P1 S1 H1 T50                                         ; set fan 1 value. 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
                        
                        ; Miscellaneous
                        M950 S0 C"out6"						  	    			  ; assign GPIO port 0 to heater3 on expansion connector, servo mode
                        M280 P0 S154
                        T0                                                 	      ; select first tool
                        M150 X3
                        M98 P"/macros/neopixel/startup.g"
                        
                        ;; Global variables
                        M98 P"/macros/startup/set_globals.g"
                        
                        ; After startup
                        M98 P"/macros/startup.g"							 	  ;tone after config file was completely executed
                        
                        
                        

                        homez.g

                        ; Z-Home
                        M564 H0
                        G91                									  	 ; relative mode
                        G1 Z10 F2000     										 ; raise head 4mm to ensure it is above the Z probe trigger height
                        M564 H1
                        M98 P"/macros/zprobe/loadclicky.g"						 ; call macro to load the Klicky probe
                        M400													 ; Wait for current moves to finish
                        G90                									     ; back to absolute mode
                        G1 H0 X125 F10000 										 ; put head over the x-axis centre of the bed, or wherever you want to probe
                        G1 H0 Y90 F10000										 ; put head over the y-axis centre of the bed, or wherever you want to probe
                        ;M558 P5 C"^io6.in" H2 F4000 T9000 A1 S0.02   			 ; set Z probe type to unmodulated and the dive height + speeds
                        G30 K0               	 									 ; lower head, stop when probe triggered and set Z to trigger height
                        ;G4 P500
                        M400
                        G1 Z5 F1000
                        G30 K1
                        ;M558 P5 C"^io6.in" H2 F100 T9000 A3 S0.01   			 ; set Z probe for a second and more accurate G30
                        G91
                        G1 Z15 F1000
                        M98 P"/macros/zprobe/unloadclicky.g"					 ; call macro to unload the Klicky probe
                        G90
                        G1 X0 Y0 F10000
                        M558 P5 C"^io6.in" H2 F500 T9000 A1 S0.01   			 ; set Z probe to standard back
                        M564 S1
                        
                        dc42undefined 1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators @The_Mechanic
                          last edited by

                          @The_Mechanic said in Change feed rate during Z homing:

                          M558 K0 P5 C"^io6.in" H2 F4000 T9000 A1 S0.02 ; set Z probe type to unmodulated and the dive height + speeds
                          M558 K1 P5 C"^io6.in" H2 F100 T9000 A3 S0.01 ; set Z probe for a second and more accurate G30

                          Define just one probe, not two, like this:

                          M558 K0 P5 C"^io6.in" H2 F4000:100 T9000 A4 S0

                          F4000:100 tells it to probe at 4000mm/min for the first probe and 100mm/min for subsequent probes. A4 tell is to do at most 4 probes, and S0 tells it to always do all of them and average the results of the slow probes.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          The_Mechanicundefined 1 Reply Last reply Reply Quote 0
                          • The_Mechanicundefined
                            The_Mechanic @dc42
                            last edited by

                            @dc42
                            Thank you very much!
                            It works like you pointed out and how it wanted it to behave.

                            But: one issue solved, another appeared...
                            When I'm doing a G29 before the print I'm having the same settings for those probings, which take nearly 4 times longer.

                            Is the solution to use
                            M558 K0 P5 C"^io6.in" H2 F1000 T9000 A1 S0 before the G29?

                            jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                            • jay_s_ukundefined
                              jay_s_uk @The_Mechanic
                              last edited by

                              @The_Mechanic yes, you can make that change in bed.g at the beginning and then change it back at the end.

                              Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Unless otherwise noted, all forum content is licensed under CC-BY-SA