diff --git a/Haas_Gantry_BIDC/Bechtel SR.cps b/Haas_Gantry_BIDC/Bechtel SR.cps index f42af14..5a4d50d 100644 --- a/Haas_Gantry_BIDC/Bechtel SR.cps +++ b/Haas_Gantry_BIDC/Bechtel SR.cps @@ -37,7 +37,7 @@ allowSpiralMoves = true; highFeedrate = (unit == IN) ? 500 : 5000; // user-defined properties -properties = { +properties = {/* writeMachine: { title: "Write machine", description: "Output the machine settings in the header of the code.", @@ -92,22 +92,6 @@ properties = { value: 10, scope: "post" }, - pencilWCSValidation: { - title: "WCS Validation", - description: "WCS validation. By turning this off, you accept responsibility for any resulting crashes.", - group: 99, - type: "boolean", - value: true, - scope: "post" - }, - toolHeightValidation: { - title: "Tool Length Validation", - description: "Length validation. By turning this off, you accept responsibility for any resulting crashes.", - group: 99, - type: "boolean", - value: true, - scope: "post" - }, sequenceNumberIncrement: { title: "Sequence number increment", description: "The amount by which the sequence number is incremented by in each block.", @@ -148,7 +132,7 @@ properties = { title: "Parametric feed", description: "Parametric feed values based on movement type are output.", type: "boolean", - value: true, + value: false, scope: "post" }, showNotes: { @@ -176,7 +160,7 @@ properties = { ], value: "G53", scope: "post" - }, + },*/ useSubroutines: { title: "Use subroutines", description: "Select your desired subroutine option. 'All Operations' creates subroutines per each operation, 'Cycles' creates subroutines for cycle operations on same holes, and 'Patterns' creates subroutines for patterned operations.", @@ -189,7 +173,7 @@ properties = { ], value: "allOperations", scope: "post" - }, + },/* useG187: { title: "Use G187", description: "Specifies that smoothing using G187 should be used.", @@ -275,9 +259,64 @@ properties = { type: "boolean", value: true, scope: "post" + }*/ + pencilWCSValidation: { + title: "WCS Validation", + description: "WCS validation. By turning this off, you accept responsibility for any resulting crashes.", + group: 99, + type: "boolean", + value: true, + scope: "post" + }, + toolHeightValidation: { + title: "Tool Length Validation", + description: "Length validation. By turning this off, you accept responsibility for any resulting crashes.", + group: 99, + type: "boolean", + value: true, + scope: "post" + }, + measureToolsAtStart: { + title: "Tool Probing", + description: "Tool Probing. By turning this off, you accept responsibility for any resulting crashes.", + group: 99, + type: "boolean", + value: true, + scope: "post" } }; +var staticProperties = { + writeMachine: false, + writeTools: true, + writeVersion: true, + preloadTool: true, + chipTransport: false, + showSequenceNumbers: true, + sequenceNumberStart: 10, + sequenceNumberIncrement: 5, + sequenceNumberOnlyOnToolChange: false, + optionalStop: true, + separateWordsWithSpace: true, + useRadius: true, + useParametricFeed: false, + showNotes: true, + useG0: true, + safePositionMethod: "G53", + useG187: false, + homePositionCenter: true, + optionallyCycleToolsAtStart: false, + optionallyMeasureToolsAtStart: true, + toolBreakageTolerance: 0.1, + safeStartAllOperations: true, + fastToolChange: false, + useG95forTapping: true, + useG73Retract: false, + setting34: 1, + useDPMFeeds: false, + singleResultsFile: true +} + 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} @@ -431,9 +470,9 @@ function writeBlock() { } var maximumSequenceNumber = ((getProperty("useSubroutines") == "allOperations") || (getProperty("useSubroutines") == "patterns") || (getProperty("useSubroutines") == "cycles")) ? initialSubprogramNumber : 99999; - if (getProperty("showSequenceNumbers")) { + if (staticProperties.showSequenceNumbers) { if (sequenceNumber >= maximumSequenceNumber) { - sequenceNumber = getProperty("sequenceNumberStart"); + sequenceNumber = staticProperties.sequenceNumberStart; } if (optionalSection || skipBlock) { if (text) { @@ -442,7 +481,7 @@ function writeBlock() { } else { writeWords2("N" + sequenceNumber, arguments); } - sequenceNumber += getProperty("sequenceNumberIncrement"); + sequenceNumber += staticProperties.sequenceNumberIncrement; } else { if (optionalSection || skipBlock) { writeWords2("/", arguments); @@ -457,10 +496,10 @@ function writeBlock() { Writes the specified block - used for tool changes only. */ function writeToolBlock() { - var show = getProperty("showSequenceNumbers"); - setProperty("showSequenceNumbers", show || getProperty("sequenceNumberOnlyOnToolChange")); + var show = staticProperties.showSequenceNumbers; + staticProperties.sequenceNumberOnlyOnToolChange = (show || staticProperties.sequenceNumberOnlyOnToolChange); writeBlock(arguments); - setProperty("showSequenceNumbers", show); + staticProperties.sequenceNumberOnlyOnToolChange = show; } /** @@ -645,13 +684,15 @@ function BIDCWriteToolMeasureBlock(tool, rotating) { } else { writeBlock(gFormat.format(59), gFormat.format(0), xOutput.format(0), yOutput.format(0)); } - writeBlock(gFormat.format(37), hFormat.format(tool.number), zOutput.format(0), feedOutput.format(5)); + writeBlock(mFormat.format(83)) + writeBlock(gFormat.format(37), hFormat.format(tool.number), zOutput.format(0), feedOutput.format(15)); writeBlock(gAbsIncModal.format(91), gFormat.format(0), zOutput.format(.1), feedOutput.format(100)); if (rotating) { writeBlock(sOutput.format(800)); } - writeBlock(gFormat.format(37), hFormat.format(tool.number), zOutput.format(0), feedOutput.format(2)); + writeBlock(gFormat.format(37), hFormat.format(tool.number), zOutput.format(0), feedOutput.format(3)); writeBlock(gAbsIncModal.format(91), gFormat.format(0), zOutput.format(.1), feedOutput.format(100)); + writeBlock(mFormat.format(84)); onCommand(COMMAND_STOP_SPINDLE); writeRetract(Z); } @@ -694,11 +735,11 @@ function writeToolMeasureBlock(tool, preMeasure) { } function onOpen() { - if (getProperty("useRadius")) { + if (staticProperties.useRadius) { maximumCircularSweep = toRad(90); // avoid potential center calculation errors for CNC } - if (getProperty("sequenceNumberOnlyOnToolChange")) { - setProperty("showSequenceNumbers", false); + if (staticProperties.sequenceNumberOnlyOnToolChange) { + staticProperties.showSequenceNumbers = false; } gRotationModal.format(69); // Default to G69 Rotation Off @@ -727,11 +768,11 @@ function onOpen() { return; } - if (!getProperty("separateWordsWithSpace")) { + if (!staticProperties.separateWordsWithSpace) { setWordSeparator(""); } - saveShowSequenceNumbers = getProperty("showSequenceNumbers"); - sequenceNumber = getProperty("sequenceNumberStart"); + saveShowSequenceNumbers = staticProperties.showSequenceNumbers; + sequenceNumber = staticProperties.sequenceNumberStart; writeln("%"); if (programName) { @@ -758,13 +799,13 @@ function onOpen() { return; } - if (getProperty("useG0")) { + if (staticProperties.useG0) { writeComment(localize("Using G0 which travels along dogleg path.")); } else { writeComment(subst(localize("Using high feed G1 F%1 instead of G0."), feedFormat.format(highFeedrate))); } - if (getProperty("writeVersion")) { + if (staticProperties.writeVersion) { if ((typeof getHeaderVersion == "function") && getHeaderVersion()) { writeComment(localize("post version") + ": " + getHeaderVersion()); } @@ -778,7 +819,7 @@ function onOpen() { var model = machineConfiguration.getModel(); var description = machineConfiguration.getDescription(); - if (getProperty("writeMachine") && (vendor || model || description)) { + if (staticProperties.writeMachine && (vendor || model || description)) { writeComment(localize("Machine")); if (vendor) { writeComment(" " + localize("vendor") + ": " + vendor); @@ -792,7 +833,7 @@ function onOpen() { } // dump tool information - if (getProperty("writeTools")) { + if (staticProperties.writeTools) { var zRanges = {}; if (is3D()) { var numberOfSections = getNumberOfSections(); @@ -831,7 +872,7 @@ function onOpen() { } // optionally cycle through all tools - if (getProperty("optionallyCycleToolsAtStart") || getProperty("optionallyMeasureToolsAtStart")) { + if (staticProperties.optionallyCycleToolsAtStart || staticProperties.optionallyMeasureToolsAtStart) { var tools = getToolTable(); if (tools.getNumberOfTools() > 0) { writeln(""); @@ -840,7 +881,7 @@ function onOpen() { writeOptionalBlock(mFormat.format(0), formatComment(localize("Read note"))); // wait for operator writeComment(localize("With BLOCK DELETE turned off each tool will cycle through")); writeComment(localize("the spindle to verify that the correct tool is in the tool magazine")); - if (getProperty("optionallyMeasureToolsAtStart")) { + if (staticProperties.optionallyMeasureToolsAtStart) { writeComment(localize("and to automatically measure it")); } writeComment(localize("Once the tools are verified turn BLOCK DELETE on to skip verification")); @@ -848,7 +889,7 @@ function onOpen() { for (var i = 0; i < tools.getNumberOfTools(); ++i) { var tool = tools.getTool(i); - if (getProperty("optionallyMeasureToolsAtStart") && (tool.type == TOOL_PROBE)) { + if (staticProperties.optionallyMeasureToolsAtStart && (tool.type == TOOL_PROBE)) { continue; } var comment = "T" + toolFormat.format(tool.number) + " " + @@ -860,7 +901,7 @@ function onOpen() { comment += " - " + getToolTypeName(tool.type); writeComment(tool.description); writeComment(comment); - if (getProperty("optionallyMeasureToolsAtStart")) { + if (staticProperties.optionallyMeasureToolsAtStart) { var probeType = getHaasProbingTypeBIDC(tool, false) if (!retracted) { writeRetract(Z); @@ -958,7 +999,7 @@ function onOpen() { break; } - if (getProperty("chipTransport")) { + if (staticProperties.chipTransport) { onCommand(COMMAND_START_CHIP_TRANSPORT); } // Probing Surface Inspection @@ -1528,7 +1569,7 @@ function subprogramStart(_initialPosition, _abc, _incremental) { "N" + nFormat.format(currentSubprogram) + conditional(comment, formatComment(comment.substr(0, maximumLineLength - 2 - 6 - 1))) ); - setProperty("showSequenceNumbers", false); + staticProperties.showSequenceNumbers = false; if (_incremental) { setIncrementalMode(_initialPosition, _abc); } @@ -1544,7 +1585,7 @@ function subprogramEnd() { } forceAny(); firstPattern = false; - setProperty("showSequenceNumbers", saveShowSequenceNumbers); + staticProperties.showSequenceNumbers = saveShowSequenceNumbers; closeRedirection(); } @@ -1657,12 +1698,12 @@ function onSection() { writeBlock("T" + toolFormat.format(19), mFormat.format(6)); //Changes Tool writeBlock(gFormat.format(55), gFormat.format(0), xOutput.format(stockMidX), yOutput.format(stockMidY)); - writeComment("Is the pencil centered above your stock?"); writeBlock(mFormat.format(0), formatComment("Open door")); + writeComment("Is the pencil centered above your stock?"); writeBlock(gFormat.format(55), gFormat.format(43), hFormat.format(19), zOutput.format(stockTopZ)); - writeComment("Is the pencil touching your stock?"); writeBlock(mFormat.format(0), formatComment("Open door")); + writeComment("Is the pencil touching your stock?"); } var forceToolAndRetract = optionalSection && !currentSection.isOptional(); optionalSection = currentSection.isOptional(); @@ -1684,20 +1725,20 @@ function onSection() { (!getPreviousSection().isMultiAxis() && currentSection.isMultiAxis() || getPreviousSection().isMultiAxis() && !currentSection.isMultiAxis()); // force newWorkPlane between indexing and simultaneous operations - operationNeedsSafeStart = getProperty("safeStartAllOperations") && !isFirstSection(); + operationNeedsSafeStart = staticProperties.safeStartAllOperations && !isFirstSection(); if (insertToolCall || operationNeedsSafeStart) { - if (getProperty("fastToolChange") && !isProbeOperation()) { + if (staticProperties.fastToolChange && !isProbeOperation()) { currentCoolantMode = COOLANT_OFF; } else if (insertToolCall) { // no coolant off command if safe start operation onCommand(COMMAND_COOLANT_OFF); } } - if ((insertToolCall && !getProperty("fastToolChange")) || newWorkOffset || newWorkPlane || toolChecked) { + if ((insertToolCall && !staticProperties.fastToolChange) || newWorkOffset || newWorkPlane || toolChecked) { // stop spindle before retract during tool change - if (insertToolCall && !isFirstSection() && !toolChecked && !getProperty("fastToolChange")) { + if (insertToolCall && !isFirstSection() && !toolChecked && !staticProperties.fastToolChange) { onCommand(COMMAND_STOP_SPINDLE); } @@ -1712,6 +1753,11 @@ function onSection() { } } + if (!isFirstSection()) { + writeBlock(mFormat.format(0)); + writeComment("CHECK TOOL AND PART"); + } + if (hasParameter("operation-comment")) { var comment = getParameter("operation-comment"); if (comment && ((comment !== lastOperationComment) || !patternIsActive || insertToolCall)) { @@ -1725,7 +1771,7 @@ function onSection() { writeln(""); } - if (getProperty("showNotes") && hasParameter("notes")) { + if (staticProperties.showNotes && hasParameter("notes")) { var notes = getParameter("notes"); if (notes) { var lines = String(notes).split("\n"); @@ -1746,13 +1792,13 @@ function onSection() { if (operationNeedsSafeStart) { if (!retracted) { - skipBlock = true; + //skipBlock = true; writeRetract(Z); } } if (insertToolCall || operationNeedsSafeStart) { - if (!isFirstSection() && getProperty("optionalStop") && insertToolCall) { + if (!isFirstSection() && staticProperties.optionalStop && insertToolCall) { onCommand(COMMAND_OPTIONAL_STOP); } @@ -1829,7 +1875,7 @@ function onSection() { ); } - if (getProperty("useParametricFeed") && + if (staticProperties.useParametricFeed && hasParameter("operation-strategy") && (getParameter("operation-strategy") != "drill") && !(useInverseTimeFeed && currentSection.isMultiAxis()) && // legacy @@ -1893,12 +1939,12 @@ function onSection() { forceAny(); gMotionModal.reset(); - if (getProperty("useG187")) { + if (staticProperties.useG187) { writeG187(); } - var G = ((highFeedMapping != HIGH_FEED_NO_MAPPING) || !getProperty("useG0")) ? 1 : 0; - var F = ((highFeedMapping != HIGH_FEED_NO_MAPPING) || !getProperty("useG0")) ? getFeed(highFeedrate) : ""; + var G = ((highFeedMapping != HIGH_FEED_NO_MAPPING) || !staticProperties.useG0) ? 1 : 0; + var F = ((highFeedMapping != HIGH_FEED_NO_MAPPING) || !staticProperties.useG0) ? getFeed(highFeedrate) : ""; if (insertToolCall || retracted || operationNeedsSafeStart || !lengthCompensationActive) { var _skipBlock = !(insertToolCall || retracted); var lengthOffset = tool.lengthOffset; @@ -1971,7 +2017,7 @@ function onSection() { validate(lengthCompensationActive, "Length compensation is not active."); if (insertToolCall || operationNeedsSafeStart) { - if (getProperty("preloadTool")) { + if (staticProperties.preloadTool) { var nextTool = getNextTool(tool.number); if (nextTool) { skipBlock = !insertToolCall; @@ -2014,8 +2060,9 @@ function onSection() { var toolDistance = initialPosition.z - stockTopZ; // Prompt user to check stock-tool distance + writeBlock(mFormat.format(0), formatComment("Halt Program")); writeComment("Is your tool " + toolDistance.toPrecision(2).toString() + "in from your stock?"); - writeBlock(mFormat.format(0), formatComment("Open door")); + writeComment("END VALIDATION SECTION"); @@ -2235,8 +2282,8 @@ function onCyclePoint(x, y, z) { } break; case "chip-breaking": - if ((!getProperty("useG73Retract") && (cycle.accumulatedDepth < cycle.depth)) || - (getProperty("useG73Retract") && (cycle.accumulatedDepth < cycle.depth) && + if ((!staticProperties.useG73Retract && (cycle.accumulatedDepth < cycle.depth)) || + (staticProperties.useG73Retract && (cycle.accumulatedDepth < cycle.depth) && (cycle.incrementalDepthReduction > 0))) { expandCyclePoint(x, y, z); } else if (cycle.accumulatedDepth < cycle.depth) { @@ -2273,8 +2320,8 @@ function onCyclePoint(x, y, z) { break; case "tapping": var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); - F = (getProperty("useG95forTapping") ? tool.getThreadPitch() : tappingFPM); - if (getProperty("useG95forTapping")) { + F = (staticProperties.useG95forTapping ? tool.getThreadPitch() : tappingFPM); + if (staticProperties.useG95forTapping) { writeBlock(gFeedModeModal.format(95)); } writeBlock( @@ -2286,8 +2333,8 @@ function onCyclePoint(x, y, z) { break; case "left-tapping": var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); - F = (getProperty("useG95forTapping") ? tool.getThreadPitch() : tappingFPM); - if (getProperty("useG95forTapping")) { + F = (staticProperties.useG95forTapping ? tool.getThreadPitch() : tappingFPM); + if (staticProperties.useG95forTapping) { writeBlock(gFeedModeModal.format(95)); } writeBlock( @@ -2299,8 +2346,8 @@ function onCyclePoint(x, y, z) { break; case "right-tapping": var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); - F = (getProperty("useG95forTapping") ? tool.getThreadPitch() : tappingFPM); - if (getProperty("useG95forTapping")) { + F = (staticProperties.useG95forTapping ? tool.getThreadPitch() : tappingFPM); + if (staticProperties.useG95forTapping) { writeBlock(gFeedModeModal.format(95)); } writeBlock( @@ -2314,8 +2361,8 @@ function onCyclePoint(x, y, z) { case "left-tapping-with-chip-breaking": case "right-tapping-with-chip-breaking": var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); - F = (getProperty("useG95forTapping") ? tool.getThreadPitch() : tappingFPM); - if (getProperty("useG95forTapping")) { + F = (staticProperties.useG95forTapping ? tool.getThreadPitch() : tappingFPM); + if (staticProperties.useG95forTapping) { writeBlock(gFeedModeModal.format(95)); } // Parameter 57 bit 6, REPT RIG TAP, is set to 1 (On) @@ -2843,7 +2890,7 @@ function onCycleEnd() { cycleSubprogramIsActive = false; } if (!cycleExpanded) { - writeBlock(gCycleModal.format(80), conditional(getProperty("useG95forTapping"), gFeedModeModal.format(94))); + writeBlock(gCycleModal.format(80), conditional(staticProperties.useG95forTapping, gFeedModeModal.format(94))); gMotionModal.reset(); } } @@ -2864,7 +2911,7 @@ function onRapid(_x, _y, _z) { error(localize("Radius compensation mode cannot be changed at rapid traversal.")); return; } - if (!getProperty("useG0") && (((x ? 1 : 0) + (y ? 1 : 0) + (z ? 1 : 0)) > 1)) { + if (!staticProperties.useG0 && (((x ? 1 : 0) + (y ? 1 : 0) + (z ? 1 : 0)) > 1)) { // axes are not synchronized writeBlock(gFeedModeModal.format(94), gMotionModal.format(1), x, y, z, getFeed(highFeedrate)); } else { @@ -2934,7 +2981,7 @@ function onRapid5D(_x, _y, _z, _a, _b, _c) { ((bOutput.isEnabled() && abcFormat.areDifferent(_b, bOutput.getCurrent())) ? 1 : 0) + ((cOutput.isEnabled() && abcFormat.areDifferent(_c, cOutput.getCurrent())) ? 1 : 0); /* - if (!getProperty("useG0") && ((currentSection.getOptimizedTCPMode() == 0) || (num > 1))) { + if (!staticProperties.useG0 && ((currentSection.getOptimizedTCPMode() == 0) || (num > 1))) { invokeOnLinear5D(_x, _y, _z, _a, _b, _c, highFeedrate); // onLinear5D handles inverse time feedrates return; } @@ -2947,7 +2994,7 @@ function onRapid5D(_x, _y, _z, _a, _b, _c) { var c = cOutput.format(_c); if (x || y || z || a || b || c) { - if (!getProperty("useG0") && ((currentSection.getOptimizedTCPMode() == 0) || (num > 1))) { + if (!staticProperties.useG0 && ((currentSection.getOptimizedTCPMode() == 0) || (num > 1))) { // axes are not synchronized writeBlock(gFeedModeModal.format(94), gMotionModal.format(1), x, y, z, a, b, c, getFeed(highFeedrate)); } else { @@ -2978,7 +3025,7 @@ function onLinear5D(_x, _y, _z, _a, _b, _c, feed) { var f = {frn:0, fmode:0}; if (a || b || c) { f = getMultiaxisFeed(_x, _y, _z, _a, _b, _c, feed); - if (getProperty("useDPMFeeds")) { + if (staticProperties.useDPMFeeds) { f.frn = feedOutput.format(f.frn); } else { f.frn = inverseTimeOutput.format(f.frn); @@ -3026,7 +3073,7 @@ function getMultiaxisFeed(_x, _y, _z, _a, _b, _c, feed) { var length = getMoveLength(_x, _y, _z, _a, _b, _c); - if (!getProperty("useDPMFeeds")) { // inverse time + if (!staticProperties.useDPMFeeds) { // inverse time f.frn = getInverseTime(length.tool, feed); f.fmode = 93; feedOutput.reset(); @@ -3074,7 +3121,7 @@ function getFeedDPM(_moveLength, _feed) { dpmFeed = previousDPMFeed; } } else { // machine specific calculation - var feedRate = _feed / (_moveLength.radius.x / (toPreciseUnit(getProperty("setting34"), IN) / 2.0)); + var feedRate = _feed / (_moveLength.radius.x / (toPreciseUnit(staticProperties.setting34, IN) / 2.0)); dpmFeed = Math.min(feedRate, highFeedrate); if (Math.abs(dpmFeed - previousDPMFeed) < dpmFeedToler) { dpmFeed = previousDPMFeed; @@ -3277,7 +3324,7 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed) { var start = getCurrentPosition(); if (isFullCircle()) { - if (getProperty("useRadius") || isHelical()) { // radius mode does not support full arcs + if (staticProperties.useRadius || isHelical()) { // radius mode does not support full arcs linearize(tolerance); return; } @@ -3294,7 +3341,7 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed) { default: linearize(tolerance); } - } else if (!getProperty("useRadius")) { + } else if (!staticProperties.useRadius) { switch (getCircularPlane()) { case PLANE_XY: writeBlock(gPlaneModal.format(17), gFeedModeModal.format(94), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); @@ -3483,7 +3530,7 @@ function onCommand(command) { "P" + 9853, "T" + toolFormat.format(tool.number), "B" + xyzFormat.format(0), - "H" + xyzFormat.format(getProperty("toolBreakageTolerance")) + "H" + xyzFormat.format(staticProperties.toolBreakageTolerance) ); toolChecked = true; lengthCompensationActive = false; // macro 9853 cancels tool length compensation @@ -3575,7 +3622,7 @@ function onSectionEnd() { function writeRetract() { var words = []; // store all retracted axes in an array var retractAxes = new Array(false, false, false); - var method = getProperty("safePositionMethod"); + var method = staticProperties.safePositionMethod; if (method == "clearanceHeight") { if (!is3D()) { error(localize("Retract option 'Clearance Height' is not supported for multi-axis machining.")); @@ -3663,7 +3710,7 @@ function writeRetract() { var isDPRNTopen = false; function inspectionCreateResultsFileHeader() { if (isDPRNTopen) { - if (!getProperty("singleResultsFile")) { + if (!staticProperties.singleResultsFile) { writeln("DPRNT[END]"); writeBlock("PCLOS"); isDPRNTopen = false; @@ -3679,7 +3726,7 @@ function inspectionCreateResultsFileHeader() { writeBlock("POPEN"); // check for existence of none alphanumeric characters but not spaces var resFile; - if (getProperty("singleResultsFile")) { + if (staticProperties.singleResultsFile) { resFile = getParameter("job-description") + "-RESULTS"; } else { resFile = getParameter("operation-comment") + "-RESULTS"; @@ -3768,15 +3815,15 @@ function onClose() { // retract writeRetract(Z); zOutput.reset(); - if (!getProperty("homePositionCenter") || currentMachineABC.length != 0) { + if (!staticProperties.homePositionCenter || currentMachineABC.length != 0) { writeRetract(X, Y); } forceWorkPlane(); setWorkPlane(new Vector(0, 0, 0)); // reset working plane - if (getProperty("homePositionCenter")) { - homePositionCenter = getProperty("homePositionCenter"); + if (staticProperties.homePositionCenter) { + homePositionCenter = staticProperties.homePositionCenter; writeRetract(X, Y); }