Skip to content

Commit

Permalink
Removed Manual A,B,C Selection
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Sep 16, 2021
1 parent a6a840a commit eaa3131
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions Haas_Mills_BIDC/Bechtel VF4.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 @@ -486,6 +486,9 @@ staticProperties = {
coolantPressure: "",
singleResultsFile: true,
useP9995: true,
hasAAxis: false,
hasBAxis: false,
hasCAxis: false,
postVersion: "VF4G8A21"
};

Expand Down Expand Up @@ -1097,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 @@ -1118,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 @@ -1129,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 @@ -1142,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 @@ -2335,9 +2338,9 @@ function onSection() {
writeBlock("T" + toolFormat.format(19), mFormat.format(6)); //Changes Tool
writeBlock(gFormat.format(55), gFormat.format(0), forceX.format(stockMidX), forceY.format(stockMidY));
if (getProperty("hasAAxis") != "false" && getProperty("hasCAxis") != "false") {
if (staticProperties.hasAAxis != "false" && staticProperties.hasCAxis != "false") {
writeBlock(gFormat.format(0), aOutput.format(0), cOutput.format(0));
} else if (getProperty("hasAAxis") != "false") {
} else if (staticProperties.hasAAxis != "false") {
writeBlock(gFormat.format(0), aOutput.format(0));
}
displayMedia("xyWCSCheck.jpg", false);
Expand Down

0 comments on commit eaa3131

Please sign in to comment.