| | |
| | | // 写数据 ID+目标站 |
| | | case 2: |
| | | write((StaProtocol)task.getData()); |
| | | log.error("输送线下发命令:"+((StaProtocol) task.getData()).getWorkNo()+","+((StaProtocol) task.getData()).getStaNo()); |
| | | // log.error("输送线下发命令:"+((StaProtocol) task.getData()).getWorkNo()+","+((StaProtocol) task.getData()).getStaNo()); |
| | | break; |
| | | // 写开门 |
| | | case 3: |
| | |
| | | OperateResultExOne<byte[]> resultErr = siemensS7Net.Read("DB101.1652", (short) ((staNosErrList.size()+1)*4)); // 不连续,多读中间一个 |
| | | if (resultErr.IsSuccess){ |
| | | for (int i = 0;i<staNosErrList.size();i++){ |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i*9+2, 1); |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i*8+2, 1); |
| | | StaProtocol staProtocol = station.get(staNosErrList.get(i)); |
| | | staProtocol.setFrontErr(status[0]); |
| | | staProtocol.setBackErr(status[1]); |