From 9fa2a50b7de5000f8e0115937878f985030b5101 Mon Sep 17 00:00:00 2001 From: "Williams, Gavin J" Date: Mon, 28 Jun 2021 16:10:11 -0400 Subject: [PATCH] Altered Thread Mill Classification --- Haas_Next_Generation/haas vf2.cps | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Haas_Next_Generation/haas vf2.cps b/Haas_Next_Generation/haas vf2.cps index db75ad2..77a0ef0 100644 --- a/Haas_Next_Generation/haas vf2.cps +++ b/Haas_Next_Generation/haas vf2.cps @@ -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: @@ -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); } @@ -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) { @@ -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; @@ -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", @@ -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