| | |
| | | public enum RgvStatusType { |
| | | |
| | | NONE(-1, "离线"), |
| | | NONE0(0, "离线"), |
| | | IDLE(1, "空闲"), |
| | | ROAM(100000, "漫游"), |
| | | WORKING(2, "作业中"), |
| | | WORKING(2, "作业中"),// 1:行走 2:取 3:放 |
| | | SOS(3, "报警"), |
| | | FETCHING(11, "取货中"), |
| | | PUTTING(12, "放货中"), |
| | | WAITING(90, "任务完成等待WCS确认"), |
| | | FETCHWAITING(91, "取货任务完成等待WCS确认"), |
| | | SOS99(99, "报警99"), |
| | | OTHER(100, "其它100") |
| | | OTHER(100, "其它100"), |
| | | ROAM(100000, "漫游") |
| | | ; |
| | | |
| | | public Integer id; |
| | |
| | | |
| | | private volatile int isRunning = 0; // 运行状态 0:初始 1:等待执行 2:执行中 3:执行中断 4:完结 |
| | | |
| | | private volatile int taskStatus = 0; //作业模式 0:行走 1:取 2:放 |
| | | private volatile int taskStatus = 0; //作业模式 1:行走 2:取 3:放 0:无 |
| | | |
| | | private volatile boolean direction; // 执行方向(面朝轨道 定位值左小右大) true:左 false:右 |
| | | |
| | |
| | | private Map<Integer, StaProtocol> station = new ConcurrentHashMap<>(); |
| | | private short heartBeatVal = 1; |
| | | public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{ |
| | | add(1000);add(1001);add(1002);add(1003);add(1004);add(1005);add(1006);add(1007); |
| | | add(1001);add(1002);add(1003);add(1004);add(1005);add(1006);add(1007); |
| | | 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); |
| | | }}; |
| | |
| | | /** |
| | | * 条码数量 |
| | | */ |
| | | private int barcodeSize = 4; |
| | | private int barcodeSize = 2; |
| | | |
| | | /** |
| | | * 入出库模式 |
| | |
| | | |
| | | boolean[] status = siemensS7Net.getByteTransform().TransBool(result.Content, i*8 + 6, 2); |
| | | staProtocol.setAutoing(status[0]); // 自动 |
| | | // staProtocol.setAutoing(true); // 自动 |
| | | staProtocol.setLoading(status[1]); // 有物 |
| | | // staProtocol.setLoading(true); // 有物 |
| | | staProtocol.setInEnable(status[2]); // 可入 |
| | | // staProtocol.setInEnable(true); // 可入 |
| | | staProtocol.setOutEnable(status[3]);// 可出 |
| | | // staProtocol.setOutEnable(true);// 可出 |
| | | staProtocol.setEmptyMk(status[4]); // 空板信号 |
| | | staProtocol.setFullPlt(status[5]); // 满托盘 |
| | | staProtocol.setHigh(status[6]); // 高库位 |
| | |
| | | barcodeThread.setBarcode(barcode); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | if (result.IsSuccess) { |
| | |
| | | ip: 10.10.10.60 |
| | | slot: 0 |
| | | port: 102 |
| | | rack: 102 |
| | | rack: 0 |
| | | id: 1 |
| | | # 入库口1 |
| | | inSta[0]: |
| | | staNo: 102 |
| | | staNo: 1004 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | backSta: 1005 |
| | | # 入库口2 |
| | | inSta[1]: |
| | | staNo: 1020 |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | backSta: 1021 |
| | | # led: ${wcs-slave.led[0].id} |
| | | # 空板入库口1 |
| | | emptyInSta[0]: |
| | | staNo: 102 |
| | | staNo: 1004 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | backSta: 1005 |
| | | # 入库口2 |
| | | emptyInSta[1]: |
| | | staNo: 1020 |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | backSta: 1021 |
| | | # led: ${wcs-slave.led[0].id} |
| | | # 拣料入库口1 |
| | | pickSta[0]: |
| | | staNo: 102 |
| | | staNo: 1004 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | backSta: 1005 |
| | | # 拣料入库口2 |
| | | pickSta[1]: |
| | | staNo: 1020 |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | backSta: 1021 |
| | | # 入库下发口1 |
| | | inWalkSta[0]: |
| | | staNo: 102 |
| | | staNo: 1021 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | backSta: 1021 |
| | | # 入库下发口1 |
| | | inWalkSta[1]: |
| | | staNo: 102 |
| | | staNo: 1005 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | backSta: 1005 |
| | | # 入库下发口1 |
| | | inWalkSta[2]: |
| | | staNo: 102 |
| | | staNo: 1012 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 101 |
| | | backSta: 1012 |
| | | barcodeSign: true |
| | | |
| | | # 出库口1 |
| | | outSta[0]: |
| | | staNo: 102 |
| | | staNo: 1002 |
| | | # 出库口2 |
| | | outSta[1]: |
| | | staNo: 1005 |
| | | # 出库口3 |
| | | outSta[2]: |
| | | staNo: 1012 |
| | | # 出库口4 |
| | | outSta[3]: |
| | | staNo: 1021 |
| | | # 出库口5 |
| | | outSta[4]: |
| | | staNo: 1023 |
| | | # led: ${wcs-slave.led[0].id} |
| | | # RGV穿梭车1 |
| | | rgv[0]: |
| | |
| | | port: 51236 |
| | | ip: 10.10.10.52 |
| | | id: 2 |
| | | barcode[2]: #条码扫描仪1 |
| | | port: 51236 |
| | | ip: 10.10.10.52 |
| | | id: 3 |
| | | # 磅秤 |
| | | scale[0]: |
| | | id: 1 |
| | |
| | | "floors": 1, |
| | | "racks": [{ |
| | | "type": "rack", |
| | | "id": "rack4", |
| | | "top": 109, |
| | | "id": "rack1", |
| | | "top": 403, |
| | | "left": 475, |
| | | "width": 795, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [22] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack13", |
| | | "top": 498, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [1,2] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack12", |
| | | "top": 474, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [1] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack11", |
| | | "top": 402, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [1] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack10", |
| | | "top": 366, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack9", |
| | | "top": 343, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack8", |
| | | "top": 268, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack7", |
| | | "top": 245, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [3,10,11,17,18] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack6", |
| | | "top": 203, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [1,3,10,11,17,18,22] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack5", |
| | | "top": 180, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [3,10,11,17,18,22] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack3", |
| | | "top": 82, |
| | | "left": 475, |
| | | "width": 795, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [1,22] |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack2", |
| | | "top": 59, |
| | | "top": 344,//376 |
| | | "left": 475, |
| | | "width": 795, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [1,22] |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack1", |
| | | "top": 0, |
| | | "id": "rack3", |
| | | "top": 317, |
| | | "left": 475, |
| | | "width": 795, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 22, |
| | | "hiddenArr": [1,22] |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack4", |
| | | "top": 258,//290 |
| | | "left": 475, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack5", |
| | | "top": 231, |
| | | "left": 475, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack6", |
| | | "top": 172,//204 |
| | | "left": 475, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack7", |
| | | "top": 145, |
| | | "left": 475, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack8", |
| | | "top": 86,//118 |
| | | "left": 475, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack9", |
| | | "top": 59, |
| | | "left": 475, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack10", |
| | | "top": 0, |
| | | "left": 475, |
| | | "width": 1295, |
| | | "height": 23, |
| | | "minBayNo": 1, |
| | | "maxBayNo": 65, |
| | | "hiddenArr": [1,65] |
| | | }], |
| | | "crns": [{ |
| | | "type": "crane", |
| | | "id": "crn-4", |
| | | "text": "4", |
| | | "top": 439, |
| | | "left": 530, |
| | | "id": "crn-1", |
| | | "text": "1", |
| | | "top": 376, |
| | | "left": 630, |
| | | "width": 93, |
| | | "height": 22 |
| | | }, { |
| | | "type": "track", |
| | | "id": "lb_track4", |
| | | "text": "", |
| | | "top": 450, |
| | | "left": 444, |
| | | "width": 850, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |
| | | "id": "crn-3", |
| | | "text": "3", |
| | | "top": 308, |
| | | "left": 530, |
| | | "width": 93, |
| | | "height": 22 |
| | | }, { |
| | | "type": "track", |
| | | "id": "lb_track3", |
| | | "text": "", |
| | | "top": 318, |
| | | "left": 444, |
| | | "width": 850, |
| | | "id": "lb_track1", |
| | | "text": "1", |
| | | "top": 387, |
| | | "left": 470, |
| | | "width": 1295, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |
| | | "id": "crn-2", |
| | | "text": "2", |
| | | "top": 145, |
| | | "left": 530, |
| | | "width": 93, |
| | | "height": 22 |
| | | }, { |
| | | "type": "crane", |
| | | "id": "crn-1", |
| | | "text": "1", |
| | | "top": 32, |
| | | "left": 530, |
| | | "top": 290, |
| | | "left": 630, |
| | | "width": 93, |
| | | "height": 22 |
| | | }, { |
| | | "type": "track", |
| | | "id": "lb_track2", |
| | | "text": "", |
| | | "top": 155, |
| | | "left": 444, |
| | | "width": 850, |
| | | "text": "2", |
| | | "top": 301, |
| | | "left": 470, |
| | | "width": 1295, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |
| | | "id": "crn-3", |
| | | "text": "3", |
| | | "top": 204, |
| | | "left": 630, |
| | | "width": 93, |
| | | "height": 22 |
| | | }, { |
| | | "type": "track", |
| | | "id": "lb_track3", |
| | | "text": "3", |
| | | "top": 215, |
| | | "left": 470, |
| | | "width": 1295, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |
| | | "id": "crn-4", |
| | | "text": "4", |
| | | "top": 118, |
| | | "left": 630, |
| | | "width": 93, |
| | | "height": 22 |
| | | }, { |
| | | "type": "track", |
| | | "id": "lb_track4", |
| | | "text": "4", |
| | | "top": 129, |
| | | "left": 470, |
| | | "width": 1295, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |
| | | "id": "crn-5", |
| | | "text": "5", |
| | | "top": 32, |
| | | "left": 630, |
| | | "width": 93, |
| | | "height": 22 |
| | | }, { |
| | | "type": "track", |
| | | "id": "lb_track5", |
| | | "text": "5", |
| | | "top": 43, |
| | | "left": 470, |
| | | "width": 1295, |
| | | "height": 2 |
| | | }, { |
| | | "type": "track", |
| | | "id": "lb_track1", |
| | | "text": "", |
| | | "top": 43, |
| | | "left": 447, |
| | | "width": 850, |
| | | "height": 2 |
| | | "id": "lb_track10", |
| | | "text": "10", |
| | | "top": 0, |
| | | "left": 350, |
| | | "width": 2, |
| | | "height": 431 |
| | | }, { |
| | | "type": "track", |
| | | "id": "lb_track11", |
| | | "text": "11", |
| | | "top": 0, |
| | | "left": 380, |
| | | "width": 2, |
| | | "height": 431 |
| | | }], |
| | | "areas": [{ |
| | | "type": "Control_floor", |
| | |
| | | "height": 706, |
| | | "stns": [{ |
| | | "type": "stn", |
| | | "id": "site-107", |
| | | "text": "107", |
| | | "top": 476, |
| | | "left": 386, |
| | | "id": "site-1001", |
| | | "text": "1001", |
| | | "top": 403, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-106", |
| | | "text": "106", |
| | | "top": 404, |
| | | "left": 386, |
| | | "id": "site-1002", |
| | | "text": "1002", |
| | | "top": 403, |
| | | "left": 240, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-105", |
| | | "text": "105", |
| | | "id": "site-1003", |
| | | "text": "1003", |
| | | "top": 344, |
| | | "left": 386, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-104", |
| | | "text": "104", |
| | | "top": 269, |
| | | "left": 386, |
| | | "id": "site-1004", |
| | | "text": "1004", |
| | | "top": 344, |
| | | "left": 240, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1005", |
| | | "text": "1005", |
| | | "top": 344, |
| | | "left": 287, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1006", |
| | | "text": "1006", |
| | | "top": 317, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-103", |
| | | "text": "103", |
| | | "top": 181, |
| | | "left": 386, |
| | | "id": "site-1007", |
| | | "text": "1007", |
| | | "top": 258, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-102", |
| | | "text": "102", |
| | | "top": 110, |
| | | "left": 386, |
| | | "id": "site-1008", |
| | | "text": "1008", |
| | | "top": 231, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-101", |
| | | "text": "101", |
| | | "top": 60, |
| | | "left": 386, |
| | | "id": "site-1009", |
| | | "text": "1009", |
| | | "top": 231, |
| | | "left": 287, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1010", |
| | | "text": "1010", |
| | | "top": 231, |
| | | "left": 240, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1011", |
| | | "text": "1011", |
| | | "top": 231, |
| | | "left": 193, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1013", |
| | | "text": "1013", |
| | | "top": 172, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-100", |
| | | "text": "100", |
| | | "id": "site-1014", |
| | | "text": "1014", |
| | | "top": 172, |
| | | "left": 287, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1015", |
| | | "text": "1015", |
| | | "top": 172, |
| | | "left": 240, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1016", |
| | | "text": "1016", |
| | | "top": 172, |
| | | "left": 193, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1012", |
| | | "text": "1012", |
| | | "top": 196, |
| | | "left": 193, |
| | | "width": 45, |
| | | "height": 34 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1017", |
| | | "text": "1017", |
| | | "top": 145, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1018", |
| | | "text": "1018", |
| | | "top": 86, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1019", |
| | | "text": "1019", |
| | | "top": 59, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1023", |
| | | "text": "1023", |
| | | "top": 59, |
| | | "left": 240, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1022", |
| | | "text": "1022", |
| | | "top": 0, |
| | | "left": 386, |
| | | "left": 403, |
| | | "width": 92, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1021", |
| | | "text": "1021", |
| | | "top": 0, |
| | | "left": 240, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1020", |
| | | "text": "1020", |
| | | "top": 0, |
| | | "left": 287, |
| | | "width": 45, |
| | | "height": 23 |
| | | }] |
| | | }] |
| | | }] |