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

    G0 speed not as expected

    Scheduled Pinned Locked Moved
    CNC
    7
    14
    1.2k
    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.
    • alankilianundefined
      alankilian @baird1fa
      last edited by

      @baird1fa

      I don't mean to be an idiot here, but your "Rapid XY to end of the table" is a G1 not a G0

      Is that going to make a difference?

      SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

      baird1faundefined 1 Reply Last reply Reply Quote 0
      • Elonundefined
        Elon @baird1fa
        last edited by Elon

        @baird1fa I'm still new to this but recently woke up my own slow motors with 2 steps. One was my max was too low. You've already fixed that. The other was raising the motor current. I started low based on the guide's advice. I brought it closer to 75-80% of the rated amount and it's doing much better.

        1 Reply Last reply Reply Quote 0
        • 3DPMicroundefined
          3DPMicro @baird1fa
          last edited by

          @baird1fa your saying you can program a G1 simultaneous XY move at 24kmm/m and not the same move for a G0 rapid?
          Your step rate seems pretty high. You may be hitting the limit with those timings and step pulse output if it will run 24k on one axis but not 2 together. Also I dont use microstepping with external drives. I didnt think it worked as I thought the last time I tried it. If it does 64 is quite high

          Duet controlled Jet Lathe, scratch built micro mill and 3d printer. 1992 Haas VF2 VMC retrofit

          baird1faundefined 1 Reply Last reply Reply Quote 0
          • alankilianundefined
            alankilian @baird1fa
            last edited by

            @baird1fa said in G0 speed not as expected:

            M569 P5 S0 R1 T5:2.5:5:7.5
            M92 X394.09 Y394.09 Z1280.00 A420.00
            Here is an example of the macro I use, but really any G0 X** Y** will only run at 300mm/s

            If I'm doing the math right:

            • 300 mm/s times 394 steps-per-mm = 118,200 steps-per-second
            • 5microseconds step pulse + 2.5 microseconds step rate = 7.5 microseconds
            • 1/7.5 microseconds = 133,333 steps-per second

            Sp it seems like 300mm/seconds might be hitting the maximum rate you said your stepper motor drivers can accept.

            Is my math right here?

            SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

            baird1faundefined 2 Replies Last reply Reply Quote 0
            • baird1faundefined
              baird1fa @alankilian
              last edited by

              @alankilian Thanks for pointing that out. I changed it after I discovered the issue, then blindly posted it in response to phaedrux. It was a G0 command but would only travel at 18000mm/min, so I changed it to a G1 command to get it moving at 24000mm/min. It's a work around in this case but when I run jobs, I just use G0 from the post processor and there really isn't a good work around because even if I add a feed rate to G0 it is ignored when in CNC mode.

              1 Reply Last reply Reply Quote 0
              • baird1faundefined
                baird1fa @3DPMicro
                last edited by

                @3dpmicro That is correct. I can move at 24000mm/min with G1 command, but when I use a G0 it will only run at 18000mm/min.

                1 Reply Last reply Reply Quote 0
                • baird1faundefined
                  baird1fa @alankilian
                  last edited by

                  @alankilian Forgive me but I didn't actually do the math, I just blindly punched in the numbers. your calculations look sound, and then the max would actually be 338mm/s

                  If your math is correct and that is the issue I'm facing then there is another issue in the firmware where it reports that it is running faster than it actually is. When I use a G1 command, say G1 X1000 Y2200 F24000, the DWC shows that the requested speed is 400mm/s and the actual is 400mm/s.

                  1 Reply Last reply Reply Quote 0
                  • baird1faundefined
                    baird1fa @alankilian
                    last edited by

                    @alankilian

                    I don't think this is the issue. I just took your advice and changed the maximum speed to 330mm/s (by the math I should be able to hit 338mm/s as an absolute max) and I still get 300mm/s for the G0 and if I use G1 X** F24000 It maxes out at 330mm/s.

                    I changed the M203 to 19800mm/min in my config.

                    So regardless there still seems to be some type of issue where G0 maxes out at 300mm/s on my application.

                    1 Reply Last reply Reply Quote 0
                    • baird1faundefined
                      baird1fa
                      last edited by

                      Hello Everyone,

                      Thank you for your replies, based on what was said/suggested I tried a couple of things.

                      I looked back to the manual of the stepper driver and found that I can run the pulses at 2.5us so I made that change which should allow for upto 507mm/s, based on the math provided by alankilian. it does sound like the machine moves faster now at 300mm/s so maybe there is some issue where the pulses are a limiting factor and the display isn't showing that correctly. Even with that new pulse speed the G0 still maxes out at 300mm/s

                      Here is the relevant changes in the config.g

                      ; External Drives
                      M569 P5 S0 R1 T2.5:2.5:5:7.5                     		; external drive 5 goes forwards requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time
                      M569 P6 S1 R1 T2.5:2.5:5:7.5                     		; external drive 6 goes forwards requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time
                      M569 P7 S1 R1 T2.5:2.5:5:7.5                     		; external drive 7 goes forwards requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time
                      M569 P8 S1 R1 T2.5:2.5:5:7.5                     		; external drive 8 goes forwards requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time
                      M569 P9 S1 R1 T2.5:2.5:5:7.5                    		; external drive 9 goes forward requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time
                      
                      ; Disable internal drives
                      ;M569 P1 R-1									   	; disable physical drive
                      ;M569 P2 R-1                                    	; disable physical drive 2
                      ;M569 P3 R-1				                     	; disable physical drive 3
                      ;M569 P4 R-1                                    	; disable physical drive 4
                      ;M569 P5 R-1	                                 	; disable physical drive 5
                      
                      ; Map axis drives
                      M584 X7 Y5:6 Z8 A9                            		; set drive mapping
                      ;M350 X64 Y64 Z16 E16 I0                        	; configure microstepping with interpolation
                      
                      ; Set drive speeds
                      M92 X394.09 Y394.09 Z1280.00 A420.00            	; set steps per mm
                      M566 X300.00 Y300.00 Z300.00 A120.00            	; set maximum instantaneous speed changes (mm/min)
                      M203 X24000.00 Y24000.00 Z3600.00 A1200.00        	; set maximum speeds (mm/min)
                      M201 X400.00 Y400.00 Z400.00 A250.00           	 	; set accelerations (mm/s^2)
                      M906 X800 Y800 Z800 A800 I30                   		; set motor currents (mA) and motor idle factor in per cent
                      ;M84 S30         
                      

                      I also did try changing the maximum speed to 19800 for x and Y and that also had no effect

                      gloomyandyundefined dc42undefined 2 Replies Last reply Reply Quote 0
                      • gloomyandyundefined
                        gloomyandy @baird1fa
                        last edited by

                        @baird1fa Looking at the source code it would seem that the maximum feedrate for a G0 move is indeed fixed at 18000mm/min. See the code here:https://github.com/Duet3D/RepRapFirmware/blob/3.4-dev/src/GCodes/GCodes.cpp#L1497

                        // Set up the extrusion and feed rate of a move for the Move class
                        // 'moveBuffer.moveType' and 'moveBuffer.isCoordinated' must be set up before calling this
                        // 'isPrintingMove' is true if there is any axis movement
                        // Returns nullptr if this gcode is valid so far, or an error message if it should be discarded
                        const char * GCodes::LoadExtrusionAndFeedrateFromGCode(GCodeBuffer& gb, bool isPrintingMove) THROWS(GCodeException)
                        {
                        	// Deal with feed rate, also determine whether M220 and M221 speed and extrusion factors apply to this move
                        	if (moveState.isCoordinated || machineType == MachineType::fff)
                        	{
                        		moveState.applyM220M221 = (moveState.moveType == 0 && isPrintingMove && !gb.IsDoingFileMacro());
                        		if (gb.Seen(feedrateLetter))
                        		{
                        			gb.LatestMachineState().feedRate = gb.GetSpeed();				// update requested speed, not allowing for speed factor
                        		}
                        		moveState.feedRate = (moveState.applyM220M221)
                        								? speedFactor * gb.LatestMachineState().feedRate
                        								: gb.LatestMachineState().feedRate;
                        		moveState.usingStandardFeedrate = true;
                        	}
                        	else
                        	{
                        		moveState.applyM220M221 = false;
                        		moveState.feedRate = ConvertSpeedFromMmPerMin(DefaultG0FeedRate);	// use maximum feed rate, the M203 parameters will limit it
                        		moveState.usingStandardFeedrate = false;
                        	}
                        

                        and here:https://github.com/Duet3D/RepRapFirmware/blob/3.4-dev/src/Config/Configuration.h#L221

                        constexpr float DefaultG0FeedRate = 18000.0;			// The initial feed rate for G0 commands after resetting the printer, in mm/min
                        

                        I'm not sure where that default/maximum value comes from though. Perhaps @dc42 could comment?

                        1 Reply Last reply Reply Quote 3
                        • dc42undefined
                          dc42 administrators @baird1fa
                          last edited by

                          @baird1fa, @gloomyandy is correct. I will fix this in RRF 3.4.2rc2.

                          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

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