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

    Temperature control for Heating Bed

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    6
    29
    1.1k
    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.
    • jay_s_ukundefined
      jay_s_uk @deckingman
      last edited by

      @deckingman the else is part of the job layer check, not the temperature check so it will only be turned off when the job is equal to or above 20 layers

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      1 Reply Last reply Reply Quote 1
      • bernardomattiucciundefined
        bernardomattiucci @deckingman
        last edited by bernardomattiucci

        @deckingman As @jay_s_uk said, That M140 S0 is related to layer control and is activated from layer 20 and up. This is because, after 3 hours of printing, the bed temperature is stable at 30°C and is more than enough to maintain the part. So there is no need, at the moment, to have the bed heater on (in winter we will see...).

        deckingmanundefined 1 Reply Last reply Reply Quote 0
        • deckingmanundefined
          deckingman @bernardomattiucci
          last edited by

          @bernardomattiucci said in Temperature control for Heating Bed:

          @deckingman As @jay_s_uk said, That M140 S0 is related to layer control and is activated from layer 20 and up. This is because, after 3 hours of printing, the bed temperature is stable at 30°C and is more than enough to maintain the part. So there is no need, at the moment, to have the bed heater on (in winter we will see...).

          Ahh - apologies for missing that "else" being related to the layer value. So, yes, I'd have thought your proposal should work.

          Ian
          https://somei3deas.wordpress.com/
          https://www.youtube.com/@deckingman

          1 Reply Last reply Reply Quote 0
          • bernardomattiucciundefined
            bernardomattiucci
            last edited by bernardomattiucci

            I modified the code slightly to keep the heater on at the set temperature of 50° for the first 5 layers.

            if {state.status} = "processing"
            	if {heat.heaters[1].active} > 0
            		if {job.layer} > 5
            			if {job.layer} < 20
            				if {heat.heaters[0].current} < 40
            					M140 S50
            				if {heat.heaters[0].current} > 50
            					M140 S40
            			else
            				M140 S0
            		else
            			M140 S50
            

            the problem is that, at the beginning of printing, I get the following error:

            Error: in file macro line 3 column 27: meta command: cannot convert operands to same type

            The error occurs when I manually activate the heaters (hotend and bed) and then run the press

            1 Reply Last reply Reply Quote 0
            • bernardomattiucciundefined
              bernardomattiucci
              last edited by

              I fixed the errors in the code.

              if job.build != null
              	if job.layer != null && job.layer <= 5
              		M140 S50
              	elif job.layer != null && job.layer > 5
              		if job.layer < 20
              			if heat.heaters[0].current < 40
              				M140 S50
              			if heat.heaters[0].current > 50
              				M140 S40
              		else
              			M140 S0
              
              1 Reply Last reply Reply Quote 1
              • bernardomattiucciundefined
                bernardomattiucci
                last edited by

                I would like to make a change to the code, but I don't know how to do it.

                if job.layer < 20
                

                I would like to consider 20% and not layer number 20.
                How should I modify the code?

                jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                • jay_s_ukundefined
                  jay_s_uk @bernardomattiucci
                  last edited by

                  @bernardomattiucci you would have to calculate what 20% of job.file.numLayers is

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  1 Reply Last reply Reply Quote 1
                  • bernardomattiucciundefined
                    bernardomattiucci
                    last edited by

                    if job.build != null
                    	if job.layer != null && job.layer <= 5
                    		M140 S50
                    	elif job.layer != null && job.layer > 5
                    		if ((job.file.numLayers*20)/100) < 20
                    			if heat.heaters[0].current < 40
                    				M140 S50
                    			if heat.heaters[0].current > 50
                    				M140 S40
                    		else
                    			M140 S0
                    

                    seems to be working

                    1 Reply Last reply Reply Quote 1
                    • bernardomattiucciundefined
                      bernardomattiucci
                      last edited by bernardomattiucci

                      More update

                      if job.build != null
                      	if job.layer != null && job.layer < 5
                      		M140 S50
                      	if job.layer != null && job.layer >= 5 && job.layer < (job.file.numLayers*20)/100
                      		if heat.heaters[0].current < 40
                      			M140 S50
                      		if heat.heaters[0].current > 50
                      			M140 S40
                      	if job.layer != null && job.layer > (job.file.numLayers*20)/100
                      		M140 S0
                      
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Unless otherwise noted, all forum content is licensed under CC-BY-SA