更新
This commit is contained in:
@@ -13,7 +13,7 @@ public class ItemProtocol {
|
||||
|
||||
public static String item_heartbeat = "heartbeat";
|
||||
public static String item_mode = "mode";
|
||||
public static String item_move = "move";
|
||||
//public static String item_move = "move";
|
||||
public static String item_action = "action";
|
||||
public static String item_walk_y = "walk_y";
|
||||
public static String item_container_type = "container_type";
|
||||
@@ -40,9 +40,9 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_mode);
|
||||
}
|
||||
|
||||
public int getMove() {
|
||||
return this.getOpcIntegerValue(item_move);
|
||||
}
|
||||
// public int getMove() {
|
||||
// return this.getOpcIntegerValue(item_move);
|
||||
// }
|
||||
|
||||
public int getWalk_y() {
|
||||
return this.getOpcIntegerValue(item_walk_y);
|
||||
@@ -84,10 +84,10 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_container_type);
|
||||
}
|
||||
|
||||
//是否有货
|
||||
public int hasGoods(int move) {
|
||||
return move;
|
||||
}
|
||||
// //是否有货
|
||||
// public int hasGoods(int move) {
|
||||
// return move;
|
||||
// }
|
||||
|
||||
Boolean isonline;
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ItemProtocol {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0"));
|
||||
list.add(new ItemDto(item_mode, "工作状态", "DB600.B2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_move, "光电开关信号", "DB600.B3"));
|
||||
// list.add(new ItemDto(item_move, "光电开关信号", "DB600.B3"));
|
||||
list.add(new ItemDto(item_action, "动作信号", "DB600.B4"));
|
||||
list.add(new ItemDto(item_walk_y, "行走列", "DB600.B5"));
|
||||
list.add(new ItemDto(item_container_type, "托盘类型", "DB600.B6"));
|
||||
|
||||
@@ -71,7 +71,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
|
||||
int mode = 0;
|
||||
int error = 0;
|
||||
int move = 0;
|
||||
// int move = 0;
|
||||
int task = 0;
|
||||
int action = 0;
|
||||
int container_type = 0;
|
||||
@@ -79,13 +79,13 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
int walk_y = 0;
|
||||
int last_mode = 0;
|
||||
int last_error = 0;
|
||||
int last_move = 0;
|
||||
// int last_move = 0;
|
||||
int last_task = 0;
|
||||
int last_action = 0;
|
||||
int last_container_type = 0;
|
||||
int last_walk_y = 0;
|
||||
Boolean isonline = true;
|
||||
int hasGoods = 0;
|
||||
// int hasGoods = 0;
|
||||
String message = null;
|
||||
Boolean iserror = false;
|
||||
|
||||
@@ -119,21 +119,21 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
device_code = this.getDeviceCode();
|
||||
mode = this.itemProtocol.getMode();
|
||||
error = this.itemProtocol.getError();
|
||||
move = this.itemProtocol.getMove();
|
||||
//move = this.itemProtocol.getMove();
|
||||
walk_y = this.itemProtocol.getWalk_y();
|
||||
container_type = this.itemProtocol.getContainer_type();
|
||||
action = this.itemProtocol.getAction();
|
||||
task = this.itemProtocol.getTask();
|
||||
hasGoods = this.itemProtocol.getMove();
|
||||
// hasGoods = this.itemProtocol.getMove();
|
||||
|
||||
if (mode != last_mode) {
|
||||
this.execute_log.setResource(this.device_code, this.device.getDevice_name());
|
||||
this.execute_log.log("设备:" + device_code + ",last_mode -> mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
this.execute_log.setResource(this.device_code, this.device.getDevice_name());
|
||||
this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move);
|
||||
}
|
||||
// if (move != last_move) {
|
||||
// this.execute_log.setResource(this.device_code, this.device.getDevice_name());
|
||||
// this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move);
|
||||
// }
|
||||
if (error != last_error) {
|
||||
this.execute_log.setResource(this.device_code, this.device.getDevice_name());
|
||||
this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error);
|
||||
@@ -175,7 +175,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
return;
|
||||
case 2:
|
||||
//申请任务
|
||||
if (mode == 2 && walk_y == 1 && move == 0 && !applySucess ) {
|
||||
if (mode == 2 && walk_y == 1 /*&& move == 0*/ && !applySucess ) {
|
||||
instruction_apply();
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
}
|
||||
|
||||
|
||||
if ( action == 4 && move == 0 && task > 0) {
|
||||
if ( action == 4 /*&& move == 0*/ && task > 0) {
|
||||
//inst_message
|
||||
inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||
if (inst != null) {
|
||||
@@ -210,7 +210,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
|
||||
last_mode = mode;
|
||||
last_error = error;
|
||||
last_move = move;
|
||||
// last_move = move;
|
||||
last_task = task;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class Standard_RGVDefination implements OpcDeviceDriverDefination {
|
||||
List<ItemDto> list = new ArrayList();
|
||||
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
|
||||
list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B2", true));
|
||||
list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB600.B3"));
|
||||
// list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB600.B3"));
|
||||
list.add(new ItemDto(ItemProtocol.item_action, "动作信号", "DB600.B4"));
|
||||
list.add(new ItemDto(ItemProtocol.item_walk_y, "行走列", "DB600.B5"));
|
||||
list.add(new ItemDto(ItemProtocol.item_container_type, "托盘类型", "DB600.B6"));
|
||||
|
||||
@@ -950,17 +950,17 @@ public class StageActorServiceImpl implements StageActorService {
|
||||
} else if (standardRGVDeviceDriver.getMode() == 2) {
|
||||
mode = "联机";
|
||||
}
|
||||
if (standardRGVDeviceDriver.getMove() == 0) {
|
||||
move = "无货";
|
||||
} else if (standardRGVDeviceDriver.getMove() == 1) {
|
||||
move = "有货";
|
||||
} else if (standardRGVDeviceDriver.getMove() == 2) {
|
||||
move = "有托盘有货";
|
||||
}
|
||||
// if (standardRGVDeviceDriver.getMove() == 0) {
|
||||
// move = "无货";
|
||||
// } else if (standardRGVDeviceDriver.getMove() == 1) {
|
||||
// move = "有货";
|
||||
// } else if (standardRGVDeviceDriver.getMove() == 2) {
|
||||
// move = "有托盘有货";
|
||||
// }
|
||||
obj.put("devicede_name", standardRGVDeviceDriver.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("hasGoods", standardRGVDeviceDriver.getHasGoods());
|
||||
// jo.put("hasGoods", standardRGVDeviceDriver.getHasGoods());
|
||||
jo.put("isOnline", standardRGVDeviceDriver.getIsonline());
|
||||
jo.put("error", standardRGVDeviceDriver.getError());
|
||||
jo.put("isError", standardRGVDeviceDriver.getIserror());
|
||||
|
||||
@@ -8,7 +8,7 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:njyf_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:zgln_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
# 初始连接数
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
Reference in New Issue
Block a user