| | |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历入库口 |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | // inSta.setStaNo(102); |
| | | inSta.setStaNo(102); |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | |
| | | try { |
| | | |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | | // locTypeDto.setLocType1((short)1); |
| | | locTypeDto.setLocType1((short)1); |
| | | SearchLocParam param = new SearchLocParam(); |
| | | param.setBarcode(barcode); |
| | | param.setIoType(1); |
| | |
| | | devpThread.startSignal[i] = newSingle; |
| | | } |
| | | }else if (devpThread.startSignal[i] == 8){ |
| | | |
| | | //复位PLC信号,借用输送站点实体类 |
| | | StaProtocol staProtocol = new StaProtocol(); |
| | | staProtocol.setSiteId(i*2);//寄存器地址 |
| | | staProtocol.setStaNo(newSingle);//修改PLC寄存器地址值,8==>0 |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); |
| | | if(!result){ |
| | | // log.error("更新库位紧急出库信号失败===>>[channel:{},locNo:{},barcode:{}]", i+1, locMast.getLocNo(), locMast.getBarcode()); |
| | | // throw new CoolException("更新测试信号失败===>>" + i); |
| | | } else { |
| | | devpThread.startSignal[i] = newSingle; |
| | | } |
| | | } |
| | | |
| | | } |