Jump to content
Ultimaker Community of 3D Printing Experts

Recommended Posts

Posted · Disable M105?

Is there a way to prevent Cura from adding M105 to gcode? 

 

I have used the "find and replace" to comment it out, but is there a way to prevent it completely?

  • Link to post
    Share on other sites
    Posted (edited) · Disable M105?

    I was looking into where the M105 command is generated and it's in the functions writeTemperatureCommand and writeBedTemperatureCommand in the file gcodeExport.cpp of the CuraEngine project. Here's the code responsible for the M105 command:

     

        if (wait && flavor != EGCodeFlavor::MAKERBOT)
        {
            if(flavor == EGCodeFlavor::MARLIN)
            {
                *output_stream << "M105" << new_line; // get temperatures from the last update, the M109 will not let get the target temperature
            }
            *output_stream << "M109";
            extruder_attr[extruder].waited_for_temperature = true;
        }
        else
        {
            *output_stream << "M104";
            extruder_attr[extruder].waited_for_temperature = false;
        }

    So looking for ways to disable M105 your options are:

    1) Choose a flavor of G code that's not from Marlin in the printer settings. (But then something else will almost certainly break because of other differences in the generated g-code.)

    2) Change the code in the CuraEngine source code and recompile it.

     

    By far the simplest option would probably be to continue using search and replace. When you say search and replace I'm assuming you mean the post processing plugin and not opening the file in a text editor and doing it manually. In case you didn't discover it yet: Go to extensions, post processing, modify g-code. Add a script and select "search and replace". Here you can enter M105 and remove the command automatically every time.

     

    May I ask you why you would want to disable M105 though?

    Edited by nitro2k01
  • Link to post
    Share on other sites
    Posted · Disable M105?

    Thank you for the perfect reply. Yes, I was using the post processing option.

     

    As for disabling M105, It's just a small project I'm helping with and all temperature related controls are handled mechanically and not through a slicer. M105 was triggering an error. I can't get into it much as it's not my personal project,  I'm just testing various slicers for tool path and motion controls. Nothing temperature related if that makes sense.

  • Link to post
    Share on other sites
    Posted · Disable M105?

    I make a PPScript to delete de M105 and M109 only when i use the same material in both extruders from a geeetech A10M.

     

    The PPScript start counting the number of different temps that are in the M109, and if there is only one temp, delete all the M105 and M109 from the gcode.

     

    If there is several temps changing, then the script warn in the gcode in the POSTPROCESSED line and do not change anything.

     

     

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    ×
    ×
    • Create New...