Skip to content

Commit

Permalink
Fixed Radial Probe Direction
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Sep 6, 2021
1 parent 351461e commit 29ad5f8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Haas_Lathes_BIDC/Bechtel ST-20Y.cps
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ function getCompleteTool(holder, tool) {
this.holder = holder;
this.tool = tool;
this.inner = toolSection.getParameter("operation:turningMode") == "inner";
this.axial = toolSection.getWorkPlane().getElement(0, 0) == 0;
this.radial = toolSection.getWorkPlane().getElement(0, 0) == 0;

tool.shankWidth = toolSection.getParameter("operation:tool_shankWidth");
tool.cuttingWidth = toolSection.getParameter("operation:tool_cuttingWidth");
Expand Down Expand Up @@ -684,7 +684,6 @@ function getCompleteTool(holder, tool) {
};

} else if (holder == KM40A) {
this.offsetType = "General Turning";
var haasType = getHaasToolTypeBIDC(tool.type);
var millX = function() {
return holder.x - PROBE_CENTERING_OFFSET + tool.diameter;
Expand Down Expand Up @@ -1243,7 +1242,7 @@ function getToolHolderBIDCST20(toolNum) {
}
}

function getHaasProbingTypeBIDC(tool, internal, axial) {
function getHaasProbingTypeBIDC(tool, internal, radial) {
switch (getHaasToolTypeBIDC(tool.type)) {
case BIDC_BORING_TURNING:
return SOUTHEAST;
Expand All @@ -1255,7 +1254,7 @@ function getHaasProbingTypeBIDC(tool, internal, axial) {
case HAAS_DRILL:
case HAAS_CENTER:
case HAAS_END_MILL:
return axial ? EAST : NORTH;
return radial ? NORTH : EAST;
default:
throw "INVALID PROBING DIRECTION";
}
Expand All @@ -1267,7 +1266,7 @@ function writeToolMeasureBlockBIDC(tool) {
var holder = getToolHolderBIDCST20(tool.number);
let measureTool = new getCompleteTool(holder, tool);
var probeType = getHaasProbingTypeBIDC(tool, measureTool.inner, measureTool.axial);
var probeType = getHaasProbingTypeBIDC(tool, measureTool.inner, measureTool.radial);
var compensationOffset = tool.isTurningTool() ? tool.compensationOffset : tool.lengthOffset;
if (compensationOffset > 99) {
error(localize("Compensation offset is out of range."));
Expand Down

0 comments on commit 29ad5f8

Please sign in to comment.