|
@ -71,7 +71,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements |
|
|
|
|
|
|
|
|
int mode = 0; |
|
|
int mode = 0; |
|
|
int error = 0; |
|
|
int error = 0; |
|
|
int move = 0; |
|
|
// int move = 0;
|
|
|
int task = 0; |
|
|
int task = 0; |
|
|
int action = 0; |
|
|
int action = 0; |
|
|
int container_type = 0; |
|
|
int container_type = 0; |
|
@ -79,13 +79,13 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements |
|
|
int walk_y = 0; |
|
|
int walk_y = 0; |
|
|
int last_mode = 0; |
|
|
int last_mode = 0; |
|
|
int last_error = 0; |
|
|
int last_error = 0; |
|
|
int last_move = 0; |
|
|
// int last_move = 0;
|
|
|
int last_task = 0; |
|
|
int last_task = 0; |
|
|
int last_action = 0; |
|
|
int last_action = 0; |
|
|
int last_container_type = 0; |
|
|
int last_container_type = 0; |
|
|
int last_walk_y = 0; |
|
|
int last_walk_y = 0; |
|
|
Boolean isonline = true; |
|
|
Boolean isonline = true; |
|
|
int hasGoods = 0; |
|
|
// int hasGoods = 0;
|
|
|
String message = null; |
|
|
String message = null; |
|
|
Boolean iserror = false; |
|
|
Boolean iserror = false; |
|
|
|
|
|
|
|
@ -119,21 +119,21 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements |
|
|
device_code = this.getDeviceCode(); |
|
|
device_code = this.getDeviceCode(); |
|
|
mode = this.itemProtocol.getMode(); |
|
|
mode = this.itemProtocol.getMode(); |
|
|
error = this.itemProtocol.getError(); |
|
|
error = this.itemProtocol.getError(); |
|
|
move = this.itemProtocol.getMove(); |
|
|
//move = this.itemProtocol.getMove();
|
|
|
walk_y = this.itemProtocol.getWalk_y(); |
|
|
walk_y = this.itemProtocol.getWalk_y(); |
|
|
container_type = this.itemProtocol.getContainer_type(); |
|
|
container_type = this.itemProtocol.getContainer_type(); |
|
|
action = this.itemProtocol.getAction(); |
|
|
action = this.itemProtocol.getAction(); |
|
|
task = this.itemProtocol.getTask(); |
|
|
task = this.itemProtocol.getTask(); |
|
|
hasGoods = this.itemProtocol.getMove(); |
|
|
// hasGoods = this.itemProtocol.getMove();
|
|
|
|
|
|
|
|
|
if (mode != last_mode) { |
|
|
if (mode != last_mode) { |
|
|
this.execute_log.setResource(this.device_code, this.device.getDevice_name()); |
|
|
this.execute_log.setResource(this.device_code, this.device.getDevice_name()); |
|
|
this.execute_log.log("设备:" + device_code + ",last_mode -> mode:" + last_mode + "->" + mode); |
|
|
this.execute_log.log("设备:" + device_code + ",last_mode -> mode:" + last_mode + "->" + mode); |
|
|
} |
|
|
} |
|
|
if (move != last_move) { |
|
|
// if (move != last_move) {
|
|
|
this.execute_log.setResource(this.device_code, this.device.getDevice_name()); |
|
|
// this.execute_log.setResource(this.device_code, this.device.getDevice_name());
|
|
|
this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move); |
|
|
// this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move);
|
|
|
} |
|
|
// }
|
|
|
if (error != last_error) { |
|
|
if (error != last_error) { |
|
|
this.execute_log.setResource(this.device_code, this.device.getDevice_name()); |
|
|
this.execute_log.setResource(this.device_code, this.device.getDevice_name()); |
|
|
this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error); |
|
|
this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error); |
|
@ -175,7 +175,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements |
|
|
return; |
|
|
return; |
|
|
case 2: |
|
|
case 2: |
|
|
//申请任务
|
|
|
//申请任务
|
|
|
if (mode == 2 && walk_y == 1 && move == 0 && !applySucess ) { |
|
|
if (mode == 2 && walk_y == 1 /*&& move == 0*/ && !applySucess ) { |
|
|
instruction_apply(); |
|
|
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_message
|
|
|
inst = instructionService.findByCodeFromCache(String.valueOf(task)); |
|
|
inst = instructionService.findByCodeFromCache(String.valueOf(task)); |
|
|
if (inst != null) { |
|
|
if (inst != null) { |
|
@ -210,7 +210,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements |
|
|
|
|
|
|
|
|
last_mode = mode; |
|
|
last_mode = mode; |
|
|
last_error = error; |
|
|
last_error = error; |
|
|
last_move = move; |
|
|
// last_move = move;
|
|
|
last_task = task; |
|
|
last_task = task; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|