Skip to content

Commit

Permalink
Removed User Selected Axis
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Sep 16, 2021
1 parent eaa3131 commit 379fe6b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 37 deletions.
29 changes: 15 additions & 14 deletions Haas_Mills_BIDC/Bechtel DT.cps
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -110,7 +110,7 @@ properties = {/*
],
value: "false",
scope: "post"
},/*
},
throughSpindle: {
title: "Allow Through Spindle Coolant",
description: "Enables through spindle coolant, if off uses flood",
Expand Down Expand Up @@ -417,31 +417,31 @@ 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,
scope: "post"
},
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,
scope: "post"
},
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,
scope: "post"
},
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,
Expand Down Expand Up @@ -486,6 +486,9 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
hasAAxis: "false",
hasBAxis: "false",
hasCAxis: "false",
postVersion: "DT1G8A21"
};

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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."));
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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});
}

Expand Down Expand Up @@ -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"));
Expand Down
29 changes: 15 additions & 14 deletions Haas_Mills_BIDC/Bechtel VF2.cps
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -110,7 +110,7 @@ properties = {/*
],
value: "false",
scope: "post"
},/*
},
throughSpindle: {
title: "Allow Through Spindle Coolant",
description: "Enables through spindle coolant, if off uses flood",
Expand Down Expand Up @@ -417,31 +417,31 @@ 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,
scope: "post"
},
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,
scope: "post"
},
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,
scope: "post"
},
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,
Expand Down Expand Up @@ -486,6 +486,9 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
hasAAxis: "false",
hasBAxis: "false",
hasCAxis: "false",
postVersion: "VF2G8A21"
};

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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."));
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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});
}

Expand Down Expand Up @@ -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"));
Expand Down
18 changes: 9 additions & 9 deletions Haas_Mills_BIDC/Bechtel VF4.cps
Original file line number Diff line number Diff line change
Expand Up @@ -417,31 +417,31 @@ 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,
scope: "post"
},
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,
scope: "post"
},
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,
scope: "post"
},
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,
Expand Down Expand Up @@ -486,9 +486,9 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
hasAAxis: false,
hasBAxis: false,
hasCAxis: false,
hasAAxis: "false",
hasBAxis: "false",
hasCAxis: "false",
postVersion: "VF4G8A21"
};

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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));
}

Expand Down Expand Up @@ -2823,6 +2822,7 @@ function onSection() {

if (tool.type != TOOL_PROBE) {
setCoolant(tool.coolant);
writeBlock(gFormat.format(4), "P500");
}

writeComment("BEGIN OPERATION");
Expand Down

0 comments on commit 379fe6b

Please sign in to comment.