From ca32b19316c66d5d1acce74ec65a4336c1e6be76 Mon Sep 17 00:00:00 2001 From: pan261 Date: Tue, 14 Sep 2021 12:44:01 -0400 Subject: [PATCH 1/7] Changed H19 -> H1 for Verify WCS --- Haas_Gantry_BIDC/Bechtel SR.cps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Haas_Gantry_BIDC/Bechtel SR.cps b/Haas_Gantry_BIDC/Bechtel SR.cps index f92d238..38d9c2b 100644 --- a/Haas_Gantry_BIDC/Bechtel SR.cps +++ b/Haas_Gantry_BIDC/Bechtel SR.cps @@ -1743,7 +1743,7 @@ function onSection() { writeBlock(mFormat.format(0)); writeComment("Is the pencil centered above your stock?"); - writeBlock(gFormat.format(55), gFormat.format(43), hFormat.format(19), zOutput.format(stockTopZ)); + writeBlock(gFormat.format(55), gFormat.format(43), hFormat.format(1), zOutput.format(stockTopZ)); writeBlock(mFormat.format(0)); writeComment("Is the pencil touching your stock?"); } From 3ce1950882af0bf108c01f3b78bccd3ea14cd121 Mon Sep 17 00:00:00 2001 From: "Williams, Gavin J" Date: Tue, 14 Sep 2021 13:42:18 -0400 Subject: [PATCH 2/7] Added Tool Selection --- Haas_Gantry_BIDC/Bechtel SR.cps | 60 +++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/Haas_Gantry_BIDC/Bechtel SR.cps b/Haas_Gantry_BIDC/Bechtel SR.cps index 38d9c2b..e0ef7a6 100644 --- a/Haas_Gantry_BIDC/Bechtel SR.cps +++ b/Haas_Gantry_BIDC/Bechtel SR.cps @@ -171,7 +171,7 @@ properties = {/* {title: "Cycles", id: "cycles"}, {title: "Patterns", id: "patterns"} ], - value: "allOperations", + value: "none", scope: "post" },/* useG187: { @@ -260,6 +260,14 @@ properties = {/* value: true, scope: "post" }*/ + toolsToLoad: { + title: "Tools to load and probe", + description: "List or provide a range of tools to probe e.g. 1, 2, 3 or 1-5. Leaving this empty will probe all tools", + group: 4, + type: "string", + value: "", + scope: "post" + }, pencilWCSValidation: { title: "WCS Validation", description: "WCS validation. By turning this off, you accept responsibility for any resulting crashes.", @@ -281,7 +289,7 @@ properties = {/* description: "Tool Probing. By turning this off, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", - value: false, + value: true, scope: "post" } }; @@ -905,11 +913,59 @@ function onOpen() { writeComment(localize("Once the tools are verified turn BLOCK DELETE on to skip verification")); */ + parsedTools = [] + + function defaultFill() { + for (var i = 0; i < tools.getNumberOfTools(); i++){ + parsedTools[i] = tools.getTool(i).number; + } + } + + function invalidToolNum(toolNum) { + return (toolNum < 1 || toolNum > 10); + } + // parse string for specific tools to load + if (getProperty("toolsToLoad") != "") { + // get list of numbers + let toolNumArray = getProperty("toolsToLoad").split(','); + // iterate through and fill ranges + for (var i = 0; i < toolNumArray.length; i++){ + toolNumArray[i] = toolNumArray[i].trim(); + + // fill range + if (toolNumArray[i].indexOf("-") >= 0) { + let numRange = toolNumArray[i].split("-"); + if (invalidToolNum(parseInt(numRange[0])) || invalidToolNum(parseInt(numRange[1]))) { + defaultFill(); + break; + } + for(var j = numRange[0]; j <= numRange[1]; j++){ + parsedTools.push(parseInt(j)); + } + continue; + } + // check if valid num + if (invalidToolNum(parseInt(toolNumArray[i]))) { + defaultFill(); + break; + } + // push single num + parsedTools.push(parseInt(toolNumArray[i])); + } + } else { + defaultFill(); + } + for (var i = 0; i < tools.getNumberOfTools(); ++i) { var tool = tools.getTool(i); if (staticProperties.optionallyMeasureToolsAtStart && (tool.type == TOOL_PROBE)) { continue; } + + if (parsedTools.indexOf(tool.number) <= -1) { + continue; + } + var comment = "T" + toolFormat.format(tool.number) + " " + "D=" + xyzFormat.format(tool.diameter) + " " + localize("CR") + "=" + xyzFormat.format(tool.cornerRadius); From 72bcd9306acd06cf33c1ff0b5ff5a628fa2cbfbd Mon Sep 17 00:00:00 2001 From: pan261 Date: Tue, 14 Sep 2021 13:54:42 -0400 Subject: [PATCH 3/7] FIxed tool validation checking in Mills --- Haas_Mills_BIDC/Bechtel DT.cps | 4 +++- Haas_Mills_BIDC/Bechtel VF2.cps | 4 +++- Haas_Mills_BIDC/Bechtel VF4.cps | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Haas_Mills_BIDC/Bechtel DT.cps b/Haas_Mills_BIDC/Bechtel DT.cps index 2a04feb..9ddc390 100644 --- a/Haas_Mills_BIDC/Bechtel DT.cps +++ b/Haas_Mills_BIDC/Bechtel DT.cps @@ -515,6 +515,8 @@ staticProperties = { const X_TRAVEL_LIMIT = -20; const Y_TRAVEL_LIMIT = -16; + const MAX_TOOL_NUM = 20; + var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines // samples: // {id: COOLANT_THROUGH_TOOL, on: 88, off: 89} @@ -1367,7 +1369,7 @@ function onOpen() { // also maybe anonymous // TODO: tool.getNumberOfTools needs to be machine-specific constant function invalidToolNum(toolNum) { - return (toolNum < 1 || toolNum > tools.getNumberOfTools() || tools.getTool(toolNum) == undefined); + return (toolNum < 1 || toolNum > MAX_TOOL_NUM); } // parse string for specific tools to load diff --git a/Haas_Mills_BIDC/Bechtel VF2.cps b/Haas_Mills_BIDC/Bechtel VF2.cps index 108f24e..e95f503 100644 --- a/Haas_Mills_BIDC/Bechtel VF2.cps +++ b/Haas_Mills_BIDC/Bechtel VF2.cps @@ -515,6 +515,8 @@ staticProperties = { const X_TRAVEL_LIMIT = -30; const Y_TRAVEL_LIMIT = -15; + const MAX_TOOL_NUM = 20; + var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines // samples: // {id: COOLANT_THROUGH_TOOL, on: 88, off: 89} @@ -1367,7 +1369,7 @@ function onOpen() { // also maybe anonymous // TODO: tool.getNumberOfTools needs to be machine-specific constant function invalidToolNum(toolNum) { - return (toolNum < 1 || toolNum > tools.getNumberOfTools() || tools.getTool(toolNum) == undefined); + return (toolNum < 1 || toolNum > MAX_TOOL_NUM); } // parse string for specific tools to load diff --git a/Haas_Mills_BIDC/Bechtel VF4.cps b/Haas_Mills_BIDC/Bechtel VF4.cps index 882c1c2..7522560 100644 --- a/Haas_Mills_BIDC/Bechtel VF4.cps +++ b/Haas_Mills_BIDC/Bechtel VF4.cps @@ -515,6 +515,7 @@ staticProperties = { const X_TRAVEL_LIMIT = -50; const Y_TRAVEL_LIMIT = -20; + const MAX_TOOL_NUM = 20; var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines // samples: // {id: COOLANT_THROUGH_TOOL, on: 88, off: 89} @@ -1367,7 +1368,7 @@ function onOpen() { // also maybe anonymous // TODO: tool.getNumberOfTools needs to be machine-specific constant function invalidToolNum(toolNum) { - return (toolNum < 1 || toolNum > tools.getNumberOfTools() || tools.getTool(toolNum) == undefined); + return (toolNum < 1 || toolNum > MAX_TOOL_NUM); } // parse string for specific tools to load From d584dba8256dc9d22dc0681bf7908cb4767d884e Mon Sep 17 00:00:00 2001 From: "Williams, Gavin J" Date: Thu, 16 Sep 2021 11:54:12 -0400 Subject: [PATCH 4/7] Added Dwell for coolant --- Haas_Mills_BIDC/Bechtel DT.cps | 1 + Haas_Mills_BIDC/Bechtel VF2.cps | 1 + 2 files changed, 2 insertions(+) diff --git a/Haas_Mills_BIDC/Bechtel DT.cps b/Haas_Mills_BIDC/Bechtel DT.cps index 9ddc390..a7d8a35 100644 --- a/Haas_Mills_BIDC/Bechtel DT.cps +++ b/Haas_Mills_BIDC/Bechtel DT.cps @@ -2817,6 +2817,7 @@ function onSection() { if (tool.type != TOOL_PROBE) { setCoolant(tool.coolant); + writeBlock(gFormat.format(4), "P500"); } writeComment("BEGIN OPERATION"); diff --git a/Haas_Mills_BIDC/Bechtel VF2.cps b/Haas_Mills_BIDC/Bechtel VF2.cps index e95f503..b46e4c2 100644 --- a/Haas_Mills_BIDC/Bechtel VF2.cps +++ b/Haas_Mills_BIDC/Bechtel VF2.cps @@ -2817,6 +2817,7 @@ function onSection() { if (tool.type != TOOL_PROBE) { setCoolant(tool.coolant); + writeBlock(gFormat.format(4), "P500"); } writeComment("BEGIN OPERATION"); From a6a840a000e7df5116616cadd3afa16bcb645b79 Mon Sep 17 00:00:00 2001 From: will1742 Date: Thu, 16 Sep 2021 14:12:04 -0400 Subject: [PATCH 5/7] Added Debug Mode and Feed Cancel --- Flow_Waterjet_BIDC/Bechtel Waterjet.cps | 81 +++++++++++++++---------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/Flow_Waterjet_BIDC/Bechtel Waterjet.cps b/Flow_Waterjet_BIDC/Bechtel Waterjet.cps index 05ad654..57fd684 100644 --- a/Flow_Waterjet_BIDC/Bechtel Waterjet.cps +++ b/Flow_Waterjet_BIDC/Bechtel Waterjet.cps @@ -21,7 +21,7 @@ longDescription = "Post for Flow Waterjets using software Version 5 or 6. V5=2-a "V5: Manually set nozzle height. V6: Nozzle height in NC program set by Top Height attribute. " + EOL + "Feed percentage set by Cutting Mode quality in tool dialog (auto=60, high=20, medium=40, low=100)"; -extension = "ORD"; +extension = "ord"; setCodePage("ascii"); capabilities = CAPABILITY_JET; @@ -68,6 +68,13 @@ properties = { ], value: "6", scope: "post" + }, + debugMode: { + title: "Debug Mode", + description: "Display Comments in ORD. Not compatible with machine", + type: "boolean", + value: false, + scope: "post" } }; @@ -87,6 +94,8 @@ var lineCounter = -1; // collected state var useVersion6 = false; var arcFinish = undefined; +var feedActive = false; +var prevCoords = undefined; // override radius compensation var compensationOffset = 0; // center compensation @@ -106,6 +115,7 @@ function formatComment(comment) { } function writeComment(text) { + if (!getProperty("debugMode")) return; writeln(formatComment(text.substr(0, maximumLineLength - 2))); } @@ -218,13 +228,6 @@ function onSection() { return; } - if (hasParameter("operation-comment")) { - var comment = getParameter("operation-comment"); - writeln(""); - writeComment(comment); - } else { - writeln(""); - } var initialPosition = getFramePosition(currentSection.getInitialPosition()); onExpandedRapid(initialPosition.x, initialPosition.y, initialPosition.z); } @@ -256,14 +259,16 @@ function writeLinear(x, y, z, feed, column7) { writeComment("Arc Completion"); break; } - writeBlock( - commentf("X"), ",", - f("Y"), ",", - f("Z"), ",", - fi("L", 2), ",", - fi("Feed", 5), ",", - fi("C", 2), ",", - fi("?", 2)); + if (getProperty("debugMode")){ + writeBlock( + commentf("X"), ",", + f("Y"), ",", + f("Z"), ",", + fi("L", 2), ",", + fi("Feed", 5), ",", + fi("C", 2), ",", + fi("?", 2)); + } writeBlock( f(xyzFormat.format(x)), ",", f(xyzFormat.format(y)), ",", @@ -285,7 +290,6 @@ function writeLinear(x, y, z, feed, column7) { writeComment("Arc Completion"); break; } - writeBlock(commentf("X"), ",", f("Y"), ",", fi("L", 2), ",", fi("Feed", 5), ",", fi("C", 2)) writeBlock( f(xyzFormat.format(x)), ",", f(xyzFormat.format(y)), ",", @@ -297,7 +301,10 @@ function writeLinear(x, y, z, feed, column7) { ++lineCounter; forceOutput = false; } - + if (feed > 0) { + feedActive = true; + } + prevCoords = {x:x, y:y, z:z}; } function finishArcs() { @@ -311,7 +318,12 @@ function finishArcs() { function onRapid(x, y, z) { finishArcs(); + if (feedActive) { + forceOutput = true; + writeLinear(prevCoords.x, prevCoords.y, prevCoords.z, 0, 0); + } writeLinear(x, y, z, 0, 0); // non-cutting + feedActive = false; } function onLinear(x, y, z, feed) { @@ -342,17 +354,19 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed) { var p = getCurrentPosition(); if (useVersion6) { writeComment("Circular"); - writeBlock( - commentf("X"), ",", - f("Y"), ",", - f("Z"), ",", - fi("CW", 2), ",", - fi("Feed", 5), ",", - fi("C", 2), ",", - fi("?", 2), ",", - f("CX"), ",", - f("CY"), ",", - f("CZ")); + if (getProperty("debugMode")){ + writeBlock( + commentf("X"), ",", + f("Y"), ",", + f("Z"), ",", + fi("CW", 2), ",", + fi("Feed", 5), ",", + fi("C", 2), ",", + fi("?", 2), ",", + f("CX"), ",", + f("CY"), ",", + f("CZ")); + } writeBlock( f(xyzFormat.format(p.x)), ",", f(xyzFormat.format(p.y)), ",", @@ -381,7 +395,10 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed) { // save destination values to complete arc move arcFinish = {x:x, y:y, z:z, feed:(power ? getFeedInPercent(feed) : 0)}; - + if (feed > 0) { + feedActive = true; + } + prevCoords = {x:x, y:y, z:z}; } function getFeedInPercent(feed) { @@ -451,11 +468,11 @@ function onClose() { writeComment("Filename: " + getGlobalParameter("document-path")); writeComment("Date: " + getGlobalParameter("generated-at")); writeComment("Post Version: " + staticProperties.postVersion); - // writeln("// This file was created by FlowMaster(R), which is proprietary to Flow International Corporation. " + lineCounter + " " + arcCounter); + writeln("// This file was created by FlowMaster(R), which is proprietary to Flow International Corporation. " + lineCounter + " " + arcCounter); if (useVersion6) { writeln("VER 6.00"); } - // writeln("// Created by Autodesk HSM"); + writeln("// Created by Autodesk HSM"); if (programComment) { writeln("// " + programComment); } From eaa3131b240038233f38c12c5cfb7af2cd57d564 Mon Sep 17 00:00:00 2001 From: will1742 Date: Thu, 16 Sep 2021 14:17:57 -0400 Subject: [PATCH 6/7] Removed Manual A,B,C Selection --- Haas_Mills_BIDC/Bechtel VF4.cps | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Haas_Mills_BIDC/Bechtel VF4.cps b/Haas_Mills_BIDC/Bechtel VF4.cps index 7522560..a3218d7 100644 --- a/Haas_Mills_BIDC/Bechtel VF4.cps +++ b/Haas_Mills_BIDC/Bechtel VF4.cps @@ -71,7 +71,7 @@ properties = {/* ], value: "none", scope: "post" - },*/ + }, hasAAxis: { title: "Has A-axis rotary", description: "Enable if the machine has an A-axis table/trunnion. Check the table direction on the machine and use the (Reversed) selection if the table is moving in the opposite direction.", @@ -110,7 +110,7 @@ properties = {/* ], value: "false", scope: "post" - },/* + }, throughSpindle: { title: "Allow Through Spindle Coolant", description: "Enables through spindle coolant, if off uses flood", @@ -486,6 +486,9 @@ staticProperties = { coolantPressure: "", singleResultsFile: true, useP9995: true, + hasAAxis: false, + hasBAxis: false, + hasCAxis: false, postVersion: "VF4G8A21" }; @@ -1097,9 +1100,9 @@ function setFeedrateMode(reset) { } function defineMachine() { - hasA = getProperty("hasAAxis") != "false"; - hasB = getProperty("hasBAxis") != "false"; - hasC = getProperty("hasCAxis") != "false"; + hasA = staticProperties.hasAAxis != "false"; + hasB = staticProperties.hasBAxis != "false"; + hasC = staticProperties.hasCAxis != "false"; if (hasA && hasB && hasC) { error(localize("Only two rotary axes can be active at the same time.")); @@ -1118,7 +1121,7 @@ function defineMachine() { var cAxis; var useTCPC = getProperty("useTCPC"); if (hasA) { // A Axis - For horizontal machines and trunnions - var dir = getProperty("hasAAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasAAxis == "reversed" ? -1 : 1; if (hasC || hasB) { var aMin = (dir == 1) ? -120 - 0.0001 : -30 - 0.0001; var aMax = (dir == 1) ? 30 + 0.0001 : 120 + 0.0001; @@ -1129,7 +1132,7 @@ function defineMachine() { } if (hasB) { // B Axis - For horizontal machines and trunnions - var dir = getProperty("hasBAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasBAxis == "reversed" ? -1 : 1; if (hasC) { var bMin = (dir == 1) ? -120 - 0.0001 : -30 - 0.0001; var bMax = (dir == 1) ? 30 + 0.0001 : 120 + 0.0001; @@ -1142,7 +1145,7 @@ function defineMachine() { } if (hasC) { // C Axis - For trunnions only - var dir = getProperty("hasCAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasCAxis == "reversed" ? -1 : 1; cAxis = createAxis({coordinate:2, table:true, axis:[0, 0, dir], cyclic:true, reset:1, tcp:useTCPC}); } @@ -2335,9 +2338,9 @@ function onSection() { writeBlock("T" + toolFormat.format(19), mFormat.format(6)); //Changes Tool writeBlock(gFormat.format(55), gFormat.format(0), forceX.format(stockMidX), forceY.format(stockMidY)); - if (getProperty("hasAAxis") != "false" && getProperty("hasCAxis") != "false") { + if (staticProperties.hasAAxis != "false" && staticProperties.hasCAxis != "false") { writeBlock(gFormat.format(0), aOutput.format(0), cOutput.format(0)); - } else if (getProperty("hasAAxis") != "false") { + } else if (staticProperties.hasAAxis != "false") { writeBlock(gFormat.format(0), aOutput.format(0)); } displayMedia("xyWCSCheck.jpg", false); From 379fe6b23050dbf928fb16d6c4c2a8140a219e66 Mon Sep 17 00:00:00 2001 From: "Williams, Gavin J" Date: Thu, 16 Sep 2021 14:35:30 -0400 Subject: [PATCH 7/7] Removed User Selected Axis --- Haas_Mills_BIDC/Bechtel DT.cps | 29 +++++++++++++++-------------- Haas_Mills_BIDC/Bechtel VF2.cps | 29 +++++++++++++++-------------- Haas_Mills_BIDC/Bechtel VF4.cps | 18 +++++++++--------- 3 files changed, 39 insertions(+), 37 deletions(-) diff --git a/Haas_Mills_BIDC/Bechtel DT.cps b/Haas_Mills_BIDC/Bechtel DT.cps index a7d8a35..c618ce4 100644 --- a/Haas_Mills_BIDC/Bechtel DT.cps +++ b/Haas_Mills_BIDC/Bechtel DT.cps @@ -71,7 +71,7 @@ properties = {/* ], value: "none", scope: "post" - },*/ + }, hasAAxis: { title: "Has A-axis rotary", description: "Enable if the machine has an A-axis table/trunnion. Check the table direction on the machine and use the (Reversed) selection if the table is moving in the opposite direction.", @@ -110,7 +110,7 @@ properties = {/* ], value: "false", scope: "post" - },/* + }, throughSpindle: { title: "Allow Through Spindle Coolant", description: "Enables through spindle coolant, if off uses flood", @@ -417,7 +417,7 @@ properties = {/* }, toolLengthValidation: { title: "Tool Length Validation", - description: "Length validation. By turning this off, you accept responsibility for any resulting crashes.", + description: "Length validation. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -425,7 +425,7 @@ properties = {/* }, pencilWCSValidation: { title: "WCS Validation", - description: "WCS validation. By turning this off, you accept responsibility for any resulting crashes.", + description: "WCS validation. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -433,7 +433,7 @@ properties = {/* }, measureToolsAtStart: { title: "Tool Probing", - description: "Tool Probing. By turning this off, you accept responsibility for any resulting crashes.", + description: "Tool Probing. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -441,7 +441,7 @@ properties = {/* }, loadToolsAtStart: { title: "Tool Loading", - description: "Tool Loading. By turning this off, you accept responsibility for any resulting crashes.", + description: "Tool Loading. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -486,6 +486,9 @@ staticProperties = { coolantPressure: "", singleResultsFile: true, useP9995: true, + hasAAxis: "false", + hasBAxis: "false", + hasCAxis: "false", postVersion: "DT1G8A21" }; @@ -897,7 +900,6 @@ function prepareForToolCheck() { function writeToolMeasureBlock(tool, preMeasure) { var writeFunction = getProperty("measureToolsAtStart") ? writeBlock : writeOptionalBlock; - // var writeFunction = writeBlock; var comment = measureTool ? formatComment("MEASURE TOOL") : ""; if (!preMeasure) { prepareForToolCheck(); @@ -1098,9 +1100,9 @@ function setFeedrateMode(reset) { } function defineMachine() { - hasA = getProperty("hasAAxis") != "false"; - hasB = getProperty("hasBAxis") != "false"; - hasC = getProperty("hasCAxis") != "false"; + hasA = staticProperties.hasAAxis != "false"; + hasB = staticProperties.hasBAxis != "false"; + hasC = staticProperties.hasCAxis != "false"; if (hasA && hasB && hasC) { error(localize("Only two rotary axes can be active at the same time.")); @@ -1119,7 +1121,7 @@ function defineMachine() { var cAxis; var useTCPC = getProperty("useTCPC"); if (hasA) { // A Axis - For horizontal machines and trunnions - var dir = getProperty("hasAAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasAAxis == "reversed" ? -1 : 1; if (hasC || hasB) { var aMin = (dir == 1) ? -120 - 0.0001 : -30 - 0.0001; var aMax = (dir == 1) ? 30 + 0.0001 : 120 + 0.0001; @@ -1130,7 +1132,7 @@ function defineMachine() { } if (hasB) { // B Axis - For horizontal machines and trunnions - var dir = getProperty("hasBAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasBAxis == "reversed" ? -1 : 1; if (hasC) { var bMin = (dir == 1) ? -120 - 0.0001 : -30 - 0.0001; var bMax = (dir == 1) ? 30 + 0.0001 : 120 + 0.0001; @@ -1143,7 +1145,7 @@ function defineMachine() { } if (hasC) { // C Axis - For trunnions only - var dir = getProperty("hasCAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasCAxis == "reversed" ? -1 : 1; cAxis = createAxis({coordinate:2, table:true, axis:[0, 0, dir], cyclic:true, reset:1, tcp:useTCPC}); } @@ -1441,7 +1443,6 @@ function onOpen() { comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg"); } comment += " - " + getToolTypeName(tool.type); - writeComment(tool.description); writeFunction("T" + toolFormat.format(tool.number), mFormat.format(6)); //Changes Tool displayMedia("toolLoad" + tool.number + ".jpg", !getProperty("loadToolsAtStart")); diff --git a/Haas_Mills_BIDC/Bechtel VF2.cps b/Haas_Mills_BIDC/Bechtel VF2.cps index b46e4c2..091fbfc 100644 --- a/Haas_Mills_BIDC/Bechtel VF2.cps +++ b/Haas_Mills_BIDC/Bechtel VF2.cps @@ -71,7 +71,7 @@ properties = {/* ], value: "none", scope: "post" - },*/ + }, hasAAxis: { title: "Has A-axis rotary", description: "Enable if the machine has an A-axis table/trunnion. Check the table direction on the machine and use the (Reversed) selection if the table is moving in the opposite direction.", @@ -110,7 +110,7 @@ properties = {/* ], value: "false", scope: "post" - },/* + }, throughSpindle: { title: "Allow Through Spindle Coolant", description: "Enables through spindle coolant, if off uses flood", @@ -417,7 +417,7 @@ properties = {/* }, toolLengthValidation: { title: "Tool Length Validation", - description: "Length validation. By turning this off, you accept responsibility for any resulting crashes.", + description: "Length validation. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -425,7 +425,7 @@ properties = {/* }, pencilWCSValidation: { title: "WCS Validation", - description: "WCS validation. By turning this off, you accept responsibility for any resulting crashes.", + description: "WCS validation. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -433,7 +433,7 @@ properties = {/* }, measureToolsAtStart: { title: "Tool Probing", - description: "Tool Probing. By turning this off, you accept responsibility for any resulting crashes.", + description: "Tool Probing. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -441,7 +441,7 @@ properties = {/* }, loadToolsAtStart: { title: "Tool Loading", - description: "Tool Loading. By turning this off, you accept responsibility for any resulting crashes.", + description: "Tool Loading. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -486,6 +486,9 @@ staticProperties = { coolantPressure: "", singleResultsFile: true, useP9995: true, + hasAAxis: "false", + hasBAxis: "false", + hasCAxis: "false", postVersion: "VF2G8A21" }; @@ -897,7 +900,6 @@ function prepareForToolCheck() { function writeToolMeasureBlock(tool, preMeasure) { var writeFunction = getProperty("measureToolsAtStart") ? writeBlock : writeOptionalBlock; - var comment = measureTool ? formatComment("MEASURE TOOL") : ""; if (!preMeasure) { prepareForToolCheck(); @@ -1098,9 +1100,9 @@ function setFeedrateMode(reset) { } function defineMachine() { - hasA = getProperty("hasAAxis") != "false"; - hasB = getProperty("hasBAxis") != "false"; - hasC = getProperty("hasCAxis") != "false"; + hasA = staticProperties.hasAAxis != "false"; + hasB = staticProperties.hasBAxis != "false"; + hasC = staticProperties.hasCAxis != "false"; if (hasA && hasB && hasC) { error(localize("Only two rotary axes can be active at the same time.")); @@ -1119,7 +1121,7 @@ function defineMachine() { var cAxis; var useTCPC = getProperty("useTCPC"); if (hasA) { // A Axis - For horizontal machines and trunnions - var dir = getProperty("hasAAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasAAxis == "reversed" ? -1 : 1; if (hasC || hasB) { var aMin = (dir == 1) ? -120 - 0.0001 : -30 - 0.0001; var aMax = (dir == 1) ? 30 + 0.0001 : 120 + 0.0001; @@ -1130,7 +1132,7 @@ function defineMachine() { } if (hasB) { // B Axis - For horizontal machines and trunnions - var dir = getProperty("hasBAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasBAxis == "reversed" ? -1 : 1; if (hasC) { var bMin = (dir == 1) ? -120 - 0.0001 : -30 - 0.0001; var bMax = (dir == 1) ? 30 + 0.0001 : 120 + 0.0001; @@ -1143,7 +1145,7 @@ function defineMachine() { } if (hasC) { // C Axis - For trunnions only - var dir = getProperty("hasCAxis") == "reversed" ? -1 : 1; + var dir = staticProperties.hasCAxis == "reversed" ? -1 : 1; cAxis = createAxis({coordinate:2, table:true, axis:[0, 0, dir], cyclic:true, reset:1, tcp:useTCPC}); } @@ -1441,7 +1443,6 @@ function onOpen() { comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg"); } comment += " - " + getToolTypeName(tool.type); - writeComment(tool.description); writeFunction("T" + toolFormat.format(tool.number), mFormat.format(6)); //Changes Tool displayMedia("toolLoad" + tool.number + ".jpg", !getProperty("loadToolsAtStart")); diff --git a/Haas_Mills_BIDC/Bechtel VF4.cps b/Haas_Mills_BIDC/Bechtel VF4.cps index a3218d7..359bc34 100644 --- a/Haas_Mills_BIDC/Bechtel VF4.cps +++ b/Haas_Mills_BIDC/Bechtel VF4.cps @@ -417,7 +417,7 @@ properties = {/* }, toolLengthValidation: { title: "Tool Length Validation", - description: "Length validation. By turning this off, you accept responsibility for any resulting crashes.", + description: "Length validation. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -425,7 +425,7 @@ properties = {/* }, pencilWCSValidation: { title: "WCS Validation", - description: "WCS validation. By turning this off, you accept responsibility for any resulting crashes.", + description: "WCS validation. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -433,7 +433,7 @@ properties = {/* }, measureToolsAtStart: { title: "Tool Probing", - description: "Tool Probing. By turning this off, you accept responsibility for any resulting crashes.", + description: "Tool Probing. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -441,7 +441,7 @@ properties = {/* }, loadToolsAtStart: { title: "Tool Loading", - description: "Tool Loading. By turning this off, you accept responsibility for any resulting crashes.", + description: "Tool Loading. By setting this to optional, you accept responsibility for any resulting crashes.", group: 99, type: "boolean", value: true, @@ -486,9 +486,9 @@ staticProperties = { coolantPressure: "", singleResultsFile: true, useP9995: true, - hasAAxis: false, - hasBAxis: false, - hasCAxis: false, + hasAAxis: "false", + hasBAxis: "false", + hasCAxis: "false", postVersion: "VF4G8A21" }; @@ -899,7 +899,6 @@ function prepareForToolCheck() { function writeToolMeasureBlock(tool, preMeasure) { var writeFunction = getProperty("measureToolsAtStart") ? writeBlock : writeOptionalBlock; - // var writeFunction = writeBlock; var comment = measureTool ? formatComment("MEASURE TOOL") : ""; if (!preMeasure) { prepareForToolCheck(); @@ -2322,7 +2321,7 @@ function onSection() { // writeBlock(gFormat.format(53), "X" + macroFormat.format(100), yOutput.format(0)); writeBlock(gFormat.format(55), gFormat.format(0), xOutput.format(Stock_X_55)); writeBlock(gFormat.format(53), gFormat.format(0), yOutput.format(0)); - displayMedia("loadStock.jpg"); + displayMedia("loadStock.jpg", false); writeBlock(mFormat.format(0)); } @@ -2823,6 +2822,7 @@ function onSection() { if (tool.type != TOOL_PROBE) { setCoolant(tool.coolant); + writeBlock(gFormat.format(4), "P500"); } writeComment("BEGIN OPERATION");