In the startup script we set the extruder temperature directly so that we can turn off the hot end cooling fan during warm-up and then turn it back on afterwords. Here is what we've been using for a single hot end:
M43 ; turn off cooling fan
M140 S[bed0_temperature]
M109 S[extruder0_temperature] T0
M109 S[bed0_temperature]
M42 ; turn on cooling fan
We're now switching over to a dual hot end system. The way our printer works the hot ends are modular and either one of them may not be installed during a particular print. That allows setting up all sorts of interesting combinations (dual materials, different sizes, different nozzle diameters, etc.). It also allows for quick-restart if a jamb occurs.
So we need to modify this startup script to heat up both printheads. Something like this:
M43 ; turn off cooling fan
M140 S[bed0_temperature]
M109 S[extruder0_temperature] T0
M109 S[extruder1_temperature] T1
M42 ; turn on cooling fan
But if either of the printheads is not installed this errors out in the controller. The correct solution is to check whether the extruder0/extruder1 temperatures need to be set and only try to set it if it is. Something like this:
M43 ; turn off cooling fan
M140 S[bed0_temperature]
{IF [extruder0_temperature]>0} M109 S[extruder0_temperature] T0
{IF [extruder1_temperature]>0} M109 S[extruder1_temperature] T1
M109 S[bed0_temperature]
M42 ; turn on cooling fan
Unfortunately this doesn't seem to work. I'm guessing the IF conditional isn't supported in the startup script???
Any other way to do this?
Thanks.
-larry