|
|
@@ -211,11 +211,17 @@ public class ExecuteTheRecipe { |
|
|
|
String[] wl = item.split("[,]"); |
|
|
|
if (wl != null && wl.length == 2) { |
|
|
|
String name = wl[0]; |
|
|
|
int val = (int) Math.round((Double.parseDouble(wl[1]) * 10)); |
|
|
|
//int val = (int) Math.round((Double.parseDouble(wl[1]) * 10)); |
|
|
|
int val = (int) Math.round((Double.parseDouble(wl[1]))); |
|
|
|
//int val = Integer.parseInt(wl[1]); |
|
|
|
List<BPA_SILOS> bpa_silos = QueryDB.GetSolisByMaterialName(name); |
|
|
|
if (bpa_silos.size() > 0 && val > 0) { |
|
|
|
BPA_SILOS silos = bpa_silos.get(0); |
|
|
|
if(val>=32767) |
|
|
|
{ |
|
|
|
val=32767; |
|
|
|
ThreadWhile("料仓" + silos.num + "出量克数溢出,已按照最大出量出料!!!"); |
|
|
|
} |
|
|
|
formulation.put(silos, val); |
|
|
|
} |
|
|
|
} |
|
|
@@ -337,7 +343,8 @@ public class ExecuteTheRecipe { |
|
|
|
if (ExecuteCurrentOperation != null) { |
|
|
|
ExecuteCurrentOperation.Run("液体料|" + silos.num); |
|
|
|
} |
|
|
|
ExecuteTheRecipe.showlog("准备写入PLC仓号需求:" + silos.num + "," + val / 10.0); |
|
|
|
//ExecuteTheRecipe.showlog("准备写入PLC仓号需求:" + silos.num + "," + val / 10.0); |
|
|
|
ExecuteTheRecipe.showlog("准备写入PLC仓号需求:" + silos.num + "," + val); |
|
|
|
|
|
|
|
String name = "料仓" + silos.num + "下料完成"; |
|
|
|
ExecuteTheRecipe.WritePLC(name, false, null); |
|
|
@@ -754,7 +761,8 @@ public class ExecuteTheRecipe { |
|
|
|
val = Integer.parseInt(value); |
|
|
|
} else if (key.contains("出料克数")) { |
|
|
|
//1000.0 10000/3 3333 |
|
|
|
cl_value = (int) Math.round((Double.parseDouble(value) * 10)); |
|
|
|
//cl_value = (int) Math.round((Double.parseDouble(value) * 10)); |
|
|
|
cl_value = (int) Math.round((Double.parseDouble(value))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|