| | |
| | | add(1131);add(1132);add(1133);add(1134);add(1135); |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{ |
| | | add(1112);add(1114);add(1122);add(1124);add(1131);add(1135); |
| | | |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> BarcodeList = new ArrayList<Integer>() {{ |
| | | add(1112); add(1122); |
| | | }}; |
| | |
| | | staProtocol.setAutoing(status[0]); // 自动 |
| | | staProtocol.setIdle(status[1]); //空闲 |
| | | staProtocol.setLoading(status[2]); // 有物 |
| | | // staProtocol.setInEnable(status[2]); // 可入 |
| | | // staProtocol.setOutEnable(status[3]);// 可出 |
| | | staProtocol.setIn(status[3]); |
| | | staProtocol.setOut(status[4]); |
| | | staProtocol.setBackErr(status[5]); |
| | | staProtocol.setLeftErr(status[6]); |
| | | staProtocol.setRightErr(status[7]); |
| | |
| | | staProtocol.setWeightErr(status[9]); |
| | | staProtocol.setLow(status[10]); |
| | | staProtocol.setHigh(status[11]); |
| | | |
| | | staProtocol.setInEnable(status[13]); // 可入 |
| | | staProtocol.setOutEnable(status[14]);// 可出 |
| | | |
| | | |
| | | staProtocol.setWorkNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*26+2)); // 工作号 |
| | |
| | | if (null == staProtocol) { |
| | | return; |
| | | } |
| | | ArrayList<Integer> staNos = getStaNo(); |
| | | int index = staNos.indexOf(staProtocol.getSiteId()); |
| | | int index = staNos2.indexOf(staProtocol.getSiteId()); |
| | | OperateResult write = null; |
| | | OperateResult write1 = null; |
| | | //任务下发次数 |
| | | int writeCount = 0; |
| | | do { |
| | | write = siemensS7Net.Write("DB83." + index*8+6, staProtocol.getWorkNo()); // 工作号 |
| | | write = siemensS7Net.Write("DB83." + (index*8+6), staProtocol.getWorkNo()); // 工作号 |
| | | Thread.sleep(200); |
| | | write1 = siemensS7Net.Write("DB83." + (index*8+4), staProtocol.getStaNo()); // 目标站 |
| | | if(write.IsSuccess && write1.IsSuccess){ |