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.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
        • 20 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...