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

    Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt

    Scheduled Pinned Locked Moved Solved
    Beta Firmware
    4
    31
    1.1k
    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.
    • DocTruckerundefined
      DocTrucker
      last edited by

      Edited the original post to make it clearer.

      Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

      1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @DocTrucker
        last edited by

        @DocTrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:

        @fcwilt

        DWC estop = Duet Web Control emergency stop.

        Why would the first G1 E command work fine (and a second if requested) but the second hang?
        The extruder axis is running in relative mode and not altered.

        Are you sure the E axis is in relative mode?

        Where does it get set to relative mode?

        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

        1 Reply Last reply Reply Quote 0
        • DocTruckerundefined
          DocTrucker
          last edited by

          Yes because it moves twice if I repeat G1 E5 F500 before re-assigning the drives. Also the following line is at the head of the config file:

          ; General preferences
          G90                                           ; send absolute coordinates...
          M83                                           ; ...but relative extruder moves
          

          I had however forgot to include the macros that re-assign the drives:

          set_primary_syring

          M584 E3 B4               ; Set primary syringe to active
          M574 B1 S1 P"ystop"      ; Set limit switch
          

          set_secondary_syring

          M584 E4 B3               ; Swap drives
          M574 B1 S1 P"xstop"      ; Set limit
          

          Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

          1 Reply Last reply Reply Quote 0
          • DocTruckerundefined
            DocTrucker
            last edited by DocTrucker

            The whole config file won't make a massive amount of sense as I am just using the printer to test the dual syringe system before the hardware arrives.

            Primary syringe on physical drive 3 (e0)
            Secondary syringe on physical drive 4 (e1)

            xstop = Primary syringe full, set as limit when running as B axis as you can't do a home drive on an extruder.
            ystop = Secondary syringe full, set as limit when running as B axis as you can't do a home drive on an extruder.

            e0stop = Primary syringe empty. Used to trigger trigger2.g which swaps the drive assignment to E to the secondary syringe, and assigns the primary syringe drive to the B axis.
            e1stop = Secondary syringe empty. Used to trigger trigger3.g which swaps the drive assignment to E to the secondary syringe, and assigns the secondary syringe drive to the B axis.

            config.g

            ; Configuration file for Duet WiFi (firmware version 3)
            
            ; General preferences
            G90                                           ; send absolute coordinates...
            M83                                           ; ...but relative extruder moves
            M550 P"DS"                           ; set printer name
            
            ; Network
            M540 PBE:EF:DE:AD:FE:F2                       ; set custom MAC address
            M552 P192.168.85.116 S1                       ; enable network and set IP address
            M553 P255.255.255.0                           ; set netmask
            M554 P192.168.85.1                            ; set gateway
            M586 P0 S1                                    ; enable HTTP
            M586 P1 S0                                    ; disable FTP
            M586 P2 S0                                    ; disable Telnet
            
            
            ; ######
            
            ; Free endstops
            M574 X0 P"nil"                            ; no X endstop switch, free up X endstop input
            M574 Y0 P"nil"                            ; no Y endstop switch, free up Y endstop input
            M574 Z0 P"nil"                            ; no Z endstop switch, free up Z endstop input
            
            
            ; Drives
            M569 P0 S1                                    ; physical drive 0 goes forwards
            M569 P1 S1                                    ; physical drive 1 goes forwards
            M569 P2 S1                                    ; physical drive 2 goes forwards
            M569 P3 S1                                    ; physical drive 3 goes forwards
            M569 P4 S1                                    ; physical drive 4 goes forwards
            ;M584 X0 Y1 Z2 E3:4                            ; set drive mapping
            M584 X0 Y1 Z2 
            
            
            M350 X16 Y16 Z16 I1                       ; configure microstepping with interpolation
            M92 X100.00 Y100.00 Z3200.00           ; set steps per mm
            M566 X450.00 Y450.00 Z24.00         ; set maximum instantaneous speed changes (mm/min)
            M203 X12000.00 Y12000.00 Z250.20      ; set maximum speeds (mm/min)
            M201 X1800.00 Y1800.00 Z250.00        ; set accelerations (mm/s^2)
            M906 X2000 Y2000 Z800 I30           ; set motor currents (mA) and motor idle factor in per cent
            M84 S30                                       ; Set idle timeout
            M593 F0                                       ; Configure dynamic acceleration adjustment.
            
            M98 P"set_primary_syringe.g"
            M98 P"set_syringe_settings.g"
            
            ; Axis Limits
            M208 X-104.6:83 Y-102.00:102.5 Z-5:196 B0:300
            ;M208 X-104.6 Y-102 Z-5 S1                    ; set axis minima
            ;M208 X83 Y102.5 Z196 S0                      ; set axis maxima
            
            ; Lead screws
            ;M671 X165.0:-165.0 Y0.0:0.0                   ; Z leadscrews are at (-165,0), (165,0) 
            
            ; Endstops
            ;M574 X1 S1 P"xstop"                            ; configure active-high endstop for low end on X via pin xstop
            ;M574 Y1 S1 P"ystop"                            ; configure active-high endstop for low end on Y via pin ystop
            ;M574 Z0 P"nil"                                 ; no Z endstop switch, free up Z endstop input
            
            
            
            ; Z-Probe
            M558 P5 C"zstop" H2.5 F100 T6000 A5 S0.03 R1   ; Set Z probe type to unmodulated and the dive height + speeds. Prod 5 times max to reach 0.03 tollerance.
            G31 P500 X0 Y-59 Z1.17                         ; set Z probe trigger value, offset and trigger height
            M556 S74.25 X0 Y0 Z0                           ; set orthogonal axis compensation parameters
            M557 X-85:80 Y-85:39 S33:24.8                  ; define mesh grid
            
            ; Heaters
            M308 S0 P"bedtemp" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin bedtemp
            M950 H0 C"bedheat" T0                          ; create bed heater output on bedheat and map it to sensor 0
            M307 H0 B0 S1.00                               ; disable bang-bang mode for the bed heater and set PWM limit
            M140 H0                                        ; map heated bed to heater 0
            M143 H0 S120 A0 C0                             ; Raise a heater fault if heatbed exceeds 120C.
            ;M308 S1 P"spi.cs1" Y"rtd-max31865"             ; configure sensor 1 as pt100 via CS pin spi.cs1
            ;M305 P1 B4725 C7.060000e-8 R4700 ; https://e3d-online.dozuki.com/Guide/V6+RepRap+Firmware+Configuration/26
            
            ;e0temp
            M308 S1 P"e0temp" Y"thermistor" B4725 C7.060000e-8 ; configure sensor 1 as thermistor via pin e0temp
            M950 H1 C"e0heat" T1                           ; create nozzle heater output on e0heat and map it to sensor 1
            M307 H1 B0 S1.00                               ; disable bang-bang mode for heater  and set PWM limit
            M143 H1 S300  A0 C0                            ; Raise a heater fault if hotend exceeds 300C.
            M570 H0 P10 T10 S1                             ; Allow a heat bed anomaly to persist for 10 seconds (P10) 
                                                           ; on the before raising a heater fault. Allow a 10C deviation 
                                                           ; from set point (T10) After 0.17 minutes of heater  fault
                                                           ; cancel the build (S0.17).
            M570 H1 P10 T10 S1                             ; Allow a hot end anomaly to persist for 10 seconds (P10)
                                                           ; on the before raising a heater fault. Allow a 
                                                           ; 10C deviation from set point (T10 - default) After 0  
                                                           ; minutes of heater fault cancel the build (S0.17).
            
            ; Fans
            M950 F0 C"fan0" Q500                           ; create fan 0 on pin fan0 and set its frequency
            M106 P0 S0 H-1                                 ; set fan 0 value. Thermostatic control is turned off
            
            ; Tools
            M563 P0 S"E3D V6 Hotend" 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 ; select tool 0
            M302 P1; allow cold extrude
            G92 X0 Y0 Z0 B0 ; set  position
            
            ; Automatic saving after power loss is not enabled
            ; Custom settings are not defined
            
            ; Miscellaneous
            M80                                           ; Enable PS_ON
            M501                                          ; load saved parameters from non-volatile memory
            ;T0                                            ; select first tool
            
            
            

            Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

            1 Reply Last reply Reply Quote 0
            • fcwiltundefined
              fcwilt
              last edited by fcwilt

              Hi,

              Is there a reason to have just one logical extruder and have to swap as opposed to having two logical extruders?

              The firmware already has features to handle multiple tools - which sounds like what you have.

              Is it because of the "homing" issue?

              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

              DocTruckerundefined 1 Reply Last reply Reply Quote 0
              • DocTruckerundefined
                DocTrucker
                last edited by DocTrucker

                Progress. It has something to do with idle hold. If I sent M84 after the syringe swap. The second axis works as expected. Also if I wait for long enough after the hung command the machine has a subtle tone changes and the axus runs as expected.

                So the following sequence of gcodes fails with a hung command...

                G1 E25 F500
                G1 E25 F500
                M584 E4 B3
                M574 B1 S1 P"xstop"
                G91
                G1 H1 B-100 F400
                G90
                M83 ; this has no effect on this problem 
                G1 E25 F500 ; this command not executed.
                

                But the following works fine...

                G1 E25 F500
                G1 E25 F500
                M584 E4 B3
                M574 B1 S1 P"xstop"
                G91
                G1 H1 B-100 F400
                G90
                M84 ; STOP IDLE HOLD
                G1 E25 F500
                G1 E25 F500
                

                Edit: I'll be testing this more to see if the hold issue effects all drives, or just the E/B. Likewise I wouod like to restrict the Idle hold command to just the E and/or B axis to avoid quality issues. Ideally what ever calling M84 fixes can be resolved.

                Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                1 Reply Last reply Reply Quote 0
                • DocTruckerundefined
                  DocTrucker @fcwilt
                  last edited by DocTrucker

                  @fcwilt did you have a look at the linked thread in the first post? I don't want to make this thread a duplicate of that as I think this is a valid bug, but yes.

                  I am looking into reducing down time in a production syringe pump system by running two syringes. At best @dc42 has hinted parallel gcode streams is on the horizon, but at worst I change the home drive of the B axis into a number of smaller drives parsed into other G1 commands so that the idle syringe refills while the other is printing.

                  Not being able todo a home drive on an extruder drive does appear to necessitate the use of B drive too.

                  Edit: "on the horizon" would have probably been better written as "has been considered and not ruled out for a future - not imminent - release"

                  Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                  deckingmanundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
                  • deckingmanundefined
                    deckingman @DocTrucker
                    last edited by

                    @DocTrucker

                    Hi Wes,

                    I've only glanced through this thread so might have missed something, but as I read it you have a macro that uses M584 but it's called after all the M350, M92, M566 (etc) commands and it creates a new axis (the B) axis. From the wiki we have this (quote) :

                    M584 must come earlier in config.g than any M350 and M906 commands. If it creates new axes, it must also be earlier than any M92, M201, M203, M208, M350, M566, M574, M667 and M669 commands.

                    So moving those macro calls to a position earlier in the config.g file should help.

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

                    DocTruckerundefined 1 Reply Last reply Reply Quote 0
                    • DocTruckerundefined
                      DocTrucker @deckingman
                      last edited by DocTrucker

                      @deckingman afternoon Ian. Calling M584 outside of the config file or dynamically is certinally not common and I think the comment in the gcode docs is only really concerned with the initial startup. I was concerned about that and created a macro called set_syringe_settings that set all of the commands that should be set after M584, and called it in the config file. It is in the first post.

                      I tried calling this in the macros that are called dynamically when a syringe hits empty but it didn't seem to help. I will double check though.

                      I did however do empty calls to all of the M/G codes listed in set_syringe_settings after swapping the E/B drives around using M584 and it didn't seem to effect any if the values reported.

                      Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                      1 Reply Last reply Reply Quote 0
                      • DocTruckerundefined
                        DocTrucker
                        last edited by

                        @deckingman Just checked and adding :

                        M98 P"set_syringe_settings.g"

                        To the end of the trigger2.g or trigger3.g had no effect.

                        Also checked the effect of M84 E0 & M84 B. The M84 B had no effect, but M84 E0 did work as well as M84 on its own. Odd that a relative move on the B axis is fine after a drive re-assignment (as the home drive works) but not on the E axis.

                        I did try various versions of G92 after the drive swap (hence finding other bug) encase there was a home flag that needed to be forced, but that had no effect.

                        Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                        1 Reply Last reply Reply Quote 0
                        • fcwiltundefined
                          fcwilt @DocTrucker
                          last edited by

                          @DocTrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:

                          @fcwilt did you have a look at the linked thread in the first post? I don't want to make this thread a duplicate of that as I think this is a valid bug, but yes.

                          Not being able todo a home drive on an extruder drive does appear to necessitate the use of B drive too.

                          An extruder axis doesn't seem to match up well with the limited travel of the device you are trying to control.

                          What is the thinking behind trying to use an extruder axis as opposed to a "normal" axis?

                          Thanks.

                          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

                          DocTruckerundefined 1 Reply Last reply Reply Quote 0
                          • DocTruckerundefined
                            DocTrucker @fcwilt
                            last edited by DocTrucker

                            @fcwilt trying to make use of all of the additional features that are available to an extrusion axis. For this application the argument for using RRF over other Linux CNC is that it is designed and a large amount of its testing is based on systems that squirt a viscous liquid. Loose those and LinuxCNC makes more sense.

                            Besides, this post is predominantly raising the bug that I found after following an approach suggested by @dc42. An extruder axis often has limit switches for out of, or stuck filament. It seems odd that the E axis is behaving differently to the others. My abnormal operations may just be highlighting a usually well hidden bug that can now be addressed.

                            Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                            1 Reply Last reply Reply Quote 1
                            • DocTruckerundefined
                              DocTrucker
                              last edited by DocTrucker

                              @deckingman @fcwilt thanks for the questions though, rethinking from different angles helped me find the M84 E0 work around.

                              Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                              fcwiltundefined 1 Reply Last reply Reply Quote 1
                              • fcwiltundefined
                                fcwilt @DocTrucker
                                last edited by

                                @DocTrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:

                                @deckingman @fcwilt thanks for the questions though, rethinking from different angles helped me find the M84 E0 work around.

                                I was thinking that if super fast homing is not needed you could use the conditional code feature of v3 firmware to "home" an extruder axis without messing with the swapping and encountering the "bug".

                                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

                                1 Reply Last reply Reply Quote 0
                                • DocTruckerundefined
                                  DocTrucker
                                  last edited by

                                  Is this a confirmed bug in 3.3beta2?

                                  Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                                  1 Reply Last reply Reply Quote 0
                                  • DocTruckerundefined
                                    DocTrucker
                                    last edited by

                                    @dc42 @droftarts @Phaedrux @T3P3Tony

                                    Is this a confirmed bug in 3.3beta2?

                                    Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

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

                                      @doctrucker, not it's not a known bug. Are you able to provide a GCode file that when run, provokes the undesired behaviour, without using triggers?

                                      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

                                      DocTruckerundefined 2 Replies Last reply Reply Quote 0
                                      • DocTruckerundefined
                                        DocTrucker @dc42
                                        last edited by

                                        @dc42 No triggers on the example I gave on the 20th of march:

                                        @doctrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:

                                        So the following sequence of gcodes fails with a hung command...

                                        G1 E25 F500
                                        G1 E25 F500
                                        M584 E4 B3
                                        M574 B1 S1 P"xstop"
                                        G91
                                        G1 H1 B-100 F400
                                        G90
                                        M83 ; this has no effect on this problem 
                                        G1 E25 F500 ; this command not executed.
                                        

                                        But the following works fine...

                                        G1 E25 F500
                                        G1 E25 F500
                                        M584 E4 B3
                                        M574 B1 S1 P"xstop"
                                        G91
                                        G1 H1 B-100 F400
                                        G90
                                        M84 ; STOP IDLE HOLD
                                        G1 E25 F500
                                        G1 E25 F500
                                        

                                        Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                                        1 Reply Last reply Reply Quote 0
                                        • DocTruckerundefined
                                          DocTrucker @dc42
                                          last edited by

                                          @dc42 Further to the above in the example where the machine hangs if you wait (probably for the stepper idle current timeout) for a while I suspect the motors will run.

                                          Wouldn't of expected the drive assignment to be something that is actually written to the stepper driver chip?

                                          Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

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

                                            @doctrucker, I think one of the main causes of the problem is that you have declared a new B axis and a new extruder in the M584 command in your sequence of GCodes (your config.g file declares neither an extruder nor the B axis), but after creating them you have not set the motor current, or the steps/mm, or the microstepping. The microstepping should be OK because it will default to x16 with interpolation, but you certainly need to set the motor current and the steps/mm for both B and E after they have been created and before you move then.

                                            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

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