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

macro executing if wanted after print ?

Scheduled Pinned Locked Moved
Tuning and tweaking
7
13
414
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
    joeko
    last edited by joeko 13 Jan 2021, 08:42

    hallo,
    is it possible to create a macro that i can start manual when a print is running and will run after the print is finish ?
    for example after the fan is off shut down with M81.

    ? undefined 3 Replies Last reply 13 Jan 2021, 12:41 Reply Quote 0
    • ?
      A Former User @joeko
      last edited by 13 Jan 2021, 12:41

      @joeko

      You might consider giving this a vote "up" if it would likely fit your needs:
      https://forum.duet3d.com/topic/20708/start-g-end-g?_=1610541552963

      1 Reply Last reply Reply Quote 0
      • undefined
        DIY-O-Sphere @joeko
        last edited by 13 Jan 2021, 12:47

        @joeko said in macro executing if wanted after print ?:

        for example after the fan is off shut down with M81.

        You don't need a macro for that
        Put "M81 S1" in the slicer end code......

        (UTC+1)

        undefined 1 Reply Last reply 13 Jan 2021, 13:20 Reply Quote 0
        • undefined
          fcwilt @DIY-O-Sphere
          last edited by 13 Jan 2021, 13:20

          @DIY-O-Sphere said in macro executing if wanted after print ?:

          @joeko said in macro executing if wanted after print ?:

          for example after the fan is off shut down with M81.

          You don't need a macro for that
          Put "M81 S1" in the slicer end code......

          Will that wait for the fan to stop running before it shuts off power?

          Frederick

          Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

          undefined 1 Reply Last reply 13 Jan 2021, 13:31 Reply Quote 0
          • ?
            A Former User @joeko
            last edited by A Former User 13 Jan 2021, 13:30

            @joeko

            Or - In your case you might make a screen-message-request with M291 within stop.g that is called via "M0 command at the end of the print job"?

            1 Reply Last reply Reply Quote 0
            • undefined
              Veti @fcwilt
              last edited by 13 Jan 2021, 13:31

              @fcwilt said in macro executing if wanted after print ?:

              Will that wait for the fan to stop running before it shuts off power?

              yes

              Sn n=0 turn power off immediately (default), n=1 turn power off when all thermostatic fans have turned off (RepRapFirmware 1.20 and later only)

              1 Reply Last reply Reply Quote 1
              • undefined
                joeko
                last edited by 13 Jan 2021, 16:39

                i use also a printer with repetier server.
                in repetier server there is a button and when i click on this button while a print is running a command will execute after the print is finished and this command is m81 s1 or what i set in this command.
                i can set rules what happen after a print.

                when i set m81 s1 in the slicer this will run after every print but i would like do this only if i want.

                1 Reply Last reply Reply Quote 0
                • undefined
                  Phaedrux Moderator
                  last edited by 13 Jan 2021, 20:45

                  https://duet3d.dozuki.com/Wiki/Duet_Web_Control_v2_and_v3_(DWC)_Manual#Section_Job_Control

                  Enable auto-sleep may be what you want?

                  The print control section has a check box to "Enable Auto-Sleep". If this is selected then the M1 G-Code is sent at the end of the print which runs the "sleep.g" macro file. This for example would allow the shutting down of the main power supply once the print has completed (assuming the printer hardware is set up to allow this).

                  Z-Bot CoreXY Build | Thingiverse Profile

                  undefined 1 Reply Last reply 13 Jan 2021, 21:08 Reply Quote 0
                  • undefined
                    joeko @Phaedrux
                    last edited by joeko 13 Jan 2021, 21:08

                    @Phaedrux said in macro executing if wanted after print ?:

                    https://duet3d.dozuki.com/Wiki/Duet_Web_Control_v2_and_v3_(DWC)_Manual#Section_Job_Control

                    Enable auto-sleep may be what you want?

                    The print control section has a check box to "Enable Auto-Sleep". If this is selected then the M1 G-Code is sent at the end of the print which runs the "sleep.g" macro file. This for example would allow the shutting down of the main power supply once the print has completed (assuming the printer hardware is set up to allow this).

                    yes it seems that is what i am looking for 🙂
                    perfect and thank you 🙂

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      joeko
                      last edited by joeko 14 Jan 2021, 14:37

                      hmm,
                      doesnt work.
                      do i have to open the browser ? after closeing the browser and open again the auto-sleep is disable again.

                      undefined 1 Reply Last reply 14 Jan 2021, 17:05 Reply Quote 0
                      • undefined
                        appjaws
                        last edited by 14 Jan 2021, 15:06

                        I have a macro for auto shutdown which you could call from an entry in the end section of your slicer:-
                        M98 P"0:/macros/extra/Auto Shutdown

                        this is my macro:-
                        "M291 P"Shutdown Started" R"Shutdown" S1 T0; Display message

                        M98 P"0:/macros/extra/Set LED Red"
                        M140 S0 ; turn off bed heater
                        M104 S0 ; turn off extruder heater

                        if move.axes[0].homed || move.axes[1].homed || move.axes[3].homed || move.axes[4].homed
                        G91 ; relative mode
                        G1 Z5 F2000 ; move bed down 5mm
                        G90 ; absolute mode
                        G1 Y228 V228 X118 U118 F3000 ; Park position
                        else M291 P"ERROR - Drives not homed, Please shutdown manually" R"Shutdown" S1 T0; Display message
                        break

                        while heat.heaters[1].current > 42
                        M98 P"0:/macros/extra/Set LED Green"
                        M291 P{"Waiting for nozzle to reduce to 42C, Extruder temperature = " ^ floor(heat.heaters[1].current + 0.5)}
                        M106 P0 S255 ;set cooling fan to maximum
                        G4 S5 ;Wait for 5 second

                        M106 P0 S0 ;set cooling fan to zero
                        M106 P3 S0
                        M106 P4 S0
                        M106 P5 S0
                        M291 P"Shutdown Completed" R"Shutdown"; Display message

                        you could put everything you need to happen in this macro but keep the section
                        while heat.heaters[1].current > 42

                        Hope that helps

                        appjaws - Core XYUV Duet Ethernet Duex5
                        firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
                        Ormerod 1-converted to laser engraver, Duet wifi
                        OpenSCAD version 2024.03.18
                        Simplify3D 5.1.2

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          Phaedrux Moderator @joeko
                          last edited by 14 Jan 2021, 17:05

                          @joeko said in macro executing if wanted after print ?:

                          hmm,
                          doesnt work.
                          do i have to open the browser ? after closeing the browser and open again the auto-sleep is disable again.

                          It may very well be one of the few features that depends on DWC being open. Another I can think of is the fan speed override lock.

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            joeko
                            last edited by 14 Jan 2021, 18:28

                            ok, maybe a option in future firmware

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