This commit is contained in:
USER-20220102CG\noblelift
2023-01-29 10:16:40 +08:00
parent 8494e7ccbd
commit 9e2afda6c7
8 changed files with 52 additions and 26 deletions

View File

@@ -316,6 +316,12 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
jo.put("hasGoods", true);
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("temperature", temperature);
jo.put("finish", finish);
jo.put("countdown_house", countdown_house);
jo.put("countdown_min", countdown_min);
jo.put("countdown_sec", countdown_sec);
jo.put("door", door);
jo.put("mode", mode);
jo.put("move", move);
jo.put("action", action);

View File

@@ -144,16 +144,20 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
error = this.itemProtocol.getError();
task = this.itemProtocol.getTask();
if (mode != last_mode) {
requireSucess = false;
requireApplyLabelingSuccess = false;
requireApplyLaStrangulationSuccess =false;
requireEmptyInSuccess =false;
requireEmptyOutSuccess =false;
if( mode == 2){
requireSucess = false;
requireApplyLabelingSuccess = false;
requireApplyLaStrangulationSuccess =false;
requireEmptyInSuccess =false;
requireEmptyOutSuccess =false;
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode +"复位请求标记");
}
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode);
}
if (move != last_move) {
if(move == 0 ){
if(move == 0 && mode == 2 ){
this.clearWrite();
}
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
@@ -273,7 +277,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
break;
case 8:
//申请AGV任务
if (move == 0 && !requireSucess) {
if (move == 1 && !requireSucess) {
applyAgvTask();
}
break;

View File

@@ -184,6 +184,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
plcbarcode_length = this.itemProtocol.getBarCode_length();
if (mode != last_mode) {
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode +"复位请求标记");
this.setRequireSucess(false);
}
if (move != last_move) {
@@ -235,7 +236,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
case 2:
//申请任务
String newBarcode = null;
if(!StrUtil.equals(plcbarcode,"0")){
if(plcbarcode_length != 0){
newBarcode = plcbarcode;
} else {
if(!StrUtil.isEmpty(barcode())){
@@ -246,10 +247,10 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
}
if (move > 0 && !StrUtil.isEmpty(newBarcode) && !requireSucess) {
instruction_require(newBarcode);
instruction_require(newBarcode.trim());
}
if (move > 0 && !StrUtil.isEmpty(newBarcode) && !applySucess) {
instruction_apply(newBarcode);
instruction_apply(newBarcode.trim());
}
}
switch (flag) {
@@ -727,4 +728,5 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
public void setDeviceStatus(JSONObject data) {
}
}

View File

@@ -51,6 +51,7 @@ public class OpcUtl {
if (!is_success) {
// throw new BusinessException(message.toString());
System.out.println("下发信号失败:"+message.toString());
log.info("下发信号失败:"+message.toString());
}
} catch (JIException arg7) {
// throw new BusinessException(arg7);