| | |
| | | add(144);add(145);add(146);add(147); |
| | | add(148);add(149);add(150);add(151); |
| | | add(152);add(153); |
| | | add(170); |
| | | add(171); |
| | | }}; |
| | | public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{ |
| | | add(200);add(201);add(202);add(203); |
| | |
| | | if (result.IsSuccess) { |
| | | for (int i = 0; i < staNoSize; i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |
| | | if (siteId==119){ |
| | | StaProtocol staProtocol = station.get(siteId); |
| | | if (null == staProtocol) { |
| | | staProtocol = new StaProtocol(); |
| | | staProtocol.setSiteId(siteId); |
| | | station.put(siteId, staProtocol); |
| | | } |
| | | staProtocol.setWorkNo(0); // 工作号 |
| | | |
| | | staProtocol.setStaNo(0); // 目标站 |
| | | |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(result.Content, i*8 + 6, 2); |
| | | staProtocol.setAutoing(false); // 自动 |
| | | staProtocol.setLoading(status[1]); // 有物 |
| | | staProtocol.setInEnable(status[2]); // 可入 |
| | | staProtocol.setOutEnable(status[3]);// 可出 |
| | | staProtocol.setEmptyMk(status[4]); // 空板信号 |
| | | staProtocol.setFullPlt(status[5]); // 满托盘 |
| | | staProtocol.setHigh(status[6]); // 高库位 |
| | | staProtocol.setLow(status[7]); // 低库位 |
| | | continue; |
| | | } |
| | | StaProtocol staProtocol = station.get(siteId); |
| | | if (null == staProtocol) { |
| | | staProtocol = new StaProtocol(); |
| | |
| | | staProtocol.setFullPlt(status[5]); // 满托盘 |
| | | staProtocol.setHigh(status[6]); // 高库位 |
| | | staProtocol.setLow(status[7]); // 低库位 |
| | | if (siteId==118){ |
| | | staProtocol.setAutoing(false); // 自动 |
| | | |
| | | } |
| | | if (!staProtocol.isPakMk() && !staProtocol.isLoading()) { |
| | | staProtocol.setPakMk(true); |
| | | } |
| | |
| | | staProtocol.setSiteId(siteId); |
| | | station.put(siteId, staProtocol); |
| | | } |
| | | short loadingSuper = siemensS7Net.getByteTransform().TransInt16(result.Content, i * 2); |
| | | short loadingSuper = siemensS7Net.getByteTransform().TransInt16(resultStaSuper.Content, i * 2); |
| | | staProtocol.setLoadingSuper(loadingSuper==0); // 目标站 |
| | | } |
| | | } |
| | |
| | | case 118: |
| | | index=0; |
| | | break; |
| | | case 119: |
| | | case 171: |
| | | index=1; |
| | | break; |
| | | case 120: |
| | |
| | | case 118: |
| | | index=0; |
| | | break; |
| | | case 119: |
| | | case 171: |
| | | index=1; |
| | | break; |
| | | case 120: |