src/main/java/com/zy/asrs/controller/OpenController.java
@@ -61,7 +61,7 @@ // 反馈任务执行结果 @GetMapping("/api/robot/reporter/task1") public void reporterTask1(){ Integer sourceStaNo = 401; Integer sourceStaNo = 402; SiemensDevpThread siemensDevpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1); StaProtocol staProtocol = siemensDevpThread.getStation().get(sourceStaNo).clone(); boolean result = MessageQueue.offer(SlaveType.Devp, 1, new com.zy.core.model.Task(3, staProtocol)); src/main/java/com/zy/asrs/entity/WrkMast.java
@@ -25,6 +25,9 @@ private static final long serialVersionUID = 1L; @ApiModelProperty(value= "") @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 工作号 */ src/main/java/com/zy/asrs/entity/WrkMastLog.java
@@ -51,6 +51,9 @@ @TableField("whs_type") private Integer whsType; @ApiModelProperty("日志ID") private Long logId; /** * 工作状态 */ src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -101,6 +101,8 @@ @Autowired private HikUtils hikUtils; @Autowired private AgvTaskServiceImpl agvTaskService; /** * 组托 @@ -129,6 +131,38 @@ //LED LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); // 尺寸检测异常 boolean back = false; String errMsg = ""; if (staProtocol.isFrontError()) { errMsg = "前超限"; back = true; } if (!back && staProtocol.isBackError()) { errMsg = "后超限"; back = true; } if (!back && staProtocol.isHighError()) { errMsg = "高超限"; back = true; } if (!back && staProtocol.isLeftError()) { errMsg = "左超限"; back = true; } if (!back && staProtocol.isRightError()) { errMsg = "右超限"; back = true; } if (!back && staProtocol.isWeightError()) { errMsg = "超重"; back = true; } if (!back && staProtocol.isBarcodeError()) { errMsg = "扫码失败"; back = true; } // 判断是否满足入库条件 if (!staProtocol.isLoading()) { continue; @@ -142,10 +176,25 @@ && staProtocol.isPakMk()) { News.warnNoLog("" + mark + " - 0" + " - 开始执行"); if (back) { // led 异常显示 if (ledThread != null) { String errorMsg = errMsg; MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg)); } log.error("输送线异常组托退回={}",errMsg); staProtocol.setWorkNo((short) 9999); staProtocol.setStaNo((short) 0); // devpThread.setPakMk(staProtocol.getSiteId(), false); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); continue; } String barcode = barcodeThread.getBarcode(); if (!Cools.isEmpty(barcode)) { News.info("" + mark + " - 1" + " - {}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)|| "00000000".equals(barcode)) { // staProtocol.setWorkNo((short) 9992); // staProtocol.setStaNo(inSta.getBackSta().shortValue()); // devpThread.setPakMk(staProtocol.getSiteId(), false); @@ -541,7 +590,7 @@ if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() == 9991 && staProtocol.isPakMk()) { News.warnNoLog("" + mark + " - 0" + " - 开始执行"); @@ -550,7 +599,21 @@ if (barcodeThread == null) { continue; } String name="401"; if (staProtocol.getSiteId()==402){ name = "402"; } String bar = ""; Config name1 = configService.selectOne(new EntityWrapper<Config>().eq("name", name)); if (!Cools.isEmpty(name1)) { bar = name1.getValue(); } String barcode = barcodeThread.getBarcode(); if (barcode.equals("00000000")){ barcode = bar; } if (!Cools.isEmpty(barcode)) { News.info("" + mark + " - 1" + " - {}号条码扫描器检测条码信息:{}", insta.getBarcode(), barcode); if ("NG".endsWith(barcode) || "NoRead".equals(barcode)) { @@ -607,7 +670,8 @@ throw new CoolException("保存工作明细档历史档失败"); } // 保存工作主档历史档 if (wrkMastMapper.saveWrkMastLog(wrkMast.getWrkNo()) == 0) { if (!wrkMastLogService.save(wrkMast.getWrkNo())) { throw new CoolException("保存工作主档历史档失败"); } @@ -705,12 +769,12 @@ staProtocol = staProtocol.clone(); } if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == null)) { if (staProtocol.isAutoing() && staProtocol.isLoading()) { CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, wrkMast.getCrnNo()); CrnProtocol crnProtocol = crnThread.getCrnProtocol(); if (crnProtocol.modeType == CrnModeType.AUTO && crnProtocol.getTaskNo().equals(wrkMast.getWrkNo().shortValue()) && (crnProtocol.statusType == CrnStatusType.PUTTING || crnProtocol.statusType == CrnStatusType.WAITING)) { && crnProtocol.statusType == CrnStatusType.WAITING) { //放货中 或 等待确认 News.warnNoLog("" + mark + " - 0" + " - 开始执行"); @@ -719,9 +783,6 @@ .eq("loc_no", wrkMast.getSourceLocNo())); short staNo = wrkMast.getStaNo().shortValue(); if (wrkMast.getStaNo() == 1004) { staNo = 2003; } // 下发站点信息 staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); @@ -1169,7 +1230,7 @@ } //查询在库信息 LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() .eq("loc_sts", "R") .in("loc_sts", "R","P") .eq("loc_no", wrkMast.getSourceLocNo())); if (Cools.isEmpty(locMast)) { News.error("出库 ===>> 库位中没有这笔资料", wrkMast.getSourceLocNo()); @@ -1200,11 +1261,16 @@ } } // 判断堆垛机出库站状态 // 判断堆垛机出库站状态&& staProtocol.isOutEnable() if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable() && staProtocol.isEmptyOutType()) { && staProtocol.isEmptyOutType()) { // 命令下发区 -------------------------------------------------------------------------- //判断是否有正在执行中的AGV任务 List<AgvTask> agvTasks = agvTaskService.selectList(new EntityWrapper<AgvTask>().eq("wrk_sts", 302).eq("source_sta_no", staProtocol.getSiteId())); if (agvTasks != null && agvTasks.size() > 0) { continue; } // 堆垛机控制过滤 if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { // continue; @@ -2007,9 +2073,8 @@ DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId()); // 命令集合 List<LedCommand> commands = new ArrayList<>(); // // 工作档集合 // List<WrkMast> wrkMasts = new ArrayList<>(); List<Integer> workNoList = new ArrayList<>(); // 工作档集合 List<WrkMast> wrkMasts = new ArrayList<>(); for (Integer staNo : led.getStaArr()) { // 获取叉车站点 StaProtocol staProtocol = devpThread.getStation().get(staNo); @@ -2018,48 +2083,20 @@ } else { staProtocol = staProtocol.clone(); } Integer wrkNo = null; Integer ioType = null; Integer targetStaNo = null; String sourceLocNo = null; String locNo = null; String barcode = null; // 获取工作档数据 WrkMast wrkMast = wrkMastMapper.selectById(staProtocol.getWorkNo()); // if (null == wrkMast || wrkMast.getWrkSts() < 14 || wrkMast.getIoType() < 100) { continue; } if (null == wrkMast) { List<WrkMastLog> wrkMastLogs = wrkMastLogService.selectList(new EntityWrapper<WrkMastLog>() .eq("wrk_no", staProtocol.getWorkNo()) .orderBy("modi_time", false) ); if (wrkMastLogs.isEmpty()) { continue; } WrkMastLog wrkMastLog = wrkMastLogs.get(0); wrkNo = wrkMastLog.getWrkNo(); ioType = wrkMastLog.getIoType(); sourceLocNo = wrkMastLog.getSourceLocNo(); locNo = wrkMastLog.getLocNo(); targetStaNo = wrkMastLog.getStaNo(); barcode = wrkMastLog.getBarcode(); }else { wrkNo = wrkMast.getWrkNo(); ioType = wrkMast.getIoType(); sourceLocNo = wrkMast.getSourceLocNo(); locNo = wrkMast.getLocNo(); targetStaNo = wrkMast.getStaNo(); barcode = wrkMast.getBarcode(); } News.warnNoLog("" + mark + " - 0" + " - 开始执行:出库 ===>> 工作档信息写入led显示器"); workNoList.add(wrkNo); wrkMasts.add(wrkMast); // 组装命令 LedCommand ledCommand = new LedCommand(); ledCommand.setWorkNo(wrkNo); ledCommand.setIoType(ioType); ledCommand.setWorkNo(wrkMast.getWrkNo()); ledCommand.setIoType(wrkMast.getIoType()); // 出库模式 switch (ioType) { switch (wrkMast.getIoType()) { case 1: ledCommand.setTitle("全板入库"); break; @@ -2092,104 +2129,34 @@ ledCommand.setTitle("并板入库"); break; default: News.error("" + mark + " - 1" + " - 任务入出库类型错误!!![工作号:{}] [入出库类型:{}]", wrkNo, ioType); News.error(""+mark+" - 1"+" - 任务入出库类型错误!!![工作号:{}] [入出库类型:{}]", wrkMast.getWrkNo(), wrkMast.getIoType()); break; } ledCommand.setSourceLocNo(sourceLocNo); ledCommand.setLocNo(locNo); ledCommand.setStaNo(targetStaNo); ledCommand.setBarcode(barcode); ledCommand.setSourceLocNo(wrkMast.getSourceLocNo()); ledCommand.setLocNo(wrkMast.getLocNo()); ledCommand.setStaNo(wrkMast.getStaNo()); // ledCommand.setSourceStaNo(wrkMast.getSourceStaNo()); if (ioType != 110 && ioType != 10) { List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkNo); if (!wrkDetls.isEmpty()) { WrkDetl wrkDetl = wrkDetls.get(0); double anfme = 0D; double weight = 0D; for (WrkDetl detl : wrkDetls) { anfme += detl.getAnfme(); weight += detl.getWeight(); wrkDetl.setAnfme(anfme); wrkDetl.setWeight(weight); if (wrkMast.getIoType() != 110 && wrkMast.getIoType() != 10) { List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkMast.getWrkNo()); try{ if (wrkMast.getIoType()>100){ for (WrkDetl wrkDetl : wrkDetls){ LocDetl locDetl = locDetlService.selectMatnrSpecs(wrkDetl.getMatnr(), wrkDetl.getSpecs(), wrkMast.getSourceLocNo()); wrkDetl.setWeight(locDetl.getAnfme()); } List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() .eq("loc_no", wrkMast.getSourceLocNo())); double totalAnfme = 0D; double totalWeight = 0D; for (LocDetl locDetl : locDetls) { totalAnfme += locDetl.getAnfme(); totalWeight += locDetl.getWeight(); } wrkDetl.setStockNum(totalAnfme); wrkDetl.setStockNum2(totalWeight); ledCommand.getMatDtos().add(new MatDto( wrkDetl.getMatnr() , wrkDetl.getMaktx() , wrkDetl.getAnfme() , wrkDetl.getWeight() , wrkDetl.getStockNum() , wrkDetl.getStockNum2() , wrkDetl.getSpecs() , wrkDetl.getSku() , wrkDetl.getZpallet() , wrkDetl.getModel() , wrkDetl.getSupp() , wrkDetl.getKpCstmrName() , wrkDetl.getOrderNo() , wrkDetl.getCstateid$() )); }else { List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectTodayByWrkNo(wrkNo); if(!wrkDetlLogs.isEmpty()) { WrkDetlLog wrkDetlLog = wrkDetlLogs.get(0); double anfme = 0D; double weight = 0D; for (WrkDetlLog detl : wrkDetlLogs) { anfme += detl.getAnfme(); weight += detl.getWeight(); wrkDetlLog.setAnfme(anfme); wrkDetlLog.setWeight(weight); } List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() .eq("loc_no", sourceLocNo)); double totalAnfme = 0D; double totalWeight = 0D; for (LocDetl locDetl : locDetls) { totalAnfme += locDetl.getAnfme(); totalWeight += locDetl.getWeight(); } wrkDetlLog.setStockNum(totalAnfme); wrkDetlLog.setStockNum2(totalWeight); ledCommand.getMatDtos().add(new MatDto( wrkDetlLog.getMatnr() , wrkDetlLog.getMaktx() , wrkDetlLog.getAnfme() , wrkDetlLog.getWeight() , wrkDetlLog.getStockNum() , wrkDetlLog.getStockNum2() , wrkDetlLog.getSpecs() , wrkDetlLog.getSku() , wrkDetlLog.getZpallet() , wrkDetlLog.getModel() , wrkDetlLog.getSupp() , wrkDetlLog.getKpCstmrName() , wrkDetlLog.getOrderNo() , wrkDetlLog.getCstateid$() )); for (WrkDetl wrkDetl : wrkDetls){ wrkDetl.setWeight(wrkDetl.getAnfme()); } } }catch (Exception e){ log.error("工作档案明细输入电视机失败1:异常信息==》"+e); } wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme(),wrkDetl.getWeight(),wrkDetl.getSpecs(),wrkDetl.getSku()))); } commands.add(ledCommand); } Set<Integer> workNos = new HashSet<>(workNoList); Set<Integer> workNos = wrkMasts.stream().map(WrkMast::getWrkNo).collect(Collectors.toSet()); // 获取LED线程 LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId()); // 相同工作号集合则过滤 @@ -2227,15 +2194,12 @@ try { // 修改主档led标记 for (Integer wrkNo : workNoList) { WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", wrkNo)); if (wrkMast != null) { for (WrkMast wrkMast : wrkMasts) { wrkMast.setOveMk("Y"); wrkMast.setModiTime(new Date()); if (wrkMastMapper.updateById(wrkMast) == 0) { News.errorNoLog("" + mark + " - 4" + " - 更新工作档失败"); throw new CoolException("更新工作档失败"); } } } src/main/java/com/zy/asrs/service/impl/RcsServiceImpl.java
@@ -77,6 +77,7 @@ StaProtocol staProtocol = siemensDevpThread.getStation().get(sourceStaNo).clone(); //wcs反馈rcs继续执行 if (staProtocol != null && !staProtocol.isLoading() && !staProtocol.isEmptyOutType()) { if(task.getTaskType().equals("AGV补空料架")){ RcsTaskContinue rcsTaskContinue = new RcsTaskContinue(); rcsTaskContinue.setRobotTaskCode(task.getTaskNo()+"-"+(task.getCtnType()-1)); rcsTaskContinue.setTriggerType("TASK"); @@ -85,18 +86,35 @@ String url = HIK_URL + "api/robot/controller/task/extend/continue"; String response = sendPost(url, JSONObject.toJSONString(rcsTaskContinue)); if (!StringUtils.isEmpty(response) && response.contains("code")) { RcsReturn rcsReturn1 = JSONObject.parseObject(response, RcsReturn.class); if ("SUCCESS".equals(rcsReturn1.getCode())) { //出发PLC站点的扫码器扫码 boolean result = MessageQueue.offer(SlaveType.Devp, 1, new com.zy.core.model.Task(3, staProtocol)); log.info("AGV放货完成,给站点写9991工作号,下发任务:{},站点:{},agv任务号:{}", result, task.getStaNo(), task.getTaskNo()); if (result) { log.info("允许AGV放货成功"); } // 返回RCS rcsReturn.setCode("SUCCESS"); rcsReturn.setMessage(""); JSONObject data = new JSONObject(); data.put("robotTaskCode", robotTaskCode); rcsReturn.setData(data); }else { //出发PLC站点的扫码器扫码 boolean result = MessageQueue.offer(SlaveType.Devp, 1, new com.zy.core.model.Task(3, staProtocol)); if (result) { log.info("入库站点={}触发扫码成功", staProtocol.getSiteId()); // 返回RCS rcsReturn.setCode("SUCCESS"); rcsReturn.setMessage(""); JSONObject data = new JSONObject(); data.put("robotTaskCode", robotTaskCode); rcsReturn.setData(data); RcsTaskContinue rcsTaskContinue = new RcsTaskContinue(); rcsTaskContinue.setRobotTaskCode(task.getTaskNo()+"-"+(task.getCtnType()-1)); rcsTaskContinue.setTriggerType("TASK"); rcsTaskContinue.setTriggerCode(task.getTaskNo()+"-"+(task.getCtnType()-1)); String url = HIK_URL + "api/robot/controller/task/extend/continue"; String response = sendPost(url, JSONObject.toJSONString(rcsTaskContinue)); if (!StringUtils.isEmpty(response) && response.contains("code")) { log.info("允许AGV放货成功"); } } else { // 返回RCS rcsReturn.setCode("Err_Internal"); @@ -108,7 +126,6 @@ } } } } break; //放货完成 --》agv已经离开 @@ -116,10 +133,19 @@ Integer sourceStaNo = Integer.valueOf(task.getStaNo()); SiemensDevpThread siemensDevpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1); StaProtocol staProtocol = siemensDevpThread.getStation().get(sourceStaNo).clone(); Boolean boo=false; Short wrkNo = 9991; //放货完成 --》agv已经离开 --》给PLC站点写9991工作号 if (staProtocol != null && staProtocol.isLoading() && staProtocol.isEmptyOutType() && staProtocol.getWorkNo() == 0) { staProtocol.setWorkNo((short) 9991); staProtocol.setStaNo(Short.valueOf(task.getStaNo())); //补空料架 --》agv已经立库 --》给PLC站点写9995工作号 if(task.getTaskType().equals("AGV补空料架") && staProtocol != null && !staProtocol.isLoading() && staProtocol.isEmptyOutType() && staProtocol.getWorkNo() == 0){ boo=true; wrkNo = 9995; }else if(!task.getTaskType().equals("AGV补空料架") && staProtocol != null && staProtocol.isLoading() && staProtocol.isEmptyOutType() && staProtocol.getWorkNo() == 0){ boo=true; } if (boo) { staProtocol.setWorkNo(wrkNo);//空料架到位信号点 staProtocol.setStaNo(Short.valueOf("0")); boolean result = MessageQueue.offer(SlaveType.Devp, 1, new com.zy.core.model.Task(2, staProtocol)); log.info("AGV放货完成,给站点写9991工作号,下发任务:{},站点:{},agv任务号:{}", result, task.getStaNo(), task.getTaskNo()); if (result) { @@ -141,6 +167,13 @@ data.put("robotTaskCode", robotTaskCode); rcsReturn.setData(data); } }else { // 返回RCS rcsReturn.setCode("Err_Internal"); rcsReturn.setMessage(""); JSONObject data = new JSONObject(); data.put("robotTaskCode", robotTaskCode); rcsReturn.setData(data); } } break; @@ -150,9 +183,8 @@ SiemensDevpThread siemensDevpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1); StaProtocol staProtocol = siemensDevpThread.getStation().get(sourceStaNo).clone(); //判断站点是否有料架和托盘 if (staProtocol != null && staProtocol.isLoading() && staProtocol.isEmptyOutType() && staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() < 9990) { if (staProtocol != null && (staProtocol.isLoading()||task.getTaskType().equals("AGV空料架回缓存区")) && staProtocol.isEmptyOutType()) { RcsTaskContinue rcsTaskContinue = new RcsTaskContinue(); rcsTaskContinue.setRobotTaskCode(task.getTaskNo()+"-"+(task.getCtnType()-1)); rcsTaskContinue.setTriggerType("TASK"); @@ -187,7 +219,7 @@ SiemensDevpThread siemensDevpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1); StaProtocol staProtocol = siemensDevpThread.getStation().get(sourceStaNo).clone(); //放货完成 --》agv已经离开 --》给PLC站点写9991工作号 if (staProtocol != null && !staProtocol.isLoading() && !staProtocol.isEmptyOutType() && staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() < 9990) { if (staProtocol != null && !staProtocol.isLoading() && !staProtocol.isEmptyOutType()) { staProtocol.setWorkNo((short) 0); staProtocol.setStaNo((short) 0); boolean result = MessageQueue.offer(SlaveType.Devp, 1, new com.zy.core.model.Task(2, staProtocol)); src/main/java/com/zy/asrs/service/impl/WrkMastLogServiceImpl.java
@@ -1,17 +1,40 @@ package com.zy.asrs.service.impl; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.exception.CoolException; import com.zy.asrs.entity.WrkMast; import com.zy.asrs.mapper.WrkMastLogMapper; import com.zy.asrs.entity.WrkMastLog; import com.zy.asrs.service.WrkMastLogService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.zy.asrs.service.WrkMastService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Objects; @Service("wrkMastLogService") public class WrkMastLogServiceImpl extends ServiceImpl<WrkMastLogMapper, WrkMastLog> implements WrkMastLogService { @Autowired private WrkMastService wrkMastService; @Autowired private WrkMastLogService wrkMastLogService; @Override public boolean save(Integer workNo) { return this.baseMapper.save(workNo) > 0; WrkMast mast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", workNo)); if (Objects.isNull(mast)) { throw new CoolException("数据错误:任务不存在!!"); } WrkMastLog mastLog = new WrkMastLog(); BeanUtils.copyProperties(mast, mastLog); mastLog.setLogId(mast.getId()); if (!wrkMastLogService.insert(mastLog)) { throw new CoolException("任务日志保存失败!!"); } return true; } } src/main/java/com/zy/common/model/MatDto.java
@@ -71,4 +71,14 @@ this.orderNo = orderNo; this.cstateid = cstateid; } public MatDto(String matNo, String maktx, Double count,Double total,String specs,String sku) { this.specs = specs; this.matnr = matNo; this.maktx = maktx; this.maknx = maktx; this.count = count; this.total = total; this.sku = sku; } } src/main/java/com/zy/core/MainProcess.java
@@ -42,12 +42,12 @@ } // 演示 mainService.crnDemoOfLocMove1(); // mainService.crnDemoOfLocMove1(); // 入出库模式切换函数 // mainService.ioConvert(); // 入库 ===>> 入库站到堆垛机站,根据条码扫描生成入库工作档 mainService.generateStoreWrkFile(1); // 组托 mainService.generateStoreWrkFile0(2); // WMS入库 // mainService.generateStoreWrkFile0(2); // WMS入库 Thread.sleep(500); // 拣料、并板、盘点再入库 // mainService.stnToCrnStnPick(3); @@ -66,7 +66,7 @@ // 空托盘入库-立库 ===>> 空栈板初始化入库,叉车入库站放货 mainService.storeEmptyPlt(8); // mainService.storeEmptyPlt(8); // 空托盘入库-产线 // mainService.storeEmptyPltLine(13); @@ -83,9 +83,9 @@ // mainService.rgvFinished2(14); //堆垛机无任务两分钟,回入库口待机 mainService.crnMove(); // mainService.crnMove(); //堆垛机有入库任务时,回入库口待机 mainService.crnMoveByInTask(); // mainService.crnMoveByInTask(); } catch (Exception e) { e.printStackTrace(); src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -181,10 +181,10 @@ crnProtocol.setxSpeed(siemensNet.getByteTransform().TransInt16(result.Content, 28)); crnProtocol.setySpeed(siemensNet.getByteTransform().TransInt16(result.Content, 32)); crnProtocol.setzSpeed(siemensNet.getByteTransform().TransInt16(result.Content, 36)); crnProtocol.setxDistance(siemensNet.getByteTransform().TransInt16(result.Content, 40)); crnProtocol.setyDistance(siemensNet.getByteTransform().TransInt16(result.Content, 44)); crnProtocol.setxDuration(siemensNet.getByteTransform().TransInt16(result.Content, 48)); crnProtocol.setyDuration(siemensNet.getByteTransform().TransInt16(result.Content, 52)); crnProtocol.setxDistance((short) siemensNet.getByteTransform().TransSingle(result.Content, 40)); crnProtocol.setyDistance((short) siemensNet.getByteTransform().TransSingle(result.Content, 44)); crnProtocol.setxDuration((short) siemensNet.getByteTransform().TransSingle(result.Content, 48)); crnProtocol.setyDuration((short) siemensNet.getByteTransform().TransSingle(result.Content, 52)); // if (slave.getId() == 1) { // crnProtocol.setCrnLane((int) siemensNet.getByteTransform().TransInt16(result.Content, 56)); // } src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -238,7 +238,7 @@ //外形检测 Integer[] arr={401,402}; OperateResultExOne<byte[]> resultErr1 = siemensS7Net.Read("DB101.700.0", (short) (arr.length*6)); OperateResultExOne<byte[]> resultErr1 = siemensS7Net.Read("DB101.702.0", (short) (arr.length*6)); for (int i = 0; i < arr.length; i++) { StaProtocol staProtocol1 = station.get(arr[i]); if(resultErr1.IsSuccess){ src/main/resources/application.yml
@@ -147,7 +147,7 @@ # 出库口1 outSta[1]: staNo: 402 led: ${wcs-slave.led[0].id} led: ${wcs-slave.led[1].id} # 输送线2 # devp[1]: # id: 2 src/main/resources/mapper/WrkMastMapper.xml
@@ -104,7 +104,7 @@ </select> <select id="selectPickStep" resultMap="BaseResultMap"> select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104) select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=20 and (io_type=103 or io_type=107 or io_type=104) </select> <select id="selectPakOutStep1" resultMap="BaseResultMap">