| | |
| | | melsecMcNet.ConnectClose(); |
| | | } |
| | | |
| | | public CrnProtocol getCrnProtocol(){ |
| | | if (crnProtocol == null) { |
| | | throw new CoolException(slave.getId() + "号堆垛机连接失败"); |
| | | } |
| | | return this.crnProtocol; |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************/ |
| | | /**************************************** 测试专用 *****************************************/ |
| | |
| | | this.slave = slave; |
| | | try { |
| | | Bx5GEnv.initial(3000); |
| | | screen = new Bx5GScreenClient("MyScreen"); |
| | | screen = new Bx5GScreenClient("my"); |
| | | screen.turnOn(); |
| | | pf = new ProgramBxFile( 0, screen.getProfile()); |
| | | pf.setFrameShow(false); |
| | |
| | | boolean connRes = false; |
| | | try { |
| | | connRes = screen.connect(slave.getIp(),slave.getPort()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } catch (Exception ignore) { |
| | | } |
| | | if (connRes) { |
| | | log.info("led连接成功 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |