From c23fa558197ba32ea4d65c799bc3fbd9a047e6c1 Mon Sep 17 00:00:00 2001 From: yxFwq <1> Date: 星期四, 24 十月 2024 12:56:23 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/MainProcess.java | 142 ++++++++++++++++++---------------------------- 1 files changed, 56 insertions(+), 86 deletions(-) diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java index 48c9273..f3e12d6 100644 --- a/src/main/java/com/zy/core/MainProcess.java +++ b/src/main/java/com/zy/core/MainProcess.java @@ -27,6 +27,8 @@ // 棰戠巼 private int i = 0; private int j = 0; + private int k = 0; + private int l = 0; /** * =====>> 寮�濮嬪伐浣� @@ -35,6 +37,15 @@ thread = new Thread(() -> { while (!Thread.currentThread().isInterrupted()) { try { + i++; if (i>5) i=0; + j++; if (j>5) j=0; + k++; + if (k>13) { + k=0; + l++; + if (l>3) l=0; + } + // 闂撮殧 Thread.sleep(1000); @@ -47,116 +58,75 @@ //鍒濆鍖朢GV鍦板浘 // mainService.initRgvMap(); //鍒锋柊RGV鍦板浘 - mainService.refreshRgvMap(); +// mainService.refreshRgvMap(); // 婕旂ず // mainService.crnDemoOfLocMove1(); // 鍏ュ嚭搴撴ā寮忓垏鎹㈠嚱鏁� // mainService.ioConvert(); // 鍏ュ簱 ===>> 鍏ュ簱绔欏埌鍫嗗灈鏈虹珯锛屾牴鎹潯鐮佹壂鎻忕敓鎴愬叆搴撳伐浣滄。 + mainService.generateStoreWrkFile(); // 缁勬墭 - // 鍏ュ簱 ===>> 鐮佸灈浣嶈幏鍙栫┖鏉挎潯鐮佷俊鎭� - mainService.generateStoreWrkFileFull2LouM(); // 缁勬墭 - mainService.generateStoreWrkFile0(); // WMS鍏ュ簱 - // 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱 - mainService.stnToCrnStnPick(); - // 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱鎷嗙洏鍖� 1妤兼媶鍨涗綅缃� - mainService.stnToCrnStnPick2(); + mainService.generateStoreWrkFile464(); // 缁勬墭464 + mainService.generateStoreWrkFileSingle(); // 缁勬墭 鍙屽伐浣嶅崟浼� 灏忔枡绠� + mainService.generateStoreWrkFileLarge(); // 缁勬墭 鍙屽伐浣嶅崟浼� 澶ф枡绠� +// mainService.generateStoreWrkFile0(); // WMS鍏ュ簱 + // 鍑哄簱 ===>> 鍫嗗灈鏈哄嚭搴撶珯鍒板嚭搴撶珯 mainService.crnStnToOutStn(); + // 鍑哄簱 ===>> 鍫嗗灈鏈哄嚭搴撶珯鍒板嚭搴撶珯 宸ヤ綅2 + mainService.crnStnToOutStnTwo(); // 鍏ュ嚭搴� ===>> 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂 mainService.crnIoExecute(); - // 鍏ュ嚭搴撳寮� ===>> 鍫嗗灈鏈哄懡浠や笅鍙戝悗锛屽紓姝ヤ慨鏀瑰伐浣滄。鐘舵�� -// mainService.crnIoWrkMast(); - // 鍏ュ簱 ===>> 鎵ц瀵瑰伐浣滄。鐨勫畬鎴愭搷浣� - mainService.storeFinished(); - - /////////////////////////////////////RGV璋冨害///////////////////////////////////// - -// //缁戝畾灏忚溅鏂规硶 -// mainService.rgvBindSte(); -// mainService.rgvBindSte2(); -//// // 鍏ュ嚭搴� ===>> RGV鍏ュ嚭搴撲綔涓氫笅鍙� -// mainService.rgvIoExecute(); -// // RGV鍏ュ簱 ===>> 鏍规嵁RGV瀹屾垚淇″彿,鎵ц瀵瑰伐浣滄。鐨勫畬鎴愭搷浣� -// mainService.rgvFinished(); -// // 鍏ュ嚭搴� ===>> RGV鍑哄簱绔欏埌绯荤粺鍏ュ嚭搴撶珯 -// mainService.rgvDestStnToCrnStn(); -// // 鍑哄簱 ===>> RGV鍑哄簱绔欏埌绯荤粺鍑哄簱绔� -// mainService.rgvOutDStnToOutStn(); - - //瀹屾垚灏忚溅浠诲姟 - mainService.rgvCompleteWrkMastSta(); - i++; - if (i<7) { - // RGV ===>> 灏忚溅浠诲姟浣滀笟涓嬪彂 - try{ - mainService.rgvIoExecute(i); - }catch (Exception e){ - log.error("RGV ===>> 灏忚溅浠诲姟浣滀笟涓嬪彂寮傚父"+e); - } + // 鍏ュ嚭搴� ===>> 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂 鍙屽伐浣嶅爢鍨涙満 + mainService.crnIoExecuteTwo(); + // 鍏ュ嚭搴� ===>> 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂 鍙屽伐浣嶅爢鍨涙満 鎷嗗垎鎵ц浠诲姟涓嬪彂 + mainService.crnIoExecuteTwoExecute(i);//Execute + if (i%2==0){ + // 鍏ュ簱 ===>> 鎵ц瀵瑰伐浣滄。鐨勫畬鎴愭搷浣� + mainService.storeFinished(); }else { - i = 0; + // 鍏ュ簱 ===>> 鎵ц瀵瑰伐浣滄。鐨勫畬鎴愭搷浣� 宸ヤ綅2 + mainService.storeFinishedTwo(); } -// //鎵ц灏忚溅璐х墿鎼繍浠诲姟 -// mainService.rgvRunWrkMastFullSta(); -// //鎵ц灏忚溅绌烘澘鎼繍浠诲姟 -// mainService.rgvRunWrkMastEmptyStaPut();//鏀�//鎷嗙洏 -// mainService.rgvRunWrkMastEmptyStaPutFull();//婊℃斁 -// mainService.rgvRunWrkMastEmptyStaTake();//鍙栧彔鐩� -// mainService.rgvRunWrkMastEmptyStaTakeFull();////婊″彇 -// mainService.rgvRunWrkMastEmptyStaAvoidance();//閬胯 - - /////////////////////////////////////RGV璋冨害///////////////////////////////////// - - // 寮傚父淇℃伅璁板綍 - mainService.recErr(); - // 鍏ュ簱 ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐� 2妤� +// // 寮傚父淇℃伅璁板綍 +// mainService.recErr(); + // 鍏ュ簱 ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱 mainService.storeEmptyPlt(); - // 鍏ュ簱 ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,1妤煎彔鐩樻満鍙犵洏 - mainService.storeEmptyPlt2(); - // 鍏ュ簱 ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,1妤煎彔鐩樻満绌烘澘鍏ュ簱 - mainService.storeEmptyPlt3(); - // 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱鎷嗙洏鍖� 1妤兼媶鍨涗綅缃� 绌烘澘鍙犵洏 - mainService.storeEmptyPlt4(); + // 鍏ュ簱 ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱 鍙屽伐浣嶅崟浼� 灏忔枡绠� + mainService.storeEmptyPltSingle(); + // 鍏ュ簱 ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱 鍙屽伐浣嶅崟浼� 澶ф枡绠� + mainService.storeEmptyPltLarge(); // 鍑哄簱 ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣� mainService.ledExecute(); - // 鍏朵粬 ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅 + // 鍏朵粬 ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅 mainService.ledReset(); -// mainService.outOfDevp(); + /************************************JAR璋冨害************************************/ + mainService.stackingCompletionDriveTray();//鍒嗛厤纭寲缃� -// //绌烘墭鐩樿嚜鍔ㄥ嚭搴� -// mainService.autoEmptyOut(); -// //绌烘墭鐩樿嚜鍔ㄥ叆搴� -// mainService.autoEmptyIn(); + //Jar鍏呯數浠诲姟瀹屾垚 + mainService.jarChargeComplete(); + //JarWrkMastExecute浠诲姟瀹屾垚 + mainService.jarWrkMastExecuteGenerateComplete(k); + //JarWrkMastExecute浠诲姟鍒涘缓 //纭寲缃� + mainService.jarWrkMastExecuteGenerate(k); + //JarWrkMastExecute浠诲姟鎵ц + mainService.jarWrkMastExecuteAction(k,j); + //Jar浠诲姟鍒涘缓 + mainService.jarMastGenerate(); + //Jar浠诲姟瀹屾垚 + mainService.jarMastGenerateComplete(); + //Jar鍏呯數浠诲姟鍒涘缓 + mainService.jarChargeGenerate(); -// // 鍏朵粬 ===>> 鍏ュ嚭搴撴ā寮忓垏鎹� -// i++; -// if (i > 1) { -// mainService.ioConvert(); -// i = 0; -// } - //鐮佸灈浣嶈嚜鍔ㄨˉ鍏呯┖鏉匡細椹卞姩鎷嗙洏鏈鸿緭鍑烘墭鐩� -// mainService.dischargingMachineOutputTray(); -// //鎷嗙洏鏈哄绌烘澘鎵爜锛岄┍鍔ㄦ墭鐩樺悜鐮佸灈浣嶏紝涓嶅叆搴� -// mainService.scanBarcodeEmptyBoard(); - //鐮佸灈瀹屾垚椹卞姩鎵樼洏涓嬩竴姝ユ壂鐮佸叆搴� - mainService.stackingCompletionDriveTray(); - //鎷嗗灈瀹屾垚缁х画涓嬩竴姝� - mainService.stackingCompletionDriveTray2(); - //璐存爣瀹屾垚缁х画涓嬩竴姝� -// mainService.stackingCompletionDriveTray3(); - //鎷嗗灈瀹屾垚缁х画涓嬩竴姝� 杩愯閫斾腑鑷姩閬胯绌烘澘 - mainService.stackingCompletionDriveTray4(); - //鎷嗗灈瀹屾垚鎵樼洏缁х画涓嬩竴姝� - mainService.stackingCompletionDriveTrayOk2(); - //閫�璐х爜鍨涘畬鎴愭墭鐩樼户缁笅涓�姝� - mainService.stackingCompletionDriveTrayOk3(); + + /************************************JAR璋冨害************************************/ + } catch (Exception e) { e.printStackTrace(); -- Gitblit v1.9.1