Skip to content

Commit

Permalink
Retract and Diam Set Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Aug 12, 2021
1 parent 831e7b6 commit a6c893d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
13 changes: 8 additions & 5 deletions Haas_Mills_BIDC/Bechtel DT.cps
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ properties = {/*
value: "",
scope: "post"
},
toolHeightValidation: {
toolLengthValidation: {
title: "Tool Length Validation",
description: "Length validation. By turning this off, you accept responsibility for any resulting crashes.",
group: 99,
Expand Down Expand Up @@ -459,7 +459,7 @@ staticProperties = {
homePositionCenter: false,
optionallyCycleToolsAtStart: false,
measureToolsAtStart: true,
forceHomeOnIndexing: true,
forceHomeOnIndexing: false,
toolBreakageTolerance: 0.1,
fastToolChange: false,
useG95forTapping: true,
Expand Down Expand Up @@ -906,6 +906,7 @@ function writeToolMeasureBlock(tool, preMeasure) {
} else { // use Macro P9995 to measure tools
// writeFunction("T" + toolFormat.format(tool.number), mFormat.format(6)); // get tool
setMacro(1600 + tool.number, tool.numberOfFlutes, "Number of Flutes");
setMacro(2400 + tool.number, xyzFormat.format(tool.diameter), "Tool Diameter");
var probeType = getHaasProbingTypeBIDC(tool, false);
writeFunction(
gFormat.format(65),
Expand Down Expand Up @@ -2748,7 +2749,7 @@ function onSection() {
}
}

if (getProperty("toolHeightValidation")) {
if (getProperty("toolLengthValidation")) {
writeComment("TOOL VALIDATION");
// Added 06/15/21 | Gavin Williams | will1742
// Verifies tool-stock distance. Post fails if tool fails clearance standards
Expand Down Expand Up @@ -4474,8 +4475,8 @@ function writeProbingToolpathInformation(cycleDepth) {
}

function onClose() {
writeRetract(Z);
if (isDPRNTopen) {
writeln("DPRNT[END]");
writeBlock("PCLOS");
Expand All @@ -4499,6 +4500,9 @@ function onClose() {
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
if (tool.number == 20 || tool.number == 19) {
continue;
}
writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6)); // get tool
displayMedia("removeTool" + tool.number + ".jpg");
writeBlock(mFormat.format(0));
Expand All @@ -4514,7 +4518,6 @@ function onClose() {

writeln("");
writeComment("CLEAN MACHINE");
writeRetract(Z);
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunClean.jpg");
displayMedia("floodCoolantOff.jpg")
writeBlock(mFormat.format(0));
Expand Down
13 changes: 8 additions & 5 deletions Haas_Mills_BIDC/Bechtel VF2.cps
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ properties = {/*
value: "",
scope: "post"
},
toolHeightValidation: {
toolLengthValidation: {
title: "Tool Length Validation",
description: "Length validation. By turning this off, you accept responsibility for any resulting crashes.",
group: 99,
Expand Down Expand Up @@ -459,7 +459,7 @@ staticProperties = {
homePositionCenter: false,
optionallyCycleToolsAtStart: false,
measureToolsAtStart: true,
forceHomeOnIndexing: true,
forceHomeOnIndexing: false,
toolBreakageTolerance: 0.1,
fastToolChange: false,
useG95forTapping: true,
Expand Down Expand Up @@ -906,6 +906,7 @@ function writeToolMeasureBlock(tool, preMeasure) {
} else { // use Macro P9995 to measure tools
// writeFunction("T" + toolFormat.format(tool.number), mFormat.format(6)); // get tool
setMacro(1600 + tool.number, tool.numberOfFlutes, "Number of Flutes");
setMacro(2400 + tool.number, xyzFormat.format(tool.diameter), "Tool Diameter");
var probeType = getHaasProbingTypeBIDC(tool, false);
writeFunction(
gFormat.format(65),
Expand Down Expand Up @@ -2748,7 +2749,7 @@ function onSection() {
}
}

if (getProperty("toolHeightValidation")) {
if (getProperty("toolLengthValidation")) {
writeComment("TOOL VALIDATION");
// Added 06/15/21 | Gavin Williams | will1742
// Verifies tool-stock distance. Post fails if tool fails clearance standards
Expand Down Expand Up @@ -4474,8 +4475,8 @@ function writeProbingToolpathInformation(cycleDepth) {
}

function onClose() {
writeRetract(Z);
if (isDPRNTopen) {
writeln("DPRNT[END]");
writeBlock("PCLOS");
Expand All @@ -4499,6 +4500,9 @@ function onClose() {
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
if (tool.number == 20 || tool.number == 19) {
continue;
}
writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6)); // get tool
displayMedia("removeTool" + tool.number + ".jpg");
writeBlock(mFormat.format(0));
Expand All @@ -4514,7 +4518,6 @@ function onClose() {

writeln("");
writeComment("CLEAN MACHINE");
writeRetract(Z);
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunClean.jpg");
displayMedia("floodCoolantOff.jpg")
writeBlock(mFormat.format(0));
Expand Down
15 changes: 9 additions & 6 deletions Haas_Mills_BIDC/Bechtel VF4.cps
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ properties = {/*
{title: "Yes", id: "true"},
{title: "Reversed", id: "reversed"}
],
value: "reversed",
value: "false",
scope: "post"
},
hasBAxis: {
Expand All @@ -108,7 +108,7 @@ properties = {/*
{title: "Yes", id: "true"},
{title: "Reversed", id: "reversed"}
],
value: "true",
value: "false",
scope: "post"
},/*
throughSpindle: {
Expand Down Expand Up @@ -415,7 +415,7 @@ properties = {/*
value: "",
scope: "post"
},
toolHeightValidation: {
toolLengthValidation: {
title: "Tool Length Validation",
description: "Length validation. By turning this off, you accept responsibility for any resulting crashes.",
group: 99,
Expand Down Expand Up @@ -906,6 +906,7 @@ function writeToolMeasureBlock(tool, preMeasure) {
} else { // use Macro P9995 to measure tools
// writeFunction("T" + toolFormat.format(tool.number), mFormat.format(6)); // get tool
setMacro(1600 + tool.number, tool.numberOfFlutes, "Number of Flutes");
setMacro(2400 + tool.number, xyzFormat.format(tool.diameter), "Tool Diameter");
var probeType = getHaasProbingTypeBIDC(tool, false);
writeFunction(
gFormat.format(65),
Expand Down Expand Up @@ -2753,7 +2754,7 @@ function onSection() {
}
}

if (getProperty("toolHeightValidation")) {
if (getProperty("toolLengthValidation")) {
writeComment("TOOL VALIDATION");
// Added 06/15/21 | Gavin Williams | will1742
// Verifies tool-stock distance. Post fails if tool fails clearance standards
Expand Down Expand Up @@ -4479,7 +4480,7 @@ function writeProbingToolpathInformation(cycleDepth) {
}

function onClose() {
writeRetract(Z);
if (isDPRNTopen) {
writeln("DPRNT[END]");
Expand All @@ -4504,6 +4505,9 @@ function onClose() {
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
if (tool.number == 20 || tool.number == 19) {
continue;
}
writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6)); // get tool
displayMedia("removeTool" + tool.number + ".jpg");
writeBlock(mFormat.format(0));
Expand All @@ -4519,7 +4523,6 @@ function onClose() {

writeln("");
writeComment("CLEAN MACHINE");
writeRetract(Z);
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunClean.jpg");
displayMedia("floodCoolantOff.jpg")
writeBlock(mFormat.format(0));
Expand Down

0 comments on commit a6c893d

Please sign in to comment.