fix: 添加堆垛机,下发信号日志

This commit is contained in:
yanps
2025-02-05 16:13:31 +08:00
parent bd646840ea
commit ae085f825a
7 changed files with 40 additions and 34 deletions

View File

@@ -184,6 +184,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (ObjectUtil.isEmpty(inst)) {
log.info("未找到指令号{}对应的指令", ikey);
} else {
if("1".equals(inst.getInstruction_type()) || "2".equals(inst.getInstruction_type()) || "3".equals(inst.getInstruction_type())) {
String agvcar = inst.getCarno();
Device agvDevice = deviceAppService.findDeviceByCode(agvcar);
if (agvDevice != null) {
@@ -202,6 +203,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
}
}
}
//请求删除任务
//(需要WCS反馈)
else if (phase == 0x30) {

View File

@@ -11,7 +11,7 @@ import java.util.LinkedList;
import java.util.List;
/**
* 油漆线
* 纸管库
*/
@Service
public class PaperTubeConveyor2Defination implements OpcDeviceDriverDefination {

View File

@@ -320,7 +320,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
break;
case 3:
log.info("运行中");
log.info(this.device_code + ",运行中");
break;
case 4:
//申请出货

View File

@@ -40,7 +40,7 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
Group group;
try {
group = opcServerService.getServer(this.getOpcServer());
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
group = opcServerService.getServer(this.getOpcServer());
}
@@ -125,7 +125,7 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
}
if (i >= 2) {
log.info("写入次数超过3次而失败");
log.info(itemValues + "写入次数超过3次而失败");
throw new RuntimeException("写入次数超过3次而失败");
}
++i;

View File

@@ -410,6 +410,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
}
} catch (Exception e) {
this.iserror = true;
log.error("空指针:{}", e);
String extracted = DeviceErrorUtil.extracted(e);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
@@ -729,7 +730,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
String body = httpResponse.body();
jsonObject = JSONObject.parseObject(body);
}
log.info("wms反馈结果:{}",jsonObject);
log.info("wms反馈结果:{}", jsonObject);
message = "木箱、子卷入库申请入库任务,返回参数:" + jsonObject;
LuceneLogDto logDto3 = LuceneLogDto.builder()
.device_code(device_code)
@@ -749,7 +750,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
map.put("code", "to_command");
map.put("value", mode);
list1.add(map);
log.error("下发电气--------:{}",map);
log.error("下发电气--------:{}", map);
this.writing(list1);
requireSucess = true;
} else {
@@ -799,7 +800,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
String body = httpResponse.body();
jsonObject = JSONObject.parseObject(body);
}
log.info("wms反馈结果:{}",jsonObject);
log.info("wms反馈结果:{}", jsonObject);
message = "木箱、子卷入库申请入库任务,返回参数:" + jsonObject;
LuceneLogDto logDto3 = LuceneLogDto.builder()
.device_code(device_code)
@@ -819,7 +820,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
map.put("code", "to_command");
map.put("value", mode);
list1.add(map);
log.error("下发电气--------:{}",map);
log.error("下发电气--------:{}", map);
this.writing(list1);
requireSucess = true;
} else {

View File

@@ -229,6 +229,7 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
} catch (Exception e) {
this.iserror = true;
log.error("空指针:{}",e);
String extracted = DeviceErrorUtil.extracted(e);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)

View File

@@ -1046,7 +1046,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
"有货或未联机,无法下发指令!指令号:" + inst.getInstruction_code();
return false;
}
log.info(next_device_code + "设备mode:" + beltConveyorDeviceDriver.getMode() + ",move:" + beltConveyorDeviceDriver.getMove());
}
List list = new ArrayList();
pakageCommand(list, inst.getInstruction_code());
packagePlcCoordinate(startDevice, list, "1");