| | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <finalName>jgwcs</finalName> |
| | | <finalName>djwcs</finalName> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.utils.News; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | public LocTypeDto(StaProtocol staProtocol) { |
| | | if (staProtocol.isHigh() == staProtocol.isLow() || staProtocol.isChang() == staProtocol.isDuan()) { |
| | | News.error("plc高低/长短检测异常,high:{},low:{},chang:{},duan:{}",staProtocol.isHigh(),staProtocol.isLow(),staProtocol.isChang(),staProtocol.isDuan()); |
| | | return; |
| | | } |
| | | |
| | | if (staProtocol.isHigh()) { |
| | | this.locType1 = 2; |
| | | } else { |
| | | this.locType1 = 1; |
| | | } |
| | | |
| | | if (staProtocol.isChang()) { |
| | | this.locType2 = 2; // 长库位 |
| | | } else { |
| | | this.locType2 = 1; // 短库位 |
| | | } |
| | | // if (staProtocol.isHigh() == staProtocol.isLow() || staProtocol.isChang() == staProtocol.isDuan()) { |
| | | // News.error("plc高低/长短检测异常,high:{},low:{},chang:{},duan:{}",staProtocol.isHigh(),staProtocol.isLow(),staProtocol.isChang(),staProtocol.isDuan()); |
| | | // return; |
| | | // } |
| | | // |
| | | // if (staProtocol.isHigh()) { |
| | | // this.locType1 = 2; |
| | | // } else { |
| | | // this.locType1 = 1; |
| | | // } |
| | | // |
| | | // if (staProtocol.isChang()) { |
| | | // this.locType2 = 2; // 长库位 |
| | | // } else { |
| | | // this.locType2 = 1; // 短库位 |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | continue; |
| | | } |
| | | |
| | | // 读取工作档状态为1的任务,给输送线下发命令状态改2 |
| | | // mainService.devFlow(); |
| | | |
| | | // 入库货物到位106,mk更新为Y |
| | | mainService.flowEnd(); |
| | | |
| | | // 拣料、并板、盘点再入库 |
| | | // mainService.stnToCrnStnPick(3); |
| | | mainService.stnToCrnStnPick(3); |
| | | |
| | | // 入库 ===>> 入库站到堆垛机站,根据条码扫描生成入库工作档 |
| | | mainService.generateStoreWrkFile(); // 组托 |
| | | |
| | | // 出库 ===>> 堆垛机出库站到出库站 |
| | | mainService.crnStnToOutStn(4); |
| | | // mainService.crnStnToOutStn(4); |
| | | |
| | | // 入出库 ===>> 堆垛机入出库作业下发 |
| | | mainService.crnIoExecute(5); |
| | | // mainService.crnIoExecute(5); |
| | | |
| | | // 入库 ===>> 执行对工作档的完成操作 |
| | | mainService.storeFinished(6); |
| | | // mainService.storeFinished(6); |
| | | |
| | | // 堆垛机异常信息记录 |
| | | mainService.recCrnErr(7); |
| | | // mainService.recCrnErr(7); |
| | | |
| | | // 输送线异常信息记录 |
| | | mainService.recDevpErr(); |
| | |
| | | mainService.outOfDevp(11); |
| | | |
| | | // 堆垛机回原点 |
| | | mainService.originGo(); |
| | | // mainService.originGo(); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.CrnSlave; |
| | | import com.zy.core.model.DevpSlave; |
| | | import com.zy.core.model.LedSlave; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.LedThread; |
| | | import com.zy.core.thread.SiemensCrnThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import com.zy.utils.News; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | private void initThread(){ |
| | | // 初始化堆垛机线程 |
| | | News.info("初始化堆垛机线程..................................................."); |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | CrnThread crnThread = new SiemensCrnThread(crn); |
| | | new Thread((Runnable) crnThread).start(); |
| | | SlaveConnection.put(SlaveType.Crn, crn.getId(), crnThread); |
| | | } |
| | | // News.info("初始化堆垛机线程..................................................."); |
| | | // for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // CrnThread crnThread = new SiemensCrnThread(crn); |
| | | // new Thread((Runnable) crnThread).start(); |
| | | // SlaveConnection.put(SlaveType.Crn, crn.getId(), crnThread); |
| | | // } |
| | | // 初始化穿梭车线程 |
| | | // log.info("初始化RGV线程..................................................."); |
| | | // for (RgvSlave rgv : slaveProperties.getRgv()) { |
| | |
| | | private short heartBeatVal = 1; |
| | | private StaError1 staError1; |
| | | public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{ |
| | | add(201);add(202);add(203);add(204);add(205); |
| | | add(101);add(102);add(103);add(104);add(105);add(106); |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> BarcodeList = new ArrayList<Integer>() {{ |
| | | add(1); add(2);add(3); |
| | | add(1); |
| | | }}; |
| | | public static final ArrayList<Integer> staNosErrList = new ArrayList<Integer>() {{ |
| | | add(201); add(203); add(205); |
| | | // add(201); add(203); add(205); |
| | | }}; |
| | | |
| | | /** |
| | | * 条码数量 |
| | | */ |
| | | private int barcodeSize = 3; |
| | | private int barcodeSize = 1; |
| | | |
| | | /** |
| | | * 入出库模式 |
| | |
| | | } |
| | | |
| | | // 外形检测 |
| | | OperateResultExOne<byte[]> resultErr = siemensS7Net.Read("DB101.700", (short) (staNosErrList.size() *4)); // 不连续,多读中间一个 |
| | | if (resultErr.IsSuccess){ |
| | | for (int i = 0;i<staNosErrList.size();i++){ |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i*4 + 2, 1); |
| | | StaProtocol staProtocol = station.get(staNosErrList.get(i)); |
| | | staProtocol.setFrontErr(status[0]); |
| | | staProtocol.setBackErr(status[1]); |
| | | staProtocol.setHighErr(status[2]); |
| | | staProtocol.setLeftErr(status[3]); |
| | | staProtocol.setRightErr(status[4]); |
| | | // staProtocol.setGroupSupportErr(status[5]); |
| | | staProtocol.setWeightErr(status[5]); |
| | | staProtocol.setBarcodeErr(status[6]); |
| | | // short goodsHeight = siemensS7Net.getByteTransform().TransInt16(resultErr.Content, i * 4 + 2); |
| | | // staProtocol.setGoodsHeight(goodsHeight); |
| | | } |
| | | } |
| | | // OperateResultExOne<byte[]> resultErr = siemensS7Net.Read("DB101.700", (short) (staNosErrList.size() *4)); // 不连续,多读中间一个 |
| | | // if (resultErr.IsSuccess){ |
| | | // for (int i = 0;i<staNosErrList.size();i++){ |
| | | // boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i*4 + 2, 1); |
| | | // StaProtocol staProtocol = station.get(staNosErrList.get(i)); |
| | | // staProtocol.setFrontErr(status[0]); |
| | | // staProtocol.setBackErr(status[1]); |
| | | // staProtocol.setHighErr(status[2]); |
| | | // staProtocol.setLeftErr(status[3]); |
| | | // staProtocol.setRightErr(status[4]); |
| | | //// staProtocol.setGroupSupportErr(status[5]); |
| | | // staProtocol.setWeightErr(status[5]); |
| | | // staProtocol.setBarcodeErr(status[6]); |
| | | //// short goodsHeight = siemensS7Net.getByteTransform().TransInt16(resultErr.Content, i * 4 + 2); |
| | | //// staProtocol.setGoodsHeight(goodsHeight); |
| | | // } |
| | | // } |
| | | |
| | | // 故障信息反馈 |
| | | OperateResultExOne<byte[]> resultErr2 = siemensS7Net.Read("DB101.400", (short) (staNos.size() * 4)); |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.common.model.LocTypeDto; |
| | | import com.zy.common.model.MatDto; |
| | | import com.zy.common.model.SearchLocParam; |
| | | import com.zy.common.model.StartupDto; |
| | |
| | | |
| | | public Integer wrkNo = 9999; |
| | | |
| | | public synchronized void devFlow() { |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp,1); |
| | | StaProtocol staProtocol = devpThread.getStation().get(104); |
| | | if (staProtocol == null) { |
| | | return; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if(staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() == 0) { |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_sts", 1).orderBy("io_time")); |
| | | if(wrkMast != null) { |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo()); |
| | | staProtocol.setStaNo(wrkMast.getStaNo().shortValue()); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol)); |
| | | if (result) { |
| | | // log.info("入库输送线命令下发成功:"+wrkMast.getWrkNo()+","+wrkMast.getStaNo()); |
| | | News.info("入库输送线命令下发成功:"+wrkMast.getWrkNo()+","+wrkMast.getStaNo()); |
| | | wrkMast.setWrkSts(2L); |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMastService.updateById(wrkMast); |
| | | }else { |
| | | // log.error("入库输送线命令下发失败:"+wrkMast.getWrkNo()+","+wrkMast.getStaNo()); |
| | | News.error("入库输送线命令下发失败:"+wrkMast.getWrkNo()+","+wrkMast.getStaNo()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public synchronized void flowEnd() { |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp,1); |
| | | StaProtocol staProtocol = devpThread.getStation().get(106); |
| | | if (staProtocol == null) { |
| | | return; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if(staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() != 0) { |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", staProtocol.getWorkNo())); |
| | | if(wrkMast != null && Cools.isEmpty(wrkMast.getMk())) { |
| | | // log.info("货物流动到位106:"+wrkMast.getWrkNo()); |
| | | News.info("货物流动到位106:"+wrkMast.getWrkNo()); |
| | | wrkMast.setMk("Y"); |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMastService.updateById(wrkMast); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 组托 |
| | | * 入库站,根据条码扫描生成入库工作档,工作状态 2 |
| | |
| | | // 尺寸检测异常 |
| | | boolean back = false; |
| | | String errMsg = ""; |
| | | if (staProtocol.isFrontErr()) { |
| | | errMsg = "前超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBackErr()) { |
| | | errMsg = "后超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isHighErr()) { |
| | | errMsg = "高超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isLeftErr()) { |
| | | errMsg = "左超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isRightErr()) { |
| | | errMsg = "右超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isWeightErr()) { |
| | | // if (staProtocol.isFrontErr()) { |
| | | // errMsg = "前超限"; |
| | | // back = true; |
| | | // } |
| | | // if (!back && staProtocol.isBackErr()) { |
| | | // errMsg = "后超限"; |
| | | // back = true; |
| | | // } |
| | | // if (!back && staProtocol.isHighErr()) { |
| | | // errMsg = "高超限"; |
| | | // back = true; |
| | | // } |
| | | // if (!back && staProtocol.isLeftErr()) { |
| | | // errMsg = "左超限"; |
| | | // back = true; |
| | | // } |
| | | // if (!back && staProtocol.isRightErr()) { |
| | | // errMsg = "右超限"; |
| | | // back = true; |
| | | // } |
| | | if (staProtocol.isWeightErr()) { |
| | | errMsg = "超重"; |
| | | back = true; |
| | | } |
| | |
| | | back = true; |
| | | } |
| | | // 退回 |
| | | if (back && (staProtocol.getWorkNo() >= 9993 && staProtocol.getWorkNo() <= 9995) && staProtocol.isLoading() && staProtocol.isPakMk()) { |
| | | if (back && staProtocol.isLoading() && staProtocol.isAutoing() && staProtocol.isPakMk()) { |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errMsg)); |
| | | staProtocol.setWorkNo(wrkNo); |
| | | News.info("{}入库回退:{},任务号:{}", inSta.getStaNo(), errMsg,wrkNo); |
| | |
| | | && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() |
| | | && staProtocol.isPakMk() && staProtocol.getWorkNo() >= 9993 && staProtocol.getWorkNo() <= 9995) { // 9990-9992空托,9993-9995 满托,9999回退 |
| | | && staProtocol.isPakMk() && staProtocol.getWorkNo() == 9998) { // 9997空托,9998满托/捡料,9999回退 |
| | | if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) { |
| | | News.info("{}条码扫描错误:{}",barcodeThread.getSlave().getId(),barcode); |
| | | continue; |
| | |
| | | continue; |
| | | } |
| | | try { |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | | // LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | | SearchLocParam param = new SearchLocParam(); |
| | | param.setBarcode(barcode); |
| | | param.setIoType(1); |
| | | param.setSourceStaNo(inSta.getStaNo()); |
| | | param.setLocType1(locTypeDto.getLocType1()); |
| | | param.setLocType2(locTypeDto.getLocType2()); |
| | | param.setLocType1((short)1); |
| | | // param.setLocType2(locTypeDto.getLocType2()); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/pakin/loc/v1") |
| | |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk() && staProtocol.getWorkNo() == 9999) { |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() && staProtocol.isPakMk() && staProtocol.getWorkNo() == 9998) { |
| | | News.warnNoLog(""+mark+" - 0"+" - 开始执行"); |
| | | WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode); |
| | | if (wrkMast == null) { |
| | |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", wrkMast.getIoType() - 50) |
| | | .eq("stn_no", pickSta.getStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | .eq("stn_no", pickSta.getStaNo() + 1) // 作业站点 = 拣料出库的目标站 |
| | | .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号 |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | News.error(""+mark+" - 2"+" - 入库路径不存在!type_no={},stn_no={},crn_no={}", wrkMast.getIoType(), pickSta.getStaNo(), wrkMast.getCrnNo()); |
| | | staProtocol.setWorkNo(wrkNo); |
| | | staProtocol.setStaNo((short) (pickSta.getStaNo().shortValue()-(short)1)); |
| | | staProtocol.setStaNo((short)103); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | log.error("输送线下发4:"+wrkNo+","+(pickSta.getStaNo().shortValue()-(short)1)); |
| | |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setIoType(wrkMast.getIoType() - 50); // 入出库类型: 103->53,104->54,107->57 |
| | | wrkMast.setWrkSts(2L); // 工作状态: 2.设备上走 |
| | | wrkMast.setSourceStaNo(wrkMast.getStaNo()); // 源站 |
| | | wrkMast.setSourceStaNo(wrkMast.getStaNo()+1); // 源站 |
| | | wrkMast.setStaNo(staNo); // 目标站 |
| | | wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 目标库位 = 出库时的源库位 |
| | | wrkMast.setSourceLocNo(""); // 源库位清空 |
| | |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, emptyInSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if(!Cools.isEmpty(barcode)) { |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode)) { |
| | | continue; |
| | | } |
| | | } else { |
| | | continue; |
| | | } |
| | | |
| | | LedThread ledThread = null; |
| | | if (!Cools.isEmpty(emptyInSta.getLed())) { |
| | |
| | | && staProtocol.isInEnable() |
| | | && staProtocol.isEmptyMk() |
| | | && staProtocol.isPakMk() |
| | | && staProtocol.getWorkNo() >= 9990 && staProtocol.getWorkNo() <= 9992 // 9990-9992空托,9993-9995 满托,9999回退 |
| | | && staProtocol.getWorkNo() == 9997 |
| | | ) { |
| | | News.warnNoLog(""+mark+" - 0"+" - 开始执行:空栈板初始化入库,叉车入库站放货"); |
| | | |
| | | try { |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | | // LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | | |
| | | SearchLocParam param = new SearchLocParam(); |
| | | param.setIoType(10); |
| | | param.setSourceStaNo(emptyInSta.getStaNo()); |
| | | param.setLocType1(locTypeDto.getLocType1()); |
| | | param.setLocType2(locTypeDto.getLocType2()); |
| | | param.setBarcode(barcode); |
| | | param.setLocType1((short)1); |
| | | // param.setLocType2(locTypeDto.getLocType2()); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/pakin/loc/v1") |
| | |
| | | } else { |
| | | staProtocol.setWorkNo(wrkNo); |
| | | staProtocol.setStaNo(emptyInSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | devpThread.setPakMk(emptyInSta.getBackSta(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | News.errorNoLog(""+mark+" - 2"+" - 更新plc站点信息失败"); |
| | |
| | | name: @pom.build.finalName@ |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=jgwms |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=djwms |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| | |
| | | enable: false |
| | | |
| | | wms: |
| | | url: 127.0.0.1:8089/jgwms |
| | | url: 127.0.0.1:8088/djwms |
| | | |
| | | # 下位机配置 |
| | | wcs-slave: |
| | |
| | | groupCount: 2 |
| | | |
| | | # 堆垛机1 |
| | | crn[0]: |
| | | id: 1 |
| | | ip: 172.26.11.31 |
| | | port: 102 |
| | | rack: 0 |
| | | slot: 0 |
| | | # 偏移量,当堆垛机站点列号=1时,偏移量=2 |
| | | offset: 2 |
| | | demo: false |
| | | # 堆垛机入库站点 |
| | | crnInStn[0]: |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staNo: 201 |
| | | row: 2 |
| | | bay: 1 |
| | | lev: 1 |
| | | # 堆垛机入库站点2 |
| | | crnInStn[1]: |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staNo: 203 |
| | | row: 1 |
| | | bay: 1 |
| | | lev: 1 |
| | | # 堆垛机出库站点1 |
| | | crnOutStn[0]: |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staNo: 203 |
| | | row: 1 |
| | | bay: 1 |
| | | lev: 1 |
| | | # 堆垛机出库站点2 |
| | | crnOutStn[1]: |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staNo: 205 |
| | | row: 1 |
| | | bay: 9 |
| | | lev: 1 |
| | | # 堆垛机出库站点3 |
| | | crnOutStn[2]: |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staNo: 201 |
| | | row: 2 |
| | | bay: 1 |
| | | lev: 1 |
| | | # crn[0]: |
| | | # id: 1 |
| | | # ip: 172.26.11.31 |
| | | # port: 102 |
| | | # rack: 0 |
| | | # slot: 0 |
| | | # # 偏移量,当堆垛机站点列号=1时,偏移量=2 |
| | | # offset: 2 |
| | | # demo: false |
| | | # # 堆垛机入库站点 |
| | | # crnInStn[0]: |
| | | # devpPlcId: ${wcs-slave.devp[0].id} |
| | | # staNo: 201 |
| | | # row: 2 |
| | | # bay: 1 |
| | | # lev: 1 |
| | | # # 堆垛机入库站点2 |
| | | # crnInStn[1]: |
| | | # devpPlcId: ${wcs-slave.devp[0].id} |
| | | # staNo: 203 |
| | | # row: 1 |
| | | # bay: 1 |
| | | # lev: 1 |
| | | # # 堆垛机出库站点1 |
| | | # crnOutStn[0]: |
| | | # devpPlcId: ${wcs-slave.devp[0].id} |
| | | # staNo: 203 |
| | | # row: 1 |
| | | # bay: 1 |
| | | # lev: 1 |
| | | # # 堆垛机出库站点2 |
| | | # crnOutStn[1]: |
| | | # devpPlcId: ${wcs-slave.devp[0].id} |
| | | # staNo: 205 |
| | | # row: 1 |
| | | # bay: 9 |
| | | # lev: 1 |
| | | # # 堆垛机出库站点3 |
| | | # crnOutStn[2]: |
| | | # devpPlcId: ${wcs-slave.devp[0].id} |
| | | # staNo: 201 |
| | | # row: 2 |
| | | # bay: 1 |
| | | # lev: 1 |
| | | |
| | | # 输送线1 |
| | | devp[0]: |
| | | id: 1 |
| | | ip: 172.26.11.41 |
| | | ip: 172.26.11.42 |
| | | port: 102 |
| | | rack: 0 |
| | | slot: 0 |
| | | # 入库口1 |
| | | inSta[0]: |
| | | staNo: 201 |
| | | staNo: 104 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 202 |
| | | backSta: 103 |
| | | led: ${wcs-slave.led[0].id} |
| | | # 入库口2 |
| | | inSta[1]: |
| | | staNo: 205 |
| | | barcode: ${wcs-slave.barcode[2].id} |
| | | led: ${wcs-slave.led[2].id} |
| | | # 入库口3 |
| | | inSta[2]: |
| | | staNo: 203 |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | led: ${wcs-slave.led[1].id} |
| | | backSta: 204 |
| | | # # 入库口2 |
| | | # inSta[1]: |
| | | # staNo: 205 |
| | | # barcode: ${wcs-slave.barcode[2].id} |
| | | # led: ${wcs-slave.led[2].id} |
| | | # # 入库口3 |
| | | # inSta[2]: |
| | | # staNo: 203 |
| | | # barcode: ${wcs-slave.barcode[1].id} |
| | | # led: ${wcs-slave.led[1].id} |
| | | # backSta: 204 |
| | | # 空板入库口1 |
| | | emptyInSta[0]: |
| | | staNo: 201 |
| | | staNo: 104 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 202 |
| | | backSta: 103 |
| | | led: ${wcs-slave.led[0].id} |
| | | # 空板入库口2 |
| | | emptyInSta[1]: |
| | | staNo: 205 |
| | | barcode: ${wcs-slave.barcode[2].id} |
| | | led: ${wcs-slave.led[2].id} |
| | | # 空板入库口3 |
| | | emptyInSta[2]: |
| | | staNo: 203 |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | backSta: 204 |
| | | led: ${wcs-slave.led[1].id} |
| | | # # 拣料入库口1 |
| | | # pickSta[0]: |
| | | # staNo: 104 |
| | | # barcode: ${wcs-slave.barcode[0].id} |
| | | # backSta: 103 |
| | | # emptyInSta[1]: |
| | | # staNo: 205 |
| | | # barcode: ${wcs-slave.barcode[2].id} |
| | | # led: ${wcs-slave.led[2].id} |
| | | # # 空板入库口3 |
| | | # emptyInSta[2]: |
| | | # staNo: 203 |
| | | # barcode: ${wcs-slave.barcode[1].id} |
| | | # backSta: 204 |
| | | # led: ${wcs-slave.led[1].id} |
| | | # 拣料入库口1 |
| | | pickSta[0]: |
| | | staNo: 104 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 103 |
| | | led: ${wcs-slave.led[0].id} |
| | | # # 拣料入库口2 |
| | | # pickSta[1]: |
| | | # staNo: 106 |
| | |
| | | # led: ${wcs-slave.led[2].id} |
| | | # 出库口1 |
| | | outSta[0]: |
| | | staNo: 204 |
| | | led: ${wcs-slave.led[1].id} |
| | | staNo: 101 |
| | | led: ${wcs-slave.led[0].id} |
| | | # 出库口2 |
| | | outSta[1]: |
| | | staNo: 205 |
| | | led: ${wcs-slave.led[2].id} |
| | | # 出库口3 |
| | | outSta[2]: |
| | | staNo: 202 |
| | | led: ${wcs-slave.led[1].id} |
| | | # outSta[1]: |
| | | # staNo: 205 |
| | | # led: ${wcs-slave.led[2].id} |
| | | # # 出库口3 |
| | | # outSta[2]: |
| | | # staNo: 202 |
| | | # led: ${wcs-slave.led[1].id} |
| | | |
| | | # 条码扫描仪1 |
| | | barcode[0]: |
| | |
| | | ip: 172.26.11.43 |
| | | port: 51236 |
| | | # 条码扫描仪2 |
| | | barcode[1]: |
| | | id: 2 |
| | | ip: 172.26.11.44 |
| | | port: 51236 |
| | | # 条码扫描仪3 |
| | | barcode[2]: |
| | | id: 3 |
| | | ip: 172.26.11.45 |
| | | port: 51236 |
| | | # barcode[1]: |
| | | # id: 2 |
| | | # ip: 172.26.11.44 |
| | | # port: 51236 |
| | | # # 条码扫描仪3 |
| | | # barcode[2]: |
| | | # id: 3 |
| | | # ip: 172.26.11.45 |
| | | # port: 51236 |
| | | |
| | | # LED1 |
| | | led[0]: |
| | |
| | | staArr: 202 |
| | | crnId: 1 |
| | | # LED2 |
| | | led[1]: |
| | | id: 2 |
| | | ip: 192.168.5.105 |
| | | port: 5005 |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staArr: 204 |
| | | crnId: 1 |
| | | # LED3 |
| | | led[2]: |
| | | id: 3 |
| | | ip: 192.168.5.106 |
| | | port: 5005 |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staArr: 205 |
| | | crnId: 1 |
| | | # led[1]: |
| | | # id: 2 |
| | | # ip: 192.168.5.105 |
| | | # port: 5005 |
| | | # devpPlcId: ${wcs-slave.devp[0].id} |
| | | # staArr: 204 |
| | | # crnId: 1 |
| | | # # LED3 |
| | | # led[2]: |
| | | # id: 3 |
| | | # ip: 192.168.5.106 |
| | | # port: 5005 |
| | | # devpPlcId: ${wcs-slave.devp[0].id} |
| | | # staArr: 205 |
| | | # crnId: 1 |
| | |
| | | var baseUrl = "/jgwcs"; |
| | | var baseUrl = "/djwcs"; |
| | | |
| | | // 赋值 |
| | | function setVal(el, val) { |
| | |
| | | "rackCount": 8, |
| | | "crnCount": 2, |
| | | "stbCount": 18, |
| | | "hpPosition": 1, |
| | | "hpPosition": 0, |
| | | "minBayNo": 1, |
| | | "floors": 1, |
| | | "racks": [ |
| | |
| | | "type": "rack", |
| | | "id": "rack1", |
| | | "top": 250, |
| | | "left": 270, |
| | | "width": 1350, |
| | | "left": 500, |
| | | "width": 1000, |
| | | "height": 30, |
| | | "minBayNo": 2, |
| | | "maxBayNo": 17 |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack2", |
| | | "top": 325, |
| | | "left": 270, |
| | | "width": 1350, |
| | | "left": 500, |
| | | "width": 1200, |
| | | "height": 30, |
| | | "minBayNo": 2, |
| | | "maxBayNo": 17 |
| | | "minBayNo": 1, |
| | | "maxBayNo": 28 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack3", |
| | | "top": 375, |
| | | "left": 500, |
| | | "width": 1200, |
| | | "height": 30, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 28 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack3", |
| | | "top": 450, |
| | | "left": 500, |
| | | "width": 1200, |
| | | "height": 30, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 28 |
| | | } |
| | | ], |
| | | "rackDescs": [ |
| | | { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc13", |
| | | "text": "》》》出库", |
| | | "top": 360, |
| | | "left": 1600, |
| | | "text": "》》》入库", |
| | | "top": 280, |
| | | "left": 330, |
| | | "width": 100, |
| | | "height": 23 |
| | | }, |
| | | { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc12", |
| | | "text": "《《《 入库", |
| | | "top": 220, |
| | | "left": 1600, |
| | | "text": "《《《 出库", |
| | | "top": 435, |
| | | "left": 330, |
| | | "width": 100, |
| | | "height": 23 |
| | | }, |
| | | { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc2", |
| | | "text": "#1", |
| | | "top": 330, |
| | | "left": 233, |
| | | "width": 33, |
| | | "height": 23 |
| | | }, |
| | | { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc1", |
| | | "text": "#2", |
| | | "top": 255, |
| | | "left": 235, |
| | | "text": "#1", |
| | | "top": 250, |
| | | "left": 1500, |
| | | "width": 33, |
| | | "height": 23 |
| | | } |
| | | , { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc2", |
| | | "text": "#2", |
| | | "top": 330, |
| | | "left": 1700, |
| | | "width": 33, |
| | | "height": 23 |
| | | } |
| | | , { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc3", |
| | | "text": "#3", |
| | | "top": 380, |
| | | "left": 1700, |
| | | "width": 33, |
| | | "height": 23 |
| | | } |
| | | , { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc4", |
| | | "text": "#4", |
| | | "top": 450, |
| | | "left": 1700, |
| | | "width": 33, |
| | | "height": 23 |
| | | } |
| | | ], |
| | | "crns": [ |
| | | { |
| | | "type": "crane", |
| | | "id": "crn-1", |
| | | "text": "1", |
| | | "top": 285, |
| | | "left": 270, |
| | | "width": 100, |
| | | "height": 32 |
| | | }, |
| | | { |
| | | "type": "track", |
| | | "id": "lb_track3", |
| | | "text": "", |
| | | "top": 302, |
| | | "left": 270, |
| | | "width": 1350, |
| | | "height": 1 |
| | | } |
| | | // { |
| | | // "type": "crane", |
| | | // "id": "crn-1", |
| | | // "text": "1", |
| | | // "top": 285, |
| | | // "left": 270, |
| | | // "width": 100, |
| | | // "height": 32 |
| | | // }, |
| | | // { |
| | | // "type": "track", |
| | | // "id": "lb_track3", |
| | | // "text": "", |
| | | // "top": 302, |
| | | // "left": 270, |
| | | // "width": 1350, |
| | | // "height": 1 |
| | | // } |
| | | ], |
| | | "areas": [ |
| | | { |
| | |
| | | "stns": [ |
| | | { |
| | | "type": "stn", |
| | | "id": "site-201", |
| | | "text": "201", |
| | | "top": 250, |
| | | "left": 1620, |
| | | "id": "site-101", |
| | | "text": "101", |
| | | "top": 400, |
| | | "left": 350, |
| | | "width": 70, |
| | | "height": 30 |
| | | }, |
| | | { |
| | | } |
| | | , { |
| | | "type": "stn", |
| | | "id": "site-202", |
| | | "text": "202", |
| | | "top": 250, |
| | | "left": 1691, |
| | | "id": "site-102", |
| | | "text": "102", |
| | | "top": 400, |
| | | "left": 279, |
| | | "width": 70, |
| | | "height": 30 |
| | | }, |
| | | { |
| | | } |
| | | , { |
| | | "type": "stn", |
| | | "id": "site-203", |
| | | "text": "203", |
| | | "top": 325, |
| | | "left": 1620, |
| | | "id": "site-103", |
| | | "text": "103", |
| | | "top": 369, |
| | | "left": 279, |
| | | "width": 70, |
| | | "height": 30 |
| | | }, |
| | | { |
| | | } |
| | | , { |
| | | "type": "stn", |
| | | "id": "site-204", |
| | | "text": "204", |
| | | "top": 325, |
| | | "left": 1691, |
| | | "id": "site-104", |
| | | "text": "104", |
| | | "top": 338, |
| | | "left": 279, |
| | | "width": 70, |
| | | "height": 30 |
| | | }, |
| | | { |
| | | } |
| | | , { |
| | | "type": "stn", |
| | | "id": "site-205", |
| | | "text": "205", |
| | | "top": 325, |
| | | "left": 945, |
| | | "width": 83, |
| | | "id": "site-105", |
| | | "text": "105", |
| | | "top": 307, |
| | | "left": 279, |
| | | "width": 70, |
| | | "height": 30 |
| | | } |
| | | , { |
| | | "type": "stn", |
| | | "id": "site-106", |
| | | "text": "106", |
| | | "top": 307, |
| | | "left": 350, |
| | | "width": 70, |
| | | "height": 30 |
| | | } |
| | | ] |