| | |
| | | public LedThread(Slave slave) { |
| | | this.slave = slave; |
| | | try { |
| | | Bx5GEnv.initial(3000); |
| | | screen = new Bx5GScreenClient("my"); |
| | | // Bx5GEnv.initial(3000); |
| | | // screen = new Bx5GScreenClient("my"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.info("led连接构造器错误 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | |
| | | @Override |
| | | @SuppressWarnings({"InfiniteLoopStatement", "unchecked"}) |
| | | public void run() { |
| | | connect(); |
| | | // connect(); |
| | | close(); |
| | | while (true) { |
| | | try { |
| | |
| | | |
| | | @Override |
| | | public void close() { |
| | | screen.disconnect(); |
| | | // screen.disconnect(); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | } else { |
| | | initCrn(); |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}】{1}堆垛机plc状态信息失败",DateUtils.convert(new Date()), slave.getId())); |
| | | throw new CoolException(MessageFormat.format( "堆垛机plc状态信息失败 ===>> [id:{0}] [ip:{1}] [port:{2}]", slave.getId(), slave.getIp(), slave.getPort())); |
| | | } |