| | |
| | | vo.setPakMk(staProtocol.isPakMk()?"Y":"N"); // 入库标记 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "小" : "大"); //高低库位 |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "小" : "大"); //高低库位 |
| | | vo.setLocType1(devp.getLocType1$()); |
| | | // vo.setLocType1(devp.getDevNo()==102 ? "高" : "低"); |
| | | } |
| | | return R.ok().add(list); |
| | |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | | return "低库位"; |
| | | return "较低库位"; |
| | | case 2: |
| | | return "低库位"; |
| | | case 3: |
| | | return "高库位"; |
| | | case 4: |
| | | return "特高库位"; |
| | | default: |
| | | return String.valueOf(this.locType1); |
| | | } |
| | |
| | | basDevp.setLocType2((short) 0); // 宽窄类型{0:未知,1:窄库位,2:宽库位} |
| | | basDevp.setLocType3((short) 0); // 轻重类型{0:未知,1:轻库位,2:重库位} |
| | | basDevp.setLocType1(high != low && low ? (short) 1 : (short) 2); |
| | | // basDevp. |
| | | basDevp.setInQty(inQty !=null ?(int)inQty : 0); |
| | | return basDevp; |
| | | } |
| | |
| | | staProtocol.setSiteId(siteId); |
| | | station.put(siteId, staProtocol); |
| | | } |
| | | staProtocol.setWorkNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*2)); // 工作号 |
| | | staProtocol.setWorkNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*4)); // 工作号 |
| | | |
| | | staProtocol.setStaNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*2 + 2 )); // 目标站 |
| | | staProtocol.setStaNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i*4 + 2 )); // 目标站 |
| | | } |
| | | } |
| | | Thread.sleep(200); |
| | |
| | | staProtocol.setOutEnable(status[3]);// 可出 |
| | | staProtocol.setEmptyMk(status[4]); // 空板信号 |
| | | staProtocol.setFullPlt(status[5]); // 满托盘 |
| | | staProtocol.setHigh(status[6]); |
| | | staProtocol.setHigh1(status[7]); |
| | | staProtocol.setLow(status[8]); |
| | | staProtocol.setLow1(status[9]); |
| | | staProtocol.setLow(status[6]); // 低 -- 高 |
| | | staProtocol.setLow1(status[7]); |
| | | staProtocol.setHigh(status[8]); |
| | | staProtocol.setHigh1(status[9]); |
| | | |
| | | if (!staProtocol.isPakMk() && !staProtocol.isLoading()) { |
| | | staProtocol.setPakMk(true); |
| | |
| | | } |
| | | |
| | | // 条码扫描器 |
| | | if(slave.getId() == 2) { |
| | | if(slave.getId() == 1) { |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result2 = null; |
| | | result2 = siemensS7Net.Read("DB100.200", (short) (barcodeSize * 8)); |
| | | result2 = siemensS7Net.Read("DB100.150", (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"); |
| | |
| | | short[] array = new short[2]; |
| | | array[0] = staProtocol.getWorkNo(); |
| | | array[1] = staProtocol.getStaNo(); |
| | | // OperateResult write = siemensS7Net.Write("DB100." + index*4, array); |
| | | OperateResult write = siemensS7Net.Write("DB100." + index*4, array); |
| | | |
| | | OperateResult write = siemensS7Net.Write("DB100." + index*2, staProtocol.getWorkNo()); // 工作号 |
| | | Thread.sleep(300); |
| | | OperateResult write1 = siemensS7Net.Write("DB100." + index*2, staProtocol.getStaNo()); // 目标站 |
| | | // OperateResult write = siemensS7Net.Write("DB100." + index*2, staProtocol.getWorkNo()); // 工作号 |
| | | // Thread.sleep(300); |
| | | // OperateResult write1 = siemensS7Net.Write("DB100." + index*2, staProtocol.getStaNo()); // 目标站 |
| | | |
| | | if (!write.IsSuccess) { |
| | | staProtocol = station.get(staProtocol.getSiteId()); |
| | |
| | | # 条码扫描仪1 左下 1楼开始,111 |
| | | barcode[0]: |
| | | id: 1 |
| | | ip: 10.10.10.100 |
| | | ip: 10.10.10.3 |
| | | port: 51236 |
| | | # 条码扫描仪2, 114 |
| | | barcode[1]: |
| | | id: 2 |
| | | ip: 10.10.10.101 |
| | | ip: 10.10.10.4 |
| | | port: 51236 |
| | | # LED1 |
| | | led[0]: |
| | |
| | | } |
| | | } |
| | | } |
| | | bayWidth = rackss[i].width / bLen |
| | | bayWidth = (rackss[i].width / bLen)-4 |
| | | // hpPosition 0 表示货架序号 左->右 1 表示货架序号 左<-右 |
| | | if (mapInfo.hpPosition == 1) { |
| | | bNum = maxBayNo |
| | | for (let j = bLen; j > 0; j--) { |
| | | if (i === 0) { |
| | | if (j === 13) { |
| | | bay = "<button class='item' style='width: " + 160 + "px'>" + bNum + "</button>" |
| | | bays = bays + bay |
| | | bNum = bNum - interval; |
| | | continue |
| | | } |
| | | bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>" |
| | | bays = bays + bay |
| | | bNum = bNum - interval; |
| | | continue |
| | | } |
| | | if (j === 13) { |
| | | bay = "<button class='item' style='margin-left: 160px;width: "+ bayWidth +"px'>" + (bNum - 2) + "</button>" |
| | | bays = bays + bay |
| | | bNum = bNum - interval - 2; |
| | | continue |
| | | } |
| | | bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>" |
| | | bays = bays + bay |
| | | bNum = bNum - interval; |
| | |
| | | "rackCount": 18, |
| | | "crnCount": 7, |
| | | "stbCount": 77, |
| | | "hpPosition": 0, |
| | | "hpPosition": 1, |
| | | "minBayNo": 2, |
| | | "floors": 1, |
| | | "racks": [ |
| | |
| | | "id": "lb_desc1", |
| | | "text": "#1", |
| | | "top": 324, |
| | | "left": 1794, |
| | | "left": 1812, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, |
| | |
| | | "id": "lb_desc2", |
| | | "text": "#2", |
| | | "top": 388, |
| | | "left": 1794, |
| | | "left": 1812, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, |
| | |
| | | "id": "site-105", |
| | | "text": "105", |
| | | "top": 386, |
| | | "left": 1067, |
| | | "left": 1007, |
| | | "width": 78, |
| | | "height": 24 |
| | | }, |
| | |
| | | "id": "site-102", |
| | | "text": "102", |
| | | "top": 386, |
| | | "left": 1147, |
| | | "left": 1087, |
| | | "width": 78, |
| | | "height": 24 |
| | | }, |
| | |
| | | "id": "site-104", |
| | | "text": "104", |
| | | "top": 412, |
| | | "left": 1067, |
| | | "left": 1007, |
| | | "width": 78, |
| | | "height": 24 |
| | | }, |
| | |
| | | "id": "site-101", |
| | | "text": "101", |
| | | "top": 412, |
| | | "left": 1147, |
| | | "left": 1087, |
| | | "width": 78, |
| | | "height": 24 |
| | | }, |
| | |
| | | "id": "site-103", |
| | | "text": "103", |
| | | "top": 438, |
| | | "left": 1067, |
| | | "left": 1007, |
| | | "width": 78, |
| | | "height": 24 |
| | | }, |
| | |
| | | "id": "site-100", |
| | | "text": "100", |
| | | "top": 438, |
| | | "left": 1147, |
| | | "left": 1087, |
| | | "width": 78, |
| | | "height": 24 |
| | | }, |