| 
															
																@@ -361,7 +361,9 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             switch (param[1]) 
															 | 
															
															 | 
															
																                             switch (param[1]) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             { 
															 | 
															
															 | 
															
																                             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 case '0': reason = "Wafer drop"; break; 
															 | 
															
															 | 
															
																                                 case '0': reason = "Wafer drop"; break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                case '1': reason = "Wafer protrusion"; break; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                case '1': reason = "Wafer protrusion"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                    IsWaferProtrude = true;  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                    break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 case '2': reason = "FOUP mount error"; break; 
															 | 
															
															 | 
															
																                                 case '2': reason = "FOUP mount error"; break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 case '3': reason = "FOUP mount error"; break; 
															 | 
															
															 | 
															
																                                 case '3': reason = "FOUP mount error"; break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 case '5': reason = "Air pressure drop"; break; 
															 | 
															
															 | 
															
																                                 case '5': reason = "Air pressure drop"; break; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -395,11 +397,11 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     if (string.IsNullOrEmpty(reason)) 
															 | 
															
															 | 
															
																                     if (string.IsNullOrEmpty(reason)) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     { 
															 | 
															
															 | 
															
																                     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        LOG.Error($"[{_lpname}] MOV:{catch_command.Match(ReceiveMsg).Value} failed for the Unknown error {param}"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        EV.PostAlarmLog("System",$"[{_lpname}] MOV:{catch_command.Match(ReceiveMsg).Value} failed for the Unknown error {param}"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     else 
															 | 
															
															 | 
															
																                     else 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     { 
															 | 
															
															 | 
															
																                     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        LOG.Error($"[{_lpname}] MOV:{catch_command.Match(ReceiveMsg).Value} failed for the error {param}:{reason}"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        EV.PostAlarmLog("System", $"[{_lpname}] MOV:{catch_command.Match(ReceiveMsg).Value} failed for the error {param}:{reason}"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 } 
															 | 
															
															 | 
															
																                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                  
															 | 
															
															 | 
															
																                  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -605,11 +607,10 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private void OnStasRead(string command_parameter) 
															 | 
															
															 | 
															
																         private void OnStasRead(string command_parameter) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            _isLoaded = false; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            //_isLoaded = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             switch (command_parameter[6])//Continer Status 
															 | 
															
															 | 
															
																             switch (command_parameter[6])//Continer Status 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 case '0': 
															 | 
															
															 | 
															
																                 case '0': 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -666,13 +667,16 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     break; 
															 | 
															
															 | 
															
																                     break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            switch (command_parameter[11])//Wafer protrusion sensor(2025.4.18 +) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            switch (command_parameter[11])//Wafer protrusion sensor 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 case '0': 
															 | 
															
															 | 
															
																                 case '0': 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     ProtrusionState = "Shading"; 
															 | 
															
															 | 
															
																                     ProtrusionState = "Shading"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    IsWaferProtrude = true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    CheckToPostMessage(LoadPortMsg.Error); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     break; 
															 | 
															
															 | 
															
																                     break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 case '1': 
															 | 
															
															 | 
															
																                 case '1': 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     ProtrusionState = "Lighting"; 
															 | 
															
															 | 
															
																                     ProtrusionState = "Lighting"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    IsWaferProtrude = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     break; 
															 | 
															
															 | 
															
																                     break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -696,7 +700,7 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 param += command_parameter[4]; 
															 | 
															
															 | 
															
																                 param += command_parameter[4]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 param += command_parameter[5]; 
															 | 
															
															 | 
															
																                 param += command_parameter[5]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 FindErrorReason(param, out reason); 
															 | 
															
															 | 
															
																                 FindErrorReason(param, out reason); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                LOG.Error($"[{_lpname}] reason"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                EV.PostAlarmLog("System", $"[{_lpname}] reason:{reason}"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 CheckToPostMessage(LoadPortMsg.Error); 
															 | 
															
															 | 
															
																                 CheckToPostMessage(LoadPortMsg.Error); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -915,6 +919,7 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //收到消息进入initilizing状态 需要先下发 
															 | 
															
															 | 
															
																             //收到消息进入initilizing状态 需要先下发 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //初始化逻辑MOV:ORGN 
															 | 
															
															 | 
															
																             //初始化逻辑MOV:ORGN 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             IsHomed = false; 
															 | 
															
															 | 
															
																             IsHomed = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            IsWaferProtrude = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             SendMessage("MOV:ORGN;"); 
															 | 
															
															 | 
															
																             SendMessage("MOV:ORGN;"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _initStartTime = DateTime.Now; 
															 | 
															
															 | 
															
																             _initStartTime = DateTime.Now; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return true; 
															 | 
															
															 | 
															
																             return true; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -928,6 +933,7 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 SendMessage("GET:STAS;"); 
															 | 
															
															 | 
															
																                 SendMessage("GET:STAS;"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _isLoaded = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return true; 
															 | 
															
															 | 
															
																             return true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -943,6 +949,7 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         protected override bool fStartReset(object[] param) 
															 | 
															
															 | 
															
																         protected override bool fStartReset(object[] param) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //SET:RSET 
															 | 
															
															 | 
															
																             //SET:RSET 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            IsWaferProtrude = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             lock (_locker) 
															 | 
															
															 | 
															
																             lock (_locker) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 SendMessage("SET:RSET;"); 
															 | 
															
															 | 
															
																                 SendMessage("SET:RSET;"); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -983,6 +990,10 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             base.DockState = FoupDockState.Docked; 
															 | 
															
															 | 
															
																             base.DockState = FoupDockState.Docked; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             base.ClampState = FoupClampState.Close; 
															 | 
															
															 | 
															
																             base.ClampState = FoupClampState.Close; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             base.DoorState = FoupDoorState.Open; 
															 | 
															
															 | 
															
																             base.DoorState = FoupDoorState.Open; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            lock (_locker) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                SendMessage("GET:STAS;"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //if (Name == "LP1") 
															 | 
															
															 | 
															
																             //if (Name == "LP1") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //    DeviceModel.TrigSafetytoSMIF1.SetTrigger(true, out _); 
															 | 
															
															 | 
															
																             //    DeviceModel.TrigSafetytoSMIF1.SetTrigger(true, out _); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //if (Name == "LP2") 
															 | 
															
															 | 
															
																             //if (Name == "LP2") 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1006,6 +1017,10 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             base.DockState = FoupDockState.Undocked; 
															 | 
															
															 | 
															
																             base.DockState = FoupDockState.Undocked; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             base.ClampState = FoupClampState.Close; 
															 | 
															
															 | 
															
																             base.ClampState = FoupClampState.Close; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             base.DoorState = FoupDoorState.Close; 
															 | 
															
															 | 
															
																             base.DoorState = FoupDoorState.Close; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            lock (_locker) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                SendMessage("GET:STAS;"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //if (Name == "LP1") 
															 | 
															
															 | 
															
																             //if (Name == "LP1") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //    DeviceModel.TrigSafetytoSMIF1.SetTrigger(false, out _); 
															 | 
															
															 | 
															
																             //    DeviceModel.TrigSafetytoSMIF1.SetTrigger(false, out _); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //if (Name == "LP2") 
															 | 
															
															 | 
															
																             //if (Name == "LP2") 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1088,6 +1103,7 @@ namespace EfemRT.Devices.LoadPorts.Hirata 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override bool ClearError(out string reason) 
															 | 
															
															 | 
															
																         public override bool ClearError(out string reason) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             reason = ""; 
															 | 
															
															 | 
															
																             reason = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            IsWaferProtrude = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             CheckToPostMessage(LoadPortMsg.Reset); 
															 | 
															
															 | 
															
																             CheckToPostMessage(LoadPortMsg.Reset); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return true; 
															 | 
															
															 | 
															
																             return true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 |