更新
This commit is contained in:
@@ -302,6 +302,7 @@ public class LnshOneRGVDeviceDriver extends AbstractOpcDeviceDriver implements D
|
||||
ReadUtil.write(itemMap, server);
|
||||
|
||||
}
|
||||
|
||||
public void executing(Server server, Map<String, Object> itemMap) {
|
||||
ReadUtil.write(itemMap, server);
|
||||
}
|
||||
@@ -318,6 +319,18 @@ public class LnshOneRGVDeviceDriver extends AbstractOpcDeviceDriver implements D
|
||||
|
||||
}
|
||||
|
||||
public void writing(int command) {
|
||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + ItemProtocol.item_to_command1;
|
||||
|
||||
String opcservcerid = this.getDevice().getOpc_server_id();
|
||||
Server server = ReadUtil.getServer(opcservcerid);
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_command, command);
|
||||
ReadUtil.write(itemMap, server);
|
||||
|
||||
}
|
||||
|
||||
public synchronized boolean finish_instruction() throws Exception {
|
||||
instructionService.finish(inst);
|
||||
return true;
|
||||
@@ -337,7 +350,9 @@ public class LnshOneRGVDeviceDriver extends AbstractOpcDeviceDriver implements D
|
||||
List<String> device_code_list = Arrays.asList(demoArray);
|
||||
TaskDto task = null;
|
||||
for (int i = 0; i < device_code_list.size(); i++) {
|
||||
if (ObjectUtil.isNotEmpty(taskserver.queryTaskByDeviceCode(device_code_list.get(i).replace("\"", "")))) {
|
||||
task = taskserver.queryTaskByDeviceCode(device_code_list.get(i).replace("\"", "")).get(0);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(task)) break;
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(task)) {
|
||||
@@ -385,16 +400,16 @@ public class LnshOneRGVDeviceDriver extends AbstractOpcDeviceDriver implements D
|
||||
//创建指令后修改任务状态
|
||||
task.setTask_status("1");
|
||||
taskserver.update(task);
|
||||
requireSucess = false;
|
||||
requireSucess = true;
|
||||
|
||||
|
||||
String start_addr = startdevice.getAddress();
|
||||
String next_addr = nextdevice.getAddress();
|
||||
String start_addr = startdevice.getExtraValue().get("OPCServer").toString();
|
||||
String next_addr = nextdevice.getExtraValue().get("OPCServer").toString();
|
||||
|
||||
writing("to_command1","1");
|
||||
writing("item_to_onset1",start_addr);
|
||||
writing("item_to_target1",next_addr);
|
||||
writing("item_to_task1",instdto.getInstruction_code());
|
||||
writing(1);
|
||||
writing("RGV1.RGV1.RGV1.to_onset1", start_addr);
|
||||
writing("RGV1.RGV1.RGV1.to_target1", next_addr);
|
||||
writing("RGV1.RGV1.RGV1.to_task1", instdto.getInstruction_code());
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
@@ -187,7 +187,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
//叫空托盘
|
||||
jsonObject.put("next_point_code", device_code);
|
||||
//如果是叠盘位3 ,则去铁托盘缓存区取
|
||||
if (!StrUtil.equals(device_code,"KTPHCW3")){
|
||||
if (StrUtil.equals(device_code,"KTPDDW3")){
|
||||
//1 更新缓存位
|
||||
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KTTHCQ.getCode()).addParam("flag", "4").process().getResultJSONArray(0);
|
||||
PointUpdateUtil.updatePoint(pointarr);
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
DISTINCT
|
||||
point.point_id,
|
||||
point.point_code,
|
||||
point.point_name,
|
||||
|
||||
Reference in New Issue
Block a user