Kod: Zaznacz cały
if (insertToolCall || newWorkOffset || newWorkPlane) {
// retract to safe plane
writeRetract(Z);
}
if (hasParameter("operation-comment")) {
var comment = getParameter("operation-comment");
if (comment) {
writeStructureComment(comment);
}
}
if (properties.showNotes && hasParameter("notes")) {
var notes = getParameter("notes");
if (notes) {
var lines = String(notes).split("\n");
var r1 = new RegExp("^[\\s]+", "g");
var r2 = new RegExp("[\\s]+$", "g");
for (line in lines) {
var comment = lines[line].replace(r1, "").replace(r2, "");
if (comment) {
writeComment(comment);
}
}
}
}
if (insertToolCall) {
forceWorkPlane();
onCommand(COMMAND_STOP_SPINDLE);
Tylko, czy na pewno chcesz usunąć odjazd przed wymianą narzędzia?
Reszta jest na końcu.
po tekście
Kod: Zaznacz cały
function onClose() {
setCoolant(COOLANT_OFF)
onCommand(COMMAND_STOP_SPINDLE);
writeRetract(Z);
pod tym ostatnim dopisujesz
Kod: Zaznacz cały
writeBlock("L " + "Z+50 " + " R0 FMAX " + "M5");
Kod: Zaznacz cały
writeBlock("L " + "IZ+50 " + " R0 FMAX " + "M5");