|
|
@@ -1330,32 +1330,27 @@ public class ExecuteTheRecipe { |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线启动",false,null); |
|
|
|
|
|
|
|
ThreadManager.get().execute(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try{ |
|
|
|
if(ModbusCenter.getListingValue("输送线出料菜盆检测") instanceof Boolean){ |
|
|
|
boolean isStart = (boolean) ModbusCenter.getListingValue("输送线出料菜盆检测"); |
|
|
|
long a = System.currentTimeMillis(); |
|
|
|
Thread.sleep(15000); |
|
|
|
while (!isStart) { |
|
|
|
Thread.sleep(1000); |
|
|
|
if ((System.currentTimeMillis() - a) > 1000 * 20) { |
|
|
|
break; |
|
|
|
} |
|
|
|
isStart = (boolean) ModbusCenter.getListingValue("输送线出料菜盆检测"); |
|
|
|
if(isStart){ |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
try{ |
|
|
|
if(ModbusCenter.getListingValue("输送线出料菜盆检测") instanceof Boolean){ |
|
|
|
boolean isStart = (boolean) ModbusCenter.getListingValue("输送线出料菜盆检测"); |
|
|
|
long a = System.currentTimeMillis(); |
|
|
|
Thread.sleep(15000); |
|
|
|
while (!isStart) { |
|
|
|
Thread.sleep(1000); |
|
|
|
if ((System.currentTimeMillis() - a) > 1000 * 20) { |
|
|
|
break; |
|
|
|
} |
|
|
|
isStart = (boolean) ModbusCenter.getListingValue("输送线出料菜盆检测"); |
|
|
|
if(isStart){ |
|
|
|
break; |
|
|
|
} |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",false,null); |
|
|
|
}catch (Exception e){ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",true,null); |
|
|
|
Thread.sleep(500); |
|
|
|
ModbusCenter.rackWritePlc("输送线停止",false,null); |
|
|
|
}catch (Exception e){ |
|
|
|
} |
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
} |
|
|
|