|
|
@ -129,11 +129,6 @@ public class StandardManipulatorInspectSiteDeviceDriver extends AbstractOpcDevic |
|
|
|
String device_code = this.getDeviceCode(); |
|
|
|
|
|
|
|
mode = this.itemProtocol.getMode(); |
|
|
|
error = this.itemProtocol.getError(); |
|
|
|
move = this.itemProtocol.getMove(); |
|
|
|
task = this.itemProtocol.getTask(); |
|
|
|
hasGoods = this.itemProtocol.getMove(); |
|
|
|
io_action = this.itemProtocol.getIoAction(); |
|
|
|
actoin = this.itemProtocol.getAction(); |
|
|
|
|
|
|
|
if (mode != last_mode) { |
|
|
@ -141,17 +136,6 @@ public class StandardManipulatorInspectSiteDeviceDriver extends AbstractOpcDevic |
|
|
|
this.execute_log.setResource(this.devicecode, 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.devicecode, this.device.getDevice_name()); |
|
|
|
this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move); |
|
|
|
if (move == 0) { |
|
|
|
thingToNothing(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (error != last_error) { |
|
|
|
this.execute_log.setResource(this.devicecode, this.device.getDevice_name()); |
|
|
|
this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error); |
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception var17) { |
|
|
|
return; |
|
|
@ -447,10 +431,6 @@ public class StandardManipulatorInspectSiteDeviceDriver extends AbstractOpcDevic |
|
|
|
public void executing(int command, Instruction instruction, String appendMessage) { |
|
|
|
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() |
|
|
|
+ "." + ItemProtocol.item_to_command; |
|
|
|
String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() |
|
|
|
+ "." + ItemProtocol.item_to_target; |
|
|
|
String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() |
|
|
|
+ "." + ItemProtocol.item_to_task; |
|
|
|
if (appendMessage == null) { |
|
|
|
appendMessage = ""; |
|
|
|
} |
|
|
@ -461,7 +441,6 @@ public class StandardManipulatorInspectSiteDeviceDriver extends AbstractOpcDevic |
|
|
|
Server server = ReadUtil.getServer(opcservcerid); |
|
|
|
Map<String, Object> itemMap = new HashMap<String, Object>(); |
|
|
|
itemMap.put(to_command, 1); |
|
|
|
itemMap.put(to_task, instruction_num); |
|
|
|
ReadUtil.write(itemMap, server); |
|
|
|
|
|
|
|
} |
|
|
@ -521,20 +500,11 @@ public class StandardManipulatorInspectSiteDeviceDriver extends AbstractOpcDevic |
|
|
|
public void writing(int type, int command) { |
|
|
|
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() |
|
|
|
+ "." + ItemProtocol.item_to_command; |
|
|
|
String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() |
|
|
|
+ "." + ItemProtocol.item_to_target; |
|
|
|
String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() |
|
|
|
+ "." + ItemProtocol.item_to_task; |
|
|
|
String opcservcerid = this.getDevice().getOpc_server_id(); |
|
|
|
Server server = ReadUtil.getServer(opcservcerid); |
|
|
|
Map<String, Object> itemMap = new HashMap<String, Object>(); |
|
|
|
if (type == 1) { |
|
|
|
itemMap.put(to_command, command); |
|
|
|
} else if (type == 2) { |
|
|
|
itemMap.put(to_target, command); |
|
|
|
|
|
|
|
} else if (type == 3) { |
|
|
|
itemMap.put(to_task, command); |
|
|
|
} |
|
|
|
ReadUtil.write(itemMap, server); |
|
|
|
|
|
|
|