| | |
| | | */ |
| | | public synchronized void generateStoreWrkFile(Integer mark) { |
| | | // 根据输送线plc遍历 |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { //遍历输送线 |
| | | // 遍历入库口 |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { // 遍历入库口 |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | if (barcodeThread == null) { //如果扫描仪没有数据,则跳出此次循环,遍历下一个入库口扫描仪 |
| | | continue; |
| | | } |
| | | |
| | |
| | | News.error(""+mark+" - 1"+" - 2"+" - 入库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | continue; |
| | | } |
| | | |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() |
| | | && staDetl.getCanining() != null && staDetl.getCanining().equals("Y")) { |
| | | flag = true; |
| | |
| | | if (!staProtocol.isLoading()){ |
| | | continue; |
| | | } |
| | | |
| | | // 站点条件判断 |
| | | if (staProtocol.isAutoing() |
| | | && staProtocol.isInEnable() |
| | |
| | | // ledThread.errorReset(); |
| | | } |
| | | } else { |
| | | staProtocol.setWorkNo((short)9999); |
| | | staProtocol.setStaNo(emptyInSta.getBackSta().shortValue()); |
| | | staProtocol.setWorkNo((short)9991); |
| | | staProtocol.setStaNo((short)100); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |