| | |
| | | private void taskIssued() { |
| | | while (true) { |
| | | try { |
| | | if(!connectRgv){ |
| | | try { |
| | | Thread.sleep(1000L); |
| | | } catch (Exception e){ |
| | | |
| | | } |
| | | continue; |
| | | } |
| | | int step = 1; |
| | | Task task = MessageQueue.poll(SlaveType.Rgv, slave.getId()); |
| | | if (task != null) { |
| | |
| | | private void readStatusRgv() { |
| | | while (true) { |
| | | try { |
| | | if(!connectRgv){ |
| | | try { |
| | | Thread.sleep(1000L); |
| | | } catch (Exception e){ |
| | | |
| | | } |
| | | continue; |
| | | } |
| | | Thread.sleep(40); |
| | | readStatus(); |
| | | |
| | |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB100.0", (short) 20); |
| | | OperateResultExOne<byte[]> resultV = siemensNet.Read("DB20.16", (short) 2); |
| | | OperateResultExOne<byte[]> resultE = siemensNet.Read("DB20.26", (short) 2); |
| | | if (result.IsSuccess) { |
| | | if (result.IsSuccess && resultV.IsSuccess && resultE.IsSuccess) { |
| | | if (null == rgvProtocol) { |
| | | rgvProtocol = new RgvProtocol(); |
| | | rgvProtocol.setRgvNo(slave.getId()); |