This commit is contained in:
2023-02-17 14:05:51 +08:00
parent 6a6f83358a
commit 78aff07101
2 changed files with 4 additions and 6 deletions

View File

@@ -31,10 +31,6 @@ public class ItemProtocol {
this.driver = driver;
}
public int getItem_heartbeat() {
return this.getOpcIntegerValue(item_heartbeat);
}
public int getItem_mode() {
return this.getOpcIntegerValue(item_mode);
}
@@ -75,14 +71,12 @@ public class ItemProtocol {
public static List<ItemDto> getReadableItemDtos() {
ArrayList list = new ArrayList();
list.add(new ItemDto(item_heartbeat, "心跳", "D0000000"));
list.add(new ItemDto(item_mode, "模式", "D0000004"));
list.add(new ItemDto(item_move, "光电信号", "D0000008"));
list.add(new ItemDto(item_action, "取放信号", "D0000012"));
list.add(new ItemDto(item_error, "故障", "D0000016"));
list.add(new ItemDto(item_number, "数量", "D0000020"));
list.add(new ItemDto(item_task, "任务号", "D0000024"));
return list;
}

View File

@@ -106,6 +106,8 @@ public class PaintConveyorDeviceDriver extends AbstractOpcDeviceDriver implement
if (mode != last_mode) {
this.setRequireSucess(false);
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode);
logServer.deviceExecuteLog(this.device_code, "", "", "请求标记:" + requireSucess);
}
if (move != last_move) {
if (move == 0) {
@@ -132,6 +134,7 @@ public class PaintConveyorDeviceDriver extends AbstractOpcDeviceDriver implement
message = "有报警";
//无报警
} else {
System.out.println("进入到else。。。。。");
this.setIsonline(true);
this.setIserror(false);
JSONObject jo = new JSONObject();
@@ -154,6 +157,7 @@ public class PaintConveyorDeviceDriver extends AbstractOpcDeviceDriver implement
}
case 6:
//下料位满拖申请
logServer.deviceExecuteLog(this.device_code, "", "", "下料位满拖申请,此时:move == " + move + ",请求标记为:" + requireSucess);
if (move == 1 && !requireSucess) {
//向LMS发送请求发送起点
jo.put("type","7");