| | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("rgv连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | log.error("jar连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | initSte(); |
| | | // e.printStackTrace(); |
| | | } |
| | |
| | | readStatus(); |
| | | |
| | | } catch (Exception e) { |
| | | log.error("RGV数据读取线程异常!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | log.error("JAR数据读取线程异常!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | |
| | | initSte(); |
| | | // e.printStackTrace(); |
| | |
| | | * 初始化堆垛机状态 |
| | | */ |
| | | private void initSte() { |
| | | if (null == jarProtocol) { |
| | | jarProtocol = new JarProtocol(); |
| | | try{ |
| | | if (null == jarProtocol) { |
| | | jarProtocol = new JarProtocol(); |
| | | } |
| | | jarProtocol.setJarNo(slave.getId()); |
| | | jarProtocol.setMode( 0); |
| | | jarProtocol.setStatus(JarStatusType.OFF_LINE); |
| | | jarProtocol.setJarErr(0); |
| | | } catch (Exception e){ |
| | | log.error("JAR初始化异常!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } |
| | | jarProtocol.setJarNo(slave.getId()); |
| | | jarProtocol.setMode( 0); |
| | | jarProtocol.setStatus(JarStatusType.OFF_LINE); |
| | | jarProtocol.setJarErr(0); |
| | | } |
| | | |
| | | @Override |
| | | public boolean connect() { |
| | | boolean result = false; |
| | | // 不能有 槽号 和 机架号 |
| | | siemensS7Net = new SiemensS7Net(SiemensPLCS.S200Smart, slave.getIp()); |
| | | |
| | | try{ |
| | | // 不能有 槽号 和 机架号 |
| | | siemensS7Net = new SiemensS7Net(SiemensPLCS.S200Smart, slave.getIp()); |
| | | // siemensS7Net.setRack(slave.getRack().byteValue()); |
| | | // siemensS7Net.setSlot(slave.getSlot().byteValue()); |
| | | OperateResult connect = siemensS7Net.ConnectServer(); |
| | | if(connect.IsSuccess){ |
| | | result = true; |
| | | OutputQueue.STE.offer(MessageFormat.format( "【{0}】硫化罐plc连接成功 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | News.info("硫化罐plc连接成功 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } else { |
| | | OutputQueue.STE.offer(MessageFormat.format("【{0}】硫化罐plc连接失败!!! ===>> [id:{1}] [ip:{2}] [port:{3}] ", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | News.error("硫化罐plc连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | initSte(); |
| | | OperateResult connect = siemensS7Net.ConnectServer(); |
| | | if(connect.IsSuccess){ |
| | | result = true; |
| | | OutputQueue.STE.offer(MessageFormat.format( "【{0}】硫化罐plc连接成功 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | News.info("硫化罐plc连接成功 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } else { |
| | | OutputQueue.STE.offer(MessageFormat.format("【{0}】硫化罐plc连接失败!!! ===>> [id:{1}] [ip:{2}] [port:{3}] ", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | News.error("硫化罐plc连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | initSte(); |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("硫化罐plc连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } |
| | | // melsecMcNet.ConnectClose(); |
| | | return result; |
| | | // melsecMcNet.ConnectClose(); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | log.error(e.getMessage()); |
| | | log.error("硫化罐plc状态信息失败"+e.getMessage()); |
| | | OutputQueue.STE.offer(MessageFormat.format("【{0}】读取硫化罐plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | // News.error("读取穿梭车plc状态信息失败 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | initSte(); |
| | |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc22", |
| | | "text": "#22", |
| | | "top": 278, |
| | | "left": 1640, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc23", |
| | | "text": "#23", |
| | | "top": 333, |
| | | "left": 1640, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc24", |
| | | "text": "#24", |
| | | "top": 355, |
| | | "left": 1640, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc25", |
| | | "text": "#25", |
| | | "top": 406, |
| | | "left": 1640, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc26", |
| | | "text": "#26", |
| | | "top": 462, |
| | | "left": 1640, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc27", |
| | | "text": "#27", |
| | | "top": 484, |
| | | "left": 1640, |
| | | "width": 41, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc6H", |
| | | "text": "#6号堆垛机", |
| | | "top": 307, |
| | | "left": 1700, |
| | | "width": 100, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc7H", |
| | | "text": "#7号堆垛机", |
| | | "top": 435, |
| | | "left": 1700, |
| | | "width": 100, |
| | | "height": 23 |
| | | }], |
| | | "crns": [{ |
| | |
| | | }], |
| | | "rackDescs": [{ |
| | | "type": "rackDescs", |
| | | "id": "lb_desc16", |
| | | "id": "lb_desc1", |
| | | "text": "#1", |
| | | "top": 661, |
| | | "left": 470, |
| | | "width": 30, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc1", |
| | | "id": "lb_desc2", |
| | | "text": "#2", |
| | | "top": 639, |
| | | "left": 470, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc3", |
| | | "text": "#3", |
| | | "top": 591, |
| | | "left": 470, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc4", |
| | | "text": "#4", |
| | | "top": 569, |
| | | "left": 470, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc5", |
| | | "text": "#5", |
| | | "top": 547, |
| | | "left": 470, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc6", |
| | | "text": "#6", |
| | | "top": 525, |
| | | "left": 470, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc7", |
| | | "text": "#7", |
| | | "top": 477, |
| | | "left": 470, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc8", |
| | | "text": "#8", |
| | | "top": 455, |
| | | "left": 470, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc9", |
| | | "text": "#9", |
| | | "top": 432, |
| | | "left": 300, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc10", |
| | | "text": "#10", |
| | | "top": 384, |
| | | "left": 300, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc11", |
| | | "text": "#11", |
| | | "top": 362, |
| | | "left": 300, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc12", |
| | | "text": "#12", |
| | | "top": 314, |
| | | "left": 300, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc13", |
| | | "text": "#13", |
| | | "top": 292, |
| | | "left": 300, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc14", |
| | | "text": "#14", |
| | | "top": 244, |
| | | "left": 300, |
| | | "width": 41, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc1H", |
| | | "text": "#1号堆垛机", |
| | | "top": 615, |
| | | "left": 350, |
| | | "width": 100, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc2H", |
| | | "text": "#2号堆垛机", |
| | | "top": 501, |
| | | "left": 350, |
| | | "width": 100, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc3H", |
| | | "text": "#3号堆垛机", |
| | | "top": 408, |
| | | "left": 350, |
| | | "width": 100, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc4H", |
| | | "text": "#4号堆垛机", |
| | | "top": 338, |
| | | "left": 350, |
| | | "width": 100, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc5H", |
| | | "text": "#5号堆垛机", |
| | | "top": 268, |
| | | "left": 350, |
| | | "width": 100, |
| | | "height": 23 |
| | | }], |
| | | "crns": [{ |
| | | "type": "crane", |
| | |
| | | "text": "636", |
| | | "top": 650, |
| | | "left": 480, |
| | | "width": 79, |
| | | "width": 69, |
| | | "height": 59 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-635", |
| | | "text": "635", |
| | | "top": 650, |
| | | "left": 560, |
| | | "width": 79, |
| | | "left": 550, |
| | | "width": 69, |
| | | "height": 59 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-634", |
| | | "text": "634", |
| | | "top": 650, |
| | | "left": 640, |
| | | "width": 79, |
| | | "left": 620, |
| | | "width": 59, |
| | | "height": 59 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-633", |
| | | "text": "633", |
| | | "top": 650, |
| | | "left": 720, |
| | | "width": 69, |
| | | "left": 680, |
| | | "width": 59, |
| | | "height": 59 |
| | | }, { |
| | | "type": "stn", |
| | |
| | | "id": "site-627", |
| | | "text": "627", |
| | | "top": 590, |
| | | "left": 730, |
| | | "left": 680, |
| | | "width": 49, |
| | | "height": 59 |
| | | }, { |
| | |
| | | "id": "site-628", |
| | | "text": "628", |
| | | "top": 590, |
| | | "left": 980, |
| | | "left": 930, |
| | | "width": 49, |
| | | "height": 59 |
| | | }, { |
| | |
| | | "id": "site-632", |
| | | "text": "632", |
| | | "top": 650, |
| | | "left": 790, |
| | | "left": 740, |
| | | "width": 59, |
| | | "height": 59 |
| | | }, { |
| | |
| | | "id": "site-631", |
| | | "text": "631", |
| | | "top": 650, |
| | | "left": 850, |
| | | "left": 800, |
| | | "width": 59, |
| | | "height": 59 |
| | | }, { |
| | |
| | | "id": "site-630", |
| | | "text": "630", |
| | | "top": 650, |
| | | "left": 910, |
| | | "left": 860, |
| | | "width": 59, |
| | | "height": 59 |
| | | }, { |
| | |
| | | "id": "site-629", |
| | | "text": "629", |
| | | "top": 650, |
| | | "left": 970, |
| | | "left": 920, |
| | | "width": 59, |
| | | "height": 59 |
| | | }] |
| | |
| | | <!-- <span> </span>--> |
| | | <input id="crn6" disabled="disabled"> |
| | | </div> |
| | | <div class="crn-command-item"> |
| | | <label>7#</label> |
| | | <button id="demoBtn-7" class="demoBtn" onclick="demoSwitch(this.id)"> - </button> |
| | | <!-- <span> </span>--> |
| | | <input id="crn7" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | <!-- 堆垛机状态位信息 --> |
| | | <div class="crn-state"> |
| | |
| | | <label><input type="radio" name="crnSelect" value="4"> 4号堆垛机</label> |
| | | <label><input type="radio" name="crnSelect" value="5"> 5号堆垛机</label> |
| | | <label><input type="radio" name="crnSelect" value="6"> 6号堆垛机</label> |
| | | <label><input type="radio" name="crnSelect" value="7"> 7号堆垛机</label> |
| | | </div> |
| | | </div> |
| | | <!-- 源站/源库位 选择 --> |
| | |
| | | <li><a id="console23" onclick="nav(this.id)" class="nav-select" href="#">二楼三区</a></li> |
| | | <li><a id="pipeline" onclick="nav(this.id)" class="nav-unselect" href="#">输送设备</a></li> |
| | | <li><a id="crn" onclick="nav(this.id)" class="nav-unselect" href="#">堆垛机</a></li> |
| | | <li><a id="rgv" onclick="nav(this.id)" class="nav-unselect" href="#">RGV</a></li> |
| | | <li><a id="ste" onclick="nav(this.id)" class="nav-unselect" href="#">穿梭车</a></li> |
| | | <li><a id="rgv" onclick="nav(this.id)" class="nav-unselect" href="#">硫化RGV</a></li> |
| | | <li><a id="ste" onclick="nav(this.id)" class="nav-unselect" href="#">硫化穿梭车</a></li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | |
| | | <button class="demoBtn pos-btn">数据维护</button> |
| | | <!-- <button id="mode-2" class="demoBtn mode-btn" > - </button>--> |
| | | </div> |
| | | <div data-steNo="3" class="ste-command-item" style="margin-top: 30px"> |
| | | <label>3#</label> |
| | | <button class="demoBtn pos-btn">数据维护</button> |
| | | <!-- <button id="mode-3" class="demoBtn mode-btn" > - </button>--> |
| | | </div> |
| | | <!-- <div data-steNo="3" class="ste-command-item" style="margin-top: 30px">--> |
| | | <!-- <label>3#</label>--> |
| | | <!-- <button class="demoBtn pos-btn">数据维护</button>--> |
| | | <!-- <!– <button id="mode-3" class="demoBtn mode-btn" > - </button>–>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | <!-- 堆垛机状态位信息 --> |
| | | <div class="ste-state"> |
| | |
| | | <div class="select-container"> |
| | | <label><input type="radio" name="steSelect" value="1" checked> 1号穿梭车</label> |
| | | <label><input type="radio" name="steSelect" value="2"> 2号穿梭车</label> |
| | | <label><input type="radio" name="steSelect" value="3"> 3号穿梭车</label> |
| | | </div> |
| | | </div> |
| | | </div> |