Skip to content

Commit

Permalink
Altered Thread Mill Classification
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Jun 28, 2021
1 parent fbf1b39 commit 9fa2a50
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Haas_Next_Generation/haas vf2.cps
Original file line number Diff line number Diff line change
Expand Up @@ -762,13 +762,13 @@ function getHaasToolTypeBIDC(toolType) {
case TOOL_MILLING_END_BULLNOSE:
case TOOL_MILLING_TAPERED:
case TOOL_MILLING_DOVETAIL:
case TOOL_MILLING_THREAD:
return HAAS_END_MILL; // end mill
case TOOL_DRILL_SPOT:
case TOOL_MILLING_CHAMFER:
case TOOL_DRILL_CENTER:
case TOOL_COUNTER_SINK:
case TOOL_COUNTER_BORE:
case TOOL_MILLING_THREAD:
case TOOL_MILLING_FORM:
return HAAS_CENTER; // center drill
case TOOL_MILLING_END_BALL:
Expand Down Expand Up @@ -803,9 +803,6 @@ function getHaasProbingTypeBIDC(tool, use9023) {
case HAAS_DRILL:
return formatCNumber(LEN_NON_ROT, use9023);
case HAAS_CENTER:
if (tool.type == TOOL_MILLING_THREAD) {
return formatCNumber(LEN_DIA_ROT, use9023);
}
if (tool.type == TOOL_MILLING_FORM) {
return formatCNumber(NO_PROBING, use9023);
}
Expand Down Expand Up @@ -834,6 +831,9 @@ function getHaasKFactorBIDC(tool) {
if (tool.type == TOOL_MILLING_FACE && tool.taperAngle != 0) {
return NULL_HAAS_K_FACTOR;
}
if (tool.type == TOOL_MILLING_THREAD) {
return DEFAULT_HAAS_K_FACTOR + tool.getThreadPitch();
}
return DEFAULT_HAAS_K_FACTOR + tool.cornerRadius;
case HAAS_BALL_NOSE:
if (tool.type == TOOL_MILLING_RADIUS) {
Expand All @@ -844,9 +844,7 @@ function getHaasKFactorBIDC(tool) {
case HAAS_PROBE:
case HAAS_DRILL:
case HAAS_TAP:
if (tool.type == TOOL_MILLING_THREAD) {
return DEFAULT_HAAS_K_FACTOR + tool.getThreadPitch();
}

return NULL_HAAS_K_FACTOR;
default:
return -1;
Expand Down Expand Up @@ -893,6 +891,7 @@ function writeToolMeasureBlock(tool, preMeasure) {
);
} else { // use Macro P9995 to measure tools
// writeFunction("T" + toolFormat.format(tool.number), mFormat.format(6)); // get tool
// TODO: fix tool type
writeFunction(
gFormat.format(65),
"P9995",
Expand Down Expand Up @@ -1312,6 +1311,7 @@ function onOpen() {
}
comment += " - " + getToolTypeName(tool.type);
writeComment(comment);
writeComment(tool.description);
if (staticProperties.measureToolsAtStart) {
writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6)); //Changes Tool
writeBlock(mFormat.format(0), formatComment("Load Tool")); //Pause until operator loads tool
Expand Down

0 comments on commit 9fa2a50

Please sign in to comment.