From 63b7791f13fc6cf78760e3c62b29df3af09145bc Mon Sep 17 00:00:00 2001 From: will1742 Date: Wed, 21 Jul 2021 16:15:23 -0400 Subject: [PATCH] Altered Signs on Part Loading --- Haas_Next_Generation/Bechtel DT.cps | 6 +++--- Haas_Next_Generation/Bechtel VF2.cps | 6 +++--- Haas_Next_Generation/Bechtel VF4.cps | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Haas_Next_Generation/Bechtel DT.cps b/Haas_Next_Generation/Bechtel DT.cps index 780af90..7518511 100644 --- a/Haas_Next_Generation/Bechtel DT.cps +++ b/Haas_Next_Generation/Bechtel DT.cps @@ -2277,9 +2277,9 @@ function onSection() { writeln(""); writeComment("STOCK PREP"); var Stock_X_55 = (stockUpperX - stockLowerX)/2; - writeln(macroFormat.format(100) + "=[" + (Stock_X_55.toFixed(4) + "-" + macroFormat.format(5241)) + "]"); - writeWords("IF [" + macroFormat.format(100) + " LT 0] THEN " + macroFormat.format(100) + "=0"); - writeWords("IF [" + macroFormat.format(100) + " GT " + X_TRAVEL_LIMIT + "] THEN " + macroFormat.format(100) + "=" + X_TRAVEL_LIMIT); + writeln(macroFormat.format(100) + "=[[" + (Stock_X_55.toFixed(4) + "-" + macroFormat.format(5241)) + "]*-1.]"); + writeWords("IF [" + macroFormat.format(100) + " GT 0.] THEN " + macroFormat.format(100) + "=0."); + writeWords("IF [" + macroFormat.format(100) + " LT " + (X_TRAVEL_LIMIT*-1) + "." + "] THEN " + macroFormat.format(100) + "=" + (X_TRAVEL_LIMIT*-1) + "."); writeBlock(gFormat.format(53), "X" + macroFormat.format(100), yOutput.format(0)); displayMedia("loadStock.jpg"); writeBlock(mFormat.format(0)); diff --git a/Haas_Next_Generation/Bechtel VF2.cps b/Haas_Next_Generation/Bechtel VF2.cps index 3464ff8..dc2bbbb 100644 --- a/Haas_Next_Generation/Bechtel VF2.cps +++ b/Haas_Next_Generation/Bechtel VF2.cps @@ -2277,9 +2277,9 @@ function onSection() { writeln(""); writeComment("STOCK PREP"); var Stock_X_55 = (stockUpperX - stockLowerX)/2; - writeln(macroFormat.format(100) + "=[" + (Stock_X_55.toFixed(4) + "-" + macroFormat.format(5241)) + "]"); - writeWords("IF [" + macroFormat.format(100) + " LT 0] THEN " + macroFormat.format(100) + "=0"); - writeWords("IF [" + macroFormat.format(100) + " GT " + X_TRAVEL_LIMIT + "] THEN " + macroFormat.format(100) + "=" + X_TRAVEL_LIMIT); + writeln(macroFormat.format(100) + "=[[" + (Stock_X_55.toFixed(4) + "-" + macroFormat.format(5241)) + "]*-1.]"); + writeWords("IF [" + macroFormat.format(100) + " GT 0.] THEN " + macroFormat.format(100) + "=0."); + writeWords("IF [" + macroFormat.format(100) + " LT " + (X_TRAVEL_LIMIT*-1) + "." + "] THEN " + macroFormat.format(100) + "=" + (X_TRAVEL_LIMIT*-1) + "."); writeBlock(gFormat.format(53), "X" + macroFormat.format(100), yOutput.format(0)); displayMedia("loadStock.jpg"); writeBlock(mFormat.format(0)); diff --git a/Haas_Next_Generation/Bechtel VF4.cps b/Haas_Next_Generation/Bechtel VF4.cps index c567de2..4685410 100644 --- a/Haas_Next_Generation/Bechtel VF4.cps +++ b/Haas_Next_Generation/Bechtel VF4.cps @@ -2277,9 +2277,9 @@ function onSection() { writeln(""); writeComment("STOCK PREP"); var Stock_X_55 = (stockUpperX - stockLowerX)/2; - writeln(macroFormat.format(100) + "=[" + (Stock_X_55.toFixed(4) + "-" + macroFormat.format(5241)) + "]"); - writeWords("IF [" + macroFormat.format(100) + " LT 0] THEN " + macroFormat.format(100) + "=0"); - writeWords("IF [" + macroFormat.format(100) + " GT " + X_TRAVEL_LIMIT + "] THEN " + macroFormat.format(100) + "=" + X_TRAVEL_LIMIT); + writeln(macroFormat.format(100) + "=[[" + (Stock_X_55.toFixed(4) + "-" + macroFormat.format(5241)) + "]*-1.]"); + writeWords("IF [" + macroFormat.format(100) + " GT 0.] THEN " + macroFormat.format(100) + "=0."); + writeWords("IF [" + macroFormat.format(100) + " LT " + (X_TRAVEL_LIMIT*-1) + "." + "] THEN " + macroFormat.format(100) + "=" + (X_TRAVEL_LIMIT*-1) + "."); writeBlock(gFormat.format(53), "X" + macroFormat.format(100), yOutput.format(0)); displayMedia("loadStock.jpg"); writeBlock(mFormat.format(0));