[3.3RC3] tool change don't wait on M116 P
-
@dc42 i will try but all i did was this:
reset the board, do a G28 wait until it is finished and then launch this macro
But i will try to add a M400 before the M116 in the tpost macro -
@dc42 i added a M400 like this in the tpost1.g but it didn't wait until the temp threshold before moving to center of the bed.
; tpost1.g ; called after tool 1 has been selected ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Thu May 13 2021 17:38:36 GMT+0200 (heure d’été d’Europe centrale) ; Wait for set temperatures to be reached M400 M116 P1 G90 if (move.axes[1].userPosition<(100+tools[1].offsets[1])) G0 Y{100+tools[1].offsets[1]} F3600 G0 X{244+tools[1].offsets[0]} Y{55+tools[1].offsets[1]} F3600 G0 Y{20+tools[1].offsets[1]} G0 Y{-3.5+tools[1].offsets[1]} F600 G0 X{234+tools[1].offsets[0]} G0 Y{55+tools[1].offsets[1]} F6000 M400 ;M118 S{sensors.gpIn[1].value=1 && state.currentTool=2} if sensors.gpIn[1].value=1 && state.currentTool=1 ;M118 S"writing file" M560 P"/sys/SetTool.g" T1 P0 <!-- **EoF** -->
-
@psychotik2k3 does a G4 P10 command between the G10 command and the T command work?
PS - which Duet do you have?
-
@dc42 i have a cloned DUET3 MBH6c and HC3.
And adding the G4 like this didn't change anything (and i still have the M400 on the tpost)var toolnumber = 1 var targettemp = 60 ;M109 S41 T{var.toolnumber} T-1 G10 P{var.toolnumber} S{var.targettemp} R0 G4 P50 ;M104 S{var.targettemp} T{var.toolnumber} ;M109 S{var.targettemp} T{var.toolnumber} T{var.toolnumber} G0 X155 Y155 T-1 G10 P{var.toolnumber} S0 R0
-
@dc42 and the 3 heaters are plugged on the H3C board (thermistor, heater cartridge fan and stepper motor)
-
@dc42 just in case here is my config.g
; Configuration file for Duet 3 (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Thu May 13 2021 17:38:36 GMT+0200 (heure d’été d’Europe centrale) ; General preferences G90 ; send absolute coordinates... ;M83 ; ...but relative extruder moves M82 ; ...even for extruder moves do not forget to reset when needed M550 P"duet3" ; set printer name M669 K1 ; select CoreXY mode ; Network M552 S0 ; disable ethernet interface M552 P192.168.1.151 ; set ip address M552 S1 ; enable network interface M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0.0 S0 D2 ; physical drive 0.0 goes backwards (DIAG front right rear left) M569 P0.1 S0 D2 ; physical drive 0.1 goes forwards (other diagonal) M569 P0.2 S1 D3 ; physical drive 0.2 goes backwards (z right) M569 P0.3 S1 D3 ; physical drive 0.3 goes backwards (z left) M569 P1.0 S0 D3 ; physical drive 1.0 goes forwards (tool 0) M569 P1.1 S0 D3 ; physical drive 1.1 goes forwards (tool 1) M569 P1.2 S0 D3 ; physical drive 1.2 goes forwards (tool 2) M584 X0.0 Y0.1 Z0.2:0.3 E1.0:1.1:1.2 ; set drive mapping M350 X16 Y16 Z16:16 E16:16:16 I1 ; configure microstepping with interpolation M92 X200.00 Y200.00 Z400.00 E424.91:955.666:406.00 ; set steps per mm ;M566 X42000.00 Y42000.00 Z1440.00:1440.00 E72000.00:72000.00:72000.00 ; set maximum instantaneous speed changes (mm/min) M566 X700.00 Y700.00 Z24.00:24.00 E2000.00:2000.00:2000.00 ; set maximum instantaneous speed changes (mm/min) ;M203 X1080000.00 Y1080000.00 Z60000.00:60000.00 E72000.00:72000.00:72000.00 ; set maximum speeds (mm/min) M203 X18000.00 Y18000.00 Z999.00:999.00 E1200.00:1200.00:1200.00 ; set maximum speeds (mm/min) M201 X3000.00 Y3000.00 Z100.00:100.00 E4000.00:4000.00:4000.00 ; set accelerations (mm/s^2) M906 X1400 Y1400 Z800:800 E1400:567:700 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S120 ; Set idle timeout ; Axis Limits ;M208 X-24 Y-22 Z0 S1 ; set axis minima ;M208 X329 Y342 Z365 S0 ; set axis maxima M208 X-24 Y-17 Z0 S1 ; set axis minima M208 X329 Y347 Z365 S0 ; set axis maxima ; Endstops M574 X1 S1 P"^io1.in" ; configure active-high endstop for low end on X via pin ^io1.in M574 Y2 S1 P"^io2.in" ; configure active-high endstop for high end on Y via pin ^io2.in M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M950 S0 C"io7.out" ; create servo pin 0 for BLTouch M558 P9 C"^io7.in" H5 F120 T8000 ; set Z probe type to bltouch and the dive height + speeds ;M558 H30 ;*** Remove this line after delta calibration has been done and new delta parameters have been saved ;G31 P500 X32.5 Y67.5 Z3.75 ; set Z probe trigger value, offset and trigger height G31 K0 P500 X43 Y3.5 Z5.68 ; calculated from macro autoconfig BLTOUCH correspond to T2 as it's the lowest ;M557 X0:310 Y0:310 S31 ; define mesh grid M557 X19:305 Y3:303 S28.6:30 ; define mesh grid M98 P"retractprobe.g" ; force a retract in case of restart when pin deployed ; Heaters ;M308 S0 P"temp0" Y"thermistor" T10000 B4092 ; configure sensor 0 as thermistor on pin temp0 M308 S0 P"temp0" Y"thermistor" T10000 B3450 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M307 H0 R0.142 C1371.2 D36.47 S1.00 V23.5 ; from autotune M308 S1 P"1.temp0" Y"thermistor" T3600000 B6453 C9.932858e-8 H-3 ; configure sensor 1 as thermistor on pin 1.temp0 M950 H1 C"1.out0" T1 ; create nozzle heater output on 1.out0 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ;M307 H1 B0 R2.508 C160.6 D4.58 S1.00 V0.0 ; values from autotuning M307 H1 B0 R2.341 C180.2:144.3 D5.30 S1.00 V23.7 ; values from autotuning M308 S2 P"1.temp1" Y"thermistor" T100000 B4360 ; configure sensor 2 as thermistor on pin 1.temp1 M950 H2 C"1.out1" T2 ; create nozzle heater output on 1.out1 and map it to sensor 2 M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H2 S280 ; set temperature limit for heater 2 to 280C M307 H2 B0 R2.589 C240.1:170.5 D10.82 S1.00 V23.7 ; from autotune ;M308 S3 P"1.temp2" Y"thermistor" T100000 B4138 ; configure sensor 3 as thermistor on pin 1.temp2 M308 S3 P"1.temp2" Y"thermistor" T100000 B4290 ; configure sensor 3 as thermistor on pin 1.temp2 M950 H3 C"1.out2" T3 ; create nozzle heater output on 1.out2 and map it to sensor 3 M307 H3 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H3 S280 ; set temperature limit for heater 3 to 280C M307 H3 B0 R3.025 C230.8:153.9 D8.23 S1.00 V23.7 ; values from autotune ; Fans M950 F0 C"out9" Q499 ; create fan 0 on pin out9 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"1.out6" Q500 ; create fan 1 on pin 1.out6 and set its frequency M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on M950 F2 C"1.out7" Q500 ; create fan 2 on pin 1.out7 and set its frequency M106 P2 S1 H2 T45 ; set fan 2 value. Thermostatic control is turned on M950 F3 C"1.out8" Q500 ; create fan 3 on pin 1.out8 and set its frequency M106 P3 S1 H3 T45 ; set fan 3 value. Thermostatic control is turned on ; Tools M563 P0 S"BMG-NF" D0 H1 F0 ; define tool 0 ;G10 P0 X0 Y-0.7 Z1.76 ; set tool 0 axis offsets G10 P0 X0 Y-27.6 Z1.76 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C M563 P1 S"BIQUH" D1 H2 F0 ; define tool 1 ;G10 P1 X0 Y-26.9 Z0.29 ; set tool 1 axis offsets ;G10 P1 X0 Y-26.9 Z0.81 ; set tool 1 axis offsets G10 P1 X0 Y-26.9 Z-0.379 ; set tool 1 axis offsets G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C M563 P2 S"LGXFF" D2 H3 F0 ; define tool 2 G10 P2 X0 Y-26.9 Z0 ; set tool 2 axis offsets G10 P2 R0 S0 ; set initial tool 2 active and standby temperatures to 0C ; Custom settings are not defined ;set screws position ;M671 X271:35:35:271 Y277:277:33:33 P0.7 ; for manual screw positionning M671 X372:-62 Y154:154 S3 ; for auto dual Z bed leveling ; Miscellaneous M575 P1 S1 B57600 ; enable support for PanelDue ; Toolchanger specific M950 J1 C"io8.in" ; set up IR probe (or switch) on IO8 can check with sensors.gpIn[1].value=1 (tool loaded) M98 P"/sys/SetTool.g" ; restore tool load status in case of reset or power loss with a tool loaded ;a virer apres ;M564 S0 H0 M501
and the config-override.g
; config-override.g file generated in response to M500 at 2021-06-07 15:07 ; This is a system-generated file - do not edit ; Heater model parameters M307 H0 R0.142 C1371.200:1371.200 D36.47 S1.00 V23.5 B0 I0 M307 H1 R2.341 C180.200:144.300 D5.30 S1.00 V23.7 B0 I0 M307 H2 R2.589 C240.100:170.500 D10.82 S1.00 V23.7 B0 I0 M307 H3 R3.025 C230.800:153.900 D8.23 S1.00 V23.7 B0 I0 ; Z probe parameters G31 K0 P500 X40.2 Y4.1 Z3.97 ; Workplace coordinates G10 L2 P1 X0.00 Y0.00 Z0.00 G10 L2 P2 X0.00 Y0.00 Z0.00 G10 L2 P3 X0.00 Y0.00 Z0.00 G10 L2 P4 X0.00 Y0.00 Z0.00 G10 L2 P5 X0.00 Y0.00 Z0.00 G10 L2 P6 X0.00 Y0.00 Z0.00 G10 L2 P7 X0.00 Y0.00 Z0.00 G10 L2 P8 X0.00 Y0.00 Z0.00 G10 L2 P9 X0.00 Y0.00 Z0.00
-
hummm i tried to replace the M116 with a M109 and test a simple printe with 2 heads.
the first tool load was ok but when changing the tool the second one didn't stopped waiting to reach it's active temp.
so even with M109 there are some misses.here is the code from tpost2.g
; tpost2.g ; called after tool 2 has been selected ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Thu May 13 2021 17:38:37 GMT+0200 (heure d’été d’Europe centrale) ; Wait for set temperatures to be reached var previousActiveTemperature = heat.heaters[3].active var previousStandbyTemperature = heat.heaters[3].standby M400 M109 S{var.previousActiveTemperature} T2 ;M116 P2 G10 P2 S{var.previousActiveTemperature} R{var.previousStandbyTemperature} G90 if (move.axes[1].userPosition<(100+tools[2].offsets[1])) G0 Y{100+tools[2].offsets[1]} F3600 G0 X{153+tools[2].offsets[0]} Y{55+tools[2].offsets[1]} F3600 G0 Y{20+tools[2].offsets[1]} ;M400 ;M291 P"continue ?" S3 G0 Y{-3.5+tools[2].offsets[1]} F600 ;M400 ;M291 P"continue ?" S3 G0 X{143+tools[2].offsets[0]} ;M400 ;M291 P"continue ?" S3 G0 Y{55+tools[2].offsets[1]} F6000 M400 ;M118 S{sensors.gpIn[1].value=1 && state.currentTool=2} if sensors.gpIn[1].value=1 && state.currentTool=2 ;M118 S"writing file" M560 P"/sys/SetTool.g" T2 P0 <!-- **EoF** -->
-
@psychotik2k3 please try the 3.3RC3+6 firmware from https://www.dropbox.com/sh/nmpsl9a3jfsumm5/AAA6adSjEcd1AM_j5_tVberGa?dl=0.
-
@dc42 thanks will try that and keep you in touch
-
@dc42 unfortunately it didn't worked, my tools where all parked and it took the tool 1 adn tried to purge it without waiting for it to reach the good temp.
the job gcode was this:
M107 M190 S60 ; set bed temperature and wait for it to be reached G10 S215 P1 ; set temperature G10 S215 P2 ; set temperature ;TYPE:Custom G28 ; home all axes G1 Z5 F5000 ; lift nozzle M98 P"/sys/load_meshbed.g" ; load mesh bed corresponding to the temp G10 S215 P1 ; set temperature G10 S215 P2 ; set temperature G21 ; set units to millimeters G90 ; use absolute coordinates M82 ; use absolute distances for extrusion G92 E0 T1 M98 P"/macros/purge_and_wipe"; purge and wipe residu
and the tpost1.g is this:
; tpost1.g ; called after tool 1 has been selected ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Thu May 13 2021 17:38:36 GMT+0200 (heure d’été d’Europe centrale) ; Wait for set temperatures to be reached var previousActiveTemperature = heat.heaters[2].active var previousStandbyTemperature = heat.heaters[2].standby M400 M116 P1 G90 if (move.axes[1].userPosition<(100+tools[1].offsets[1])) G0 Y{100+tools[1].offsets[1]} F3600 G0 X{244+tools[1].offsets[0]} Y{55+tools[1].offsets[1]} F3600 G0 Y{20+tools[1].offsets[1]} G0 Y{-3.5+tools[1].offsets[1]} F600 G0 X{234+tools[1].offsets[0]} G0 Y{55+tools[1].offsets[1]} F6000 M400 if sensors.gpIn[1].value=1 && state.currentTool=1 ;M118 S"writing file" M560 P"/sys/SetTool.g" T1 P0 <!-- **EoF** -->```
-
for info the {1} on line 8 is just a display bug from the site this is only a crlf there
-
@psychotik2k3 if in the G10 command you set the standby temperature to 215 as well as the active (i.e. use G10 S215 R215), does it work then?
-
@dc42 just tried and no.
here is what i did in tpostn.g
; tpost1.g ; called after tool 1 has been selected ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Thu May 13 2021 17:38:36 GMT+0200 (heure d’été d’Europe centrale) ; Wait for set temperatures to be reached var previousActiveTemperature = heat.heaters[2].active var previousStandbyTemperature = heat.heaters[2].standby M400 ;M109 S{var.previousActiveTemperature} T1 G10 P1 S{var.previousActiveTemperature} R{var.previousActiveTemperature} M116 P1 ;now that the temp threshold is here we put back standby temperature G10 P1 S{var.previousActiveTemperature} R{var.previousStandbyTemperature} G90
-
@psychotik2k3 please can you put together the simplest example you can that exhibits this behaviour. I can't make it happen on my printers,
-
@dc42 here it is:
var toolnumber = 1 var targettemp = 60 G28 if sensors.gpIn[1].value=0 T-1 P0 else T-1 G10 P1 S{var.targettemp} R0 G10 P2 S{var.targettemp} R0 G4 P50 T1 G0 X155 Y155 M400 T2 G0 X155 Y155 M400 T-1 G10 P{var.toolnumber} S0 R0
if i perform a reset of the board this will fail 99.5%
but if i launch it a second time ia may or may not fail.here is a video showing how it behaves and you clearly see that tools are moving while they are not at the correct temp
youtube video -
@dc42 if you want somehting else here is my whole sys macro and gcode folder:
github BLV MGN Seb for duet 3 -
@psychotik2k3 thanks. When M116 Pn fails to wait for the heaters on tool n to heat up, is the heater concerned always one that is attached to the main board; or always one attached to an expansion board; or have you seen both?
-
@dc42 no all my tool heaters are attached to the H3C
i attached the XY and Z, bltouch part cooling fan and heatbed on the mainboard, and everything related to the tools (heater thermistor stepper and fan) on H3C board.
so to sum up:
heater 0 and its thermistor (heatbed) on MB6HC
heaters 1 to 2 (tools) and their themistors on H3C(i just added that because maybe this is because i have no tool on mainboard but still one heater the heatbed)
-
@psychotik2k3 thanks. Please can you try putting a G4 S1 command immediately before the M116 P1 command in tpost1.g and see if that works around the problem.
-
@dc42 it worked
i wouldn't have bet on it as we already test a G4 P50 before the call to the tool.
but it worked.
do i have to try back with rrf3.3rc3+1? or does some modifications included in the rc3+6 are still needed to make it works ?