M104 or M109 doesn't work on Run on pause

M104 T0 S100 Code doesn't work appropriately at print pause.
I want to let the nozzle temperature cooldown to 100Cº when the print is paused.

When I send @pause to the printer's console, the print pauses well.
But M104 or M109 command is not working.

I have written my pause commands at the Printer Setting -> G-codes -> Event Dependent -> Run on pause.
And the G-Code commands are written as,
 M104 T0 S100
 M104 T1 S100
 G0 X50 Y100 F1500
Sometimes, these command works well, so the nozzle temperature cooldown to 100Cº, but most of the time, this doesn't work.

My Repetier Server is version 1.3.0, and I'm using Marlin Firmware to control my printer.

I tested my printer with Repetier Server of version 1.1.0, M104, and M109 code works on this version.


  • I checked the other version again, but all other versions don't work.
    I can't find other FAQs mentioning this problem.
    My Gcode file sets the nozzle temperature to 250Cº on starting code, and when I pause the print, the nozzle temperature got settled to 100Cº for a while. After a few seconds, the nozzle temperature changes to 250Cº again.
    Why is this happening?
    I want my nozzle temperature to remain at 100Cº until I click "Continue", but it keeps changing to the printing temperature.
  • Are you on a linux system? Then try installing nightly build (see faq entry on homepage). There was an issue with pause, but it wa smore that it send some delayed job commands before pause started. Not sure if I fixed it in 1.4.4 or later.

    But with your second post when you write it got set to 100°C that means the commands get executed as they do on my test just running. What you should do for testing is go to console, enable commands and then hit pause. You should see the 100°C command getting send.

    Now check when the restore temperature gets send if at all. It gets normally just reset on continue so question is where does it come from. Does your firmware change it, then you see no command for it just higher temperature. If it comes from server you see maybe more commands being send helping to find the source. It might be that you have the enable commands in some scripts. There is at least a the pause handling in general tab that would disable temperatures. But the only command knwing how to set old temperatures is normally the continue function.

    Do you have other custom g-codes defined, maybe event dependent that could change temperature?
  • Thank you for your reply.
    First, I tried with the Nightly build as you said, but I'm having the same problem.

    This is what I receive after printing my part on 1.
    Send:3:02:54.594: @pause User requested pause.Send:3:02:54.595: N128 M104 T0 S100 T1 S100Recv:3:02:54.601: okSend:3:02:54.602: N129 M76Recv:3:02:54.605: okSend:3:02:59.925: M117 Layer 1/0Recv:3:02:59.931: okSend:3:03:09.928: M117 ETA 03:52:30 day 20Recv:3:03:09.934: okSend:3:03:19.936: M117 ETE 00:49:21Recv:3:03:19.940: ok
    And this is my G-code's starting code.
    G90M82M106 S0M104 T0 S250G92 E0G1 Z0G92 Z0; process Process1; layer 1, Z = 0.191T0G92 E0.0000G1 E-10.0000 F7200
    When I click the pause, the temperature drops to 100ºC, but after a while, the Extruder 1 temperature returns to 250ºC. I was watching the console to find what makes the temperature go back to 250, and I found that when it happens when M117 is sent on the console.
    Send:3:07:10.086: M117 Layer 1/0
    So I manually sent the M117 before the server automatically sends the above code, but nothing happened when just simply sending M117. Maybe M117 is not the main cause, but there should be something happening when M117 is sent by the server.

    I'm using some custom G-codes for my printer, but I don't control temperatures with them.
  • Sorry for the above codes written in one line. Here is the code with the line changing.

    Send:3:02:54.594: @pause User requested pause.
    Send:3:02:54.595: N128 M104 T0 S100 T1 S100
    Recv:3:02:54.601: ok
    Send:3:02:54.602: N129 M76
    Recv:3:02:54.605: ok
    Send:3:02:59.925: M117 Layer 1/0
    Recv:3:02:59.931: ok
    Send:3:03:09.928: M117 ETA 03:52:30 day 20
    Recv:3:03:09.934: ok
    Send:3:03:19.936: M117 ETE 00:49:21
    Recv:3:03:19.940: ok

    And this is my G-code's starting code.

    M106 S0
    M104 T0 S250
    G92 E0
    G1 Z0
    G92 Z0
    ; process Process1
    ; layer 1, Z = 0.191
    G92 E0.0000
    G1 E-10.0000 F7200

  • That is all ok so far.

    What you need is go to console and disable command, ack and M105 filter to see everything. Watch for the lines around where the target temperature changes to 250 back. The end of pause cause will show 100°C for extruder: T: xxx / 100 and when that changes to your old temperature it is the question if you see commands at all or not. If you see commands it comes from server and we need to search there for what you see as commands. Otherwise firmware settings is what to check for. Firmwares often also have a pause function and if they paused temperature they can also put them back.

    In printer config->general you can disable sending ETE/ETA/layer so no M117 will appear. They have no influence on anything except the status line of printer. If you do not se ethem on printer display (not all show them) you should disable them anyway.
  • I confirmed the console and watched what happens with the M105 filter off.
    And this is what I got when I pressed the pause button.

    Send:8:38:46.242: N56 G1 X173.690 Y134.645 E1.2324
    Recv:8:38:47.230: T:0.00 /250.00 B:0.00 /0.00 C:0.00 /0.00 T0:0.00 /250.00 T1:0.00 /0.00 T2:0.00 /0.00 @:0 B@:0 @0:0 @1:0 @2:0
    Recv:8:38:47.279: ok
    Send:8:38:47.279: @pause User requested pause.
    Send:8:38:47.280: N57 M104 T0 S100 T1 S100
    Recv:8:38:47.286: ok
    Send:8:38:47.287: N58 M76
    Recv:8:38:47.290: ok
    Recv:8:38:54.231: T:0.00 /250.00 B:0.00 /0.00 C:0.00 /0.00 T0:0.00 /250.00 T1:0.00 /100.00 T2:0.00 /0.00 @:0 B@:0 @0:0 @1:0 @2:0 (7)

    The server command seemed to be sent well, as I could find it on the "N57 M104 T0 S100 T1 S100".
    And the server received "ok" and sent the M76 after the M104 command. 
    I could see the last received command as T:0.00 / 250.00, and this seems like the firmware is not able to catch M104 command from the server, so the temperature received is still set at 250ºC.

    But when I just send the "M104 T0 S100 T1 S100" command directly on the console, this works so fine, different from the above situation. 
  • edited December 2022
    Watch out if you have ping pong enabled or not. Only with ping-pong mode in connection settings the "ok" response means the last command above!
    But I also see that the M104 command is wrong. Looks like you try to set 2 exterder temperatures at once:
     M104 T0 S100 T1 S100

    this should be written like this:
    M104 T0 S100
    M104 T1 S100

    You see that after your command extruder 2 (T1) is reportet to be set to 100°C isntead of 0 it had before. Firmware expects only one T and one temperature in a command line.

    Actually you should only set temp to 100 for extruders in use like this:
    @if {{ext_0. temp_set!=0}}
    M104 T0 S100
    @if {{ext_1. temp_set!=0}}
    M104 T1 S100

  • Thanks for your reply.

    As you said above, you were right!
    I just splitter the M104 T0 S100 T1 S100 to two codes by "M104 T0 S100", "M104 T1 S100", and this works just fine.
    I have no idea why I thought I could set the temperature of two extruders at once.
    It was my silly mistake.
    I'm very grateful for this issue has been solved.

    Thank you for keep commenting on me.
  • I encountered a similar problem on a different website. To resolve it, ensure your G-code commands are properly formatted and compatible with Repetier Server 1.3.0 and Marlin Firmware.

    Double-check syntax, and consider using M109 for temperature control during pauses. Additionally, updating Repetier Server and Marlin to the latest versions may address compatibility issues.
Sign In or Register to comment.