Notifications
Clear all

Actual gcode for m601 and m602  

  RSS
XV
 XV
(@xv)
Active Member
Actual gcode for m601 and m602

I would like to write my own pause and resume gcode sequences for the MK3S and the Mini.  Is there somewhere to get the actual gcodes or command sequences in pseudo code or source that M601 and M602 implement in firmware that I can work from? 

Posted : 01/02/2023 5:13 am
Neophyl
(@neophyl)
Illustrious Member
RE: Actual gcode for m601 and m602

You will have to look in the firmware for those.  As the firmware is open source you should be able to find them  Just l;ook in the appropriate github reposityory for the firmware you want to copy them from.  Prusa repositories are here https://github.com/prusa3d    

Posted : 01/02/2023 6:57 am
XV
 XV
(@xv)
Active Member
Topic starter answered:
RE:

Thank you!   I looked over the MK3 firmware code.   The cmdqueue management seems a little voodoo based on what I've observed by inserting custom gcode into the file immediately after the M601.  In my tests, there's always a move back to the part for all axes that happens after the Resume Print is selected from the LCD and before the custom gcode is run.  A reasonable expectation is that the cmdqueue would be completely purged of past move data once the retract/park move and head cool down commands are issued.    This seems like a bug to me so checking here to see if anyone here has any insight.

Here's an annotated code fragment that describes what I'm seeing:

;PAUSE_PRINT
M117 Insert Test Code After M601
M601
;Next line happes after Resume Print is selected on LCD
;A move back to the part by all three axes, then custom gcode is executed
;Custom_GCode
G1 X80.5 Z65.0 E3 F720
G1 E-.5 F2100
G1 Z60.0 F720
;Back to original output from slicer
; printing object Shape-Cylinder id:0 copy 0
G1 Z2.2
G1 X94.955 Y47.261 F10800
G1 Z2 F720
G1 E1 F2100
M204 S800
;TYPE:Perimeter

 

This post was modified 1 year ago by XV
Posted : 02/02/2023 5:42 am
Share: