ZengTao
2023-09-26 74edb80b30728b2a94389f8bc180229a727f86c8
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -74,6 +74,7 @@
       if(inglassbegin&exist1)
       {
        inglassbegin=false;
        spianMapper.Updatetask(1, 0);//立即结束数据库表中的上片任务
        spianMapper.UpdataAddCageState(1,2);
       }
        // 进片请求为1时
@@ -108,9 +109,9 @@
          }
          // System.out.println(exist);
        }
           if(exist1==false){//下发任务后将任务启动改为0
          if(exist2==true) {
//下发任务后将任务启动改为0
           if(exist1==false){  //进片车忙碌时
          if(exist2==true) {   //任务已启动时
          S7control.getinstance().WriteWord("DB105.12",(short)0);//进片任务启动改为0
          }  
        }
@@ -145,6 +146,7 @@
       if(outglassbegin&outstate)//当任务开始且出片车空闲时
       {
        outglassbegin=false;
        spianMapper.UpdatetaskOut(); //完成上一次出片或者调度任务
        spianMapper.UpdataAddCageState(0,3);
       }