$ 0 0 Put an M400 Gcode before your M10 or M11 The M400 will wait until all prev movements Gcodes ends.