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

Check if extrusion is possible based on M302 parameters

Scheduled Pinned Locked Moved Solved
Gcode meta commands
2
3
191
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
    Diamondback
    last edited by 19 Mar 2021, 11:34

    Hello,

    my toolchanger has prime/brush macros as part of the actual toolchange code and I wonder if there is a way to check for "is extruder hot enough for extrusion" based on the temperatures set in M302? (without manually checking for hardcoded temps)

    Basically I want to skip the entire prime/brush cycle if I select a given tool when it's cold. Right now it will still try to do it and spawn the expected "too cold for extrusion" errors.
    While this is not doing any harm, I'd still like to avoid that

    undefined 1 Reply Last reply 19 Mar 2021, 22:12 Reply Quote 1
    • undefined
      OwenD @Diamondback
      last edited by 19 Mar 2021, 22:12

      @Diamondback

      Yes you can
      For example I have this as part of my stop.g which gets called at the end of every print.
      The only thing in the slicer stop code is M0

      Note this is part of a loop which checks all tools, turns them off etc
      It's not stand alone code but will give you the idea

      if {state.currentTool!=-1} ; check if any tools are active
      G91 ; relative positioning
      if #tools[state.currentTool].heaters > 0 & heat.heaters[tools[state.currentTool].heaters[0]].current > heat.coldRetractTemperature
      G1 E-2 F300 ; retract the filament a bit before lifting the nozzle to release some of the pressure
      M291 P"Retracted 2mm" R"Retracting" S0 T5
      G4 S6 ; wait for popup
      else
      M291 P{"Not retracted... Heater off or below extrude temp " ^ heat.heaters[1].current ^ " : " ^ heat.coldRetractTemperature ^ "."} R"Retract" S0 T5
      G4 S6 ; wait for popup
      else
      M291 P"No active tool" R"Check tools" S0 T3
      1 Reply Last reply Reply Quote 2
      • undefined
        Diamondback
        last edited by 19 Mar 2021, 23:02

        Ahh, perfect, thanks a lot 🙂 I really need to dig more into what the objectmodel has to offer.

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