| | |
| | | private StaError1 staError1; |
| | | |
| | | public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{ |
| | | add(1101); |
| | | add(1102); |
| | | add(1103); |
| | | add(1104); |
| | | add(1105); |
| | | add(1106); |
| | | add(1107); |
| | | add(1001); |
| | | add(1002); |
| | | add(1003); |
| | | add(1004); |
| | | add(1005); |
| | | add(1006); |
| | | }}; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | public static final ArrayList<Integer> staNosErrList1 = new ArrayList<Integer>() {{ |
| | | add(102); |
| | | add(1006); |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> staNoWeight1 = new ArrayList<Integer>() {{ |
| | | add(101); |
| | | add(102); |
| | | add(103); |
| | | add(104); |
| | | add(105); |
| | | add(1006); |
| | | }}; |
| | | |
| | | |
| | |
| | | staProtocol.setOutEnable(status[3]);// 可出 |
| | | staProtocol.setEmptyMk(status[4]); // 空板信号 |
| | | staProtocol.setFullPlt(status[5]); // 满托盘 |
| | | staProtocol.setHigh(status[6]); // 高库位 |
| | | staProtocol.setLow(status[7]); // 低库位 |
| | | staProtocol.setHigh(status[6]); // 超高库位 |
| | | staProtocol.setLow(status[7]); // 高库位 |
| | | |
| | | status = siemensS7Net.getByteTransform().TransBool(result.Content, i * 8 + 7, 1); |
| | | staProtocol.setMid(status[0]); // 中库位 |
| | | staProtocol.setLower(status[1]); // 低库位 |
| | | if (!staProtocol.isPakMk() && !staProtocol.isLoading()) { |
| | | staProtocol.setPakMk(true); |
| | | } |
| | |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】写入输送线站点数据失败。输送线plc编号={1},站点数据={2}", slave.getId(), JSON.toJSON(staProtocol))); |
| | | News.error("SiemensDevp" + " - 4" + " - 写入输送线站点数据失败。输送线plc编号={},站点数据={}", slave.getId(), JSON.toJSON(staProtocol)); |
| | | } |
| | | // else { |
| | | // //dang 101,201zhan xaifazhiling qingchu tiaoxingsaomaolide shuju shanchu |
| | | // if (staProtocol.getSiteId()==101){ |
| | | // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, 1); |
| | | // log.info("qingchutiaoma,{}",barcodeThread.getBarcode()); |
| | | // barcodeThread.clearBarcode(); |
| | | // } |
| | | // if (staProtocol.getSiteId()==201){ |
| | | // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, 2); |
| | | // log.info("qingchutiaoma,{}",barcodeThread.getBarcode()); |
| | | // barcodeThread.clearBarcode(); |
| | | // } |
| | | // OutputQueue.DEVP.offer(MessageFormat.format("【{0}】 输送线命令下发 [id:{1}] >>>>> {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(staProtocol))); |
| | | // News.info("SiemensDevp"+" - 5"+" - 输送线命令下发 [id:{}] >>>>> 命令下发: {}", slave.getId(), JSON.toJSON(staProtocol)); |
| | | // } |
| | | else { |
| | | //dang 101,201zhan xaifazhiling qingchu tiaoxingsaomaolide shuju shanchu |
| | | if (staProtocol.getSiteId()==101){ |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, 1); |
| | | log.info("qingchutiaoma,{}",barcodeThread.getBarcode()); |
| | | barcodeThread.clearBarcode(); |
| | | } |
| | | if (staProtocol.getSiteId()==201){ |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, 2); |
| | | log.info("qingchutiaoma,{}",barcodeThread.getBarcode()); |
| | | barcodeThread.clearBarcode(); |
| | | } |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】 输送线命令下发 [id:{1}] >>>>> {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(staProtocol))); |
| | | News.info("SiemensDevp"+" - 5"+" - 输送线命令下发 [id:{}] >>>>> 命令下发: {}", slave.getId(), JSON.toJSON(staProtocol)); |
| | | } |
| | | } |
| | | |
| | | // 更新入出库模式 |