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

    M116 appears to be not working

    Scheduled Pinned Locked Moved Solved
    General Discussion
    2
    9
    362
    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.
    • appjawsundefined
      appjaws
      last edited by

      This is my shutdown macro but the M116 is not working so the macro completes still with the hot end hot.
      I am using the latest firmware 3.01-RC2

      M291 P"Shutdown Started" R"Shutdown" S1 T0; Display message

      echo "Extruder temperature = " ^ heat.heaters[1].current
      if heat.heaters[1].current > 35
      M98 P"0:/macros/Set LED Green"
      echo "LED Green on "
      M291 P"Waiting for nozzle to cool" R"Shutdown"; Display message
      M106 P1 S255 ;set cooling fan to maximum
      M104 S35 ;reduce extruder heater to safe level
      ;G10 P0 S35 ; reduce extruder heater to safe level
      M116 :wait for set temperature
      echo "Extruder temperature should be 35 = " ^ heat.heaters[1].current
      G4 P2000
      echo "G4 Dwell set to 2000 milliseconds "

      M104 S0 ;reduce extruder heater to zero
      ;G10 P0 S0 ;reduce extruder heater to zero
      M106 P1 S0 ;set cooling fan to zero
      echo "Extruder heater set to 0 "
      M291 P"Shutdown Completed" R"Shutdown"; Display message
      M0

      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
      • dc42undefined
        dc42 administrators
        last edited by

        If you set a heater to 40C or below then M116 doesn't wait for it, because it might never get there.

        If you really want to wait for 35C then you could use conditional GCode:

        M104 S0
        while heat.heaters[1].current > 35
          G4 S1
        

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

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

          thanks, that worked great

          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
          • appjawsundefined
            appjaws
            last edited by

            On more testing I noticed that as soon as M106 P3 is called the fans[3].actualValue is 1.0
            So the LED is at max brightness and stays there.
            If I run the macro a second time it works. I tried to put M106 P3 S0 to start but that didn't work either.
            this is the log

            Run2
            LED Red Requested value = 0.60
            LED Red Actual value = 0.6
            24/02/2020, 12:10:42
            LED Red Requested value = 0.50
            LED Red Actual value = 0.5
            24/02/2020, 12:10:40
            LED Red Requested value = 0.40
            LED Red Actual value = 0.4
            24/02/2020, 12:10:39
            LED Red Requested value = 0.30
            LED Red Actual value = 0.3
            24/02/2020, 12:10:39
            LED Red Requested value = 0.20
            LED Red Actual value = 0.2
            24/02/2020, 12:10:37
            M98 P"0:/macros/Set LED Red"
            Initial LED Red Actual value = 0.1

            Run1
            24/02/2020, 12:10:24
            M98 P"0:/macros/Set LED Red"
            Initial LED Red Actual value = 1.0

            This is the macro
            M106 P3 S0
            echo "Initial LED Red Actual value = " ^ fans[3].actualValue
            while fans[3].actualValue < 0.6
            M106 P3 S{fans[3].actualValue + 0.1}
            G4 S1 ;Wait for 1 second
            echo "LED Red Requested value = " ^ fans[3].requestedValue
            echo "LED Red Actual value = " ^ fans[3].actualValue

            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
            • dc42undefined
              dc42 administrators
              last edited by

              Try testing requestedValue instead of actualValue. The actualValue may take a short while to catch up with requestedValue.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

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

                Thanks,
                That worked so that I only needed 1 run, but it still started with a value of 1 (Full Brightness)
                24/02/2020, 14:07:24
                LED Red Requested value = 0.60
                LED Red Actual value = 0.6
                24/02/2020, 14:07:22
                LED Red Requested value = 0.50
                LED Red Actual value = 0.5
                24/02/2020, 14:07:21
                LED Red Requested value = 0.40
                LED Red Actual value = 0.4
                24/02/2020, 14:07:20
                LED Red Requested value = 0.30
                LED Red Actual value = 0.3
                24/02/2020, 14:07:19
                LED Red Requested value = 0.20
                LED Red Actual value = 0.2
                24/02/2020, 14:07:18
                LED Red Requested value = 0.00
                LED Red Actual value = 0.1
                24/02/2020, 14:07:17
                M98 P"0:/macros/Set LED Red"
                Initial LED Red Actual value = 1.0

                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
                • dc42undefined
                  dc42 administrators
                  last edited by

                  If you don't run that macro, is the fan/LED output off or on to start with?

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

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

                    @dc42 The fan/LED output is OFF to start but as soon as I run the macro the LED is very bright and then drops to the first increment 0.10.
                    Its almost as if the output blips to full power from idle, perhaps to aid actual fans to start quicker.

                    25/02/2020, 10:59:04 Red LED Requested value = 0.10 Red LED Actual value = 0.1
                    25/02/2020, 10:59:03 M98 P"0:/macros/Set LED Red" Initial LED Red Actual value = 0.0

                    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

                    dc42undefined 1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators @appjaws
                      last edited by dc42

                      @appjaws said in M116 appears to be not working:

                      Its almost as if the output blips to full power from idle, perhaps to aid actual fans to start quicker.

                      It's exactly that. See the M106 B parameter.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

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