rev:agv急停后复位:光栅复位后我读信号为5后返回光栅信号5同时告诉agv可继续作业
This commit is contained in:
@@ -174,6 +174,15 @@ public interface XianGongAgvService {
|
|||||||
*/
|
*/
|
||||||
public <T> UnifiedResponse<T> sendOrderStopToXZ(JSONObject requestParam);
|
public <T> UnifiedResponse<T> sendOrderStopToXZ(JSONObject requestParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发运单继续
|
||||||
|
*
|
||||||
|
* @param requestParam
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public <T> UnifiedResponse<T> sendOrderContinueToXZ(JSONObject requestParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求开/关自动门
|
* 请求开/关自动门
|
||||||
* @param requestParam {
|
* @param requestParam {
|
||||||
|
|||||||
@@ -996,6 +996,12 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
return xgHttpUtil.sendPostRequest(path, json);
|
return xgHttpUtil.sendPostRequest(path, json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> UnifiedResponse<T> sendOrderContinueToXZ(JSONObject json) {
|
||||||
|
String path = "/gotoSiteResume";
|
||||||
|
return xgHttpUtil.sendPostRequest(path, json);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject controlDoor(JSONObject requestParam) {
|
public JSONObject controlDoor(JSONObject requestParam) {
|
||||||
log.info("仙工AGV请求开/关自动门,请求参数 - {}", requestParam);
|
log.info("仙工AGV请求开/关自动门,请求参数 - {}", requestParam);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import lombok.Getter;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.acs.agv.XgAgvEnum;
|
||||||
import org.nl.acs.agv.server.impl.XianGongAgvServiceImpl;
|
import org.nl.acs.agv.server.impl.XianGongAgvServiceImpl;
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.DeviceDriverBaseReader;
|
import org.nl.acs.device_driver.DeviceDriverBaseReader;
|
||||||
@@ -20,6 +21,8 @@ import org.nl.modules.lucene.service.LuceneExecuteLogService;
|
|||||||
import org.nl.modules.lucene.service.dto.LuceneLogDto;
|
import org.nl.modules.lucene.service.dto.LuceneLogDto;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -144,6 +147,7 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void executeLogicBefore() {
|
private void executeLogicBefore() {
|
||||||
|
// 告诉agv急停
|
||||||
if (error == 1 && ObjectUtil.isNotEmpty(car_no)) {
|
if (error == 1 && ObjectUtil.isNotEmpty(car_no)) {
|
||||||
String[] carArr = {car_no};
|
String[] carArr = {car_no};
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
@@ -153,6 +157,24 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
|||||||
//创建订单序列
|
//创建订单序列
|
||||||
xianGongAgv.sendOrderStopToXZ(json);
|
xianGongAgv.sendOrderStopToXZ(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 给光栅下发命令5
|
||||||
|
if (error == 5) {
|
||||||
|
String[] key = {"toCommand"};
|
||||||
|
Integer[] value = {5};
|
||||||
|
writing(Arrays.asList(key),Arrays.asList(value));
|
||||||
|
|
||||||
|
// 如果车号不为空则告诉agv继续作业
|
||||||
|
if (ObjectUtil.isNotEmpty(car_no)) {
|
||||||
|
String[] carArr = {car_no};
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("vehicles", carArr);
|
||||||
|
// 请求下发agv继续
|
||||||
|
XianGongAgvServiceImpl xianGongAgv = SpringContextHolder.getBean(XianGongAgvServiceImpl.class);
|
||||||
|
//创建订单序列
|
||||||
|
xianGongAgv.sendOrderContinueToXZ(json);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user