|
|
@@ -280,13 +280,14 @@ public class ExecuteTheRecipe { |
|
|
|
*/ |
|
|
|
private static void Write_PLC_Stir(HashMap<String, String> data) { |
|
|
|
try { |
|
|
|
int val=0; |
|
|
|
|
|
|
|
for (HashMap.Entry<String, String> entry : data.entrySet()) { |
|
|
|
String key = entry.getKey(); |
|
|
|
String value = entry.getValue(); |
|
|
|
ToastUtils.info("工序:" + key + "," + value); |
|
|
|
if (key.contains("(秒)")) { |
|
|
|
int val = Integer.parseInt(value); |
|
|
|
val = Integer.parseInt(value); |
|
|
|
Thread.sleep(val * 1000); |
|
|
|
} else { |
|
|
|
int writeValue = GetMXValue(key, value); |
|
|
@@ -306,6 +307,11 @@ public class ExecuteTheRecipe { |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(val>0) |
|
|
|
{ |
|
|
|
Thread.sleep(val * 1000); |
|
|
|
} |
|
|
|
} catch (Exception ex) { |
|
|
|
ToastUtils.error("异常信息:" + ex.getMessage()); |
|
|
|
} |
|
|
@@ -318,12 +324,14 @@ public class ExecuteTheRecipe { |
|
|
|
*/ |
|
|
|
private static void Write_PLC_Location(HashMap<String, String> data) { |
|
|
|
try { |
|
|
|
int val=0; |
|
|
|
|
|
|
|
for (HashMap.Entry<String, String> entry : data.entrySet()) { |
|
|
|
String key = entry.getKey(); |
|
|
|
String value = entry.getValue(); |
|
|
|
ToastUtils.info("工序:" + key + "," + value); |
|
|
|
if (key.contains("(秒)")) { |
|
|
|
int val = Integer.parseInt(value); |
|
|
|
val = Integer.parseInt(value); |
|
|
|
Thread.sleep(val * 1000); |
|
|
|
} else if (key.contains("速度")) { |
|
|
|
int writeValue = GetMXValue(key, value); |
|
|
@@ -350,6 +358,11 @@ public class ExecuteTheRecipe { |
|
|
|
ToastUtils.info("炒锅到达"+value+",继续制作!!!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(val>0) |
|
|
|
{ |
|
|
|
Thread.sleep(val * 1000); |
|
|
|
} |
|
|
|
} catch (Exception ex) { |
|
|
|
ToastUtils.error("异常信息:" + ex.getMessage()); |
|
|
|
} |
|
|
@@ -545,13 +558,13 @@ public class ExecuteTheRecipe { |
|
|
|
*/ |
|
|
|
private static void Write_PLC_Heating(HashMap<String, String> data) { |
|
|
|
try { |
|
|
|
int val=0; |
|
|
|
for (HashMap.Entry<String, String> entry : data.entrySet()) { |
|
|
|
String key = entry.getKey(); |
|
|
|
String value = entry.getValue(); |
|
|
|
ToastUtils.info("工序:" + key + "," + value); |
|
|
|
if (key.contains("(秒)")) { |
|
|
|
int val = Integer.parseInt(value); |
|
|
|
Thread.sleep(val * 1000); |
|
|
|
val = Integer.parseInt(value); |
|
|
|
} else { |
|
|
|
int writeValue = GetMXValue(key, value); |
|
|
|
WritePLC(key, writeValue, new IWriteCallBack() { |
|
|
@@ -570,6 +583,12 @@ public class ExecuteTheRecipe { |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(val>0) |
|
|
|
{ |
|
|
|
Thread.sleep(val * 1000); |
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception ex) { |
|
|
|
ToastUtils.error("异常信息:" + ex.getMessage()); |
|
|
|
} |
|
|
|