| | |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = "工作档已存在该条码号===>>" + barcode; |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg)); |
| | | // MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg)); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | ledCommand.setBarcode(barcode); |
| | | commands.add(ledCommand); |
| | | if (devp.getId() == 1) { |
| | | if (MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(1, commands))){ |
| | | ledThread.setLedMk(false); |
| | | } |
| | | // if (MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(1, commands))){ |
| | | // ledThread.setLedMk(false); |
| | | // } |
| | | } else { |
| | | if (MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, commands))){ |
| | | ledThread.setLedMk(false); |
| | |
| | | ledCommand.setMatDtos(matDtos); |
| | | commands.add(ledCommand); |
| | | if (devp.getId() == 1) { |
| | | if (MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(1, commands))) { |
| | | ledThread.setLedMk(false); |
| | | } |
| | | // if (MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(1, commands))) { |
| | | // ledThread.setLedMk(false); |
| | | // } |
| | | } else { |
| | | if (MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, commands))){ |
| | | ledThread.setLedMk(false); |
| | |
| | | ledCommand.setMatDtos(matDtos); |
| | | commands.add(ledCommand); |
| | | if (devp.getId() == 1) { |
| | | MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(1, commands)); |
| | | // MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(1, commands)); |
| | | } else { |
| | | MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(3, commands)); |
| | | } |
| | |
| | | } |
| | | |
| | | private void write(List<LedCommand> list) throws Bx5GException { |
| | | try { |
| | | if (!connect()) { |
| | | return; |
| | | } |
| | |
| | | // resetStatus = false; |
| | | } |
| | | close(); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | } |
| | | |
| | | private void reset() throws Bx5GException { |
| | | if (!connect()) { |
| | | return; |
| | | } |
| | | try { |
| | | if (!connect()) { |
| | | return; |
| | | } |
| | | // if (resetStatus) { |
| | | // return; |
| | | // } |
| | | pf = new ProgramBxFile( 0, screen.getProfile()); |
| | | pf.setFrameShow(false); |
| | | // 分别输入X,Y,width,height |
| | | area = new TextCaptionBxArea( 0,0,96,48, screen.getProfile()); |
| | | // 创建一个数据页 |
| | | TextBxPage page = new TextBxPage(); |
| | | pf = new ProgramBxFile(0, screen.getProfile()); |
| | | pf.setFrameShow(false); |
| | | // 分别输入X,Y,width,height |
| | | area = new TextCaptionBxArea(0, 0, 96, 48, screen.getProfile()); |
| | | // 创建一个数据页 |
| | | TextBxPage page = new TextBxPage(); |
| | | |
| | | // List<String> list = null; |
| | | // try { |
| | |
| | | // page.newLine("自动化立体仓库"); |
| | | // page.newLine("西格迈股份有限公司"); |
| | | // } |
| | | page.newLine("捷众智能仓储"); |
| | | page.newLine("捷众智能仓储"); |
| | | |
| | | // 设置字体 |
| | | page.setFont(new Font("宋体",Font.PLAIN,13)); |
| | | // 设置文本颜色 |
| | | page.setForeground(Color.red); |
| | | // 设置显示特技为快速打出 |
| | | page.setDisplayStyle(styles[6]); |
| | | area.clearPages(); |
| | | area.addPage(page); |
| | | pf.addArea(area); |
| | | // 更新节目 |
| | | if (pf.validate() != null) { |
| | | News.info("Led"+" - 3"+" - pf out of range"); |
| | | } else { |
| | | // 设置字体 |
| | | page.setFont(new Font("宋体", Font.PLAIN, 13)); |
| | | // 设置文本颜色 |
| | | page.setForeground(Color.red); |
| | | // 设置显示特技为快速打出 |
| | | page.setDisplayStyle(styles[6]); |
| | | area.clearPages(); |
| | | area.addPage(page); |
| | | pf.addArea(area); |
| | | // 更新节目 |
| | | screen.writeProgram(pf); |
| | | if (pf.validate() != null) { |
| | | News.info("Led" + " - 3" + " - pf out of range"); |
| | | } else { |
| | | // 更新节目 |
| | | screen.writeProgram(pf); |
| | | // resetStatus = true; |
| | | } |
| | | close(); |
| | | } catch (Exception e){ |
| | | |
| | | } |
| | | close(); |
| | | } |
| | | |
| | | private void write7(List<LedCommand> list) { |