| | |
| | | add(1001); |
| | | add(1002); |
| | | add(1003); |
| | | add(1004); |
| | | add(1005); |
| | | add(1006); |
| | | add(1007); |
| | | add(1008); |
| | | add(1009); |
| | | add(1010); |
| | | add(1011); |
| | | add(1012); |
| | | add(1013); |
| | | add(1014); |
| | | add(1015); |
| | | add(1016); |
| | | add(1017); |
| | | add(1018); |
| | | add(1019); |
| | | add(1020); |
| | | |
| | | |
| | | }}; |
| | | public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{ |
| | | add(2001); |
| | | add(2002); |
| | | add(2003); |
| | | add(2004); |
| | | add(2005); |
| | | add(2006); |
| | | add(2007); |
| | | add(2008); |
| | | add(2009); |
| | | add(2010); |
| | | add(2011); |
| | | add(2012); |
| | | add(2013); |
| | | add(2014); |
| | | add(2015); |
| | | add(2016); |
| | | add(2017); |
| | | add(2018); |
| | | add(2019); |
| | | |
| | | }}; |
| | | public static final ArrayList<Integer> staNos3 = new ArrayList<Integer>() {{ |
| | | add(1051); |
| | | add(1052); |
| | | add(1053); |
| | | add(1054); |
| | | add(1055); |
| | | add(1056); |
| | | add(1057); |
| | | add(1058); |
| | | }}; |
| | | public static final ArrayList<Integer> staNos4 = new ArrayList<Integer>() {{ |
| | | add(2051); |
| | | add(2052); |
| | | add(2053); |
| | | add(2054); |
| | | add(2055); |
| | | add(2056); |
| | | add(2057); |
| | | add(2058); |
| | | |
| | | }}; |
| | | |
| | | /** |
| | |
| | | switch (slave.getId()) { |
| | | case 1: |
| | | return staNos1; |
| | | case 2: |
| | | return staNos2; |
| | | case 3: |
| | | return staNos3; |
| | | case 4: |
| | | return staNos4; |
| | | default: |
| | | throw new CoolException("服务器异常"); |
| | | } |
| | |
| | | staProtocol.setFullPlt(status[5]); // 满托盘 |
| | | staProtocol.setHigh(status[6]); // 高库位 |
| | | staProtocol.setLow(status[7]); // 低库位 |
| | | staProtocol.setCentre(status[8]); // 中库位 |
| | | // staProtocol.setCentre(status[8]); // 中库位 |
| | | |
| | | if (!staProtocol.isPakMk() && !staProtocol.isLoading()) { |
| | | staProtocol.setPakMk(true); |
| | |
| | | int sta = 0; |
| | | switch (slave.getId()) { |
| | | case 1: |
| | | sta = 1014; |
| | | break; |
| | | case 2: |
| | | sta = 2007; |
| | | break; |
| | | case 3: |
| | | sta = 1052; |
| | | break; |
| | | case 4: |
| | | sta = 2056; |
| | | sta = 1002; |
| | | break; |
| | | } |
| | | StaProtocol staProtocol1 = station.get(sta); |
| | | boolean[] status1 = siemensS7Net.getByteTransform().TransBool(resultErr1.Content, 0, 1); |
| | | staProtocol1.setFrontErr(status1[0]); |
| | | staProtocol1.setBackErr(status1[1]); |
| | | staProtocol1.setHighErr(status1[2]); |
| | | staProtocol1.setLeftErr(status1[3]); |
| | | staProtocol1.setRightErr(status1[4]); |
| | | staProtocol1.setWeightErr(status1[5]); |
| | | staProtocol1.setBarcodeErr(status1[6]); |
| | | staProtocol1.setFrontErr(status1[0]); // 前超 |
| | | staProtocol1.setBackErr(status1[1]); // 后超 |
| | | staProtocol1.setHighErr(status1[2]); // 高超 |
| | | staProtocol1.setLeftErr(status1[3]); // 左超 |
| | | staProtocol1.setRightErr(status1[4]); // 右超 |
| | | staProtocol1.setWeightErr(status1[5]); // 超重 |
| | | staProtocol1.setBarcodeErr(status1[6]); // 扫码失败 |
| | | } |
| | | |
| | | |