Browse Source

修改

炒锅机器人_一拖多
liup 3 months ago
parent
commit
bf93ca11cb
1 changed files with 18 additions and 23 deletions
  1. +18
    -23
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java

+ 18
- 23
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -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){

}


Loading…
Cancel
Save