@Leonard03
I don't have an answer for your original issue, but...
If you want to get your config.g
to run with M98
without the error after startup, you can use the exists()
function to check if the global already exists and use the result to skip defining the globals again.
https://docs.duet3d.com/User_manual/Reference/Gcode_meta_commands

So this,
global MMUmode = true ; enable or disable Multi Material Unit
if global.MMUmode = true
global spoolJoin = false ; enable or disable the SpoolJoin feature of the Multi Material Unit
global useCutter = true ; enable or disable the CUT feature of the Multi Material Unit
global statusBondtech = 0
global statusFinda = 0
global currentSlot = {null, null} ; [0]last loaded slot, [1]last tool temperature
global loadNext = false
global pause = false
global tcBlock = false
global counter = {0,0,0} ; [0]extruder count, [1]fails, [2]total attempts
global errQueue = {null,null}
becomes this,
if !exists(global.MMUmode)
global MMUmode = true
if global.MMUmode = true
global spoolJoin = false ; enable or disable the SpoolJoin feature of the Multi Material Unit
global useCutter = true ; enable or disable the CUT feature of the Multi Material Unit
global statusBondtech = 0
global statusFinda = 0
global currentSlot = {null, null} ; [0]last loaded slot, [1]last tool temperature
global loadNext = false
global pause = false
global tcBlock = false
global counter = {0,0,0} ; [0]extruder count, [1]fails, [2]total attempts
if !exists(global.errQueue)
global errQueue = {null,null}
Then just change the true
to false
on line 2 to achieve the mode your desire between reboots.
You only need to check MMUmode
because if MMUmode
doesn't exist, then none of the globals can exist because MMUmode
is used to create all of the other globals.