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

    Wait for passive thermistor temprature to stabilize

    Scheduled Pinned Locked Moved
    Gcode meta commands
    5
    12
    476
    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.
    • garethkyundefined
      garethky
      last edited by

      This is not intended to run an active heater. This is for passively heated scenarios where an actively controlled heater is running at a constant temperature. Its usually the bed heater. So overshoot shouldn't be a concern here because the active heat source is being controlled. Does that make sense?

      It takes a temperature delta between now and 500ms ago. It will break if the delta is negative or smaller than the threshold value.

      The 500ms gap between samples is a substitute for sample smoothing. There might be momentary fluctuations or noise but over 500ms that should be dominated by real temperature change. Its crude but its works for this specific scenario.

      o_lampeundefined 1 Reply Last reply Reply Quote 1
      • dc42undefined
        dc42 administrators @garethky
        last edited by

        @garethky said in Wait for passive thermistor temprature to stabilize:

        Even without variables I still need to store the loop counter and the last temperature reading.

        There is a built-in loop counter, it's called 'iterations'.

        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

        garethkyundefined 1 Reply Last reply Reply Quote 0
        • o_lampeundefined
          o_lampe @garethky
          last edited by

          @garethky said in Wait for passive thermistor temprature to stabilize:

          Does that make sense?

          Yes, the chance to see overshooting is pretty low in that case.
          I was focussed to understand the way you misused the workplace offsets, I've missed this detail.

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

            @o_lampe said in Wait for passive thermistor temprature to stabilize:

            I was focussed to understand the way you misused the workplace offsets, I've missed this detail.

            Clever workaround for lack of variables.

            Z-Bot CoreXY Build | Thingiverse Profile

            1 Reply Last reply Reply Quote 1
            • garethkyundefined
              garethky @dc42
              last edited by garethky

              @dc42 I wanted that to work and I tried it first. Maybe this is an SBC thing but this program gives me an error when I try to use iterations in the echo statement inside the if statement:

              while true
              	echo "Iterations: " ^ iterations
              	if iterations > 5
                          echo "Final iteration: ", iterations
              	    break
              

              Console output:

              1/29/2021, 9:59:44 AM 	M98 P"0:/macros/test-iterations.g"
              Iterations: 0
              Iterations: 1
              Iterations: 2
              Iterations: 3
              Iterations: 4
              Iterations: 5
              Iterations: 6
              1/29/2021, 9:59:44 AM 	Error: Failed to evaluate "iterations": 'iterations' used when not inside a loop in line 4 of test-iterations.g
              
              dc42undefined chrishammundefined 2 Replies Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @garethky
                last edited by

                @garethky, which firmware and DSF version are you running?

                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

                garethkyundefined 1 Reply Last reply Reply Quote 0
                • garethkyundefined
                  garethky @dc42
                  last edited by

                  @dc42 3.2 Final

                  === Diagnostics ===
                  RepRapFirmware for Duet 3 MB6HC version 3.2 running on Duet 3 MB6HC v0.6 or 1.0 (SBC mode)

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

                    Thanks, I've asked @chrishamm to take a look.

                    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
                    • chrishammundefined
                      chrishamm administrators @garethky
                      last edited by

                      @garethky Thanks for reporting this, I can reproduce this problem. It's caused by break which doesn't wait for pending codes to finish, so it terminates the while block before it can evaluate iterations.

                      You can work-around this problem by adding an empty while-loop for now:

                      while true
                      	echo "Iterations: " ^ iterations
                      	if iterations > 5
                                  echo "Final iteration: ", iterations
                                  while false
                                              ; nothing
                      	    break
                      

                      Duet software engineer

                      garethkyundefined 1 Reply Last reply Reply Quote 0
                      • garethkyundefined
                        garethky @chrishamm
                        last edited by

                        @chrishamm Thanks Chris!

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