|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|