M303: Run heater tuning



  • Refers to
    https://duet3d.dozuki.com/Wiki/Gcode#Section_M303_Run_heater_tuning

    If typed only "M303" (with no parameters) into console and it throws back:
    “no heater has been tuned yet”
    is this referring to the “current” session since startup of the board or does it search all directories like config.g & config-override.g to communicate that there is no heater tuning present on this hardware+software-combo?

    I do not understand it fully, because I just tuned the heaters, saved all with M500 and verified by manually looking into the config-override.g that there was something written down, which it did like it should...

    If between my last tuning and the read-out is a restart of the board, wouldn´t it be good it would fetch the last settings of the config-override.g (which could have been there forever or put manually?) or should it rather throw back: "In this session since startup no tuning was performed" or similar?





  • @Stephen6309

    But then https://duet3d.dozuki.com/Wiki/Gcode#Section_M303_Run_heater_tuning should be updated, because there is written down: "Run M303 with no parameters to see the current tuning state or the last tuning result."?

    Should then be rather "No heaters have been tuned since startup of this board" or similar?


  • Moderator

    I think that refers to a tuning in progress. Were you running a tune when you sent M303 by itself?

    https://duet3d.dozuki.com/Guide/Ender+3+Pro+and+Duet+Maestro+Guide+Part+4:+Calibration/40#s161



  • @LB I don't write the firmware so I can't answer your question, but I'd guess that if you send M98 P"config.g" it'll re-load config.g and then whatever is in config_override and then you should get the expected result from sending M303. This is just from one user to another.



  • @deckingman
    @Phaedrux
    @Stephen6309
    Thanks
    Still is a bit confusing, because while it is performing an auto-tune when parameters are set to do so within m303, it prints out quite usefull hints while it is doing it. Donno what m303 without additional parameters is then for...?


  • Moderator

    @LB said in M303: Run heater tuning:

    Donno what m303 without additional parameters is then for...?

    As I said, if you are performing a tune and it's taking a long time and you're wondering what state it's currently in, you can send M303 to see what it's up to.

    “no heater has been tuned yet”

    It's telling you it hasn't done a tune yet, so it has nothing more to tell you.



  • @Phaedrux
    Ah - got it (think of an emoji with slap on the forhead here on this place)
    Can someone please change/adapt the text to something like "to see LIVE the current tuning state THAT IS PERFORMED" or so to the text there for non-native-english-speakers like me in https://duet3d.dozuki.com/Wiki/Gcode#Section_M303_Run_heater_tuning then or so please...



  • @Phaedrux said in M303: Run heater tuning:

    “no heater has been tuned yet”

    It's telling you it hasn't done a tune yet, so it has nothing more to tell you.

    Thanks!

    But my heaters have been tuned (and parameters successfully saved to config-override.g), just not in this session (this board start-up but e.g. the last time the duet was on) so it could be improved to "No heater has been tuned since startup of the board" or so (I am not a native-english-speaker, sometimes hard to understand all 100%)

    I consider this "solved" - thanks to everybody 🙂

    Edit: Just did a heater-tuning since I´ve just converted the anycubic-i3-mega to 24V (with a buck-down for the 12V-fans) and had to tune anyway: While it is tuning you can really really post m303 and it posts things back like: "Heater 0 is being tuned, phase 4 of 4" Great - I like it 🙂 but there are some other things observed, see posts below, so not yet fully "solved" 🙂



  • Reason for deleting - I was getting M303 and M307 confused - scratch that thought............


  • Moderator

    @LB said in M303: Run heater tuning:

    so it could be improved to "No heater has been tuned since startup of the board" or so (I am not a native-english-speaker, sometimes hard to understand all 100%)

    Yes that's reasonable change to make.



  • @Phaedrux

    because of now playing around with it I stumbled over another curiosity:

    Just did a heater-tune to understand better M303 and let´s have a look at the picture of the calibration what m303 throws back:

    m303 and so .png

    Things I observed:

    • the throwback of m303 while tuning seems to be off by +1, or the automatic system print-out is not "a-priori"/before but "posteriori"/afterwards? From a user-perspective this could be a bit confusing?
    • even it calibrated successfully and with or without save (via M500) it throws back "tuning failed"? -> but from my understanding as a user it sucessfully tuned the heater and saved all vals to config-override.g -> Why is it printing out "failed"?
    • tuning is quite different with heatplate on or off as you can see in the picture with the "m301 h1" at the bottom (with heatplate on in the tune before) and at the top with heatplate off (in that tune)... which can be kind of expected but maybe should be put in the documentation to tune with "realistic" setup e.g. if you have a heatplate turn that on when calibrating extruder since it will be on later as well -> For the future a combo-calibration would be great to maybe account for that? Yeah I know too many ideas here... 🙂

    Can somebody please try the same to reproduce the behaviour if it is me(my hardware-software combo: duet2ethernet with 3.1.1) or if it is like that?

    ?

    (thought of it to be solved and here the topic again 🙂 )



  • @LB I'm just guessing but I think it might be to do with the fact that the PID parameters get read in at start up, when config.g is read. So maybe if you run a heater tune, save the result but don't cycle power, then what gets reported by running M303 is the result of the previous heater tune (which was obtained when config.g was read at start up) rather than the heater tune that has just been run. Which is why I suggested sending M98 P"config.g" after running the heater tune. That will force config.g to get read again.
    If that works, then maybe either the documentation needs to be changed, or the firmware behaviour changed.


  • Moderator

    How's this? Clear enough?

    Tuning is performed asynchronously. Run M303 with no parameters while a tuning is underway to see the current tuning state, or the last tuning result if the tuning process has already completed. Note that sending M303 by itself before starting the tuning process won't return anything.



  • @Phaedrux said in M303: Run heater tuning:

    How's this? Clear enough?

    Tuning is performed asynchronously. Run M303 with no parameters while a tuning is underway to see the current tuning state, or the last tuning result if the tuning process has already completed. Note that sending M303 by itself before starting the tuning process won't return anything.

    Err, not exactly - at least not if my understanding of what the OP is saying happens is correct. My printer is in bits again at the moment so I can't test - in any case, don't use config_override.

    My understanding of what the OP is saying is that after running a successful heater tune, then saving the results to config_override, then sending M303 without any parameters, reports that no heater tuning has been carried out.

    Furthermore, if a successful tune has been done in the past, and another tuning cycle is carried out and saved to config_override, then sending M303 with no parameters will report the values of the original heater tune, not the one that was most recently done - unless the power is cycled.

    Or to put it another way, from what the OP is saying, the PID values are read into the object model when config.g is first run (or when power is applied) but if another tuning cycle is run, the object model isn't updated unless and until power is cycled (config.g is read again).

    At least, that's what I think he is saying happens.


  • Moderator

    @deckingman said in M303: Run heater tuning:

    My understanding of what the OP is saying is that after running a successful heater tune, then saving the results to config_override, then sending M303 without any parameters, reports that no heater tuning has been carried out.

    M303 will only report the active or recent tuning session. If power has been cycled, M303 hasn't been run that session and there is no M303 status to report.

    Saving the tuned values with M500 saves out M307 PID values. M307 is different. Sending M307 will report those values.

    There is no M303 in config-override.g. M303 is for initiating and monitoring the tuning process, nothing outside of that.

    M307 is how the resulting PID values are applied in the firmware.



  • @Phaedrux You are right of course. In that case, I have no idea what the OPs problem is. Unless he's confusing M303 with M307 (as I seen to be prone to doing... ).



  • @Phaedrux

    Was only a small suggestion, a little improvement maybe to avoid misunderstanding. In the end I am just an end-user. I do not at all know how this stuff works "under the hood" so please have a little patience 🙂

    Confusing m303 with m307 definetly solved 1 thing already... THANKS!

    I try to explain (as non native english speaker...):

    I have a duet2ethernet-1.0.4 with RRF3.1, I tuned the heaters etc. pp. printer is printing nicely. Because of PID-tuning manually for which I will open another post in a few days this issue came up

    1.)
    O.K. when I boot up that nicely tuned printer now and the first thing after booting is I ask the console for a replay via m303 this is what happens:

    m303.png

    So my suggestion is instead of
    old:
    "No heater has been tuned yet"
    new
    "No information since no heater has been tuned since startup"
    (or similar, because my heaters have been tuned just not in this session/since startup)

    Or leave it like it is and please put your good explanation "M303 will only report the active or recent tuning session. If power has been cycled, M303 hasn't been run that session and there is no M303 status to report" here: https://duet3d.dozuki.com/Wiki/Gcode#Section_M303_Run_heater_tuning
    Or e.g. at the end there:
    "Tuning is performed asynchronously. Run M303 with no parameters to see the current tuning state or the last tuning result (since power up)."

    2.)

    While tuning a heater "the counter" (1/4, 2/4,...) is a bit hard for me to understand (or I just do not get it?):

    m303_2.png

    if you follow how it counts:

    it prints out e.g. "Auto tune phase 1, heater on" and if you immediatly fire an m303 at the system it replies back
    "Heater 1 is being tuned, phase 2 of 4"

    So does "Auto tune phase 1, heater on" means it just finished phase1, right(?), because if the system prints out "Heater 1 is being tuned, phase 2 of 4" just afterwards that must be the case. So could we change this
    from
    "Auto tune phase x, ..."
    to
    "Auto tune phase x finished, ..."
    ?

    3.)

    m303_2.png

    It prints out tuning failed - but it did not fail - did it? Even after saving all successfully with "M500" it prints out tuning failed? (Thanks for reminding me that I can read out the values of M500 only via M307 but that still leaves the question why it throws back "failed"?

    I hope this time it is a little bit clearer what I wanted to communicate

    @deckingman
    Thanks for trying to understand - In the future I better write it down on a text-editor and post it the next day when I structured my thoughts because posting stuff immediatly just seems to be a mess... sorry for the unintended confusion here


  • Moderator

    @LB said in M303: Run heater tuning:

    Was only a small suggestion, a little improvement maybe to avoid misunderstanding. In the end I am just an end-user. I do not at all know how this stuff works "under the hood" so please have a little patience

    We're here to help and explain and hopefully make it better for the next person, so your feedback is appreciated.

    So my suggestion is instead of
    old:
    "No heater has been tuned yet"
    new
    "No information since no heater has been tuned since startup"
    (or similar, because my heaters have been tuned just not in this session/since startup)

    Yes, I can put forward that suggestion.

    Or leave it like it is and please put your good explanation "M303 will only report the active or recent tuning session. If power has been cycled, M303 hasn't been run that session and there is no M303 status to report" here: https://duet3d.dozuki.com/Wiki/Gcode#Section_M303_Run_heater_tuning

    It's already been added.

    The entire tuning process takes about 5 or 6 minutes and does give some feedback based on its current state, does it really warrant more changes? The difference between auto tune phase x of y, versus auto tune phase x finished seems arbitrary?

    @LB said in M303: Run heater tuning:

    It prints out tuning failed - but it did not fail - did it? Even after saving all successfully with "M500" it prints out tuning failed? (Thanks for reminding me that I can read out the values of M500 only via M307 but that still leaves the question why it throws back "failed"?

    That I'm not sure of. Did that failed message come only after sending M303 after the tuning had completed? I'll see what I can find out about that.

    @LB said in M303: Run heater tuning:

    I hope this time it is a little bit clearer what I wanted to communicate

    Yes, clearer. I hope I was able to make the tuning process a bit clearer for you as well. And I'm also sorry for the unintended confusion.



  • @Phaedrux

    m303_samstag_.jpg

    Regarding 2)
    The counter (maybe the speed) is a bit odd: Last picture from the post above I was not able to check all 4 states via m303, this time also not, just on other spots. In both pictures you can clearly see that inbetween every system-printout there is an m303 and still you cannot count 1 2 3 4 but only 124 or 134 or so, a bit odd. Yeah I know there are more important things and the tuning itself works, so this is only a minor thing. Maybe if somebody finds time it can be improved someday...

    Regarding 3)
    This message does NOT appear by itself, it is only thrown back if m303 is send AFTER the tuning has been completed (see also new picture above from saturday with a new/fresh tuning that shows the same behaviour)

    Since a heater-tuning for the hotend doesn´t take that long, it should be easy to verify the behaviour, especially 3) if it is my printer/setup or if it is the actual state of RRF3.1.1 . Just for completness the config.g:

    ; Configuration file for Duet WiFi/Ethernet (firmware version 3)
    ; executed by the firmware on start-up
    
    ;what is this:
    M451											   ; Switches to Fused Filament Fabrication(/FDM) mode for filament printing.
    
    ;General preferences:
    G90                                                ; send absolute coordinates...
    M83                                                ; ...but relative extruder moves
    
    M550 P"drucker-0"                                     ; set printer name, P-string is also used for mDNS local network discovery "http://name.local"
    
    ;Network:
    ;M551 P"inno-0"                                     ; set password
    ;M540 P												; NORMALLY CREATED BY SYSTEM AUTOMATICALLY (USER CAN but does not need to, set the MAC manually... see documentation for it...)
    M552 P0.0.0.0 S1                                   ; enable network and acquire dynamic address via DHCP
    M586 P0 S1                                         ; enable HTTP
    M586 P1 S0                                         ; disable FTP
    M586 P2 S0                                         ; disable Telnet
    
    M669 K0												; define type of kinematics with K_, see https://duet3d.dozuki.com/Wiki/Gcode#Section_M669_Set_kinematics_type_and_kinematics_parameters
    
    ; Drives:
    M569 P0 S1                                         ; x ; physical drive Px goes S1=forwards, S0=backwards
    M569 P1 S1                                         ; y ; physical drive Px goes S1=forwards, S0=backwards
    M569 P2 S1                                         ; z-l ; physical drive Px goes S1=forwards, S0=backwards
    M569 P3 S0                                         ; e0 ; physical drive Px goes S1=forwards, S0=backwards
    M569 P4 S1                                         ; z-r ; physical drive Px goes S1=forwards, S0=backwards
    
    M584 X0 Y1 Z2:4 U4 E3 P3                           ; set drive mapping, create two Z axis, name it in order UVWABC, make Px-Axis visible in GUI
    M350 X16 Y16 Z16 U16 E16 I1                        ; config microstepping, I1=with interpolation/I0=without
    
    ;>>>finetune E-val extruder(s)
    M92 X80.00 Y80.00 Z400.00 U400.00 E420.00                 ; set steps per mm, take care for extruder E in this case a BMG with 420
    ;<<<finetune E-val extruder(s)
    
    M566 X500.00 Y500.00 Z12.00 U12.0 E150.00 P1              ; set maximum instantaneous speed changes (mm/min), a.k.a. "jerk", P_=jerk policy betwenn 2 print moves -> 0, between all moves ->1
    M203 X30000.00 Y30000.00 Z480.00 U480.0 E1800.00            ; set maximum speeds (mm/min)
    M201 X2000.00 Y2000.00 Z60.00 U60.00 E5000.00                ; set accelerations (mm/s^2)
    M204 P500 T2000												; set acceleration (mm/s^2) for P printing moves and T travel moves -> DEFINE BETTER/FINER IN FILAMENT-CONFIG.G
    M906 X1000 Y1000 Z1000 U1000 E1000 I50                       ; set motor currents (mA) and I = motor idle factor in per cent
    M84 S1                                             ; Set idle timeout -> SAVES POWER -> SMALLER PSU
    
    ;Axis Limits:
    ; -> mit unserem jetzigen Extruder auf den anycubic i3 mega: 220x220x180
    M208 X0:220 Y0:220 Z0:180 U0:180					; set axis minima and maxima
    ;M579 X1.0000 Y1.0000 Z1.0000 U1.0000				; scaling possible (manual calibration needed)
    
    ;Endstops:
    M574 X1 S1 P"!xstop"                                ; see https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names
    M574 Y1 S1 P"!ystop"                                ; see https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names
    M574 Z1 S1 P"!zstop"                               ; see https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names
    M574 U1 S1 P"!e1stop"                               ; see https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names
    
    
    
    ;Z-Probe:
    M558 P0 H5 F100 T3000                              ; disable Z probe, set H dive height, F probe speed and T travel speed
    
    ;for grid automatic movements (new-style use also for mbl):
    ; define mesh grid (with G29 later for actual probing)
    ;M557 X15:195 Y15:195 S180                           ; define mesh grid with G29 for probing
    M557 X{move.axes[0].min+15}:{move.axes[0].max-15} Y{move.axes[1].min+15}:{move.axes[1].max-15} P2:2) ; define mesh grid with G29 for probing, see M208	
    
    ;for old manual z-adjustment (old-style do not use any more):
    ; M671 command enables the bed levelling assistant (with G32 later to perform actual bed probing), M671 must come later in config.g than any M667 or M669 command
    ;e.g. clockwise order: point1 (0+10,0+10), point2 ((0+200)/2, 200-10), point3 (200-10,0+10)
    ;M671 X{move.axes[0].min+10}:{(move.axes[0].min+move.axes[0].max)/2}:{move.axes[0].max-10} Y {move.axes[1].min+10}:{move.axes[1].max-10}:{move.axes[1].min+10} P0.5 ; P=Pitch of levelling screws
    
    
    
    ; Heaters/Temp-sensors
    ; M950 command must have exactly one of the H, F, J, P or S parameters
    ; use correct pin-names: https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names
    
    ; heated bed
    M308 S0 P"bedtemp" Y"thermistor" T100000 B4725 C7.060000e-8 A"heat plate"  ; configure sensor Sx as type"thermistor"/"..." on pin P"...", e.g. typ. types vor 100K are B4725, B4138, B3950, see https://duet3d.dozuki.com/Wiki/Connecting_thermistors_or_PT1000_temperature_sensors#Section_Thermistor_parameters
    M950 H0 C"bedheat" T0 Q100                             ; create H=heater (number) output on x and map it to sensor C"x"; T Temperature sens num, required only when creating a heater; see M308
    ;-> CHECK PWM FREQ TO WORK WITH POWER-SUPPLY
    M140 H0                                            ; exclusive for heatplate: map to heater Hx, in RRF3 must come after M950 command that creates heater, and before any M143 command
    ;>>>LIMIT EVENTUALLY BECAUSE OF POWER-SUPPLY MAX CAPABILITY, BUT IF TOO LOW ULTIMATLY MAX ACHIEVABLE HEAT IS CAPPED...
    M307 H0 B0 S1.0 ;V0                                  ; for Hx, B1=bang-bang/0=PID mode, set PWM limit S0.0-1.0, V=set Voltage at which calibrated set to V0 if not known
    
    ; extruder
    M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.060000e-8 A"extruder"     ; configure sensor Sx as type"thermistor"/"..." on pin P"...", e.g. typ. types vor 100K are B4725, B4138, B3950, see https://duet3d.dozuki.com/Wiki/Connecting_thermistors_or_PT1000_temperature_sensors#Section_Thermistor_parameters
    M950 H1 C"e0heat" T1 Q100                           ; create H=heater (number) output on x and map it to sensor C"x"; T Temperature sens num, required only when creating a heater; see M308
    ;-> CHECK PWM FREQ TO WORK WITH POWER-SUPPLY
    ;tool needs no map like M140/141
    ;>>>LIMIT EVENTUALLY BECAUSE OF POWER-SUPPLY MAX CAPABILITY, BUT IF TOO LOW ULTIMATLY MAX ACHIEVABLE HEAT IS CAPPED...
    M307 H1 B0 S1.0 ;V0                                  ; for Hx, B 1=bang-bang/0=PID mode, set PWM limit S0.0-1.0, V=set Voltage at which calibrated set to V0 if not known
    
    ; chamber heater optional connected then to this sensor or ONLY sensor...
    M308 S3 P"e1temp" Y"thermistor" T10000 B3970 A"Chamber" 	; configure sensor Sx as type"thermistor"/"..." on pin P"...", e.g. typ. types vor 100K are B4725, B4138, B3950, see https://duet3d.dozuki.com/Wiki/Connecting_thermistors_or_PT1000_temperature_sensors#Section_Thermistor_parameters
    ;M950 H3 C"e1heat" T3 ;Qx ; F3                           ; create H=heater (number) output on x and map it to sensor C"x"; T Temperature sens num, required only when creating a heater; see M308
    ;M141 H3											; exclusive for chamber: map to heater Hx, in RRF3 must come after M950 command that creates heater, and before any M143 command
    ;>>>LIMIT EVENTUALLY BECAUSE OF POWER-SUPPLY MAX CAPABILITY, BUT IF TOO LOW ULTIMATLY MAX ACHIEVABLE HEAT IS CAPPED...
    ;M307 H3 I2 ;B0 ;S0.x ;V0                               ; for Hx, B 1=bang-bang/0=PID mode, set PWM limit S0.0-1.0, for I inversion see documentation, , V=set Voltage at which calibrated set to V0 if not known
    
    ; max temp def M143 (set abs max for start, finer/granular control is via filament-config.g)
    ; check firmware-number for absolute limits, e.g. in RRF3.x 295 for extruder, 125 for bed...
    ; 2-step approach:
    M143 H0 P0 S125 A2 ; switch off heater 1 temporarily if it exceeds S_°C
    M143 H0 P1 S130 A0 ; raise a heater fault if it exceeds S_°C
    M143 H1 P2 S295 A2 ; switch off heater 1 temporarily if it exceeds S_°C
    M143 H1 P3 S300 A0 ; raise a heater fault if it exceeds S_°C
    ; we do not have a "real" h3, but only a temp-sensor attached to it to have a fan as cooler hooked up to it... so there is no max temp to be set...
    ;M143 H3 P4 S45 A2 ; switch off heater 1 temporarily if it exceeds S_°C
    ;M143 H3 P5 S50 A0 ; raise a heater fault if it exceeds S_°C
    
    ; heater fault (behaviour/characteristics) def M570
    M570 H0 P20 T20 S5								; def heater-fault: for Hx, time in sec Px, Temp exc in Tx, optional S Integer timeout in min (can be set 0) for print to be cancelled
    M570 H1 P5 T15 S3								; def heater-fault: for Hx, time in sec Px, Temp exc in Tx, optional S Integer timeout in min (can be set 0) for print to be cancelled
    ;M570 H2 P5 T15 S3								; def heater-fault: for Hx, time in sec Px, Temp exc in Tx, optional S Integer timeout in min (can be set 0) for print to be cancelled
    ;M570 H3 P5 T15 S3								; def heater-fault: for Hx, time in sec Px, Temp exc in Tx, optional S Integer timeout in min (can be set 0) for print to be cancelled
    
    
    
    ;Fan(s):
    ; M950 command must have exactly one of the H, F, J, P or S parameters
    ; https://duet3d.dozuki.com/Wiki/Gcode#Section_M106_Fan_On
    ; https://duet3d.dozuki.com/Wiki/Connecting_and_configuring_fans#Section_Thermostatically_controlled_fans
    ; use correct pin-names: https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names
    
    ;print/part cool fan:
    M950 F0 C"fan0" ;Q200                               ; create F=fan(x) with "!" to invert, on pin C; opt set frequency(Q) e.g. for most real 4-wire pwm-fans 25000 (max 65535), ordinary 2-wire must be kept low around 100-500, default seems to be 250
    M106 P0 C"print cool fan" B0.8 H-1 S0          ; P=num; s=set speed 0-255/0.0-1.0; limit L min & X max; H=heater monitored+Thermostatic control, -1=off or Hx(:__...) monitored; B=blip time in ms; if not thermostatic (H-1) define a board-boot-start-up speed S=fan speed;
    
    ;extr heat-sink/-break fan:
    M950 F1 C"fan1" ;Q200                               ; create F=fan(x) with "!" to invert, on pin C; opt set frequency(Q) e.g. for most real 4-wire pwm-fans 25000 (max 65535), ordinary 2-wire must be kept low around 100-500, default seems to be 250
    M106 P1 C"extr heat sink fan" B0.8 H1 L0.5 T39:160        ; P=num; s=set speed 0-255/0.0-1.0; limit L min & X max; H=heater monitored+Thermostatic control, -1=off or Hx(:__...) monitored; B=blip time in ms; if not thermostatic (H-1) define a board-boot-start-up speed S=fan speed;
    
    ;chamber fan:
    M950 F2 C"fan2" T3 ;Q500 ;! ;Q25000                  ; create F=fan(x) with "!" to invert, on pin C; opt set frequency(Q) e.g. for most real 4-wire pwm-fans 25000 (max 65535), ordinary 2-wire must be kept low around 100-500, default seems to be 250
    ; set some default vals to start but override it in the print-file with the specific filament-config.g:
    M106 P2 C"chamber fan" B1.0 L0.9 X1.0 T40:41 H3          ; P=num; s=set speed 0-255/0.0-1.0; limit L min & X max; H=heater monitored+Thermostatic control, -1=off or Hx(:__...) monitored; B=blip time in ms; if not thermostatic (H-1) define a board-boot-start-up speed S=fan speed;
    
    ;moisture/humidity sensor "DHT22":
    ; https://duet3d.dozuki.com/Wiki/Gcode#Section_M305_Set_temperature_sensor_parameters
    ;The DATA line of the DHTxx must be connected to one of pins CS1, CS2... on the SPI bus. Specify the sensor type.
    ;See P"nnn" parameter for "dhthumidty" section of https://duet3d.dozuki.com/Wiki/Gcode#Section_M308_Set_or_report_sensor_parameters
    ;In RRF3, sensors are created and configured independently from heaters, using the M308 command. When creating a heater using M950, you tell it which sensor to use. You must create the sensor before you refer to it in a M950 command. M305 is not used.
    
    M308 S10 P"0.spi.cs1" Y"dht22"       A"Filament Temp"    ; define DHT22 temperature sensor
    M308 S11 P"S10.1"     Y"dhthumidity" A"Filament Hum[%]"  ; Attach DHT22 humidity sensor to secondary output of temperature sensor
    ;M305 P103 X405 T22 S"Filament Temp."
    ;M305 P104 X455 T22 S"Filament Humid.[%]"
    
    
    
    ;Tool(s):
    M563 P0 D0 H1 F0                                   ; define tool 0
    ;G10 P0 X0 Y0 Z0                                    ; set tool 0 axis offsets
    
    ;Extruder(s):
    M200 D1.75 											;set all extruder filament diameters to 1.75mm - if volumetric-slicer is used
    ;M404 ; Filament width and nozzle diameter - NOT NEEDED since currently NOT used for calculation but only printmonitor-communication...
    ;pressure advance (needs manual calibration) https://duet3d.dozuki.com/Wiki/Pressure_advance#main
    M572 D0 S0.015										; D=extruder, S=amount, check M566, for amount see https://duet3d.dozuki.com/Wiki/Pressure_advance#Section_How_much_pressure_advance_to_use
    ;nonlinear extrusion (needs manual calibration) https://duet3d.dozuki.com/Wiki/Gcode#Section_M592_Configure_nonlinear_extrusion
    ;M592 D0 A0.01 B0.0005 								; non-linear extrusion parameters for extruder drive Dx, A, B, opt. T, opt. L, see docu
    
    
    
    ;Display:
    ;M918												;Configure direct-connect display
    M575 P1 S1 B57600                                  ; enable support for PanelDue
    
    ;Powerloss behaviour:
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set S=voltage thresholds and actions for power loss, make sure to have files needed for this created (sys/resurrect.g, sys/resurrect-prologue.g)
    
    ;Everything else:
    M501                                               ; load any via M500 stored parameters from non-volatile memory from config-override.g - simply uncomment if not wanted
    ;M593 F40.5  									   ; cancel/avoid ringing at F_ Hz
    
    
    
    ;make machine ready for start:
    T0                                                 ; select first tool
    G10 P0 R0 S0                                       ; set initial tool 0 active and standby temperatures to 0C to avoid any unwanted behaviour, "real" temps are defined e.g. in filament-config.g
    M118 P0 S"reached end of config.g"				   ; message P 0= Generic [default], 1= USB, 2= PanelDue/UART, 3= HTTP, 4= Telnet, 5= second UART (optional)
    
    

    Board is a duet2ethernet-1.0.4 printing fine 🙂 even without any calibration (next thing to do):

    IMG_0343.jpg


  • administrators

    @LB said in M303: Run heater tuning:

    So my suggestion is instead of
    old:
    "No heater has been tuned yet"
    new
    "No information since no heater has been tuned since startup"

    I will implement that suggestion immediately.

    @LB said in M303: Run heater tuning:

    So does "Auto tune phase 1, heater on" means it just finished phase1, right(?), because if the system prints out "Heater 1 is being tuned, phase 2 of 4" just afterwards that must be the case. So could we change this
    from
    "Auto tune phase x, ..."
    to
    "Auto tune phase x finished, ..."
    ?

    I will change it to "Auto tune starting phase X".

    The "Heater 1 tuning failed" message looks wrong to me. I will check when that message is generated.

    BTW I have just started implementing the new heater tuning algorithm, which should be faster, more accurate (especially in measuring the dead time), use less RAM, and be more portable to expansion and tool boards.



  • @dc42 said in M303: Run heater tuning:

    BTW I have just started implementing the new heater tuning algorithm, which should be faster, more accurate (especially in measuring the dead time), use less RAM, and be more portable to expansion and tool boards.

    Thanks again! Sounds good - I will slowly finish the anycubic i3 mega conversion to have a solid base to migrate. 🙂


Log in to reply