| | |
| | | private Map<Integer, StaProtocol> station = new ConcurrentHashMap<>(); |
| | | private short heartBeatVal = 1; |
| | | public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{ |
| | | add(101);add(102);add(103);add(104);add(105);add(106);add(107);add(108);add(109); |
| | | // add(201);add(202);add(203);add(204); |
| | | // add(301);add(302);add(303);add(304);add(305);add(306); |
| | | add(201);add(202);add(203);add(204);add(205);add(206); |
| | | add(207);add(208);add(209);add(210);add(211);add(212); |
| | | add(213);add(101); |
| | | }}; |
| | | |
| | | /** |
| | |
| | | //复位测试信号 |
| | | case 3: |
| | | StaProtocol staProtocol = (StaProtocol)task.getData(); |
| | | siemensS7Net.Write("DB200." + staProtocol.getSiteId(), staProtocol.getStaNo()); |
| | | siemensS7Net.Write("DB102.0" + staProtocol.getSiteId(), staProtocol.getStaNo()); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | } |
| | | |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB200.0", (short) 96); |
| | | OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB102.0", (short) 96); |
| | | if(result3.IsSuccess) { |
| | | for(int i=0; i<48; i++){ |
| | | startSignal[i] = siemensS7Net.getByteTransform().TransInt16(result.Content, i*2); |
| | | startSignal[i] = siemensS7Net.getByteTransform().TransInt16(result3.Content, i*2); |
| | | } |
| | | } |
| | | // OperateResultExOne<Short> result2 = siemensS7Net.ReadInt16("DB200.0"); |