• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Script execution problem after printing

Scheduled Pinned Locked Moved
Tuning and tweaking
3
7
199
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    Plohish
    last edited by Plohish 6 Jun 2020, 13:07 6 Jun 2020, 12:26

    Good afternoon! Meet the new user πŸ™‚
    Today I installed Duet.
    I ran into a printer behavior issue after printing.
    I wrote a small script.

    ==========================================
    M104 S0 ;extruder heater off
    M140 S0 ;heated bed heater off (if you have it)
    G92 E0 ;relative positioning
    G1 E-1 F300 ;retract the filament a bit before lifting the nozzle to release some of the pressure
    G1 Z+0.5 E-3 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more
    M107
    G1 Z5 F500
    G28 Z0
    G28 X0 Y0 ;move X/Y to min endstops so the head is out of the way
    M84 ;steppers off
    G90 ;absolute positioning
    ============================================

    I don’t understand why the Duet ignores line 5, 7 and 8
    The duet first parks the X and Y axes and only then Z
    I want the opposite!
    even t if I delete lines 8 and 9 the Duet still parks the X and Y axes, the Z axis does remain not parked

    I do not understand why this happens, please help me understand

    Please forgive my bad English, it's Google's fault :)

    1 Reply Last reply Reply Quote 0
    • undefined
      OwenD
      last edited by OwenD 6 Jun 2020, 12:45 6 Jun 2020, 12:44

      You might need to spend some time reading up on each of the commands used.
      e.g.
      https://duet3d.dozuki.com/Wiki/Gcode#Section_G28_Home
      "The X-Z parameters act only as flags. Any coordinates given are ignored."

      G92 E0 ;relative positioning
      No, it just sets the E position to zero
      so, your subsequent commands are presumably still in absolute mode.

      You need G91

      G1 Z+0.5 E-3 X-20 Y-20
      Probably can't happen if X/Y end stops are zero (can't move to -20).

      1 Reply Last reply Reply Quote 0
      • undefined
        Plohish
        last edited by 6 Jun 2020, 12:56

        Thank you, could you tell me how I should fix my script?

        Please forgive my bad English, it's Google's fault :)

        1 Reply Last reply Reply Quote 0
        • undefined
          OwenD
          last edited by 6 Jun 2020, 13:03

          If you describe your printer (corexy, delta, cartesian?) and describe what you want to do, then we can help.

          1 Reply Last reply Reply Quote 0
          • undefined
            Plohish
            last edited by Plohish 6 Jun 2020, 13:10 6 Jun 2020, 13:06

            i have corexy
            my table (Z-axis) rises and falls
            I fixed the script like this, in my opinion it works!

            ============================
            M104 S0 ;extruder heater off
            M140 S0 ;heated bed heater off (if you have it)
            G92 E0 ;relative positioning
            G1 E-1 F300 ;retract the filament a bit before lifting the nozzle to release some of the pressure
            M107
            G91
            G1 Z+0.5 E-3 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more
            G1 Z5 F500
            G90
            G28 Z0
            G28 X0 Y0 ;move X/Y to min endstops so the head is out of the way
            M84 ;steppers off
            G90 ;absolute positioning
            ======================================

            sorry my bad english, it's Google's fault πŸ™‚

            Please forgive my bad English, it's Google's fault :)

            1 Reply Last reply Reply Quote 0
            • undefined
              Phaedrux Moderator
              last edited by 7 Jun 2020, 21:02

              ============================
              M104 S0 ;extruder heater off
              M140 S0 ;heated bed heater off (if you have it)
              G92 E0 ; set extruder to 0
              M83 ; set extruder to relative movements
              G1 E-1 F300 ;retract the filament a bit before lifting the nozzle to release some of the pressure
              M107
              G91 ; relative movement
              G1 Z+0.5 E-3 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more
              G1 Z5 F500
              G90 ; absolute movement
              G28 ; home all axis
              M84 ;steppers off

              ======================================

              Z-Bot CoreXY Build | Thingiverse Profile

              undefined 1 Reply Last reply 8 Jun 2020, 03:00 Reply Quote 0
              • undefined
                Plohish @Phaedrux
                last edited by 8 Jun 2020, 03:00

                @Phaedrux Thanks

                Please forgive my bad English, it's Google's fault :)

                1 Reply Last reply Reply Quote 0
                4 out of 7
                • First post
                  4/7
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA