Is there a G-code for waiting?

  • My printer has an auto-leveling feature that works by touching the build plate with the tip of the nozzle.



    I started using a BuildTak surface and BuildTak is damaged when you push a hot nozzle into it.



    So I edited the start G-code to run the auto-leveling before heating up the hotend



    But ABS doesn't stick to the build surface unless I pre-heat the hotend and wait about a minute.



    So now I'm looking for a G-code command to put at the end of the start G-code that will make the printer wait a minute before printing



    The sequence I'm looking for is:




    • Heat up the bed

    • Auto level

    • Raise the hotend a little bit so it doesn't touch the build plate

    • Heat up the hotend

    • Wait a minute (that's the only part that is missing, everything else works)

    • Start printing



    Any way to insert a delay into the G-code?



    I'm using Cura to slice/print, my printer is Robo3D R1+


    Hi, @Nir! So, you want to set hotend temperature, and wait until it is warm before printing (at the end of start.gcode)? I generally doubt you really need to explicitly set a delay - it is basically a hack to overcome (not fix) the problem!

    @LarsPötter That should be an answer, not a comment!

    @LarsPötter thanks, if you post your comment as an answer I'll accept it

    @TormodHaugene - I wrote the entire back story as to why I'm looking for this, if you have a better solution I'm open to trying it

    @Nir, I believe I answered that previous question. It's getting late now, but I can have a look at it tomorrow, if you like! :-)

    @Nir, could you post the code in start.gcode that you are currently using? I believe ´M109 S{print_temperature}´ is the command you are looking for, as was posted in the previous question. Did that work? http://3dprinting.stackexchange.com/questions/454/how-to-configure-cura-to-run-the-z-probe-before-heating/469#469

    @TormodHaugene - yes, M 109 works, everything works perfectly for PLA but ABS doesn't stick to the bed, if I pre-heat the hotend (and remove the M 109) the ABS does stick to the bed - so my working assumption (that I have to test) is that it takes a little bit of extra time for the heat to make it from the thermistor to the tip of the nozzle

    @Nir, Oh, I see. In that case, you are probably right that adding a delay or "Dwell" (with G4) is the way to go. :-)

  • The G-code to delay is G4.



    G4 P60000 will wait for one minute. The P is in milliseconds. Some firmware also accept a S Parameter that has the seconds. So, if supported, G4 S60 would do the same thing.



    The details for this and all other G-codes are documented
    here.


    In my end-G-code, I shut off the hot end, and wait several minutes before shutting off the fan. I was getting communications timeout errors and the fan would never actually shut off from the code (using Monoprice Select Mini with Octoprint). If this occurs for you before the print, it will not print at all. I resolved it by simply breaking it up unto a series of shorter delays.

    For cncjs, the command is G4 P0.5 for half a second, for example. i.e. it's a float, not an int.

    so the P actually behaving like the S parameter (seconds instead of milliseconds). Can you also put that information into here: https://reprap.org/wiki/G-code#G4:_Dwell

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM

Tags used