| | |
| | | return statusList; |
| | | } |
| | | |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB100.0", (short) (statusList.size() * 10)); |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB100.10", (short) (statusList.size() * 10)); |
| | | if (result.IsSuccess) { |
| | | byte[] taskBufferRaw = readTaskBufferRaw(); |
| | | for (int i = 0; i < statusList.size(); i++) { |
| | |
| | | boolean[] status1 = siemensNet.getByteTransform().TransBool(result4.Content, i * 2, 1); |
| | | boolean[] status2 = siemensNet.getByteTransform().TransBool(result4.Content, i * 2 + 1, 1); |
| | | |
| | | if(status1[0]){ |
| | | if(status1[0] || status2[0]){ |
| | | sb.append("左超宽报警;"); |
| | | } |
| | | if(status1[1]) { |
| | | if(status1[1] || status2[1]) { |
| | | sb.append("右超宽报警;"); |
| | | } |
| | | if(status1[2]) { |
| | | if(status1[2] || status2[2]) { |
| | | sb.append("前超长报警;"); |
| | | } |
| | | if(status1[3]) { |
| | | if(status1[3] || status2[3]) { |
| | | sb.append("后超长报警;"); |
| | | } |
| | | if(status1[4]) { |
| | | if(status1[4] || status2[4]) { |
| | | sb.append("超高报警;"); |
| | | } |
| | | if(status1[5]) { |
| | | if(status1[5] || status2[5]) { |
| | | sb.append("有货报警,空托入库时检测托盘上有无货物;"); |
| | | } |
| | | if(status1[6]) { |
| | | if(status1[6] || status2[6]) { |
| | | sb.append("重量异常报警;"); |
| | | } |
| | | if(status1[7]) { |
| | | if(status1[7] || status2[7]) { |
| | | sb.append("扫码异常;"); |
| | | } |
| | | |
| | | applyAlarmMessage(barcodeEntity, sb.toString()); |
| | | } |
| | | } |
| | |
| | | return commandResponse; |
| | | } |
| | | |
| | | int taskBaseOffset = stationIdx * TASK_AREA_LENGTH + (useTaskWriteIdx * TASK_AREA_SLOT_SIZE); |
| | | int taskBaseOffset = (stationIdx + 1) * TASK_AREA_LENGTH + (useTaskWriteIdx * TASK_AREA_SLOT_SIZE); |
| | | |
| | | OperateResult writeTaskNo = siemensNet.Write("DB13." + taskBaseOffset, command.getTaskNo()); |
| | | if (!writeTaskNo.IsSuccess) { |
| | |
| | | return commandResponse; |
| | | } |
| | | |
| | | int slotBaseOffset = stationIdx * TASK_AREA_LENGTH + slotIdx * TASK_AREA_SLOT_SIZE; |
| | | int slotBaseOffset = (stationIdx + 1) * TASK_AREA_LENGTH + slotIdx * TASK_AREA_SLOT_SIZE; |
| | | CommandResponse clearTaskNo = sendOriginCommand("DB13." + slotBaseOffset, new short[]{0, 0}); |
| | | if (clearTaskNo == null || !Boolean.TRUE.equals(clearTaskNo.getResult())) { |
| | | commandResponse.setMessage(clearTaskNo == null ? "清空任务号失败" : clearTaskNo.getMessage()); |