--- tags: LRWA3 --- <style> .markdown-body { max-width: 1500px; } </style> # LRWA3 開箱機流程與IP表 ## 開箱機IP表 | 裝置 | IP | Port | 備註 | |:---------------------- | ------------- |:---------- | ------------- | | 輸送機 | 192.168.10.10 | 502 | | | 傳原噴印機 | 127.0.0.1 | 9111, 9112 | 192.168.1.128 | | FX5U PLC | 192.168.10.3 | 5062 | | | FX5U PLC2 (自主開箱機) | 192.168.10.5 | 5062 | | | 六軸手臂 | 192.168.10.2 | 5555 | | | 貼標機 | 192.168.10.7 | | | | IPC | 192.168.10.6 | | 現場 192.168.46.71 | ## 手臂執行緒 ```mermaid graph TB origin{起始點} initCheck(執行初始檢查) getTask(取得任務) armAction1(吸起箱子) armAction2(移動至交接點並通知自主開箱機動作<br>6號動作) armAction3(手臂釋放箱子並離開交接點<br>目前沒有) origin-->|未經過初始檢查|initCheck origin-->|無任務|getTask origin-->|有任務<br>且手臂未吸取箱子|armAction1 origin-->|手臂有吸取箱子<br>自主開箱機開始吸氣|armAction2 origin-->|收到自主開箱機吸取箱子完成通知|armAction3 initCheck-->origin getTask-->origin armAction1-->origin armAction2-->origin armAction3-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` ## 自主開箱機執行緒 ```mermaid graph TB origin{起始點} initCheck(執行初始檢查) action1(以該任務箱型到達對應交接點) action2(待手臂離開後<br>等待輸送機前段有空位時移動至輸送機前段上方<br>等待輸送機淨空時放置箱子並回到Home點) suck(吸氣) origin-->|未經過初始檢查|initCheck initCheck-->origin origin-->|若目前六軸手臂有任務|action1 origin-->|收到六軸手臂到交接點訊號<br>且目前自主開箱機也位於交接點|action2 origin-->|自主開箱機在交接點且手臂吸好箱子到交接點前|suck action1-->origin action2-->origin suck-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` ## 輸送機執行緒 本區空間 代表本區淨空與否 噴印點空間 代表噴印機前的空間(後段)淨空與否 輸入點空間 代表輸送機的輸入點(前段)淨空與否 ```mermaid graph TB origin{起始點} initCheck(執行初始檢查) putterRise(推桿升起) putterFallAndRelease(推桿下降並開) baffleRise(阻擋升起) baffleFall(阻擋下降) startRollingForInput(開始轉動直到感測器ON) startRollingUntilOutput(開始輸出直到感測器OFF後停止<br>設定本站為空) doLabeling(即印即貼) setBoxWidthAndPutterPushAndStopRolling(設定紙箱寬度推桿夾和滾筒停止<br>通知放氣泡袋) readBarcode(讀取條碼) origin-->|未經過初始檢查|initCheck origin-->|完成噴印與氣泡袋放置<br>且AGV到位|baffleFall origin-->|紙箱進入點有紙箱|baffleRise origin-->|紙箱即印即貼點有紙箱|putterRise initCheck-->origin doLabeling-->readBarcode readBarcode-->putterFallAndRelease putterFallAndRelease-->origin baffleRise-->startRollingForInput startRollingForInput-->origin baffleFall-->startRollingUntilOutput startRollingUntilOutput-->origin putterRise-->setBoxWidthAndPutterPushAndStopRolling setBoxWidthAndPutterPushAndStopRolling-->doLabeling linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` ## 放置氣泡袋執行緒 ```mermaid graph TB origin{起始點} placeAirSaver(放汽泡袋<br>完成後通知放置完成) origin-->|需放置氣泡袋|placeAirSaver placeAirSaver-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` ### Collateral Damage Tree Node 概念上就是把發生問題的FlowManager與其週邊和前面結點先停止後, 讓後面的做完再整機停止, 減少出錯時需排除的工作量。 **手臂及自主開箱機出錯時, 需把氣泡袋Queue中手上任務(包含)之後的任務刪除, 避免氣泡袋執行緒無法停止。** ```mermaid graph BT station3(輸送機) station2(自主開箱機) station1(手臂) airSaver(氣泡袋) station3 --> station2 station2 --> station1 station3 --> airSaver airSaver --> station3 linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d classDef mainNode fill:#B82F14 ,stroke:#871D07 class station1,station2,station3,station4 mainNode ``` # 加入自主開箱機前備份 備份日期 2022/3/18 ## 手臂執行緒 ```mermaid graph TB origin{起始點} initCheck(執行初始檢查) getTask(取得任務) armAction1(夾起箱子) armAction2(進行開箱並放至列印點) origin-->|未經過初始檢查|initCheck origin-->|無任務|getTask origin-->|有任務<br>且手臂未吸取箱子|armAction1 origin-->|手臂有吸取箱子<br>輸送機可被使用|armAction2 initCheck-->origin getTask-->origin armAction1-->origin armAction2-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` ## 輸送機執行緒 本區空間 代表本區淨空與否 噴印點空間 代表噴印機前的空間淨空與否 ```mermaid graph TB origin{起始點} initCheck(執行初始檢查) putterRise(推桿升起) putterFallAndRelease(推桿下降並開) baffleRise(阻擋升起) baffleFall(阻擋下降) startRollingForInput(開始轉動直到感測器ON) startRollingUntilOutput(開始輸出直到感測器OFF後停止<br>設定本站為空) doLabeling(即印即貼) setBoxWidthAndPutterPushAndStopRolling(設定紙箱寬度推桿夾和滾筒停止<br>通知放氣泡袋) readBarcode(讀取條碼) origin-->|未經過初始檢查|initCheck origin-->|完成噴印與氣泡袋放置<br>且AGV到位|baffleFall origin-->|紙箱進入點有紙箱|baffleRise origin-->|紙箱即印即貼點有紙箱|putterRise initCheck-->origin doLabeling-->readBarcode readBarcode-->putterFallAndRelease putterFallAndRelease-->origin baffleRise-->startRollingForInput startRollingForInput-->origin baffleFall-->startRollingUntilOutput startRollingUntilOutput-->origin putterRise-->setBoxWidthAndPutterPushAndStopRolling setBoxWidthAndPutterPushAndStopRolling-->doLabeling linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` ## 放置氣泡袋執行緒 ```mermaid graph TB origin{起始點} placeAirSaver(放汽泡袋<br>完成後通知放置完成) origin-->|需放置氣泡袋|placeAirSaver placeAirSaver-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` # 移除噴印機前備份 備份日期 2022/2/7 ## 輸送機執行緒 (噴印機版) 本區空間 代表本區淨空與否 噴印點空間 代表噴印機前的空間淨空與否 ```mermaid graph TB origin{起始點} initCheck(執行初始檢查) putterRise(推桿升起) putterFallAndRelease(推桿下降並開) baffleRise(阻擋升起) baffleFall(阻擋下降) startRollingForInput(開始轉動直到感測器ON) startRollingUntilOutput(開始輸出直到感測器OFF後停止<br>設定本站為空) doBarcodePrintingTask(噴印標籤) setBoxWidthAndPutterPushAndStopRolling(設定紙箱寬度推桿夾和滾筒停止<br>通知放氣泡袋) readBarcode(讀取條碼) purgeStart(清噴頭前置動作) purge(清噴頭) purgeEnd(清噴頭完成動作) origin-->|未經過初始檢查|initCheck origin-->|完成噴印與氣泡袋放置<br>且AGV到位|baffleFall origin-->|紙箱進入點有紙箱<br>且目前不需清噴頭|baffleRise origin-->|紙箱噴印點有紙箱|putterRise origin-->|需執行清噴頭且噴印區為空|purgeStart initCheck-->origin doBarcodePrintingTask-->readBarcode readBarcode-->putterFallAndRelease putterFallAndRelease-->origin baffleRise-->startRollingForInput startRollingForInput-->origin baffleFall-->startRollingUntilOutput startRollingUntilOutput-->origin putterRise-->setBoxWidthAndPutterPushAndStopRolling setBoxWidthAndPutterPushAndStopRolling-->doBarcodePrintingTask purgeStart-->purge purge-->purgeEnd purgeEnd-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` # 備份 2021/11/17 ## 手臂執行緒 ```mermaid graph TB origin{起始點} initCheck(執行初始檢查) getTask(取得任務) armAction1(夾起箱子) armAction2(進行開箱並放至列印點) origin-->|未經過初始檢查|initCheck origin-->|無任務|getTask origin-->|有任務<br>且手臂未吸取箱子|armAction1 origin-->|手臂有吸取箱子<br>輸送機可被使用|armAction2 initCheck-->origin getTask-->origin armAction1-->origin armAction2-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` ## 輸送機執行緒 ```mermaid graph TB origin{起始點} initCheck(執行初始檢查) putterRise(推桿升起) putterFallAndRelease(推桿下降並開) setBoxWidthAndPutterPush(設定紙箱寬度和推桿夾) baffleRise(阻擋升起) baffleFall(阻擋下降) startRollingUntilInput(開始轉動直到感測器ON後停止) startRollingUntilOutput(開始輸出直到感測器OFF後停止<br>設定本站為空) doBarcodePrintingTask(取得噴印機使用權後<br>噴印標籤<br>完成後釋放噴印機使用權) doPutingAirSaver(放汽泡袋<br>完成後通知可開始輸出) origin-->|未經過初始檢查|initCheck origin-->|有輸出需求且AGV到位|baffleFall origin-->|噴印標籤點有紙箱|putterRise initCheck-->origin putterRise-->setBoxWidthAndPutterPush setBoxWidthAndPutterPush-->doBarcodePrintingTask doBarcodePrintingTask-->putterFallAndRelease putterFallAndRelease-->baffleRise baffleRise-->startRollingUntilInput startRollingUntilInput-->doPutingAirSaver doPutingAirSaver-->origin baffleFall-->startRollingUntilOutput startRollingUntilOutput-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` ## 清噴頭執行緒 ```mermaid graph TD origin{起始點} purge(清噴頭<br>完成後釋放噴印機使用權) origin-->|需執行清噴頭<br>取得噴印機使用權|purge purge-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` # 壓力測試流程 ## 主執行緒 ```mermaid graph TD origin{起始點} putterRise(推桿升起) putterFall(推桿下降) putterPush(推桿推) putterRelease(推桿歸位) baffleRise(阻擋升起) baffleFall(阻擋下降) startRolling1(開始轉動) stopRolling1(停止轉動) wait5Sec1(等待5秒) wait5Sec2(等待5秒) origin-->baffleRise baffleRise-->putterRise putterRise-->putterPush putterPush-->putterFall putterFall-->putterRelease putterRelease-->wait5Sec1 wait5Sec1-->startRolling1 startRolling1-->wait5Sec2 wait5Sec2-->baffleFall baffleFall-->stopRolling1 stopRolling1-->origin linkStyle default fill:none, stroke:lightGray classDef node color:#eee, stroke-width:2px,fill:#45526e,stroke:#59698d ``` # 未完成區 ## 測試暫停決策節點 ```mermaid graph TB origin(起始點) doTask(進行任務) origin-->doTask doTask-->origin ```