Hi everybody I implemented what you mentionned with a switch to detect tool, updated in config file and tpost#, with your code. M950 J0 C"!^duex.e2stop" ; assign duex.e2stop pin to sensors.gpIn[0], inverted and pull-up activated if sensors.gpIn[0].value = 0 ;if the microswitch is not pressed... abort "Failed to grab tool" Sometimes it works, sometimes not... More precisely, print is aborted because of "tool grab fail" but this is not the case. The switch is well pressed and led switch on duex5 is ON... I don't understand. Thank you for your help ! Best regards