From f4e956c40a5ffb8d0928272de5159edc92bc659b Mon Sep 17 00:00:00 2001 From: will1742 Date: Mon, 28 Jun 2021 16:43:49 -0400 Subject: [PATCH] Set number of flutes per tool --- Haas_Next_Generation/README.txt | 5 +++++ Haas_Next_Generation/haas vf2.cps | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/Haas_Next_Generation/README.txt b/Haas_Next_Generation/README.txt index 8e31c78..6ac065f 100644 --- a/Haas_Next_Generation/README.txt +++ b/Haas_Next_Generation/README.txt @@ -26,6 +26,10 @@ takeInput(prompt, options) any number of options can be input, sequenceNumbers will be adjusted to compensate +setMacro(macro, value, comment) + sets specified macro, adds inline comment + + General notes: - staticProperties is a dictionary containing all properties previously allowed to be altered by the user. @@ -33,3 +37,4 @@ General notes: - Some optional portions were commented out, specifically those associated with safe start. +- Macro references can be found on page 189 of the milling manual \ No newline at end of file diff --git a/Haas_Next_Generation/haas vf2.cps b/Haas_Next_Generation/haas vf2.cps index 77a0ef0..74219d0 100644 --- a/Haas_Next_Generation/haas vf2.cps +++ b/Haas_Next_Generation/haas vf2.cps @@ -892,6 +892,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 + setMacro(1600 + tool.number, tool.numberOfFlutes, "Number of Flutes"); writeFunction( gFormat.format(65), "P9995", @@ -909,6 +910,13 @@ function writeToolMeasureBlock(tool, preMeasure) { measureTool = false; } +// 6/28/21 | Gavin Williams | will1742 +// 002 Improved Probing +// sets specified macro number with value +function setMacro(macro, value, comment) { + writeWords("#" + macro + "=" + value, "(" + comment + ")"); +} + function defineMachineModel() { var useTCPC = staticProperties.useTCPC; switch (staticProperties.machineModel) {