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

    waiting for status

    Scheduled Pinned Locked Moved
    Gcode meta commands
    4
    13
    427
    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.
    • chrishammundefined
      chrishamm administrators @Proschi3D
      last edited by

      @Proschi78 What status do you mean? In principle something like that will do:

      while state.status != "processing"
        G4 S1
      

      Duet software engineer

      1 Reply Last reply Reply Quote 1
      • Proschi3Dundefined
        Proschi3D @Proschi3D
        last edited by

        @Proschi78
        I want to do a pid tuning and after the left extruder start tuning on the right.
        I want to start the pid on the right extruder when the status of the left one is either stanby or off

        Love my Duet 3 Mini.
        https://www.instagram.com/proschi3d
        https://youtube.com/@proschi3d
        https://www.proschi3d.de

        chrishammundefined Proschi3Dundefined 2 Replies Last reply Reply Quote 0
        • chrishammundefined
          chrishamm administrators @Proschi3D
          last edited by

          @Proschi78 So you're talking about heaters. In that case something like this should work:

          ; tune heater 1 and wait for it to finish
          M303 H1 S210
          while heat.heaters[1].state != "standby" && heat.heaters[1].state != "off"
            G4 S1
          
          ; tune heater 2 and wait for it to finish
          M303 H2 S210
          while heat.heaters[2].state != "standby" && heat.heaters[2].state != "off"
            G4 S1
          
          ; tuning finished, save parameters to config-override.g
          M500
          

          Duet software engineer

          Proschi3Dundefined 1 Reply Last reply Reply Quote 2
          • Proschi3Dundefined
            Proschi3D @chrishamm
            last edited by

            @chrishamm

            thank you very much I will test that

            Love my Duet 3 Mini.
            https://www.instagram.com/proschi3d
            https://youtube.com/@proschi3d
            https://www.proschi3d.de

            1 Reply Last reply Reply Quote 0
            • Proschi3Dundefined
              Proschi3D @Proschi3D
              last edited by

              @Proschi78 do I need something in deamone.g for that

              Love my Duet 3 Mini.
              https://www.instagram.com/proschi3d
              https://youtube.com/@proschi3d
              https://www.proschi3d.de

              T3P3Tonyundefined Proschi3Dundefined 2 Replies Last reply Reply Quote 0
              • T3P3Tonyundefined
                T3P3Tony administrators @Proschi3D
                last edited by

                @Proschi78 i would do that in a macro for tuning heaters. you don't want it in deamon.g because that runs all the time and your heater tuning will only (presumably) run once or maybe a few times per machine.

                www.duet3d.com

                1 Reply Last reply Reply Quote 1
                • Proschi3Dundefined
                  Proschi3D @Proschi3D
                  last edited by Proschi3D

                  @T3P3Tony have expressed myself wrong.
                  i meant do i need deamone.g to get the status of the heater?
                  or if the macro works without deamone.g

                  Love my Duet 3 Mini.
                  https://www.instagram.com/proschi3d
                  https://youtube.com/@proschi3d
                  https://www.proschi3d.de

                  T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                  • T3P3Tonyundefined
                    T3P3Tony administrators @Proschi3D
                    last edited by

                    @Proschi78 daemon.g is a macro that the system runs every 10s, in other ways its no different for any other macro.

                    the information that you are using, e.g. heat.heaters[1].state comes from the object model:
                    https://github.com/Duet3D/RepRapFirmware/wiki/Object-Model-Documentation

                    so you can access it from any macro.

                    www.duet3d.com

                    Proschi3Dundefined 1 Reply Last reply Reply Quote 1
                    • Proschi3Dundefined
                      Proschi3D @T3P3Tony
                      last edited by

                      Is there a way to save the PID result directly in a filament config?

                      Love my Duet 3 Mini.
                      https://www.instagram.com/proschi3d
                      https://youtube.com/@proschi3d
                      https://www.proschi3d.de

                      Proschi3Dundefined 1 Reply Last reply Reply Quote 0
                      • Proschi3Dundefined
                        Proschi3D @Proschi3D
                        last edited by Proschi3D

                        @Proschi78 I got it.
                        Now I still have the problem that the file is always deleted and recreated.
                        Is it possible to only update the file and not delete it?

                        ; tune heater 1 and wait for it to finish
                        M303 H1 S210
                        while heat.heaters[1].state != "standby" && heat.heaters[1].state != "off"
                          G4 S1
                        
                        ; tune heater 2 and wait for it to finish
                        M303 H2 S210
                        while heat.heaters[2].state != "standby" && heat.heaters[2].state != "off"
                          G4 S1
                        M291 S3 R"The results of the PID tune have been automatically saved" P"You can view the results of the PID tune in the PID_tune_E0.g file"
                        echo "You can view the results of the PID tune in the Filament PID file"
                        echo >"0:/filaments/PLA/PLA PID" "M307 H1 R"^{heat.heaters[1].model.heatingRate}, "K"^{heat.heaters[1].model.coolingRate}^":"^{heat.heaters[1].model.fanCoolingRate}, "D"^{heat.heaters[1].model.deadTime}, "E"^{heat.heaters[1].model.coolingExp}
                        echo >>"0:/filaments/PLA/PLA PID" "M307 H1 B0 S1.0 V"^{heat.heaters[1].model.standardVoltage}
                        echo >>>"0:/filaments/PLA/PLA PID" "M307 H2 R"^{heat.heaters[2].model.heatingRate}, "K"^{heat.heaters[2].model.coolingRate}^":"^{heat.heaters[2].model.fanCoolingRate}, "D"^{heat.heaters[2].model.deadTime}, "E"^{heat.heaters[2].model.coolingExp}
                        echo >>>"0:/filaments/PLA/PLA PID" "M307 H2 B0 S1.0 V"^{heat.heaters[2].model.standardVoltage}
                        
                        
                        
                        ; tune heater 2 and wait for it to finish
                        ;M303 H0 S60
                        ;while heat.heaters[0].state != "standby" && heat.heaters[0].state != "off"
                        ;  G4 S1
                        ; tuning finished, save parameters to config-override.g
                        M500
                        M570 H0 P5 T15							; set heater fault detection back to default
                        
                        

                        Love my Duet 3 Mini.
                        https://www.instagram.com/proschi3d
                        https://youtube.com/@proschi3d
                        https://www.proschi3d.de

                        OwenDundefined 1 Reply Last reply Reply Quote 0
                        • OwenDundefined
                          OwenD @Proschi3D
                          last edited by

                          @Proschi78
                          I'm not sure why you want to save the PID results in a filament config.g
                          The results should be the same regardless of filament.
                          Use M500 to save them to config-overide.g

                          In addition, I think you should change your wait state to

                          while heat.heaters[1].state = "tuning"
                              G4 S1
                          

                          So that you are actually checking if it is tuning.
                          The available states are here
                          For example your code would continue immediately if the state was "fault"

                          Proschi3Dundefined 1 Reply Last reply Reply Quote 0
                          • Proschi3Dundefined
                            Proschi3D @OwenD
                            last edited by

                            @OwenD I call the PID over M703. The code works as I posted it above

                            Love my Duet 3 Mini.
                            https://www.instagram.com/proschi3d
                            https://youtube.com/@proschi3d
                            https://www.proschi3d.de

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