Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    macro executing if wanted after print ?

    Tuning and tweaking
    7
    13
    72
    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.
    • joeko
      joeko last edited by joeko

      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.

      A Former User DIY-O-Sphere 3 Replies Last reply Reply Quote 0
      • A Former User
        A Former User @joeko last edited by

        @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
        • DIY-O-Sphere
          DIY-O-Sphere @joeko last edited by

          @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......

          fcwilt 1 Reply Last reply Reply Quote 0
          • fcwilt
            fcwilt @DIY-O-Sphere last edited by

            @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

            Veti 1 Reply Last reply Reply Quote 0
            • A Former User
              A Former User @joeko last edited by A Former User

              @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
              • Veti
                Veti @fcwilt last edited by

                @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
                • joeko
                  joeko last edited by

                  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
                  • Phaedrux
                    Phaedrux Moderator last edited by

                    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).

                    joeko 1 Reply Last reply Reply Quote 0
                    • joeko
                      joeko @Phaedrux last edited by joeko

                      @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
                      • joeko
                        joeko last edited by joeko

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

                        Phaedrux 1 Reply Last reply Reply Quote 0
                        • appjaws
                          appjaws last edited by

                          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

                          1 Reply Last reply Reply Quote 0
                          • Phaedrux
                            Phaedrux Moderator @joeko last edited by

                            @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.

                            1 Reply Last reply Reply Quote 0
                            • joeko
                              joeko last edited by

                              ok, maybe a option in future firmware

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