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

    What are the G Code commands that affect stepper feedrate?

    Scheduled Pinned Locked Moved Unsolved
    Duet Hardware and wiring
    8
    34
    1.3k
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by

      Are you taking acceleration and deceleration into account?

      Z-Bot CoreXY Build | Thingiverse Profile

      jcsb1994undefined 1 Reply Last reply Reply Quote 0
      • jcsb1994undefined
        jcsb1994 @Phaedrux
        last edited by

        @Phaedrux Yeah! (not in this example however). But even when correcting Feedrate for accel/decel losses (which are pretty small) I have more than 60% increase in time taken (feedrate is basically 2/3 of what is should be on paper)

        1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator
          last edited by

          There was a question similar to this recently that DC42 had replied to that may explain what's actually going on but I can't seem to find it right now.

          If you looked back through his posts you may find it.

          Z-Bot CoreXY Build | Thingiverse Profile

          jcsb1994undefined 1 Reply Last reply Reply Quote 0
          • jcsb1994undefined
            jcsb1994 @Phaedrux
            last edited by

            @Phaedrux I tried looking at his recent posts, but there are so many!! I didnt have any luck finding something on feedrate bad conversion.

            My program used to work however. I wonder if this can be caused by upgrading to reprap version 3 (I used to be on RRF2 when it worked).

            Phaedruxundefined 1 Reply Last reply Reply Quote 0
            • Phaedruxundefined
              Phaedrux Moderator @jcsb1994
              last edited by

              @jcsb1994 said in What are the G Code commands that affect stepper feedrate?:

              My program used to work however.

              What was the program? Maybe give some more context on what you are trying to do, how it worked before, and what it does now.

              Z-Bot CoreXY Build | Thingiverse Profile

              jcsb1994undefined 1 Reply Last reply Reply Quote 0
              • jcsb1994undefined
                jcsb1994 @Phaedrux
                last edited by

                @Phaedrux I just found out what made the feedrate slow down. It isnt the firmware update, it is the fact that I added motors to my board! It seems like operating 4 motors compared to only 1 drains too much current for the duet3d wifi. Is there a solution to this. As of now (I just tested) with this command:

                while true
                	G1 U25 F1500
                	G1 H1 U-25 F1500
                M0 H1
                

                I get around 1 sec per move (plus wastes from accel/decel)

                But when I use this command:

                while true
                	G1 X25 Y25 Z25 U25 F1500
                	G1 H1 X-25 Y-25 Z-25 U-25 F1500
                M0 H1
                

                Then I get up to 1.7s per move, as I explained before. It seems linear however, I get a little slower at 2 and 3 motors (around 1.5s per move).

                Is there a current setting to correct this or it is a physical limit to the Duet3D wifi? I am using

                M906 X700.00 Y700.00 Z700.00 U700.00 E500.00           ; Set motor currents (mA)
                

                for my motor currents, and I my 4 motors are actually

                • 2 X - 17hd48002h‑22b

                • 2 X - 17hm15-0904s

                all of which are nema17. Is there a setting for max board current? I am worried about increasing the max current for my individual motors, the 17hm15 can't/shouldnt go a lot higher.

                Am I right thinking it is a current issue?
                Thanks!

                A Former User? Phaedruxundefined 2 Replies Last reply Reply Quote 0
                • A Former User?
                  A Former User @jcsb1994
                  last edited by A Former User

                  @jcsb1994 said in What are the G Code commands that affect stepper feedrate?:

                  ! It seems like operating 4 motors compared to only 1 drains too much current for the duet3d wifi

                  i think i would look at the voltage drop in you supply and wiring before putting the blame on the board

                  https://duet3d.dozuki.com/Wiki/Choosing_and_connecting_stepper_motors

                  (unless the board is a clone, in which case it likely has 35um copper instead of 70um)

                  edit: playing with highlighting feature of the wiki

                  jcsb1994undefined 1 Reply Last reply Reply Quote 0
                  • jcsb1994undefined
                    jcsb1994 @A Former User
                    last edited by

                    @bearer no voltage drop! During movement:
                    adaa440c-2c52-46de-9770-b0f3262ec68c-image.png

                    It is not a clone, so I am really puzzled right now...

                    1 Reply Last reply Reply Quote 0
                    • A Former User?
                      A Former User
                      last edited by

                      running unto back emf issues them maybe, 12v might not be enough to reach the desired speed? its certainly not a current issue.

                      https://www.reprapfirmware.org/ and emf calculator, there is also a section in the wiki linked above

                      1 Reply Last reply Reply Quote 0
                      • Phaedruxundefined
                        Phaedrux Moderator
                        last edited by

                        After commanding those movements send M122 and report the results.

                        Z-Bot CoreXY Build | Thingiverse Profile

                        jcsb1994undefined 1 Reply Last reply Reply Quote 0
                        • jcsb1994undefined
                          jcsb1994 @Phaedrux
                          last edited by

                          @Phaedrux
                          I tried increasing the Vin to around 24V but the movements are still slowed. my 24V power supply was pushed to its current limits however (4.8A consumption, and its rated 5A).

                          Here is what I get with M122. Everything looks fine even at 23.5V but the problem persists.

                          === Diagnostics ===
                          RepRapFirmware for Duet 2 WiFi/Ethernet version 3.1.1 running on Duet WiFi 1.02 or later
                          Board ID: 08DGM-917NK-F23T0-6J9DL-3SS6K-KW9SH
                          Used output buffers: 2 of 24 (22 max)
                          === RTOS ===
                          Static ram: 27980
                          Dynamic ram: 92936 of which 20 recycled
                          Exception stack ram used: 472
                          Never used ram: 9664
                          Tasks: NETWORK(ready,488) HEAT(blocked,1456) MAIN(running,1824) IDLE(ready,80)
                          Owned mutexes: WiFi(NETWORK)
                          === Platform ===
                          Last reset 00:00:54 ago, cause: power up
                          Last software reset at 2020-07-28 12:22, reason: User, spinning module GCodes, available RAM 9872 bytes (slot 2)
                          Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0441f000 BFAR 0xe000ed38 SP 0xffffffff Task MAIN
                          Error status: 0
                          MCU temperature: min 34.2, current 34.6, max 34.7
                          Supply voltage: min 23.5, current 23.5, max 23.6, under voltage events: 0, over voltage events: 0, power good: yes
                          Driver 0: ok, SG min/max not available
                          Driver 1: ok, SG min/max not available
                          Driver 2: ok, SG min/max not available
                          Driver 3: ok, SG min/max not available
                          Driver 4: standstill, SG min/max not available
                          Date/time: 2020-07-28 16:13:24
                          Cache data hit count 94461989
                          Slowest loop: 9.87ms; fastest: 0.12ms
                          I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
                          === Storage ===
                          Free file entries: 9
                          SD card 0 detected, interface speed: 20.0MBytes/sec
                          SD card longest read time 0.6ms, write time 0.0ms, max retries 0
                          === Move ===
                          Hiccups: 0(0), FreeDm: 169, MinFreeDm: 165, MaxWait: 16ms
                          Bed compensation in use: none, comp offset 0.000
                          === MainDDARing ===
                          Scheduled moves: 10, completed moves: 10, StepErrors: 0, LaErrors: 0, Underruns: 0, 0  CDDA state: -1
                          === AuxDDARing ===
                          Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0  CDDA state: -1
                          === Heat ===
                          Bed heaters = -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
                          === GCodes ===
                          Segments left: 0
                          Movement lock held by null
                          HTTP is idle in state(s) 0
                          Telnet is idle in state(s) 0
                          File is ready with "M122" in state(s) 0
                          USB is idle in state(s) 0
                          Aux is idle in state(s) 0
                          Trigger is idle in state(s) 0
                          Queue is idle in state(s) 0
                          Daemon is idle in state(s) 0
                          Autopause is idle in state(s) 0
                          Code queue is empty.
                          
                          1 Reply Last reply Reply Quote 0
                          • Phaedruxundefined
                            Phaedrux Moderator @jcsb1994
                            last edited by

                            @jcsb1994 said in What are the G Code commands that affect stepper feedrate?:

                            all of which are nema17. Is there a setting for max board current? I am worried about increasing the max current for my individual motors, the 17hm15 can't/shouldnt go a lot higher.

                            So you have two different motor types trying to do a coordinated move together?

                            They seem to be quite different motor specs. One rated at 900ma and the other at 1700ma. Setting the current to 700ma for the first would be fine but may be too low for the second.

                            Z-Bot CoreXY Build | Thingiverse Profile

                            jcsb1994undefined 1 Reply Last reply Reply Quote 0
                            • jcsb1994undefined
                              jcsb1994 @Phaedrux
                              last edited by

                              @Phaedrux Ok, so I changed my max current values for 1400mA on the 2 bigger motors. But it didn't change anything.

                              I also had a weird message.

                              I started by uploading this script with the upload and start button

                              echo 12345
                              
                              while true
                              	G1 X25 Y25 Z25 U25 F1500
                              	G1 H1 X-25 Y-25 Z-25 U-25 F1500
                              	M122
                              
                              M0 H1
                              

                              981feeb6-f62a-43c3-b27a-9ba293a942a7-image.png

                              And made sure the movements were taking significantly more time than a second each.

                              Then I pressed on pause, and this message appeared:
                              959a0a88-3183-4bcc-adb0-a82623d7172d-image.png

                              The Printing paused message seems wrong. there isn't even a line ith these values! is the code being changed when uploaded to the Duet3d??

                              1 Reply Last reply Reply Quote 0
                              • A Former User?
                                A Former User
                                last edited by

                                you pressed pause and the duet ran pause.g which by default contain some retraction g-code...

                                jcsb1994undefined 1 Reply Last reply Reply Quote 0
                                • jcsb1994undefined
                                  jcsb1994 @A Former User
                                  last edited by

                                  @bearer Ha ok thanks I understand.. I didn't see it this way I thought it meant where it paused on the running program.

                                  And if a motor current is limited in such a way that it limits its max speed below the required feedrate, will the other motors slow down even if their current max setup will let them reach the required feedrate?

                                  1 Reply Last reply Reply Quote 0
                                  • Phaedruxundefined
                                    Phaedrux Moderator
                                    last edited by

                                    Well there's no way for the firmware to know if back emf or whatever is preventing a motor from behaving as commanded because it's an open loop system, so no, the motion planner shouldn't be slowing down movement because of that.

                                    The reason for asking for the M122 report was to see if there were a number of hiccups being counted, which would be an indication that the internal step rate was being exceeded, which could cause slow down and micro pauses as it tries to keep up. That doesn't look like the case here though.

                                    I'm afraid we'll have to wait until DC42 returns from vacation to be able to really explain what might be going on.

                                    Z-Bot CoreXY Build | Thingiverse Profile

                                    1 Reply Last reply Reply Quote 0
                                    • A Former User?
                                      A Former User
                                      last edited by

                                      we're also missing the microstepping setting and one motor is 0.9deg and the other 1.8deg?

                                      jcsb1994undefined 1 Reply Last reply Reply Quote 0
                                      • jcsb1994undefined
                                        jcsb1994 @A Former User
                                        last edited by

                                        @bearer I have tested with 3 motors of the same model (the one at 1.8deg step) and no luck, the moves still take 1.5s each instead of 1 (1.1 maybe with accel/decel). It doesnt seem like having different motor models change something.
                                        here are my config settings

                                        M350 X16 Y16 Z16 U16 E8 I1                            	; Configure microstepping with interpolation
                                        M92 X101.858 Y50.929 Z101.858 U50.929						; Set steps per mm
                                        

                                        And may be all my settings just in case

                                        ; Drives
                                        G91 
                                        M584 X0 Y1 Z2 U3 E4
                                        ;M584 A0 B1 U2 V3  				   ; map drives for first band
                                        M564 H0	S0	  				   ; can move motors without homing, S0 can ignore axis limits
                                        M569 P0 S1                                         ; Drive 0 goes forwards
                                        M569 P1 S1                                         ; Drive 1 goes forwards
                                        M569 P2 S1                                         ; Drive 2 goes forwards
                                        M569 P3 S1                                         ; Drive 3 goes forwards
                                        M350 X16 Y16 Z16 U16 E8 I1                            	; Configure microstepping with interpolation
                                        M92 X101.858 Y50.929 Z101.858 U50.929						; Set steps per mm
                                        M566 X100.00 Y100.00 Z100.00 U100.00 E120.00                ; Set maximum instantaneous speed changes (mm/min)
                                        M203 X20000.00 Y20000.00 Z20000.00 U20000.0 E20000.00            ; Set maximum speeds (mm/min) Z wobbles at 800
                                        
                                        M201 X1100.00 Y1100.00 Z1100.00 E1100.00                ; Set accelerations (mm/s^2); testing was done at 4500 4500 10 250
                                        M906 X700.00 Y1400.00 Z700.00 U1400.00 E500.00           ; Set motor currents (mA)
                                        M84 S0                                             ; Disable motor idle current reduction
                                        
                                        ; Axis Limits
                                        M208 A0:63 B0:63 U0:63 V0:63 W0:63 X0:63 Y0:63 Z0:63 E0:63                            ; Set axis min-maxima
                                        G92 X0 Y0 Z0 U0 			; set all position to 0 along axis
                                        
                                        ; Endstops
                                        ;M574 A1 B1 U1 V1 W1 X1 Y1 Z1 E1:1:1:1 S0          ; Set active low for all 8 motors on Jack
                                        
                                        M574 X1 S1 P"!xstop"   ; A min active LOW endstop switch
                                        M574 Y1 S1 P"!ystop"   ; B min active LOW endstop switch
                                        M574 Z1 S1 P"!zstop"   ; U min active LOW endstop switch
                                        M574 U1 S1 P"!e0stop"  ; V max active LOW endstop switch
                                        
                                        droftartsundefined 1 Reply Last reply Reply Quote 0
                                        • jcsb1994undefined
                                          jcsb1994
                                          last edited by

                                          So I guess there is no other known possible error source? Next step is further research and possible help from @dc42 ?

                                          droftartsundefined jcsb1994undefined 2 Replies Last reply Reply Quote 0
                                          • droftartsundefined
                                            droftarts administrators @jcsb1994
                                            last edited by

                                            @jcsb1994 your config.g is missing a U value in M201 (max acceleration), so likely using the default and slowing all axes in a coordinated move as a result. Send M201 on its own to check setting, and do the same for each of the other motor settings. Testing each axis individually and seeing if one is slow would be the way the sensible way to test this.

                                            Ian

                                            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                            Phaedruxundefined wilrikerundefined 2 Replies Last reply Reply Quote 2
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA