diff --git a/Haas_Gantry_BIDC/Bechtel SR.cps b/Haas_Gantry_BIDC/Bechtel SR.cps index e0ef7a6..594ed56 100644 --- a/Haas_Gantry_BIDC/Bechtel SR.cps +++ b/Haas_Gantry_BIDC/Bechtel SR.cps @@ -868,10 +868,10 @@ function onOpen() { var tool = tools.getTool(i); // Added 8/31/21 | Kevin Pan | pan261 if (tool.number == 1) { - // throw "Tool number 1 is reserved for probing." + throw "Tool number 1 is reserved for probing." } if (tool.number == 2) { - // throw "Tool number 2 is not available for use." + throw "Tool number 2 is not available for use." } // pan261 @@ -1851,13 +1851,20 @@ function onSection() { } } - if (!isFirstSection()) { + if (!isFirstSection() && getProperty("toolHeightValidation")) { writeBlock(mFormat.format(0)); writeComment("CHECK TOOL AND PART"); if (!retracted) { writeRetract(Z); } writeRetract(X, Y); + } else if(!isFirstSection()) { + writeBlock(mFormat.format(1)); + writeComment("CHECK TOOL AND PART"); + if (!retracted) { + writeRetract(Z); + } + writeRetract(X, Y); } if (hasParameter("operation-comment")) { @@ -1874,7 +1881,7 @@ function onSection() { } if (hasParameter("notes") && getParameter("notes").toUpperCase().indexOf("APPROVED") <= -1) { - // throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a Peer Mentor." + throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a Peer Mentor." } if (staticProperties.showNotes) { diff --git a/Haas_Mills_BIDC/Bechtel DT.cps b/Haas_Mills_BIDC/Bechtel DT.cps index c618ce4..73a80f4 100644 --- a/Haas_Mills_BIDC/Bechtel DT.cps +++ b/Haas_Mills_BIDC/Bechtel DT.cps @@ -2411,12 +2411,15 @@ function onSection() { } } - if (!isFirstSection()) { + if (!isFirstSection() && getProperty("toolLengthValidation")) { displayMedia("checkPartTool.jpg", false); writeBlock(mFormat.format(0)); writeBlock(mFormat.format(131)); + } else if (!isFirstSection()) { + writeBlock(mFormat.format(1)); + writeComment("Check Part and Tool"); } - + if (hasParameter("operation-comment")) { var comment = getParameter("operation-comment"); if (comment && ((comment !== lastOperationComment) || !patternIsActive || insertToolCall)) { diff --git a/Haas_Mills_BIDC/Bechtel VF2.cps b/Haas_Mills_BIDC/Bechtel VF2.cps index 091fbfc..2ebfa1b 100644 --- a/Haas_Mills_BIDC/Bechtel VF2.cps +++ b/Haas_Mills_BIDC/Bechtel VF2.cps @@ -2411,10 +2411,13 @@ function onSection() { } } - if (!isFirstSection()) { + if (!isFirstSection() && getProperty("toolLengthValidation")) { displayMedia("checkPartTool.jpg", false); writeBlock(mFormat.format(0)); writeBlock(mFormat.format(131)); + } else if (!isFirstSection()) { + writeBlock(mFormat.format(1)); + writeComment("Check Part and Tool"); } if (hasParameter("operation-comment")) { diff --git a/Haas_Mills_BIDC/Bechtel VF4.cps b/Haas_Mills_BIDC/Bechtel VF4.cps index 359bc34..d18bd54 100644 --- a/Haas_Mills_BIDC/Bechtel VF4.cps +++ b/Haas_Mills_BIDC/Bechtel VF4.cps @@ -2415,10 +2415,13 @@ function onSection() { } } - if (!isFirstSection()) { + if (!isFirstSection() && getProperty("toolLengthValidation")) { displayMedia("checkPartTool.jpg", false); writeBlock(mFormat.format(0)); writeBlock(mFormat.format(131)); + } else if (!isFirstSection()) { + writeBlock(mFormat.format(1)); + writeComment("Check Part and Tool"); } if (hasParameter("operation-comment")) {