Skip to content

Commit

Permalink
Fixed Cleaning Overtravel
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Aug 6, 2021
1 parent 0308758 commit 9a4e508
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 30 deletions.
19 changes: 10 additions & 9 deletions Haas_Next_Generation/Bechtel DT.cps
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
postVersion: "DT1G7A21"
postVersion: "DT1G8A21"
};

const HAAS_DRILL = 1;
Expand All @@ -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:
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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) {
Expand All @@ -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']);
Expand All @@ -2781,18 +2782,18 @@ 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)));
}
}

if (tool.type != TOOL_PROBE) {
setCoolant(tool.coolant);
}

writeComment("BEGIN OPERATION");
// define subprogram
subprogramDefine(initialPosition, abc, retracted, zIsOutput);
}
Expand Down
19 changes: 10 additions & 9 deletions Haas_Next_Generation/Bechtel VF2.cps
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
postVersion: "VF2G7A21"
postVersion: "VF2G8A21"
};

const HAAS_DRILL = 1;
Expand All @@ -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:
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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) {
Expand All @@ -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']);
Expand All @@ -2781,18 +2782,18 @@ 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)));
}
}

if (tool.type != TOOL_PROBE) {
setCoolant(tool.coolant);
}

writeComment("BEGIN OPERATION");
// define subprogram
subprogramDefine(initialPosition, abc, retracted, zIsOutput);
}
Expand Down
25 changes: 13 additions & 12 deletions Haas_Next_Generation/Bechtel VF4.cps
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
postVersion: "VF4G7A21"
postVersion: "VF4G8A21"
};

const HAAS_DRILL = 1;
Expand All @@ -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:
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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) {
Expand All @@ -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']);
Expand All @@ -2781,18 +2782,18 @@ 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)));
}
}

if (tool.type != TOOL_PROBE) {
setCoolant(tool.coolant);
}

writeComment("BEGIN OPERATION");
// define subprogram
subprogramDefine(initialPosition, abc, retracted, zIsOutput);
}
Expand Down

0 comments on commit 9a4e508

Please sign in to comment.