G60 Not Working Correctly in System Macros



  • In my pause.g file I have the following:

    G60 S1 ; save current position
    M83 ; relative extruder moves
    G1 E-10 F3600 ; retract 10mm of filament
    G91 ; relative positioning
    G1 Z5 F1800 ; lift Z by 5mm
    G90 ; absolute positioning
    G1 X128 Y220 F6000 ; go to X=128 Y=220 (rear center)

    This system macro, when executed from the web interface, functions as I would expect. The print pauses, a retraction is performed, and the print head moves up and to the back of the machine.

    This is the code in resume.g:

    G1 R1 X0 Y0 F6000 ; go to x/y position of the last print move
    M83 ; relative extruder moves
    G1 E10 F3600 ; advance filament to starting position
    G1 R0 Z0 F450 ; move to 0mm above part

    When the resume.g system macro is executed, the print head moves to (0,0) at F3000 (50 mm/s) before returning to the print and resuming. I'm unsure where this command is coming from. None of the commands in my macros specify a feedrate of 50mm/s.

    And when I execute these commands in user-defined macros without the M24/M25 commands, the behavior is as expected.

    I want to eliminate the move to (0,0), but I can't find where that command is originating from. Is there something that I'm missing? Is my understanding of the G60 command wrong?

    Thanks,

    Luke



  • @Lukrative

    Hi,

    Well a couple of things to check.

    When a print is paused the current position is saved in slot 1 so I don't think you need that G60 S1.

    And you have that G1 R0 Z0 F450 command - when is slot 0 set?

    And you mention M24/M25 - where are these being used?

    Thanks.

    Frederick



  • Thanks for your reply @fcwilt,

    The R0 that you see is left over from when I tried changing everything over to slot 0 from slot 1, just to see if slot 1 was reserved for something else (I came to find out that, as you have said, slot 1 is already reserved for pausing prints). When I posted this issue I forgot to change everything back. It doesn't work even when all the commands use only slot 1.

    As far as the M24/M25 commands are concerned, they are called automatically when you hit resume/pause. You can see this if you check the G-Code Console on the web interface after you pause and resume.

    I did just try eliminating the G60 S1 command, but it made no difference. 😞


  • administrators

    @Lukrative said in G60 Not Working Correctly in System Macros:

    In my pause.g file I have the following:
    G60 S1 ; save current position

    Why are you using G60 S1 at all, given that the coordinates at the point of executing the pause are saved in restore point #1 automatically?

    Which firmware version are you using? Support for G60 was added quite recently AFAIR.



  • @dc42 said in G60 Not Working Correctly in System Macros:

    Why are you using G60 S1 at all, given that the coordinates at the point of executing the pause are saved in restore point #1 automatically?

    I added that after my first test run failed, just to make sure that it actually was storing the position.

    Which firmware version are you using? Support for G60 was added quite recently AFAIR.

    The web interface shows this: 2.02RC5(RTOS) (2018-11-28b1)

    Here is my updated pause file:

    M83 ; relative extruder moves
    G1 E-10 ; retract 10mm of filament
    G91 ; relative positioning
    G1 Z5 ; lift Z by 5mm
    G90 ; absolute positioning
    G1 X128 Y220 ; go to X=128 Y=220 (rear center)

    I removed all gcodes from resume.g. With these changes, it now returns to the correct x/y coordinates without passing through the origin, and then it moves back down in the z. The behavior is the way I want it now, so I'm not worrying about it too much, but hopefully I was able to be helpful if this turns out to be a real issue.


  • administrators

    You are using an old, unsupported release candidate firmware version. Please upgrade to 2.03 or 2.04RC1 and test again.



  • For posterity's sake, updating the firmware fixed it 🙂


Log in to reply