diff --git a/Haas_Gantry_BIDC/Bechtel SR.cps b/Haas_Gantry_BIDC/Bechtel SR.cps index b847acc..27dab3f 100644 --- a/Haas_Gantry_BIDC/Bechtel SR.cps +++ b/Haas_Gantry_BIDC/Bechtel SR.cps @@ -350,7 +350,7 @@ const LEN_DIA_ROT = 3; const DEFAULT_HAAS_K_FACTOR = 0.05; const NULL_HAAS_K_FACTOR = 0; -const CLEARANCE_HEIGHT = 1; +const CLEARANCE_HEIGHT = .1; const LENGTH_TOLERANCE = .25; const DIAM_TOLERANCE = .01; @@ -679,14 +679,14 @@ function prepareForToolCheck() { function BIDCWriteToolMeasureBlock(tool, rotating) { writeBlock(gFormat.format(43), hFormat.format(tool.number)); - if (rotating) { + if (rotating && tool.type != HAAS_BALL_NOSE) { writeBlock(gFormat.format(59), gFormat.format(0), xOutput.format(-tool.diameter/2), yOutput.format(0)); } else { writeBlock(gFormat.format(59), gFormat.format(0), xOutput.format(0), yOutput.format(0)); } writeBlock(mFormat.format(0)); writeComment("TOOL PROBING"); - writeBlock(gFormat.format(83)); + writeBlock(mFormat.format(83)); writeBlock(gFormat.format(4), "P1."); writeBlock(mFormat.format(84)); if (rotating) { @@ -701,6 +701,7 @@ function BIDCWriteToolMeasureBlock(tool, rotating) { writeBlock(gAbsIncModal.format(91), gFormat.format(0), zOutput.format(.1), feedOutput.format(100)); onCommand(COMMAND_STOP_SPINDLE); writeRetract(Z); + writeRetract(X, Y); } function writeToolMeasureBlock(tool, preMeasure) { @@ -922,7 +923,7 @@ function onOpen() { writeRetract(Z); // writeBlock(gFormat.format(53), gFormat.format(0), xOutput.format(TOOL_CHANGE_X), yOutput.format(TOOL_CHANGE_Y)); // writeBlock(mFormat.format(0), formatComment("Load Tool " + tool.number)); //Pause until operator loads tool - BIDCWriteToolMeasureBlock(tool, probeType != 2); + BIDCWriteToolMeasureBlock(tool, probeType != LEN_NON_ROT); // writeToolMeasureBlock(tool, true); writeln("") } else { @@ -1754,6 +1755,7 @@ function onSection() { // retract to safe plane writeRetract(Z); + writeRetract(X, Y); writeBlock(gAbsIncModal.format(90)); zOutput.reset();