thanks, your code is working
I think the M400 is needed, the code from
https://duet3d.dozuki.com/Guide/Independent+Z+motors+and+endstop+switches/18?lang=en
does not work, the Z switch never gets touched (E0 is touched). If I touch him manually bad Z value comes out(very high).
With M400 is works!
Thanks!