Skip to content

Commit

Permalink
Final Alterations
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Jul 21, 2021
1 parent 8a6e5ed commit ac60f44
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 35 deletions.
43 changes: 23 additions & 20 deletions Haas_Gantry_BIDC/Bechtel SR.cps
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ var staticProperties = {
useG73Retract: false,
setting34: 1,
useDPMFeeds: false,
singleResultsFile: true
singleResultsFile: true,
postVersion: "SRCG7A21"
}

var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines
Expand Down Expand Up @@ -791,28 +792,25 @@ function onOpen() {
"O" + oFormat.format(programId) +
conditional(programComment, " " + formatComment(programComment.substr(0, maximumLineLength - 2 - ("O" + oFormat.format(programId)).length - 1)))
);
writeWords(writeComment(getGlobalParameter("username") + ": " + getGlobalParameter("document-path")), writeComment(getGlobalParameter("generated-at")));

writeComment("Career Account Username: " + getGlobalParameter("username"));
writeComment("Filename: " + getGlobalParameter("document-path"));
writeComment("Date: " + getGlobalParameter("generated-at"));
writeComment("Post Version: " + staticProperties.postVersion);

lastSubprogram = (initialSubprogramNumber - 1);
} else {
error(localize("Program name has not been specified."));
return;
}

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 (staticProperties.writeVersion) {
if ((typeof getHeaderVersion == "function") && getHeaderVersion()) {
writeComment(localize("post version") + ": " + getHeaderVersion());
}
if ((typeof getHeaderDate == "function") && getHeaderDate()) {
writeComment(localize("post modified") + ": " + getHeaderDate());
}
}
// if (staticProperties.writeVersion) {
// if ((typeof getHeaderVersion == "function") && getHeaderVersion()) {
// writeComment(localize("post version") + ": " + getHeaderVersion());
// }
// if ((typeof getHeaderDate == "function") && getHeaderDate()) {
// writeComment(localize("post modified") + ": " + getHeaderDate());
// }
// }

// dump machine configuration
var vendor = machineConfiguration.getVendor();
Expand Down Expand Up @@ -866,7 +864,7 @@ function onOpen() {
comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum());
}
comment += " - " + getToolTypeName(tool.type);
writeComment(comment);
//writeComment(comment);
}
}
}
Expand Down Expand Up @@ -1770,9 +1768,14 @@ function onSection() {
} else {
writeln("");
}

if (hasParameter("notes") && getParameter("notes").toUpperCase().indexOf("APPROVED") <= -1) {
throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a Peer Mentor."
}

