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

M703 inside load.g not supported

Scheduled Pinned Locked Moved
General Discussion
rrf 3.5.0-b2 duet 3 mini 5+ standalone
7
12
466
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.
  • undefined
    Exerqtor
    last edited by T3P3Tony 8 Mar 2023, 15:37

    Having M703 inside load.g don't work for some reason even though load.g is completed fully with M703 being the last line (before the echo confirming that the file has been completed).

    Happening on a Duet 3 Mini 5+ in standalone btw

    1 Reply Last reply Reply Quote 0
    • undefined
      Phaedrux Moderator
      last edited by 8 Mar 2023, 19:31

      Can you share the full contents of load.g?

      Z-Bot CoreXY Build | Thingiverse Profile

      undefined 1 Reply Last reply 8 Mar 2023, 20:44 Reply Quote 0
      • undefined
        Exerqtor @Phaedrux
        last edited by 8 Mar 2023, 20:44

        Ofc:

        ; filaments/"filament"/load.g
        ; called when M701 S"filament" is sent
        ; ====================---------------------------------------------------------
        ; Settings section
        ; ====================
        ; Filament settings
        var FilamentType = "ABS" ; Input the filament type (only for the message)
        ; Message placeholders
        var Message1 = "N/A"
        ; ====================---------------------------------------------------------
        ; Message section
        ; ====================
        ; Generate message
        set var.Message1 = "" ^ var.FilamentType ^ " filament loaded"
        ; Filament loaded message
        M118 P0 S{var.Message1} ; Send message to DWC
        M118 P2 S{var.Message1} ; Send message to PanelDue
        M703 ; Load filament config.g for the selected filament
        echo "load.g end"

        This is what shows up in DWC console:

        8.3.2023, 16:52:10 ABS filament loaded

        And this is what config.g (filament) contains:

        ; filaments/ABS/config.g (v2.1)
        ; called when M703 is sent and ABS is loaded
        ; ====================---------------------------------------------------------
        ; Settings section
        ; ====================
        ; Filament settings
        var FilamentType = "ABS" ; Input the filament type (only for the message)
        var Default = false ; Use default settings (retraction and PA), true/yes or false/no
        var PA = 0.045 ; Pressure advance amount (s)
        var RLen = 0.400 ; Retraction length (mm)
        var X_URLen = 0.010 ; Extra unretract length (mm)
        var RSpd = 4200 ; Retraction speed (mm/min)
        var URSpd = 4200 ; Unretract speed (mm/min)
        var Z_Lift = 0.200 ; Zlift amount (mm)
        ; Message placeholders
        var Message1 = "N/A"
        var Message2 = "N/A"
        ; ====================---------------------------------------------------------
        ; Config section
        ; ====================
        if !var.Default
        ; Pressure Advance
        M572 D0 S{var.PA} ; Set extruder 0 pressure advance to 0.1 seconds
        ;Retraction & Zlift
        M207 S{var.RLen} R{var.X_URLen} F{var.RSpd} T{var.URSpd} Z{var.Z_Lift} ; Set firmware retraction length, extra un-retract lenght, retract speed, unretract speed & zlift
        ; ====================---------------------------------------------------------
        ; Define & send messages
        ; ====================
        if var.Default
        set var.Message1 = "" ^ var.FilamentType ^ " config applied (default settings)"
        else
        set var.Message1 = "" ^ var.FilamentType ^ " config applied"
        if move.extruders[0].pressureAdvance = 0
        set var.Message2 = "Pressure Advance disabled"
        else
        set var.Message2 = "Pressure Advance set to " ^ move.extruders[0].pressureAdvance ^ " seconds"
        ; Config applied message
        M118 P0 S{var.Message1} ; Send message to DWC
        M118 P2 S{var.Message1} ; Send message to PanelDue
        ; Pressure advance info message
        M118 P0 S{var.Message2} ; Send message to DWC
        M118 P2 S{var.Message2} ; Send message to PanelDue

        None of the settings or messages within config.g gets applied/ran.

        undefined 1 Reply Last reply 9 Mar 2023, 15:09 Reply Quote 0
        • undefined
          dc42 administrators @Exerqtor
          last edited by 9 Mar 2023, 15:09

          @Exerqtor which Duet are you using, and are you running in standalone mode or SBC mode? Did it work in RRF 3.4.5 ?

          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

          undefined 1 Reply Last reply 9 Mar 2023, 18:00 Reply Quote 0
          • undefined
            Exerqtor @dc42
            last edited by Exerqtor 3 Sept 2023, 18:02 9 Mar 2023, 18:00

            @dc42 Added tags to the first post.

            I haven't tried it earlier myself, BUT i know of at least one person thats been/are doing it in different 3.4 versions on Duet 3's in standalone.

            undefined 1 Reply Last reply 10 Mar 2023, 07:26 Reply Quote 0
            • undefined
              OwenD @Exerqtor
              last edited by 10 Mar 2023, 07:26

              @Exerqtor
              I think this may have been the case for a while.
              I assume (but aren't sure) it's because the filament isn't "loaded" until load.g actually exits. The docs say if you call M703 with no filament loaded it completes without warning.
              In my own files I seem to have gotten around it by using M98 to call the filament config.g
              I set up my filaments a long time ago using a single universal load and unload so can't remember the exact details regarding M703.

              undefined 1 Reply Last reply 10 Mar 2023, 16:50 Reply Quote 0
              • undefined
                Exerqtor @OwenD
                last edited by 10 Mar 2023, 16:50

                @OwenD said in M703 inside load.g broken in 3.5.0b2:

                @Exerqtor
                I think this may have been the case for a while.
                I assume (but aren't sure) it's because the filament isn't "loaded" until load.g actually exits. The docs say if you call M703 with no filament loaded it completes without warning.
                In my own files I seem to have gotten around it by using M98 to call the filament config.g
                I set up my filaments a long time ago using a single universal load and unload so can't remember the exact details regarding M703.

                Yeah that might be the deal, but i suspect that ain't the intended behavior 😅
                I ended up swaping out M703 with M98 in my load.g too. Since I allready have the "filament type" defined by a variable so it's not a huge hazzle. Buuuut it would be easier/less code to just deploy a M703 lol.

                undefined 1 Reply Last reply 17 Mar 2023, 00:12 Reply Quote 0
                • undefined
                  pfn @Exerqtor
                  last edited by 17 Mar 2023, 00:12

                  @Exerqtor

                  I already responded in discord, but I looked at my filament setting macro and it calls M703 discretely from M701. load.g probably never called config.g for me, but that didn't matter, because M702 must be called before M701 anyway, so I combined all that into the macro.

                  undefined 1 Reply Last reply 17 Mar 2023, 10:15 Reply Quote 0
                  • undefined
                    chrishamm administrators @pfn
                    last edited by chrishamm 17 Mar 2023, 10:15

                    @pfn I don't think this has ever worked because the filament isn't set before the load.g macro completes AFAIR. Call your filament config.g manually if you need to configure it as part of the load macro. Note that at least DWC calls M703 after M701 anyway.

                    Duet software engineer

                    undefined 1 Reply Last reply 17 Mar 2023, 17:17 Reply Quote 0
                    • undefined
                      Exerqtor @chrishamm
                      last edited by 17 Mar 2023, 17:17

                      Yeah with @pfn retracting his statement regarding it working pre 3.5 i have no grounds to say it's ever worked either (since he was my reference lol).

                      undefined 1 Reply Last reply 21 Mar 2023, 11:55 Reply Quote 0
                      • undefined
                        T3P3Tony administrators @Exerqtor
                        last edited by 21 Mar 2023, 11:55

                        @Exerqtor I hope you don't mind but i have changed the title of this topic and moved it to general discussion because its not an issue specifically with 3.5b2.

                        www.duet3d.com

                        undefined 1 Reply Last reply 21 Mar 2023, 17:16 Reply Quote 0
                        • undefined T3P3Tony moved this topic from Beta Firmware 21 Mar 2023, 11:56
                        • undefined
                          Exerqtor @T3P3Tony
                          last edited by Exerqtor 21 Mar 2023, 17:16

                          @T3P3Tony Yeah ofc, sorry I should have done that myself once we discovered it wasn't an isolated thing 🤦‍♂️

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