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

    multiple lines of gcode executed at the same time

    Scheduled Pinned Locked Moved Solved
    General Discussion
    4
    11
    539
    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.
    • Jos_mosaundefined
      Jos_mosa
      last edited by

      We are making a machine with a 6HC and 5 3HC and 1 1XD and we find that multiple lines of gcode get executed at the same time. (probably with a milliseconds delay)

      here is our config.g file

      G90									; absolute mode
      M83									; relative extrusion
      M111 S0                             ; Debug off
      G21 								; Work in millimetres
      
      ; Display initial welcome message
      M291 R"This machine is in maintenance mode, be carefull!" P"Axis will move without restrictions." S1 T0
      G4 S2  						 ;wait for expansion boards to start
      
      ;M564 H0 S1		; H0=move without homing S1=move within boundaries
      
      ;stepper setup S=CW/CCW R=enable high/low
      ;motors on mainboard
      M569 P0.3 S0   ; left bottom pump goes forwards
      M569 P0.4 S1   ; left middle pump goes forward
      M569 P0.5 S1   ; left top pump goes forwards
      ;Z drive at 1XD
      M569 P122.0 S0 R0 ; Z drive
      ;motors on 3HC 1
      M569 P1.0 S1   ; U drive right goes forwards
      M569 P1.1 S1   ; Y drive left goes backwards
      ;motors on 3HC 2
      M569 P2.0 S0   ; motor goes forwards
      M569 P2.1 S1   ; motor left goes backwards
      ;motors on 3HC 3
      M569 P3.0 S0   ; motor goes forwards
      M569 P3.1 S1   ; motor left goes backwards
      ;motors on 3HC 4
      M569 P4.0 S0   ; X drive goes forwards
      M569 P4.1 S0   ; Y drive right goes backwards
      ;motors on 3HC 5
      M569 P5.0 S0   ; right bottom pump goes forwards
      M569 P5.1 S0   ; right middle pump right goes backwards
      M569 P5.2 S0   ; right top pump forwards
      
      
      ;linear Mapping
      M584 U1.0 X4.0 Y1.1:4.1 Z122.0 S0		; set drive mapping
      ; Axis Limits
      M208 U72 X0 Y0 Z0 S1     				; set axis minima
      M208 U1528 X1456 Y255 Z270 S0  		   	; set axis maxima
      ; Endstops
      M574 U2 S1 P"!3.io0.in"   				; U max active low(!) endstop switch
      M574 X1 S1 P"!2.io0.in"   				; X min active low(!) endstop switch
      M574 Y2 S1 P"!1.io0.in+!4.io0.in"   	; Y max active low(!) endstop switch
      M574 Z2 S1 P"!1.io1.in+!4.io1.in"   	; Z max active low(!) endstop switch
      
      ;pump mapping
      M584 E0.5:0.4:0.3:5.2:5.1:5.0
      
      M350 U16 X16 Y16 Z16 I1  				; configure linear microstepping 
      M350 E16:16:16:16:16:16					; configure pump microstepping 
      M92 U26.7 X26.7 Y60 Z1600 				; set linear axis steps/mm
      M92 E3200:3200:3200:3200:3200:3200		; set pump steps/mm
      M566 U60 X60 Y60 Z60					; Maximum jerk speeds mm/minute
      M566 E10:10:10:10:10:10					; Maximum pump jerk speeds mm/minute
      M203 U42000 X42000 Y12000 Z900			; Maximum speeds (mm/min)
      M203 E1000:1000:1000:1000:1000:1000		; Maximum pump speeds (mm/min)
      M201 U1000 X1000 Y500 Z30				; Accelerations (mm/s^2)
      M201 E10:10:10:10:10:10					; pump Accelerations (mm/s^2)
      M906 U2000 X2000 Y3000 I30				; Set motor currents (mA)
      M906 E3000:3000:3000:3000:3000:3000		; Set pump currents (mA)
      M84 S30             		   			; Set idle timeout
      

      so we made a little macro

      G1 X100 F6000
      G1 Y100 F6000
      

      and what happens is

      G1 X100 Y100 F6000
      

      What are we doing wrong?

      fcwiltundefined danzaywerundefined 2 Replies Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @Jos_mosa
        last edited by

        @jos_mosa

        What do you want it to do?

        Frederick

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

        Jos_mosaundefined 1 Reply Last reply Reply Quote 0
        • danzaywerundefined
          danzaywer @Jos_mosa
          last edited by

          @jos_mosa if you want a movement to be performed at the end of the previous one you have to use M400

          G1 X100 F6000
          M400
          G1 Y100 F6000
          
          Jos_mosaundefined 1 Reply Last reply Reply Quote 0
          • Jos_mosaundefined
            Jos_mosa @fcwilt
            last edited by

            @fcwilt We want it to move to the right.
            Then, when it has moved to the right it, move to the back.
            In that sequence.

            But in stead, it moves to the back right in one go.

            1 Reply Last reply Reply Quote 0
            • Jos_mosaundefined
              Jos_mosa @danzaywer
              last edited by

              @danzaywer M400 does not do what it should, still the same result.
              G4 Sxx does work (as a backup, but should absolutely not be needed)

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

                @jos_mosa what firmware version are you running?

                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

                Jos_mosaundefined 1 Reply Last reply Reply Quote 0
                • Jos_mosaundefined
                  Jos_mosa @dc42
                  last edited by

                  @dc42
                  RepRapFirmware for Duet 3 MB6HC version 3.3 (2021-06-15 21:45:47) running on Duet 3 MB6HC v1.01 or later (SBC mode)

                  Also on the expansion boards

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

                    @jos_mosa I'm not aware of any bug in 3.3 that would cause the issue you report. However, there have been major changes in the development of RRF 3.4 that may affect the behaviour. So please upgrade to RRF 3.4RC2 and see if you still get the incorrect behaviour. If you do then I will attempt to reproduce your configuration.

                    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

                    Jos_mosaundefined 1 Reply Last reply Reply Quote 0
                    • Jos_mosaundefined
                      Jos_mosa @dc42
                      last edited by Jos_mosa

                      @dc42 we updated to 3.4RC2 but now the pi will not connect to it.
                      DCS is not started.
                      sudo journalctl -u duetcontrolserver gives: invalid protocol version 6

                      went for unstable release

                      1 Reply Last reply Reply Quote 0
                      • Jos_mosaundefined
                        Jos_mosa
                        last edited by

                        Installed 3.4RC2 and it now works as it should

                        Thanks for the tips

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

                          @jos_mosa thanks, I'll close this thread.

                          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 0
                          • dc42undefined dc42 marked this topic as a question
                          • dc42undefined dc42 has marked this topic as solved
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA