Problems passing parameters from Slicer
-
Currently, I am experimenting a lot and therefore constantly switching between several slicers.
Instead of bothering with different slicer scripts that all have their code flavor, i would like to keep the script on the slicer side as simple as possible and merely use it to pass the needed parameters like temperatures or the area of the printed object to the DUET and handle all the conditional gcode there.
Unfortunately, the parameters are not passed, although everything looks good in the Gcode file:
I have a DUET36HC in SBC-mode running RRF 3.5 beta 2+prusa slicer start script:
;Starting script set global.temp0={first_layer_temperature[0]} set global.temp1={first_layer_temperature[1]} set global.bedtemp0={first_layer_bed_temperature[0]} set global.bedtemp1={first_layer_bed_temperature[1]} M98 P"0:/sys/start.g"
And my start.g
;///start.g if exists(global.bedtemp0) echo {"global.bedtemp0 is = "^global.bedtemp0} if exists(global.bedtemp1) echo {"global.bedtemp1 is = "^global.bedtemp1} if global.bedtemp0>0 || global.bedtemp1>0 echo "bedtemp0 or bedtemp1 is >=0" if global.bedtemp0 >= global.bedtemp1 M190 P0 S{global.bedtemp0} echo {"heating bed to bedtemp0 of: " ^global.bedtemp0} else M190 P0 S{global.bedtemp1} echo {"heating bed to bedtemp1 of: " ^global.bedtemp1}
Prusa slicer Gcode file:
; generated by PrusaSlicer 2.6.0-alpha4+win64 on 2023-03-04 at 15:07:17 UTC ; ; external perimeters extrusion width = 0.90mm ; perimeters extrusion width = 0.90mm ; infill extrusion width = 0.50mm ; solid infill extrusion width = 0.90mm ; top infill extrusion width = 0.80mm ; support material extrusion width = 0.80mm M73 P0 R19 M107 ; disable fan M190 S80 ; set bed temperature and wait for it to be reached G10 S240 P0 ; set temperature ;TYPE:Custom ;Starting script set global.temp0=240 set global.temp1=240 set global.bedtemp0=80 set global.bedtemp1=60 M98 P"0:/sys/start.g" ...
-
-
@MaxGyver start.g is ran before the gcode is looked at so you can't pass parameters to it.
Use another file name, like print_start.g -
Need a time worm hole to pass something back to start.g
Better to use it for anything pre-slicer. Like homing, or a heat soak, resetting values, etc.
-
I posted how I handle this problem here:
-
@Phaedrux said in Problems passing parameters from Slicer:
Need a time worm hole to pass something back to start.g
Better to use it for anything pre-slicer. Like homing, or a heat soak, resetting values, etc.
Yep, sometimes it is better to take a break and have a coffee. I really did not see the forest for the trees!
-