| | |
| | | vo.setSiteId(String.valueOf(entry.getKey())); // 站点编号 |
| | | vo.setWorkNo(staProtocol.getWorkNo()); // 工作号 |
| | | vo.setSiteStatus(SiteStatusType.process(staProtocol)); // 状态 |
| | | vo.setNearbySta(staProtocol.getNearbySta()); |
| | | vos.add(vo); |
| | | } |
| | | return R.ok().add(vos); |
| | |
| | | import com.zy.asrs.domain.vo.SiteTableVo; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.core.Slave; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | |
| | | if (pakMk != null) { |
| | | staProtocol.setPakMk(pakMk.equals("Y")); |
| | | } |
| | | |
| | | staProtocol.setPalletSize((short) 1); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (result) { |
| | | return R.ok(); |
| | |
| | | return R.error("plc已掉线"); |
| | | } |
| | | |
| | | @GetMapping("/site/{siteId}") |
| | | public R site(@PathVariable("siteId") Integer siteId){ |
| | | List<DevpSlave> devp = slaveProperties.getDevp(); |
| | | for (DevpSlave slave : devp) { |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, slave.getId()); |
| | | Map<Integer, StaProtocol> station = devpThread.getStation(); |
| | | StaProtocol staProtocol = station.get(siteId); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } |
| | | return R.ok().add(staProtocol); |
| | | } |
| | | return R.error(); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | String barcode11 = barcodeThread.getBarcode(); |
| | | if (Cools.isEmpty(barcode11)){ |
| | | if (staProtocol.isAutoing()&& !staProtocol.isEmptyMk() && staProtocol.getWorkNo() == 9999 && staProtocol.isPakMk() && staProtocol.getStamp()==2){ |
| | | staProtocol.setStamp(3); |
| | | if (staProtocol.isAutoing()&& !staProtocol.isEmptyMk() && staProtocol.getWorkNo() == 9999 && staProtocol.isPakMk()){ |
| | | News.info(""+mark+" - 7"+" - 扫码失败2 ===>> {}号条码扫描器检测条码信息:{},站点:{}", inSta.getBarcode(), barcode11, inSta.getStaNo()); |
| | | staProtocol.setWorkNo((short) 9989); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | |
| | | if (staProtocol.isAutoing() && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() && staProtocol.getWorkNo() > 9990 |
| | | && staProtocol.getWorkNo()!=9999 && staProtocol.getWorkNo()!=9992 && staProtocol.getWorkNo()!=0 |
| | | && staProtocol.isPakMk() && staProtocol.getStamp()>=2 && staProtocol.getStamp()!=3) {// && !Cools.isEmpty(barcode)) { |
| | | && staProtocol.isPakMk()) {// && !Cools.isEmpty(barcode)) { |
| | | News.warnNoLog(""+mark+" - 0"+" - 开始执行"); |
| | | // try { |
| | | // Thread.sleep(300); |
| | |
| | | }else { |
| | | News.errorNoLog(""+mark+" - 6"+" - 站点信息不符合入库条件!!!"+" 自动信号:"+staProtocol.isAutoing()+"、可入信号:" + staProtocol.isInEnable() |
| | | +"、空板信号:"+ staProtocol.isEmptyMk()+"、工作号:" + staProtocol.getWorkNo() |
| | | +"、锁定标记"+ staProtocol.isPakMk()+"、入库印记:" + staProtocol.getStamp()); |
| | | +"、锁定标记"+ staProtocol.isPakMk()); |
| | | } |
| | | |
| | | } |
| | |
| | | }else { |
| | | News.errorNoLog(""+mark+" - 6"+" - 站点信息不符合入库条件!!!"+" 自动信号:"+staProtocol.isLoading()+"、可入信号:" + staProtocol.isInEnable() |
| | | +"、空板信号:"+ staProtocol.isEmptyMk()+"、工作号:" + staProtocol.getWorkNo() |
| | | +"、锁定标记"+ staProtocol.isPakMk()+"、入库印记:" + staProtocol.getStamp()); |
| | | +"、锁定标记"+ staProtocol.isPakMk()); |
| | | } |
| | | } |
| | | } |
| | |
| | | && staProtocol.isInEnable() |
| | | && staProtocol.isEmptyMk() |
| | | && (staProtocol.getWorkNo() > 9990 && staProtocol.getWorkNo() <= 9999) |
| | | && staProtocol.isPakMk()&& staProtocol.getStamp()>=2) { |
| | | && staProtocol.isPakMk()) { |
| | | News.warnNoLog(""+mark+" - 0"+" - 开始执行:空栈板初始化入库,叉车入库站放货"); |
| | | |
| | | try { |
| | |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PreDestroy; |
| | | import java.util.ArrayList; |
| | | |
| | | /** |
| | | * WCS主流程 |
| | |
| | | // 锁定标记 |
| | | private boolean pakMk = true; |
| | | |
| | | // 入库暂存数 |
| | | private Short inQty; |
| | | //报警 |
| | | private Short error; |
| | | |
| | | // 隔壁站点(台车位置) |
| | | private String nearbySta; |
| | | // 前超报警 |
| | | private boolean frontError; |
| | | |
| | | //lfd入库印记 当stamp>=2时才入库 |
| | | private Integer stamp = 0; |
| | | // 后超报警 |
| | | private boolean backError; |
| | | |
| | | // 超高报警 |
| | | private boolean highError; |
| | | |
| | | // 左高报警 |
| | | private boolean leftError; |
| | | |
| | | // 右高报警 |
| | | private boolean rightError; |
| | | |
| | | // 超重报警 |
| | | private boolean weightError; |
| | | |
| | | // 扫码报警 |
| | | private boolean barcodeError; |
| | | |
| | | // 托盘尺寸 |
| | | private Short palletSize; |
| | | |
| | | public BasDevp toSqlModel(){ |
| | | BasDevp basDevp = new BasDevp(); |
| | |
| | | basDevp.setLocType2((short) 0); // 宽窄类型{0:未知,1:窄库位,2:宽库位} |
| | | basDevp.setLocType3((short) 0); // 轻重类型{0:未知,1:轻库位,2:重库位} |
| | | basDevp.setLocType1(high != low && low ? (short) 1 : (short) 2); |
| | | basDevp.setInQty(inQty !=null ?(int)inQty : 0); |
| | | return basDevp; |
| | | } |
| | | |
| | |
| | | private SiemensS7Net siemensS7Net; |
| | | private Map<Integer, StaProtocol> station = new ConcurrentHashMap<>(); |
| | | private short heartBeatVal = 1; |
| | | // public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{ |
| | | // |
| | | // }}; |
| | | |
| | | public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{ |
| | | add(101);add(102); |
| | | add(1008);add(1009);add(1010);add(1011);add(1012);add(1013);add(1014);add(1015); |
| | | add(1016);add(1017);add(1018);add(1019);add(1020);add(1021);add(1022);add(1023); |
| | | add(1024);add(1025);add(1026);add(1027);add(1028);add(1029);add(1030);add(1031); |
| | | add(1032);add(1033);add(1034);add(1035);add(1036);add(1037);add(1038);add(1039); |
| | | add(1040);add(1041);add(1042);add(1043);add(1044);add(1045);add(1046);add(1047); |
| | | add(1048);add(1049);add(1050);add(1051);add(1052);add(1053);add(1054);add(1055); |
| | | add(1056);add(1057);add(1058);add(1059);add(1060);add(1061);add(1062);add(1063); |
| | | add(1064);add(1065);add(1066);add(1067);add(1068);add(1069);add(1070);add(1071); |
| | | add(1072);add(1073);add(1074);add(1075);add(1076);add(1077);add(1078);add(1079); |
| | | add(1080);add(1081);add(1082);add(1083);add(1084);add(1085);add(1086);add(1087); |
| | | add(1088);add(1089);add(1090); |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{ |
| | | add(1001);add(1002);add(1003);add(1004);add(1005);add(1006);add(1007); |
| | | }}; |
| | | |
| | | |
| | | private Integer count=0; |
| | | private Integer count = 0; |
| | | |
| | | /** |
| | | * 条码数量 |
| | | */ |
| | | private int barcodeSize = 1; |
| | | public static final ArrayList<Integer> barcode1 = new ArrayList<Integer>() {{ |
| | | add(1); |
| | | add(2); |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> barcode2 = new ArrayList<Integer>() {{ |
| | | add(3); |
| | | add(4); |
| | | }}; |
| | | |
| | | /** |
| | | * 入出库模式 |
| | |
| | | * 4.出库模式 |
| | | */ |
| | | public IoModeType ioModeOf2F = IoModeType.NONE; |
| | | // public IoModeType ioMode = IoModeType.NONE; |
| | | public IoModeType ioModeOf4F = IoModeType.NONE; |
| | | // public IoModeType ioMode = IoModeType.NONE; |
| | | |
| | | public SiemensDevpThread(DevpSlave slave) { |
| | | this.slave = slave; |
| | |
| | | switch (slave.getId()) { |
| | | case 1: |
| | | return staNos1; |
| | | case 2: |
| | | return staNos2; |
| | | default: |
| | | throw new CoolException("服务器异常"); |
| | | } |
| | | } |
| | | |
| | | private ArrayList<Integer> getBarcode() { |
| | | switch (slave.getId()) { |
| | | case 1: |
| | | return barcode1; |
| | | case 2: |
| | | return barcode2; |
| | | default: |
| | | throw new CoolException("服务器异常"); |
| | | } |
| | |
| | | // updateIoMode(); |
| | | ArrayList<Integer> staNos = getStaNo(); |
| | | int staNoSize = staNos.size(); |
| | | OperateResultExOne<byte[]> result = siemensS7Net.Read("DB100.0", (short) (staNoSize*2)); |
| | | OperateResultExOne<byte[]> result4 = siemensS7Net.Read("DB101.0", (short) (staNoSize*2)); |
| | | if (result.IsSuccess && result4.IsSuccess) { |
| | | OperateResultExOne<byte[]> result = siemensS7Net.Read("DB101.0", (short) (staNoSize * 18)); |
| | | if (result.IsSuccess) { |
| | | for (int i = 0; i < staNoSize; i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |
| | | StaProtocol staProtocol = station.get(siteId); |
| | |
| | | station.put(siteId, staProtocol); |
| | | } |
| | | staProtocol.setSiteId(siteId); |
| | | staProtocol.setWorkNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*2)); // 工作号 |
| | | staProtocol.setWorkNo((short) siemensS7Net.getByteTransform().TransInt32(result.Content, (i * 18))); // 工作号 |
| | | staProtocol.setStaNo((short) siemensS7Net.getByteTransform().TransInt32(result.Content, (i * 18) + 4)); // 目标站 |
| | | |
| | | staProtocol.setStaNo(siemensS7Net.getByteTransform().TransInt16(result4.Content, i*2)); // 目标站 |
| | | } |
| | | } |
| | | // Thread.sleep(200); |
| | | // OperateResultExOne<byte[]> result0 = siemensS7Net.Read("DB101.0", (short) 186); |
| | | // if (result0.IsSuccess) { |
| | | // for (int i = 0; i < 93; i++) { |
| | | // Integer siteId = staNos.get(i); // 站点编号 |
| | | // StaProtocol staProtocol = station.get(siteId); |
| | | // if (null == staProtocol) { |
| | | // staProtocol = new StaProtocol(); |
| | | // staProtocol.setSiteId(siteId); |
| | | // station.put(siteId, staProtocol); |
| | | // } |
| | | // staProtocol.setStaNo(siemensS7Net.getByteTransform().TransInt16(result0.Content, i*2)); // 目标站 |
| | | // } |
| | | // } |
| | | //条码扫描器 |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB100.200",(short)(barcodeSize*8)); |
| | | if (result2.IsSuccess) { |
| | | for (int i = 0; i < barcodeSize; i++) { |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8"); |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, i + 1); |
| | | if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)){ |
| | | // && !Cools.isEmpty(barcode) && Cools.isEmpty(barcodeThread.getBarcode())) { |
| | | barcodeThread.setBarcode(barcode); |
| | | short locHeight = siemensS7Net.getByteTransform().TransInt16(result.Content, (i * 18) + 8);//库位高度 |
| | | if (locHeight == 2) {//high |
| | | staProtocol.setHigh(true); |
| | | staProtocol.setLow(false); |
| | | }else {//low |
| | | staProtocol.setHigh(false); |
| | | staProtocol.setLow(true); |
| | | } |
| | | } |
| | | |
| | | } |
| | | staProtocol.setError(siemensS7Net.getByteTransform().TransInt16(result.Content, (i * 18) + 10)); // 报警 |
| | | |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB102.0", (short) (staNoSize * 2)); |
| | | if (result1.IsSuccess) { |
| | | for (int i = 0; i < staNoSize; i++) { |
| | | Integer siteId = staNos.get(i); // 站点编号 |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(result1.Content, i*2, 1); |
| | | StaProtocol staProtocol = station.get(siteId); |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(result.Content, (i * 18) + 12, 1); |
| | | staProtocol.setAutoing(status[0]); // 自动 |
| | | staProtocol.setLoading(status[1]); // 有物 |
| | | staProtocol.setInEnable(status[2]); // 可入 |
| | | staProtocol.setOutEnable(status[3]);// 可出 |
| | | staProtocol.setEmptyMk(status[4]); // 空板信号 |
| | | staProtocol.setFullPlt(status[5]); // 满托盘 |
| | | staProtocol.setHigh(status[6]); // 高库位 |
| | | staProtocol.setLow(status[7]); // 低库位 |
| | | |
| | | if (!staProtocol.isPakMk() && !staProtocol.isLoading()) { |
| | | staProtocol.setPakMk(true); |
| | | } |
| | | |
| | | if (staProtocol.getStamp()>=2 && !staProtocol.isLoading()){ |
| | | staProtocol.setStamp(0); |
| | | }else if (staProtocol.getStamp()<2 && staProtocol.isLoading()){ |
| | | //lfd入库印记 当stamp>=2时才入库 |
| | | staProtocol.setStamp(staProtocol.getStamp()+1); |
| | | } |
| | | boolean[] statusError = siemensS7Net.getByteTransform().TransBool(result.Content, (i * 18) + 13, 1); |
| | | staProtocol.setFrontError(statusError[0]); // 前超报警 |
| | | staProtocol.setBackError(statusError[1]); // 后超报警 |
| | | staProtocol.setHighError(statusError[2]); // 超高报警 |
| | | staProtocol.setLeftError(statusError[3]);// 左高报警 |
| | | staProtocol.setRightError(statusError[4]); // 右高报警 |
| | | staProtocol.setWeightError(statusError[5]); // 超重报警 |
| | | staProtocol.setBarcodeError(statusError[6]); // 扫码报警 |
| | | |
| | | } |
| | | } |
| | | |
| | | if (result.IsSuccess && result1.IsSuccess) { |
| | | //条码扫描器 |
| | | Thread.sleep(200); |
| | | ArrayList<Integer> barcodeList = getBarcode(); |
| | | int barcodeSize = barcodeList.size(); |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB103.0", (short) (barcodeSize * 8)); |
| | | if (result2.IsSuccess) { |
| | | for (int i = 0; i < barcodeSize; i++) { |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2.Content, i * 8, 8, "UTF-8"); |
| | | Integer barcodeId = barcodeList.get(i); |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId); |
| | | if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)){ |
| | | barcodeThread.setBarcode(barcode); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | if (result.IsSuccess && result2.IsSuccess) { |
| | | OutputQueue.DEVP.offer(MessageFormat.format("【{0}】[id:{1}] <<<<< 实时数据更新成功",DateUtils.convert(new Date()), slave.getId())); |
| | | |
| | | // 根据实时信息更新数据库 |
| | |
| | | } |
| | | ArrayList<Integer> staNos = getStaNo(); |
| | | int index = staNos.indexOf(staProtocol.getSiteId()); |
| | | short[] array = new short[2]; |
| | | array[0] = staProtocol.getWorkNo(); |
| | | array[1] = staProtocol.getStaNo(); |
| | | // OperateResult write = siemensS7Net.Write("DB100." + index*4, array); |
| | | int[] array = new int[3]; |
| | | array[0] = staProtocol.getWorkNo().intValue(); |
| | | array[1] = staProtocol.getStaNo().intValue(); |
| | | array[2] = staProtocol.getPalletSize().intValue(); |
| | | |
| | | OperateResult write = null; |
| | | OperateResult write1 = null; |
| | | //任务下发次数 |
| | | int writeCount = 0; |
| | | do { |
| | | write = siemensS7Net.Write("DB100." + index*2, staProtocol.getWorkNo()); // 工作号 |
| | | Thread.sleep(500); |
| | | write1 = siemensS7Net.Write("DB101." + index*2, staProtocol.getStaNo()); // 目标站 |
| | | if(write.IsSuccess || write1.IsSuccess){ |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> readResult = siemensS7Net.Read("DB100." + index*2, (short) 2); |
| | | OperateResultExOne<byte[]> readResult1 = siemensS7Net.Read("DB101." + index*2, (short) 2); |
| | | if(readResult.IsSuccess && readResult1.IsSuccess){ |
| | | short workNo = siemensS7Net.getByteTransform().TransInt16(readResult.Content, 0); |
| | | short staNo = siemensS7Net.getByteTransform().TransInt16(readResult1.Content, 0); |
| | | if(staProtocol.getWorkNo().equals(workNo) && staProtocol.getStaNo().equals(staNo)){ |
| | | //任务命令写入成功 |
| | | log.info("写入输送线命令后返回成功,并且回读成功。输送线plc编号={},{},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | break; |
| | | } else {//返回结果是成功了,但是真实值不相同 |
| | | writeCount++; |
| | | log.error("写入输送线命令后返回成功,但是读取任务值不一致。输送线plc编号={},{},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | } |
| | | } else { |
| | | writeCount++; |
| | | log.error("写入输送线命令后读取失败。输送线plc编号={},站点数据={},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | } |
| | | } |
| | | else { |
| | | writeCount++; |
| | | log.error("写入输送线命令后读取失败。输送线plc编号={},站点数据={},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | } |
| | | }while (writeCount<5); |
| | | OperateResult write = siemensS7Net.Write("DB102." + index * 16, array); |
| | | |
| | | if (!write.IsSuccess || !write1.IsSuccess) { |
| | | // OperateResult write = null; |
| | | // OperateResult write1 = null; |
| | | // //任务下发次数 |
| | | // int writeCount = 0; |
| | | // do { |
| | | // write = siemensS7Net.Write("DB100." + index*2, staProtocol.getWorkNo()); // 工作号 |
| | | // Thread.sleep(500); |
| | | // write1 = siemensS7Net.Write("DB101." + index*2, staProtocol.getStaNo()); // 目标站 |
| | | // if(write.IsSuccess || write1.IsSuccess){ |
| | | // Thread.sleep(200); |
| | | // OperateResultExOne<byte[]> readResult = siemensS7Net.Read("DB100." + index*2, (short) 2); |
| | | // OperateResultExOne<byte[]> readResult1 = siemensS7Net.Read("DB101." + index*2, (short) 2); |
| | | // if(readResult.IsSuccess && readResult1.IsSuccess){ |
| | | // short workNo = siemensS7Net.getByteTransform().TransInt16(readResult.Content, 0); |
| | | // short staNo = siemensS7Net.getByteTransform().TransInt16(readResult1.Content, 0); |
| | | // if(staProtocol.getWorkNo().equals(workNo) && staProtocol.getStaNo().equals(staNo)){ |
| | | // //任务命令写入成功 |
| | | // log.info("写入输送线命令后返回成功,并且回读成功。输送线plc编号={},{},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | // break; |
| | | // } else {//返回结果是成功了,但是真实值不相同 |
| | | // writeCount++; |
| | | // log.error("写入输送线命令后返回成功,但是读取任务值不一致。输送线plc编号={},{},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | // } |
| | | // } else { |
| | | // writeCount++; |
| | | // log.error("写入输送线命令后读取失败。输送线plc编号={},站点数据={},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | // } |
| | | // } |
| | | // else { |
| | | // writeCount++; |
| | | // log.error("写入输送线命令后读取失败。输送线plc编号={},站点数据={},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | // } |
| | | // }while (writeCount<5); |
| | | |
| | | if (!write.IsSuccess) { |
| | | staProtocol = station.get(staProtocol.getSiteId()); |
| | | if (staProtocol.getWorkNo() == 0 && staProtocol.getStaNo() ==0) { |
| | | staProtocol.setPakMk(true); |
| | |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # url: jdbc:sqlserver://127.0.0.1:1433;databasename=lfdasrsMem |
| | | url: jdbc:sqlserver://192.168.0.17:1433;databasename=ytflsbasrs |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=ytflasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| | |
| | | # 输送线1 |
| | | devp[0]: |
| | | id: 1 |
| | | ip: 10.10.11.10 |
| | | ip: 172.17.60.100 |
| | | port: 102 |
| | | rack: 0 |
| | | slot: 0 |
| | | # 入库口1 |
| | | inSta[0]: |
| | | staNo: 102 |
| | | staNo: 1009 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | backSta: 1008 |
| | | led: ${wcs-slave.led[0].id} |
| | | # 入库口2 |
| | | inSta[1]: |
| | | staNo: 1076 |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | backSta: 1075 |
| | | led: ${wcs-slave.led[1].id} |
| | | # 空板入库口1 |
| | | emptyInSta[0]: |
| | | staNo: 102 |
| | | staNo: 1009 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | backSta: 1008 |
| | | led: ${wcs-slave.led[0].id} |
| | | # 拣料入库口1 |
| | | pickSta[0]: |
| | |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | led: ${wcs-slave.led[0].id} |
| | | |
| | | # 出库口1 |
| | | outSta[0]: |
| | | staNo: 102 |
| | |
| | | id: 1 |
| | | ip: 10.10.10.121 |
| | | port: 51236 |
| | | # 条码扫描仪2 |
| | | barcode[1]: |
| | | id: 2 |
| | | ip: 10.10.10.121 |
| | | port: 51236 |
| | | # 条码扫描仪3 |
| | | barcode[2]: |
| | | id: 3 |
| | | ip: 10.10.10.121 |
| | | port: 51236 |
| | | # 条码扫描仪4 |
| | | barcode[3]: |
| | | id: 4 |
| | | ip: 10.10.10.121 |
| | | port: 51236 |
| | | # LED1 |
| | | led[0]: |
| | | id: 1 |
| | | ip: 10.10.11.210 |
| | | port: 5005 |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staArr: 102 |
| | | staArr: 1008 |
| | | # LED2 |
| | | led[1]: |
| | | id: 2 |
| | | ip: 10.10.11.210 |
| | | port: 5005 |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staArr: 1075 |
| | |
| | | // getCrnInfo(minBayNo); |
| | | } |
| | | // 货架描述 |
| | | for (let i = 0;i < rackDescss.length;i++) { |
| | | rackDesc = "<div class='rackDescs' id='" + rackDescss[i].id + |
| | | "'style='width:"+ rackDescss[i].width + |
| | | "px;height: "+ rackDescss[i].height+ |
| | | "px;line-height: "+ rackDescss[i].height+ |
| | | "px;top: "+ rackDescss[i].top + |
| | | "px;left: "+ rackDescss[i].left + |
| | | "px'>" + rackDescss[i].text + "</div>" |
| | | rackDescs = rackDescs + rackDesc |
| | | } |
| | | // for (let i = 0;i < rackDescss.length;i++) { |
| | | // rackDesc = "<div class='rackDescs' id='" + rackDescss[i].id + |
| | | // "'style='width:"+ rackDescss[i].width + |
| | | // "px;height: "+ rackDescss[i].height+ |
| | | // "px;line-height: "+ rackDescss[i].height+ |
| | | // "px;top: "+ rackDescss[i].top + |
| | | // "px;left: "+ rackDescss[i].left + |
| | | // "px'>" + rackDescss[i].text + "</div>" |
| | | // rackDescs = rackDescs + rackDesc |
| | | // } |
| | | // 堆垛机和地轨 |
| | | for (let i = 0;i < crnss.length;i++) { |
| | | if (crnss[i].type == "crane") { |
| | |
| | | mapInfo = { |
| | | "mapName": "LFDWCSMEM", |
| | | "rackCount": 18, |
| | | "crnCount": 7, |
| | | "stbCount": 77, |
| | | "hpPosition": 0, |
| | | "minBayNo": 2, |
| | | "floors": 1, |
| | | "racks": [{ |
| | | "type": "rack", |
| | | "id": "rack32", |
| | | "top": 410, |
| | | "left": 639, |
| | | "width": 1072, |
| | | "height": 22, |
| | | "minBayNo": 2, |
| | | "maxBayNo": 42 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack33", |
| | | "top": 458, |
| | | "left": 639, |
| | | "width": 1072, |
| | | "height": 22, |
| | | "minBayNo": 2, |
| | | "maxBayNo": 42 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack34", |
| | | "top": 479, |
| | | "left": 639, |
| | | "width": 1072, |
| | | "height": 22, |
| | | "minBayNo": 2, |
| | | "maxBayNo": 42 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack31", |
| | | "top": 389, |
| | | "left": 639, |
| | | "width": 1072, |
| | | "height": 22, |
| | | "minBayNo": 2, |
| | | "maxBayNo": 42 |
| | | }], |
| | | "rackDescs": [{ |
| | | "type": "rackDescs", |
| | | "id": "lb_desc9", |
| | | "text": "#31", |
| | | "top": 388, |
| | | "left": 1716, |
| | | "width": 33, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc18", |
| | | "text": "#34", |
| | | "top": 479, |
| | | "left": 1716, |
| | | "width": 33, |
| | | "height": 23 |
| | | }], |
| | | "crns": [{ |
| | | "type": "track", |
| | | "id": "lb_track1", |
| | | "text": "", |
| | | "top": 448, |
| | | "left": 559, |
| | | "width": 1345, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |
| | | "id": "crn-1", |
| | | "text": "1", |
| | | "top": 435, |
| | | "left": 805, |
| | | "width": 93, |
| | | "height": 22 |
| | | }], |
| | | "areas": [{ |
| | | "type": "Control_floor", |
| | | "id": "tabControl_floor1", |
| | | "text": "楼层", |
| | | "top": 68, |
| | | "left": 80, |
| | | "width": 1845, |
| | | "height": 676, |
| | | "floors": [{ |
| | | "type": "floor", |
| | | "id": "page_floor1", |
| | | "text": "1F", |
| | | "top": 4, |
| | | "left": 22, |
| | | "width": 1819, |
| | | "height": 668, |
| | | "stns": [ { |
| | | "type": "stn", |
| | | "id": "site-102", |
| | | "text": "102", |
| | | "top": 460, |
| | | "left": 548, |
| | | "width": 89, |
| | | "height": 20 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-101", |
| | | "text": "101", |
| | | "top": 460, |
| | | "left": 458, |
| | | "width": 89, |
| | | "height": 20 |
| | | }] |
| | | }] |
| | | }] |
| | | } |
| | | mapInfo = {"mapName":"YTFLWCS","rackCount":16,"crnCount":4,"stbCount":16,"hpPosition":0,"minBayNo":2,"floors":1,"racks":[{"type":"rack","id":"rack23","top":735,"left":563,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack26","top":828,"left":565,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack25","top":805,"left":565,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack24","top":757,"left":563,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack19","top":621,"left":563,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack22","top":713,"left":563,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack21","top":691,"left":563,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack20","top":643,"left":563,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack4","top":160,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":61},{"type":"rack","id":"rack5","top":182,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":61},{"type":"rack","id":"rack111","top":70,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":61},{"type":"rack","id":"rack15","top":504,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack18","top":597,"left":563,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack17","top":573,"left":563,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack16","top":525,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack11","top":389,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack14","top":481,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack13","top":460,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack12","top":412,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack7","top":277,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack10","top":368,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack9","top":345,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack8","top":299,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31},{"type":"rack","id":"rack2","top":114,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":61},{"type":"rack","id":"rack3","top":136,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":61},{"type":"rack","id":"rack6","top":239,"left":562,"width":846,"height":20,"minBayNo":2,"maxBayNo":31}],"crns":[{"type":"crane","id":"crn-5","text":"5","top":667,"left":653,"width":93,"height":22},{"type":"crane","id":"crn-6","text":"6","top":781,"left":653,"width":93,"height":22},{"type":"crane","id":"crn-1","text":"1","top":213,"left":651,"width":93,"height":22},{"type":"track","id":"lb_track1","text":"","top":560,"left":482,"width":971,"height":2},{"type":"crane","id":"crn-2","text":"2","top":321,"left":662,"width":93,"height":22},{"type":"track","id":"lb_track3","text":"","top":444,"left":482,"width":972,"height":2},{"type":"crane","id":"crn-3","text":"3","top":436,"left":651,"width":93,"height":22},{"type":"track","id":"lb_track5","text":"","top":331,"left":483,"width":974,"height":2},{"type":"track","id":"lb_track4","text":"","top":221,"left":485,"width":975,"height":2},{"type":"crane","id":"crn-4","text":"4","top":549,"left":651,"width":93,"height":22}],"areas":[{"type":"Control_floor","id":"tabControl_floor1","text":"楼层","top":68,"left":80,"width":1423,"height":863,"floors":[{"type":"floor","id":"page_floor1","text":"1F","top":4,"left":22,"width":1397,"height":855,"stns":[{"type":"stn","id":"site-10900","text":"1090","top":439,"left":207,"width":37,"height":20},{"type":"stn","id":"site-1091","text":"1091","top":437,"left":105,"width":37,"height":20},{"type":"stn","id":"site-1003","text":"1003","top":320,"left":102,"width":37,"height":20},{"type":"stn","id":"site-1007","text":"1007","top":320,"left":184,"width":37,"height":20},{"type":"stn","id":"site-1001","text":"1001","top":244,"left":184,"width":37,"height":20},{"type":"stn","id":"site-1002","text":"1002","top":269,"left":184,"width":37,"height":20},{"type":"stn","id":"site-1006","text":"1006","top":295,"left":184,"width":37,"height":20},{"type":"stn","id":"site-1004","text":"1004","top":295,"left":143,"width":37,"height":20},{"type":"stn","id":"site-1005","text":"1005","top":295,"left":102,"width":37,"height":20},{"type":"stn","id":"site-1090","text":"1090","top":857,"left":331,"width":58,"height":20},{"type":"stn","id":"site-1075","text":"1075","top":918,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1076","text":"1076","top":897,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1077","text":"1077","top":876,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1078","text":"1078","top":855,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1079","text":"1079","top":785,"left":255,"width":71,"height":64},{"type":"stn","id":"site-1047","text":"1047","top":762,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1080","text":"1080","top":691,"left":255,"width":71,"height":66},{"type":"stn","id":"site-1081","text":"1081","top":622,"left":255,"width":71,"height":66},{"type":"stn","id":"site-1082","text":"1082","top":552,"left":255,"width":71,"height":66},{"type":"stn","id":"site-1034","text":"1034","top":527,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1083","text":"1083","top":429,"left":255,"width":71,"height":77},{"type":"stn","id":"site-1084","text":"1084","top":347,"left":255,"width":71,"height":77},{"type":"stn","id":"site-1085","text":"1085","top":266,"left":255,"width":71,"height":77},{"type":"stn","id":"site-1018","text":"1018","top":241,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1086","text":"1086","top":209,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1087","text":"1087","top":166,"left":255,"width":71,"height":37},{"type":"stn","id":"site-1088","text":"1088","top":141,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1074","text":"1074","top":878,"left":1021,"width":59,"height":20},{"type":"stn","id":"site-1073","text":"1073","top":857,"left":1021,"width":59,"height":20},{"type":"stn","id":"site-1071","text":"1071","top":878,"left":891,"width":59,"height":20},{"type":"stn","id":"site-1072","text":"1072","top":857,"left":956,"width":59,"height":20},{"type":"stn","id":"site-1070","text":"1070","top":857,"left":891,"width":59,"height":20},{"type":"stn","id":"site-1069","text":"1069","top":857,"left":827,"width":59,"height":20},{"type":"stn","id":"site-1068","text":"1068","top":878,"left":762,"width":59,"height":20},{"type":"stn","id":"site-1067","text":"1067","top":857,"left":762,"width":59,"height":20},{"type":"stn","id":"site-1066","text":"1066","top":857,"left":697,"width":59,"height":20},{"type":"stn","id":"site-1065","text":"1065","top":899,"left":571,"width":59,"height":20},{"type":"stn","id":"site-1063","text":"1063","top":899,"left":633,"width":59,"height":20},{"type":"stn","id":"site-1062","text":"1062","top":878,"left":633,"width":59,"height":20},{"type":"stn","id":"site-1061","text":"1061","top":857,"left":633,"width":59,"height":20},{"type":"stn","id":"site-1058","text":"1058","top":921,"left":509,"width":59,"height":20},{"type":"stn","id":"site-1057","text":"1057","top":899,"left":509,"width":59,"height":20},{"type":"stn","id":"site-1056","text":"1056","top":878,"left":509,"width":59,"height":20},{"type":"stn","id":"site-1060","text":"1060","top":857,"left":570,"width":59,"height":20},{"type":"stn","id":"site-1055","text":"1055","top":857,"left":509,"width":59,"height":20},{"type":"stn","id":"site-1054","text":"1054","top":857,"left":448,"width":59,"height":20},{"type":"stn","id":"site-1053","text":"1053","top":857,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1050","text":"1050","top":831,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1052","text":"1052","top":806,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1051","text":"1051","top":806,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1046","text":"1046","top":782,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1049","text":"1049","top":758,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1048","text":"1048","top":758,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1043","text":"1043","top":726,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1045","text":"1045","top":693,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1044","text":"1044","top":693,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1040","text":"1040","top":669,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1042","text":"1042","top":645,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1041","text":"1041","top":645,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1037","text":"1037","top":607,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1039","text":"1039","top":575,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1038","text":"1038","top":575,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1033","text":"1033","top":551,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1036","text":"1036","top":527,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1035","text":"1035","top":527,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1030","text":"1030","top":493,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1032","text":"1032","top":461,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1031","text":"1031","top":461,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1027","text":"1027","top":437,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1029","text":"1029","top":413,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1028","text":"1028","top":413,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1024","text":"1024","top":383,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1026","text":"1026","top":347,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1025","text":"1025","top":347,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1021","text":"1021","top":323,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1023","text":"1023","top":300,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1022","text":"1022","top":300,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1017","text":"1017","top":266,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1020","text":"1020","top":241,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1019","text":"1019","top":241,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1014","text":"1014","top":209,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1016","text":"1016","top":183,"left":461,"width":100,"height":20},{"type":"stn","id":"site-1015","text":"1015","top":183,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1011","text":"1011","top":161,"left":393,"width":59,"height":20},{"type":"stn","id":"site-1012","text":"1012","top":137,"left":394,"width":59,"height":20},{"type":"stn","id":"site-1008","text":"1008","top":115,"left":187,"width":63,"height":20},{"type":"stn","id":"site-1009","text":"1009","top":115,"left":255,"width":71,"height":20},{"type":"stn","id":"site-1089","text":"1089","top":115,"left":331,"width":58,"height":20},{"type":"stn","id":"site-1010","text":"1010","top":115,"left":395,"width":59,"height":20},{"type":"stn","id":"site-1013","text":"1013","top":137,"left":461,"width":100,"height":20}]}]}]} |