if (staticProperties.showNotes && hasParameter("notes")) {
if (staticProperties.showNotes) {
var notes = getParameter("notes");
writeComment("PEER MENTOR NOTES:")
if (notes) {
var lines = String(notes).split("\n");
var r1 = new RegExp("^[\\s]+", "g");
Expand Down Expand Up @@ -1869,7 +1872,7 @@ function onSection() {
if (spindleSpeed > 99999) {
warning(localize("Spindle speed exceeds maximum value."));
}
skipBlock = !spindleChanged;
//skipBlock = !spindleChanged;
writeBlock(
sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4)
);
Expand Down
10 changes: 5 additions & 5 deletions Haas_Next_Generation/Bechtel DT.cps
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
postVersion: 2893
postVersion: "DT1G7A21"
};

const HAAS_DRILL = 1;
Expand Down Expand Up @@ -1320,7 +1320,7 @@ function onOpen() {
// 6/21/21 | Gavin Williams | will1742
writeComment("Load and probe tools");

displayMedia("Net Share/Media/toolProbeReminder.jpg");
displayMedia("toolProbeReminder.jpg");
writeBlock(mFormat.format(0));

let parsedTools = [];
Expand Down Expand Up @@ -2390,7 +2390,7 @@ function onSection() {
}

if (hasParameter("notes") && getParameter("notes").toUpperCase().indexOf("APPROVED") <= -1) {
throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a TA."
throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a Peer Mentor."
}

if (staticProperties.showNotes) {
Expand Down Expand Up @@ -4500,7 +4500,7 @@ function onClose() {
writeln("");
writeComment("CLEAN MACHINE");
writeRetract(Z);
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunCLean.jpg");
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunClean.jpg");
displayMedia("floodCoolantOff.jpg")
writeBlock(mFormat.format(0));
setCoolant(COOLANT_FLOOD);
Expand All @@ -4510,7 +4510,7 @@ function onClose() {
gotoWithMessage(X_TRAVEL_LIMIT, 0, "sprayUpperLeft.jpg")
onCommand(COMMAND_COOLANT_OFF);
onCommand(COMMAND_START_CHIP_TRANSPORT);
gotoWithMessage(X_TRAVEL_LIMIT/2, Y_TRAVEL_LIMIT, "useAuger.jpg");
gotoWithMessage(X_TRAVEL_LIMIT/2, Y_TRAVEL_LIMIT, "sweepChips.jpg");
onCommand(COMMAND_STOP_CHIP_TRANSPORT);

writeln("");
Expand Down
10 changes: 5 additions & 5 deletions Haas_Next_Generation/Bechtel VF2.cps
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
postVersion: 2893
postVersion: "VF2G7A21"
};

const HAAS_DRILL = 1;
Expand Down Expand Up @@ -1320,7 +1320,7 @@ function onOpen() {
// 6/21/21 | Gavin Williams | will1742
writeComment("Load and probe tools");

displayMedia("Net Share/Media/toolProbeReminder.jpg");
displayMedia("toolProbeReminder.jpg");
writeBlock(mFormat.format(0));

let parsedTools = [];
Expand Down Expand Up @@ -2390,7 +2390,7 @@ function onSection() {
}

if (hasParameter("notes") && getParameter("notes").toUpperCase().indexOf("APPROVED") <= -1) {
throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a TA."
throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a Peer Mentor."
}

if (staticProperties.showNotes) {
Expand Down Expand Up @@ -4500,7 +4500,7 @@ function onClose() {
writeln("");
writeComment("CLEAN MACHINE");
writeRetract(Z);
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunCLean.jpg");
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunClean.jpg");
displayMedia("floodCoolantOff.jpg")
writeBlock(mFormat.format(0));
setCoolant(COOLANT_FLOOD);
Expand All @@ -4510,7 +4510,7 @@ function onClose() {
gotoWithMessage(X_TRAVEL_LIMIT, 0, "sprayUpperLeft.jpg")
onCommand(COMMAND_COOLANT_OFF);
onCommand(COMMAND_START_CHIP_TRANSPORT);
gotoWithMessage(X_TRAVEL_LIMIT/2, Y_TRAVEL_LIMIT, "useAuger.jpg");
gotoWithMessage(X_TRAVEL_LIMIT/2, Y_TRAVEL_LIMIT, "sweepChips.jpg");
onCommand(COMMAND_STOP_CHIP_TRANSPORT);

writeln("");
Expand Down
10 changes: 5 additions & 5 deletions Haas_Next_Generation/Bechtel VF4.cps
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
postVersion: 2893
postVersion: "VF4G7A21"
};

const HAAS_DRILL = 1;
Expand Down Expand Up @@ -1320,7 +1320,7 @@ function onOpen() {
// 6/21/21 | Gavin Williams | will1742
writeComment("Load and probe tools");

displayMedia("Net Share/Media/toolProbeReminder.jpg");
displayMedia("toolProbeReminder.jpg");
writeBlock(mFormat.format(0));

let parsedTools = [];
Expand Down Expand Up @@ -2390,7 +2390,7 @@ function onSection() {
}

if (hasParameter("notes") && getParameter("notes").toUpperCase().indexOf("APPROVED") <= -1) {
throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a TA."
throw "Operation \"" + getParameter("operation-comment") + "\" not approved. See a Peer Mentor."
}

if (staticProperties.showNotes) {
Expand Down Expand Up @@ -4500,7 +4500,7 @@ function onClose() {
writeln("");
writeComment("CLEAN MACHINE");
writeRetract(Z);
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunCLean.jpg");
gotoWithMessage(X_TRAVEL_LIMIT/2, 0, "airGunClean.jpg");
displayMedia("floodCoolantOff.jpg")
writeBlock(mFormat.format(0));
setCoolant(COOLANT_FLOOD);
Expand All @@ -4510,7 +4510,7 @@ function onClose() {
gotoWithMessage(X_TRAVEL_LIMIT, 0, "sprayUpperLeft.jpg")
onCommand(COMMAND_COOLANT_OFF);
onCommand(COMMAND_START_CHIP_TRANSPORT);
gotoWithMessage(X_TRAVEL_LIMIT/2, Y_TRAVEL_LIMIT, "useAuger.jpg");
gotoWithMessage(X_TRAVEL_LIMIT/2, Y_TRAVEL_LIMIT, "sweepChips.jpg");
onCommand(COMMAND_STOP_CHIP_TRANSPORT);

writeln("");
Expand Down

0 comments on commit ac60f44

Please sign in to comment.