| | |
| | | // |
| | | // } |
| | | |
| | | //RGV台车位置 |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB100.0",(short)4); |
| | | if (result3.IsSuccess) { |
| | | for (int i = 0; i < 2; i++) { |
| | | Integer siteId = i==0 ? 112 : 212; // 站点编号 |
| | | StaProtocol staProtocol = station.get(siteId); |
| | | if (null == staProtocol) { |
| | | staProtocol = new StaProtocol(); |
| | | staProtocol.setSiteId(siteId); |
| | | station.put(siteId, staProtocol); |
| | | } |
| | | staProtocol.setNearbySta(String.valueOf(siemensS7Net.getByteTransform().TransInt16(result3.Content, i*2))); |
| | | // String aa = staProtocol.getNearbySta(); |
| | | // System.out.println(siteId + "===>>" + staProtocol.getNearbySta()); |
| | | } |
| | | } |
| | | // //RGV台车位置 |
| | | // Thread.sleep(200); |
| | | // OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB100.0",(short)4); |
| | | // if (result3.IsSuccess) { |
| | | // for (int i = 0; i < 2; i++) { |
| | | // Integer siteId = i==0 ? 1 : 2; // 站点编号 |
| | | // StaProtocol staProtocol = station.get(siteId); |
| | | // if (null == staProtocol) { |
| | | // staProtocol = new StaProtocol(); |
| | | // staProtocol.setSiteId(siteId); |
| | | // station.put(siteId, staProtocol); |
| | | // } |
| | | // staProtocol.setNearbySta(String.valueOf(siemensS7Net.getByteTransform().TransInt16(result3.Content, i*2))); |
| | | //// String aa = staProtocol.getNearbySta(); |
| | | //// System.out.println(siteId + "===>>" + staProtocol.getNearbySta()); |
| | | // } |
| | | // } |
| | | |
| | | // OperateResultExOne<Short> result2 = siemensS7Net.ReadInt16("DB200.0"); |
| | | // if (result2.IsSuccess) { |