M703 inside load.g not supported
-
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. -
@Exerqtor which Duet are you using, and are you running in standalone mode or SBC mode? Did it work in RRF 3.4.5 ?
-
@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.
-
@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. -
@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 outM703
withM98
in myload.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 aM703
lol. -
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.
-
@pfn I don't think this has ever worked because the filament isn't set before the
load.g
macro completes AFAIR. Call your filamentconfig.g
manually if you need to configure it as part of the load macro. Note that at least DWC calls M703 after M701 anyway. -
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).
-
@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.
-
-
@T3P3Tony Yeah ofc, sorry I should have done that myself once we discovered it wasn't an isolated thing
🤦♂️