| | |
| | | station.put(i, staProtocol); |
| | | } |
| | | staProtocol.setWorkNo((short) 0); |
| | | staProtocol.setNearbySta((short) 3); |
| | | staProtocol.setNearbySta((short) 1); |
| | | staProtocol.setLoading(false); |
| | | } |
| | | } |
| | |
| | | OperateResultExOne<byte[]> resultRgvLocation = siemensS7Net.Read("DB43.0", (short) 8); |
| | | OperateResultExOne<byte[]> resultRgvload = siemensS7Net.Read("DB192.0", (short) 8); |
| | | if (resultRgvWrkNo.IsSuccess && resultRgvLocation.IsSuccess && resultRgvload.IsSuccess){ |
| | | for (int i = 1;i<5;i++){ |
| | | for (int i = 0;i<4;i++){ |
| | | short wrkNo = siemensS7Net.getByteTransform().TransInt16(resultRgvWrkNo.Content, i * 32); |
| | | short location = siemensS7Net.getByteTransform().TransInt16(resultRgvLocation.Content, i * 2); |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultRgvload.Content, i*2, 1); |
| | | StaProtocol staProtocol = station.get(i); |
| | | StaProtocol staProtocol = station.get((i+1)); |
| | | if (null == staProtocol) { |
| | | staProtocol = new StaProtocol(); |
| | | staProtocol.setSiteId(i); |
| | | station.put(i, staProtocol); |
| | | staProtocol.setSiteId((i+1)); |
| | | station.put((i+1), staProtocol); |
| | | } |
| | | staProtocol.setWorkNo(wrkNo); |
| | | staProtocol.setNearbySta(location); |