Jump to content

Pause for Filament Change with M600 - What position for printhead?


reibuehl

Recommended Posts

Posted · Pause for Filament Change with M600 - What position for printhead?

When pausing a print for a filament change via the front button on the UM2, the head automatically moves to a park position in the front left corner and lowers the build plate. However if  the pause for filament change is initiated via the M600 command in G-code, the head stays over the part and makes it impossible to extrude the filament during the filament change.

I use the @TinkerGnome firmware. In the firmware source it seems M600 can take optional parameters for the head parking position:

// M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]

But what values should be used to get a similar behaviour like a pause from the front panel knob? And do I have to add a manual move back over the part or will this be done automatically? I use Prusa Slicer 2.5 to generate the g-code.

  • Link to post
    Share on other sites

    Posted (edited) · Pause for Filament Change with M600 - What position for printhead?

    Digging further in the @tinkergnome Firmware source, I found this in UltiLCD2_menu_print.cpp that seems to be responsible for the move:

     

    void lcd_print_pause()
    {
        if (!card.pause())
        {
            card.pauseSDPrint();
    
            // move z up according to the current height - but minimum to z=70mm (above the gantry height)
            uint16_t zdiff = 0;
            if (current_position[Z_AXIS] < 70)
                zdiff = max(70 - floor(current_position[Z_AXIS]), 20);
            else if (current_position[Z_AXIS] < max_pos[Z_AXIS] - 60)
            {
                zdiff = 20;
            }
            else if (current_position[Z_AXIS] < max_pos[Z_AXIS] - 30)
            {
                zdiff = 2;
            }
    
            char buffer[32] = {0};
            #if (EXTRUDERS > 1)
                uint16_t x = max(5, int(min_pos[X_AXIS]) + 5 + extruder_offset[X_AXIS][active_extruder]);
            #else
                uint8_t x = max(int(min_pos[X_AXIS]), 0) + 5;
            #endif
            uint8_t y = max(int(min_pos[Y_AXIS]), 0) + 5;
    
            sprintf_P(buffer, PSTR("M601 X%u Y%u Z%u L%u"), x, y, zdiff, uint8_t(end_of_print_retraction));
            process_command(buffer, false);
            primed = false;
        }
    }

     

    I don't fully understand the code though. Does this mean that the head moves to absolute X=5 and Y=5 and relative Z = +70?

     

    Would it be possible to execute this function instead of whatever M600 does?

     

    Edited by reibuehl
  • Link to post
    Share on other sites

    • 2 weeks later...
    Posted · Pause for Filament Change with M600 - What position for printhead?
    On 12/30/2022 at 10:56 AM, reibuehl said:

    I don't fully understand the code though. Does this mean that the head moves to absolute X=5 and Y=5 and relative Z = +70?

     

    Would it be possible to execute this function instead of whatever M600 does?

     

    Besides the fact that M600 is ignored by the UM2 🙂... you're right.

    That's what i used with Octoprint:

     

    ;M601 Pause in UltiLCD2, X[pos] Y[pos] Z[relative lift] L[additional retract distance in mm]
    M601 Z10 X10 Y200 L8

     

    You have to consider the maximum z-height (there are no limit checks if you use the gcode).

    The extra retract distance may play a role if you manually change the material during the pause.

     

    All parameters are optional (as usual).

     

  • 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
    • Our picks

      • UltiMaker Cura 5.8 beta released
        Another Cura release has arrived and in this 5.8 beta release, the focus is on improving Z seams, as well as completing support for the full Method series of printers by introducing a profile for the UltiMaker Method.
          • Like
        • 0 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 27 replies
    ×
    ×
    • Create New...