| | |
| | | // 根据输送线plc遍历 |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历入库口 |
| | | for (DevpSlave.InSta inSta : devp.getInSta()) { |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | // 获取条码 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | String barcode = barcodeThread.getBarcode(); |
| | |
| | | } |
| | | |
| | | // 更新站点信息 且 下发plc命令 |
| | | staProtocol |
| | | barcodeThread.setBarcode(""); |
| | | staProtocol.setWorkNO(workNo); |
| | | staProtocol.setStaNo(startupDto.getStaNo()); |
| | | staProtocol.setPakMk(false); |
| | | staProtocol.setInreq1(false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task<>(4, staProtocol)); |
| | | if (!result) { |
| | | throw new CoolException("更新plc站点信息失败"); |
| | |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | /** |
| | | * 拣料、并板、盘点再入库 |
| | | */ |
| | | public void stnToCrnStnPick(){ |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历拣料入库口 |
| | | for (DevpSlave.Sta pickSta : devp.getPickSta()) { |
| | | // 获取拣料入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo()); |
| | | |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInreq1() |
| | | && staProtocol.getWorkNO() > 0){ |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |