From f0f7f1578a4d18fd21487b7d27ae49855e3469ff Mon Sep 17 00:00:00 2001 From: "Williams, Gavin J" Date: Wed, 14 Jul 2021 10:00:26 -0400 Subject: [PATCH] Clearance is now a constant --- Haas_Next_Generation/haas vf2.cps | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Haas_Next_Generation/haas vf2.cps b/Haas_Next_Generation/haas vf2.cps index f737863..b5e53b2 100644 --- a/Haas_Next_Generation/haas vf2.cps +++ b/Haas_Next_Generation/haas vf2.cps @@ -456,6 +456,8 @@ staticProperties = { const DEFAULT_HAAS_K_FACTOR = 0.05; const NULL_HAAS_K_FACTOR = 0; + const CLEARANCE_HEIGHT = 1; + var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines // samples: // {id: COOLANT_THROUGH_TOOL, on: 88, off: 89} @@ -2579,8 +2581,8 @@ function onSection() { writeComment("BEGIN VALIDATION SECTION"); // Added 06/15/21 | Gavin Williams | will1742 // Verifies tool-stock distance. Post fails if tool fails clearance standards - if (toolDistance < 1) { - throw "Error: Clearance height must be greater than 1 inch from stock"; + if (toolDistance < CLEARANCE_HEIGHT) { + throw "Error: Clearance height must be " + CLEARANCE_HEIGHT + " or more inches from stock"; } if (toolDistance == Infinity) {