Welcome! Log In Create A New Profile

Advanced

Marlin M109 gcode woes

Posted by Grogyan 
Marlin M109 gcode woes
October 10, 2012 03:01AM
After rummaging through very old topics about Marlin and M109 gcode, I am left wondering if anyone else has encountered this problem.

I preheat the extruder to 180C in PronterFace,
Using a sliced model with Slic3r (V0.92 and V0.93)
Print stops right after homing axes and the extruder heater is turned off.

Seems like Marlin (RC3 on RAMPS 1.2) is shutting down the extruder when an M109 is recieved.
RAMPS 1.2 with heatbed/fan disabled.
Using Max6675

What did you guys do to get around this problem?

Edited 2 time(s). Last edit at 10/10/2012 03:23AM by Grogyan.
Re: Marlin M109 gcode woes
October 10, 2012 06:08AM
AFAIK, M109 is deprecated. Use M104 followed by M116 instead.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Marlin M109 gcode woes
October 10, 2012 04:59PM
I know it is deprecated, but obviously not with Slic3r

I checked last night in the firmware, the M109 code, it appears to work exactly like M104.
After work I will check out the actual behaviour on the RepRap.
Re: Marlin M109 gcode woes
October 10, 2012 07:02PM
Here is a snippet of the gcode

; generated by Slic3r 0.9.3 on 2012-10-11 at 11:47:48

; layer_height = 0.3
; perimeters = 3
; solid_layers = 3
; fill_density = 0.4
; perimeter_speed = 30
; infill_speed = 60
; travel_speed = 130
; scale = 1
; nozzle_diameter = 0.4
; filament_diameter = 2.9
; extrusion_multiplier = 1
; single wall width = 0.42mm

M104 S170 ; set temperature <- works
G28 ; home all axes                 <- works
M109 S170 ; wait for temperature to be reached <- Extruder heater turns off
G90 ; use absolute coordinates
G21 ; set units to millimeters
G92 E0
M82 ; use absolute distances for extrusion
G1 F1800.000 E-1.00000
G92 E0
G1 Z0.200 F7800.000
G1 X92.900 Y81.028


Marlin V1 RC3
case 109: 
    {// M109 - Wait for extruder heater to reach target.
      tmp_extruder = active_extruder;
      if(code_seen('T')) {
        tmp_extruder = code_value();
        if(tmp_extruder >= EXTRUDERS) {
          SERIAL_ECHO_START;
          SERIAL_ECHO(MSG_M109_INVALID_EXTRUDER);
          SERIAL_ECHOLN(tmp_extruder);
          break;
        }
      }
case 104: // M104
      tmp_extruder = active_extruder;
      if(code_seen('T')) {
        tmp_extruder = code_value();
        if(tmp_extruder >= EXTRUDERS) {
          SERIAL_ECHO_START;
          SERIAL_ECHO(MSG_M104_INVALID_EXTRUDER);
          SERIAL_ECHOLN(tmp_extruder);
          break;
        }
      }

In Slic3r V0.93 -> Filament Settings tab
Temperature 170C
Temperature First Layer 170C

If I set First Layer to 0, then the resulting gcode omits both M104 and M109
Re: Marlin M109 gcode woes
October 11, 2012 07:03AM
I've filed the Github issue for you: [github.com]


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Marlin M109 gcode woes
October 11, 2012 04:18PM
There's some confusion here.

M104 means: set temperature.
M109 means: set temperature and wait before going on with next G-code lines.

Let's keep the "deprecation" debate aside, which doesn't really affect the issue that Grogyan needs help with. Infact, while we could discuss about their deprecation and about other possible ways to do things, M104 and M109 *are* definitely supported by Marlin and should just work. They do work for thousands of users. So let's stay on topic and help Grogyan with his issue: Grogyan, you said that the print stops. Actually, the print pauses until it reaches the temperature you set in Slic3r. What temperature did you write in Slic3r? Also, yes: if you set temperature to "0" Slic3r will just omit any temperature-related command, leaving the task to the manual interface.

===

About the deprecation issue. Does Marlin support M116?
Re: Marlin M109 gcode woes
October 12, 2012 04:19AM
Hey, Thanks Sound/Traumflug,

I may have inadvertantly fixed that issue, while finding a solution to another.

The PID I had set for my hot end, which was in the defaults for MakerGear, was found to be not aggresive enough to keep the hot end hot when the filament is pulled through, causing the barrel temp to drop to about 175-180C, NOT gcode driven but rather using PronterFace to extrude plastic. Yesterday, it seemed no matter what I did, the heat just dropped off when running under gcode from a sliced model, manual M109 S180 worked Today however, it appeared to work out of the blue.
I will be playing with the printer tomorrow, it's late here and i'm quite tired.

There was also something else, the Cold Extrusion cut off temperature, it was set to 170C, however when I last did printing with my old electronics (Gen3 old), I was getting fairly good results printing at 165C, so I set that to 150C, and tried printing with the M104/M109 gcode in the sliced model by Slic3r, it stopped and waited for the initial temp I had set at 185C (now 170C) to drop to 170, which it did, then stopped printing after layer. I repeated this a few times, and t did exactly what it should. Along with very aggresive PID, the problem did not show again.
Weird.

Now onto the next two problems.

Cheers :-)
Re: Marlin M109 gcode woes
October 12, 2012 07:25AM
Quote

NOT gcode driven but rather using PronterFace to extrude plastic.

Pronterface doesn't have magic capabilities, it sends G-code. The difference between sending G-code manually and klicking something in Pronterface is, when doing it manually you know what you're doing and can communicate that.

Please excuse me for insisting on this. It has to become general knowledge for anybody debugging printer operations. The G-code sent to the controller is _the_ central thing to look at.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Marlin M109 gcode woes
October 13, 2012 03:23AM
I know what you mean, however when trying to word it, in such a way, to not get mixed up between the gcode of the sliced model vs the gcode that gets sent via clicking in PronterFace.
There is the buffer in the firmware to consider, and although I don't know how many lines of gcode it can store, there could have been an issue with the buffer, in some way. Like it could handle 1 or 2 lines just fine, but when there are 20 or more (that may be an exaggerated number as I don't know what that number really is).

I am getting another problem, which is in another thread, which could be a buffer problem, I just don't know. However for the M109 issue, that I can verify was actually a conflict with the Cold Extrusion limit, as I mentioned, I need to print at a lower temp than the 170C limit, to get good prints without a fan.

Thanks for your help.
Sorry, only registered users may post in this forum.

Click here to login