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));