Bed Mesh, then heat up



  • I'm looking how to get the following to work when i start a print.

    Home,
    Auto Bed Mesh
    Home
    Heat bed and Hotend,
    Prime
    Start the print.

    does this all go in the slicers gcode or can i use the g files on the board?



  • @pr0xyfl00d3r So essentially what you have a series of gcode (or mcode) commands that you want to run consecutively, before a print. You can either put all those commands into your slicer start gcode section, or you can put them in a macro, or you can use a combination of both - i.e. call a macro from the slicer start gcode.

    A macro is nothing more than a sequence of commands that get carried out one after another. The homing files are examples of this. There is no point in re-inventing the wheel so you wouldn't want to put all the individual homing commands into the start gcode or some other macro - you just call the homing macro from within another, or the start gcode section of the slicer.

    I feel that I might not have explained that well. Does it help or have I confused you even more?



  • @deckingman said in Bed Mesh, then heat up:

    @pr0xyfl00d3r So essentially what you have a series of gcode (or mcode) commands that you want to run consecutively, before a print. You can either put all those commands into your slicer start gcode section, or you can put them in a macro, or you can use a combination of both - i.e. call a macro from the slicer start gcode.

    A macro is nothing more than a sequence of commands that get carried out one after another. The homing files are examples of this. There is no point in re-inventing the wheel so you wouldn't want to put all the individual homing commands into the start gcode or some other macro - you just call the homing macro from within another, or the start gcode section of the slicer.

    I feel that I might not have explained that well. Does it help or have I confused you even more?

    I was ok, but if i run the print it heats the bed and hotend before the mesh, i want to run the mesh before the heating but cant figure out how to delay the heating



  • @pr0xyfl00d3r

    Yes, understood. Something very similar to this came up a while ago. What happens is that you tell the slicer what temperatures you want to use, but when it creates the gcode file, it first inserts those temperature commands, before it inserts whatever you put in your start gcode section. Hence it isn't easy to delay the heating.

    There is way to get around it but not a quick and easy way. What you have to do is set the temperatures in the slicer to zero or at least the first layer temperatures. Then create a macro that does everything you want to do, in the order that you want it to happen and call this macro from the the start gcode section of the slicer. Essentially, you have to dissable the slicer from setting the first layer temperature and do it in a macro after you've done the other things that you want to happen first.

    Alternatively, you could run the mesh compensation as a stand alone routine before you print. That's easy but not automatic...........


  • administrators

    @pr0xyfl00d3r said in Bed Mesh, then heat up:

    I was ok, but if i run the print it heats the bed and hotend before the mesh, i want to run the mesh before the heating but cant figure out how to delay the heating

    Assuming that you are printing a GCode file from the SD card, you can put the homing and mesh bed compensation commands in start.g instead, so they get executed before the heating commands that your slicer puts at the start of the GCode file. You may also wish to include a T0 command in start.g.



  • @dc42 said in Bed Mesh, then heat up:

    @pr0xyfl00d3r said in Bed Mesh, then heat up:

    I was ok, but if i run the print it heats the bed and hotend before the mesh, i want to run the mesh before the heating but cant figure out how to delay the heating

    Put the homing and mesh bed compensation commands in start.g instead, so they get executed before the heating commands that your slicer puts at the start of the GCode file. You may also wish to include a T0 command in start.g.

    That is the problem though, as I have pointed out. I can't speak for other slicers but Slic3R and it's variants put the temperatures in the file, before it adds the commands from the start.g section. So it will always commencing heating first, then run whatever is in start.g unless you disable the temperatures in the slicer (at least for the first layer).


  • administrators

    The start.g file is an optional macro file on the Duet SD card, that is run at the very start of any SD card print. This is separate from the start GCode that you configure in the slicer.

    Another way that works for some slicers is to include the heating commands in the slicer start GCode, e.g.:

    M140 S[first_layer_bed_temperature]

    When the slicer sees these commands in your start GCode, it doesn't generate its own.



  • @dc42 Ahh OK. Sorry I completely missed that you were referring to a start.g macro, rather that the start gcode section of the slicer.



  • @dc42 said in Bed Mesh, then heat up:

    @pr0xyfl00d3r said in Bed Mesh, then heat up:

    I was ok, but if i run the print it heats the bed and hotend before the mesh, i want to run the mesh before the heating but cant figure out how to delay the heating

    Assuming that you are printing a GCode file from the SD card, you can put the homing and mesh bed compensation commands in start.g instead, so they get executed before the heating commands that your slicer puts at the start of the GCode file. You may also wish to include a T0 command in start.g.

    Thanks for the reply..

    Can you give me an example of what to put in the start.g as I'm new to Duet,

    is it as simple as the following?

    ;homeall.g

    g28 ; Home All
    g32 ; Bed mesh
    T0

    also, do I have to put something in the gcode to trigger the start.g?



  • @pr0xyfl00d3r that looks fine for start.g

    It will run automatically once you hit print and those commands will happen before the slicer start code. You don't have to change anything else.



  • I'm curious as to why you'd want to mesh bed before heating. Doesn't heating potentially warp the bed? I always let my printer sit at bed temp for awhile before I mesh so that it has a chance to stabilize.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.