From 9a4e508504c37a3fddb01f05eda19d2bbb499ce0 Mon Sep 17 00:00:00 2001 From: will1742 Date: Fri, 6 Aug 2021 12:07:59 -0400 Subject: [PATCH] Fixed Cleaning Overtravel --- Haas_Next_Generation/Bechtel DT.cps | 19 ++++++++++--------- Haas_Next_Generation/Bechtel VF2.cps | 19 ++++++++++--------- Haas_Next_Generation/Bechtel VF4.cps | 25 +++++++++++++------------ 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/Haas_Next_Generation/Bechtel DT.cps b/Haas_Next_Generation/Bechtel DT.cps index bb00b71..5d11a6e 100644 --- a/Haas_Next_Generation/Bechtel DT.cps +++ b/Haas_Next_Generation/Bechtel DT.cps @@ -478,7 +478,7 @@ staticProperties = { coolantPressure: "", singleResultsFile: true, useP9995: true, - postVersion: "DT1G7A21" + postVersion: "DT1G8A21" }; const HAAS_DRILL = 1; @@ -504,8 +504,8 @@ staticProperties = { // VF4 specific const MAX_TOOL_LENGTH = 7; const MAX_TOOL_DIAM = 2; - const X_TRAVEL_LIMIT = 20; - const Y_TRAVEL_LIMIT = 16; + const X_TRAVEL_LIMIT = -20; + const Y_TRAVEL_LIMIT = -16; var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines // samples: @@ -2307,7 +2307,7 @@ function onSection() { var stockMidX = (stockUpperX + stockLowerX)/2; var stockMidY = (stockUpperY + stockLowerY)/2; writeln(""); - writeComment("Verify WCS"); + writeComment("VERIFY WCS"); writeBlock("T" + toolFormat.format(19), mFormat.format(6)); //Changes Tool writeBlock(gFormat.format(55), gFormat.format(0), forceX.format(stockMidX), forceY.format(stockMidY)); @@ -2749,7 +2749,7 @@ function onSection() { } if (getProperty("toolHeightValidation")) { - writeComment("BEGIN VALIDATION SECTION"); + writeComment("TOOL VALIDATION"); // Added 06/15/21 | Gavin Williams | will1742 // Verifies tool-stock distance. Post fails if tool fails clearance standards if (toolDistance < CLEARANCE_HEIGHT) { @@ -2763,9 +2763,10 @@ function onSection() { // Prompt user to check stock-tool distance displayMedia("checkDistance" + toolDistance.toPrecision(2).toString().replace(".", "_") + ".jpg"); - writeBlock(mFormat.format(0), formatComment("Open door")); + writeBlock(mFormat.format(0)); + writeComment("OPEN DOOR"); //displayMedia("Net Share/Media/checkPrompt.jpg"); - writeBlock(mFormat.format(131), formatComment("End Multimedia")); + writeBlock(mFormat.format(131)); // asks user if measured height is accurate to displayed //var gotoRef = takeInput(("Is the tool " + toolDistance.toPrecision(3) + "in from the stock? [Y/N]"), ['N', 'Y']); @@ -2781,11 +2782,10 @@ function onSection() { hFormat.format(lengthOffset) ); */ - writeComment("END VALIDATION SECTION"); // initialize spindle and engage coolant if heights are correct if (tool.type != TOOL_PROBE) { - writeBlock(mFormat.format((tool.clockwise ? 3 : 4)), formatComment("Restart spindle")); + writeBlock(mFormat.format((tool.clockwise ? 3 : 4))); } } @@ -2793,6 +2793,7 @@ function onSection() { setCoolant(tool.coolant); } + writeComment("BEGIN OPERATION"); // define subprogram subprogramDefine(initialPosition, abc, retracted, zIsOutput); } diff --git a/Haas_Next_Generation/Bechtel VF2.cps b/Haas_Next_Generation/Bechtel VF2.cps index 0052f1b..9fbe38d 100644 --- a/Haas_Next_Generation/Bechtel VF2.cps +++ b/Haas_Next_Generation/Bechtel VF2.cps @@ -478,7 +478,7 @@ staticProperties = { coolantPressure: "", singleResultsFile: true, useP9995: true, - postVersion: "VF2G7A21" + postVersion: "VF2G8A21" }; const HAAS_DRILL = 1; @@ -504,8 +504,8 @@ staticProperties = { // VF4 specific const MAX_TOOL_LENGTH = 11; const MAX_TOOL_DIAM = 5; - const X_TRAVEL_LIMIT = 30; - const Y_TRAVEL_LIMIT = 15; + const X_TRAVEL_LIMIT = -30; + const Y_TRAVEL_LIMIT = -15; var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines // samples: @@ -2307,7 +2307,7 @@ function onSection() { var stockMidX = (stockUpperX + stockLowerX)/2; var stockMidY = (stockUpperY + stockLowerY)/2; writeln(""); - writeComment("Verify WCS"); + writeComment("VERIFY WCS"); writeBlock("T" + toolFormat.format(19), mFormat.format(6)); //Changes Tool writeBlock(gFormat.format(55), gFormat.format(0), forceX.format(stockMidX), forceY.format(stockMidY)); @@ -2749,7 +2749,7 @@ function onSection() { } if (getProperty("toolHeightValidation")) { - writeComment("BEGIN VALIDATION SECTION"); + writeComment("TOOL VALIDATION"); // Added 06/15/21 | Gavin Williams | will1742 // Verifies tool-stock distance. Post fails if tool fails clearance standards if (toolDistance < CLEARANCE_HEIGHT) { @@ -2763,9 +2763,10 @@ function onSection() { // Prompt user to check stock-tool distance displayMedia("checkDistance" + toolDistance.toPrecision(2).toString().replace(".", "_") + ".jpg"); - writeBlock(mFormat.format(0), formatComment("Open door")); + writeBlock(mFormat.format(0)); + writeComment("OPEN DOOR"); //displayMedia("Net Share/Media/checkPrompt.jpg"); - writeBlock(mFormat.format(131), formatComment("End Multimedia")); + writeBlock(mFormat.format(131)); // asks user if measured height is accurate to displayed //var gotoRef = takeInput(("Is the tool " + toolDistance.toPrecision(3) + "in from the stock? [Y/N]"), ['N', 'Y']); @@ -2781,11 +2782,10 @@ function onSection() { hFormat.format(lengthOffset) ); */ - writeComment("END VALIDATION SECTION"); // initialize spindle and engage coolant if heights are correct if (tool.type != TOOL_PROBE) { - writeBlock(mFormat.format((tool.clockwise ? 3 : 4)), formatComment("Restart spindle")); + writeBlock(mFormat.format((tool.clockwise ? 3 : 4))); } } @@ -2793,6 +2793,7 @@ function onSection() { setCoolant(tool.coolant); } + writeComment("BEGIN OPERATION"); // define subprogram subprogramDefine(initialPosition, abc, retracted, zIsOutput); } diff --git a/Haas_Next_Generation/Bechtel VF4.cps b/Haas_Next_Generation/Bechtel VF4.cps index 30ca0f1..bf5e246 100644 --- a/Haas_Next_Generation/Bechtel VF4.cps +++ b/Haas_Next_Generation/Bechtel VF4.cps @@ -478,7 +478,7 @@ staticProperties = { coolantPressure: "", singleResultsFile: true, useP9995: true, - postVersion: "VF4G7A21" + postVersion: "VF4G8A21" }; const HAAS_DRILL = 1; @@ -504,8 +504,8 @@ staticProperties = { // VF4 specific const MAX_TOOL_LENGTH = 13; const MAX_TOOL_DIAM = 5; - const X_TRAVEL_LIMIT = 50; - const Y_TRAVEL_LIMIT = 20; + const X_TRAVEL_LIMIT = -50; + const Y_TRAVEL_LIMIT = -20; var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines // samples: @@ -2307,7 +2307,7 @@ function onSection() { var stockMidX = (stockUpperX + stockLowerX)/2; var stockMidY = (stockUpperY + stockLowerY)/2; writeln(""); - writeComment("Verify WCS"); + writeComment("VERIFY WCS"); writeBlock("T" + toolFormat.format(19), mFormat.format(6)); //Changes Tool writeBlock(gFormat.format(55), gFormat.format(0), forceX.format(stockMidX), forceY.format(stockMidY)); @@ -2403,9 +2403,9 @@ function onSection() { writeln(""); } - if (hasParameter("notes") && getParameter("notes").toUpperCase().indexOf("APPROVED") <= -1) { - throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a Peer Mentor." - } + // if (hasParameter("notes") && getParameter("notes").toUpperCase().indexOf("APPROVED") <= -1) { + // throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a Peer Mentor." + // } if (staticProperties.showNotes) { var notes = getParameter("notes"); @@ -2749,7 +2749,7 @@ function onSection() { } if (getProperty("toolHeightValidation")) { - writeComment("BEGIN VALIDATION SECTION"); + writeComment("TOOL VALIDATION"); // Added 06/15/21 | Gavin Williams | will1742 // Verifies tool-stock distance. Post fails if tool fails clearance standards if (toolDistance < CLEARANCE_HEIGHT) { @@ -2763,9 +2763,10 @@ function onSection() { // Prompt user to check stock-tool distance displayMedia("checkDistance" + toolDistance.toPrecision(2).toString().replace(".", "_") + ".jpg"); - writeBlock(mFormat.format(0), formatComment("Open door")); + writeBlock(mFormat.format(0)); + writeComment("OPEN DOOR"); //displayMedia("Net Share/Media/checkPrompt.jpg"); - writeBlock(mFormat.format(131), formatComment("End Multimedia")); + writeBlock(mFormat.format(131)); // asks user if measured height is accurate to displayed //var gotoRef = takeInput(("Is the tool " + toolDistance.toPrecision(3) + "in from the stock? [Y/N]"), ['N', 'Y']); @@ -2781,11 +2782,10 @@ function onSection() { hFormat.format(lengthOffset) ); */ - writeComment("END VALIDATION SECTION"); // initialize spindle and engage coolant if heights are correct if (tool.type != TOOL_PROBE) { - writeBlock(mFormat.format((tool.clockwise ? 3 : 4)), formatComment("Restart spindle")); + writeBlock(mFormat.format((tool.clockwise ? 3 : 4))); } } @@ -2793,6 +2793,7 @@ function onSection() { setCoolant(tool.coolant); } + writeComment("BEGIN OPERATION"); // define subprogram subprogramDefine(initialPosition, abc, retracted, zIsOutput); }