Skip to content

Commit

Permalink
Merge pull request #9 from Bechtel-Innovation-Design-Center/Production
Browse files Browse the repository at this point in the history
Fixed Lathe Mappings
  • Loading branch information
will1742 authored Aug 31, 2021
2 parents cb0f2e1 + 35174a2 commit 5bb1c09
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Haas_Lathes_BIDC/Bechtel ST-20Y.cps
Original file line number Diff line number Diff line change
Expand Up @@ -1204,26 +1204,26 @@ function getToolHolderBIDCST20(toolNum) {
switch (toolNum) {
case 1:
case 2:
return KM50A;
return KM50R;
case 3:
case 4:
return WBLOCK;
case 6:
case 7:
return KM50R;
return KM50A;
case 8:
case 9:
return RBLOCKY;
case 10:
return KM40R;
return KM40A;
case 12:
return KM40A;
return KM40R;
default:
throw "INVALID ST20Y TOOL NUMBER: " + toolNum;
}
}

function getHaasProbingTypeBIDC(tool, internal) {
function getHaasProbingTypeBIDC(tool, internal, axial) {
switch (getHaasToolTypeBIDC(tool.type)) {
case BIDC_BORING_TURNING:
return SOUTHEAST;
Expand All @@ -1234,7 +1234,8 @@ function getHaasProbingTypeBIDC(tool, internal) {
return tool.hand =='R' ? NORTHEAST : NORTHWEST;
case HAAS_DRILL:
case HAAS_CENTER:
return EAST;
case HAAS_END_MILL:
return axial ? EAST : NORTH;
default:
throw "INVALID PROBING DIRECTION";
}
Expand All @@ -1246,7 +1247,7 @@ function writeToolMeasureBlockBIDC(tool) {
var holder = getToolHolderBIDCST20(tool.number);
let measureTool = new getCompleteTool(holder, tool);
var probeType = getHaasProbingTypeBIDC(tool, measureTool.inner);
var probeType = getHaasProbingTypeBIDC(tool, measureTool.inner, measureTool.axial);
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 5bb1c09

Please sign in to comment.