Skip to content

Fixed Lathe Mappings #9

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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