Bläddra i källkod

Merge branch 'master' of http://10.4.3.168:3000/JetPlasma/Virgo_Mask

intern04 1 vecka sedan
förälder
incheckning
966b2e6d21

BIN
VirgoRT/Config/DeviceModelVirgo.xml


+ 1 - 1
VirgoRT/Config/_ioDefineVirgo.xml

@@ -129,7 +129,7 @@
     <DI_ITEM Index="125" Name="" />
     <DI_ITEM Index="126" Name="" />
     <DI_ITEM Index="127" Name="" />
-    <DI_ITEM Index="128" Name="" />
+    <DI_ITEM Index="128" Name="DI_Lift_Servo_Group_Go_Pos_Origin_Complete" Addr="W28.00" Device=""  Note=""/>
     <DI_ITEM Index="129" Name="" />
     <DI_ITEM Index="130" Name="DI_Lift_Servo_2_Servo_On" Addr="W28.02" Device=""  Note="1=On,0=Off    伺服-1ON" />
     <DI_ITEM Index="131" Name="DI_Lift_Servo_2_Servo_Origin_Complete" Addr="W28.03" Device=""  Note="1=On,0=Off    伺服-1回原点完成" />

+ 10 - 1
VirgoRT/Devices/EFEM/Efem.cs

@@ -271,6 +271,8 @@ namespace VirgoRT.Devices.EFEM
             AddAction(new HomeAllAction(this, ModuleName.EFEM));
             AddAction(new OrgshAction(this, ModuleName.EFEM));
             AddAction(new TrackAction(this, ModuleName.EFEM));
+            AddAction(new SIGSTATModuleAction(this, ModuleName.LP1, string.Empty));
+            AddAction(new SIGSTATModuleAction(this, ModuleName.LP2, string.Empty));
             return true;
         }
 
@@ -281,6 +283,13 @@ namespace VirgoRT.Devices.EFEM
             return true;
         }
 
+        public bool SIGSTAT(ModuleName mod, string param)
+        {
+            AddAction(new SIGSTATModuleAction(this, mod, param));
+
+            return true;
+        }
+
         public bool Load(ModuleName mod)
         {
             AddAction(new LoadModuleAction(this, mod));
@@ -809,7 +818,7 @@ namespace VirgoRT.Devices.EFEM
                         Singleton<RouteManager>.Instance.EFEM.NotifyLP(mod, LoadportEntity.MSG.ActionDone);
                         if (action.Type == EfemOperation.Load || action.Type == EfemOperation.Unload)
                         {
-                            Singleton<RouteManager>.Instance.EFEM.PostMsg(EfemEntity.MSG.ActionDone, arg.CommandType);
+                            //Singleton<RouteManager>.Instance.EFEM.PostMsg(EfemEntity.MSG.ActionDone, arg.CommandType);
                         }
                     }
 

+ 40 - 1
VirgoRT/Devices/EFEM/EfemAction.cs

@@ -147,11 +147,48 @@ namespace VirgoRT.Devices.YASKAWA
 
         public override void Execute()
         {
+            var parameter = SC.GetValue<int>($"EFEM.EfemType") == 4 ? new List<string> { Constant.ModuleString[this.Module] } : new List<string> { Constant.ModuleString[this.Module], _param };
             Send(new EfemMessage
             {
                 Operation = this.Type,
                 Head = EfemMessage.MsgHead.MOV,
-                Parameters = new List<string> { Constant.ModuleString[this.Module], _param }
+                Parameters = parameter
+            });
+
+            //base.Execute(); 
+            this.Status = ActionStatus.SendCmd;
+            _efem.Status = DeviceState.Busy;
+            EV.PostInfoLog(this.Module.ToString(), $"Cmd {this.ID} {this.Type} Start");
+        }
+
+        public override void OnPostWork(string data = null)
+        {
+            if (ModuleHelper.IsLoadPort(Module))
+            {
+                _efem[Module].OnHomed();
+            }
+
+            EV.PostInfoLog(this.Module.ToString(), $"Cmd {this.ID} {this.Type} End");
+        }
+    }
+
+    class SIGSTATModuleAction : EfemAction
+    {
+        private string _param;
+        public SIGSTATModuleAction(EfemBase efem, ModuleName mod, string param) : base(efem, mod)
+        {
+            Type = EfemOperation.SigStatus;
+            this.Module = mod;
+            _param = param;
+        }
+
+        public override void Execute()
+        {
+            Send(new EfemMessage
+            {
+                Operation = this.Type,
+                Head = EfemMessage.MsgHead.GET,
+                Parameters = new List<string> { Constant.ModuleString[this.Module] }
             });
 
             //base.Execute(); 
@@ -177,6 +214,7 @@ namespace VirgoRT.Devices.YASKAWA
         {
             Type = EfemOperation.Load;
             this.Module = mod;
+            IsBackground = ModuleHelper.IsLoadPort(mod);
         }
 
         public override void OnPostWork(string data = null)
@@ -201,6 +239,7 @@ namespace VirgoRT.Devices.YASKAWA
         {
             Type = EfemOperation.Unload;
             this.Module = mod;
+            IsBackground = ModuleHelper.IsLoadPort(mod);
         }
 
         public override void OnPostWork(string data = null)

+ 6 - 3
VirgoRT/Devices/EFEM/EfemMessage.cs

@@ -152,9 +152,12 @@ namespace VirgoRT.Device.YASKAWA
                                 msg.Data.Add(msg.RawString.Substring("INF:CSTID/P1/".Length));
                                 break;
                             case EfemOperation.SigStatus:
-                                msg.Data.Add(sBodies[2]);
-                                msg.Data.Add(sBodies[3]);
-                                msg.Data.Add(sBodies[4]);
+                                if(msg.Head != EfemMessage.MsgHead.ACK)
+                                {
+                                    msg.Data.Add(sBodies[2]);
+                                    msg.Data.Add(sBodies[3]);
+                                    msg.Data.Add(sBodies[4]);
+                                }
                                 break;
                             case EfemOperation.Ready:
                                 msg.Data.Add(sBodies[2]);

+ 15 - 2
VirgoRT/Devices/EFEM/Loadport.cs

@@ -199,8 +199,21 @@ namespace VirgoRT.Devices.EFEM
 
             _controller.Home(Module, Module.ToString());
         }
-		
-		public void NoteJobStart()
+
+        public void SIGSTAT()
+        {
+            if (IsBusy)
+            {
+                EV.PostInfoLog(Module.ToString(), $"{Module} is busy can not SIGSTAT");
+                return;
+            }
+
+            IsBusy = true;
+
+            _controller.SIGSTAT(Module, Module.ToString());
+        }
+
+        public void NoteJobStart()
         {
             JobDone = false;
         }

+ 8 - 0
VirgoRT/Devices/EdwardsPump.cs

@@ -286,6 +286,10 @@ namespace VirgoRT.Devices
                     case EdwardsPumpMessage.QUERY_Pump_Status:
                         if (cmd == "0")
                         {
+                            if(StatusDry != EdwardsPumpState.OFF)
+                            {
+                                LOG.Info($"{Module} Edwards Pre Status:{StatusDry} Cur Status:{EdwardsPumpState.OFF} Receive:{obj}");
+                            }
                             StatusDry = EdwardsPumpState.OFF;
                             if (_trigPumpOn.Q && _timerPumpOn.IsTimeout())
                             {
@@ -300,6 +304,10 @@ namespace VirgoRT.Devices
                         }
                         else if (cmd == "4")
                         {
+                            if(StatusDry != EdwardsPumpState.ON)
+                            {
+                                LOG.Info($"{Module} Edwards Pre Status:{StatusDry} Cur Status:{EdwardsPumpState.ON} Receive:{obj}");
+                            }
                             StatusDry = EdwardsPumpState.ON;
                             if (_trigPumpOff.Q && _timerPumpOff.IsTimeout())
                             {

+ 114 - 15
VirgoRT/Devices/IODevices/IoTriStateLift2.cs

@@ -18,14 +18,33 @@ namespace VirgoRT.Devices
     {
         private readonly DIAccessor _diOrigin;//是否到达原点
         private readonly DIAccessor _diOrigin2;
+        private readonly DIAccessor _diOrigin3;
         private readonly DIAccessor _diP1;//是否到达位置1
         private readonly DIAccessor _diP2;//是否到达位置2
         private readonly DIAccessor _diP3;//是否到达位置3
 
         private readonly DIAccessor _diCOMMAlarm;//去位置1,2,3超时
         private readonly DIAccessor _diBatteryLowAlarm;//去原点超时
-       // private readonly DIAccessor _diServoAlarm; // servo alarm
-       // private readonly DIAccessor _diCCWLimitSensorAlarm;  // 
+
+        private readonly DIAccessor _di1_L_Servo_Driver_Alarm;
+        private readonly DIAccessor _di1_L_Servo_Driver_Warning;
+        private readonly DIAccessor _di1_Search_ORG_Fail_Alarm;
+        private readonly DIAccessor _di1_ABS_Fail_Alarm;
+        private readonly DIAccessor _di1_Up_Limit_Alarm;
+        private readonly DIAccessor _di1_Down_Limit_Alarm;
+        private readonly DIAccessor _di1_Over_Software_Alarm;
+
+        private readonly DIAccessor _di2_L_Servo_Driver_Alarm;
+        private readonly DIAccessor _di2_L_Servo_Driver_Warning;
+        private readonly DIAccessor _di2_Search_ORG_Fail_Alarm;
+        private readonly DIAccessor _di2_ABS_Fail_Alarm;
+        private readonly DIAccessor _di2_Up_Limit_Alarm;
+        private readonly DIAccessor _di2_Down_Limit_Alarm;
+        private readonly DIAccessor _di2_Over_Software_Alarm;
+
+
+        // private readonly DIAccessor _diServoAlarm; // servo alarm
+        // private readonly DIAccessor _diCCWLimitSensorAlarm;  // 
         //private readonly DIAccessor _diOverSoftwareLimitAlarm; // 
 
         private readonly DOAccessor _doReset;
@@ -56,13 +75,15 @@ namespace VirgoRT.Devices
         private readonly AOAccessor _aoSoftDownLimit;
         private readonly AOAccessor _aoCorrectionValue;
 
+        private Stopwatch swOrigin = new Stopwatch();
         private Stopwatch sw = new Stopwatch();
         private Stopwatch _manualStopTimer = new Stopwatch();
         private readonly int _stopButtonAutoResetTime = 1000;
 
         private Position _currentTarget = Position.Invalid;
+        private Position _preTarget = Position.Invalid;
 
-        long _timeout = 10000;
+        long _timeout = 60000;
         private bool _bAlarmReported = false;
 
 
@@ -87,13 +108,13 @@ namespace VirgoRT.Devices
         {
             get
             {
-                if (_diP1.Value && _diP2.Value == false && _diP3.Value == false)
+                if ((_preTarget == Position.position1 && _diP1.Value) && _diP2.Value == false && _diP3.Value == false)
                     return MovementPosition.Up;
-                else if (_diP1.Value == false && _diP2.Value && _diP3.Value == false)
+                else if (_diP1.Value == false && (_diP2.Value && _preTarget == Position.position2) && _diP3.Value == false)
                     return MovementPosition.Middle;
-                else if (_diP1.Value == false && _diP2.Value == false && _diP3.Value)
+                else if (_diP1.Value == false && _diP2.Value == false && (_diP3.Value && _preTarget == Position.position3))
                     return MovementPosition.Down;
-                else if (_diOrigin.Value && _diOrigin2.Value)
+                else if (_diOrigin.Value && _diOrigin2.Value && _diOrigin3.Value && _preTarget == Position.origin)
                     return MovementPosition.Origin;
 
                 return MovementPosition.Unknown;
@@ -127,6 +148,7 @@ namespace VirgoRT.Devices
 
             _diOrigin = ParseDiNode("diOrigin", node, ioModule);
             _diOrigin2 = ParseDiNode("diOrigin2", node, ioModule);
+            _diOrigin3 = ParseDiNode("diOrigin3", node, ioModule);
             _diP1 = ParseDiNode("diP1", node, ioModule);
             _diP2 = ParseDiNode("diP2", node, ioModule);
             _diP3 = ParseDiNode("diP3", node, ioModule);
@@ -134,6 +156,22 @@ namespace VirgoRT.Devices
             _diCOMMAlarm = ParseDiNode("diCOMMAlarm", node, ioModule);
             _diBatteryLowAlarm = ParseDiNode("diBatteryLowAlarm", node, ioModule);
 
+            _di1_L_Servo_Driver_Alarm = ParseDiNode("di1_L_Servo_Driver_Alarm", node, ioModule);
+            _di1_L_Servo_Driver_Warning = ParseDiNode("di1_L_Servo_Driver_Warning", node, ioModule);
+            _di1_Search_ORG_Fail_Alarm = ParseDiNode("di1_Search_ORG_Fail_Alarm", node, ioModule);
+            _di1_ABS_Fail_Alarm = ParseDiNode("di1_ABS_Fail_Alarm", node, ioModule);
+            _di1_Up_Limit_Alarm = ParseDiNode("di1_Up_Limit_Alarm", node, ioModule);
+            _di1_Down_Limit_Alarm = ParseDiNode("di1_Down_Limit_Alarm", node, ioModule);
+            _di1_Over_Software_Alarm = ParseDiNode("di1_Over_Software_Alarm", node, ioModule);
+
+            _di2_L_Servo_Driver_Alarm = ParseDiNode("di2_L_Servo_Driver_Alarm", node, ioModule);
+            _di2_L_Servo_Driver_Warning = ParseDiNode("di2_L_Servo_Driver_Warning", node, ioModule);
+            _di2_Search_ORG_Fail_Alarm = ParseDiNode("di2_Search_ORG_Fail_Alarm", node, ioModule);
+            _di2_ABS_Fail_Alarm = ParseDiNode("di2_ABS_Fail_Alarm", node, ioModule);
+            _di2_Up_Limit_Alarm = ParseDiNode("di2_Up_Limit_Alarm", node, ioModule);
+            _di2_Down_Limit_Alarm = ParseDiNode("di2_Down_Limit_Alarm", node, ioModule);
+            _di2_Over_Software_Alarm = ParseDiNode("di2_Over_Software_Alarm", node, ioModule);
+
             _doReset = ParseDoNode("doReset", node, ioModule);
 
             _doOrigin = ParseDoNode("doOrigin", node, ioModule);
@@ -190,7 +228,9 @@ namespace VirgoRT.Devices
                 return false;
 
             _currentTarget = position;
+            _preTarget = position;
             sw.Restart();
+            swOrigin.Restart();
             switch (position)
             {
                 case Position.position1:
@@ -212,12 +252,12 @@ namespace VirgoRT.Devices
                     break;
                 case Position.origin:
                     {
-                        if (_diOrigin.Value && _diOrigin2.Value)
-                        {
-                            EV.PostInfoLog(Module, $"Lift Pin already on original position.");
-                            sw.Stop();
-                            return true;
-                        }
+                        //if (_diOrigin.Value && _diOrigin2.Value && _diOrigin3.Value)
+                        //{
+                        //    EV.PostInfoLog(Module, $"Lift Pin already on original position.");
+                        //    sw.Stop();
+                        //    return true;
+                        //}
                         _doOrigin.Value = true;
                     }
                     break;
@@ -366,15 +406,73 @@ namespace VirgoRT.Devices
                 NoDuplicatedAlarm($"Lift Pin DI-{_diCOMMAlarm.Index}  alarm");
             }
 
+            if(_di1_L_Servo_Driver_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di1_L_Servo_Driver_Alarm.Index}  alarm");
+            }
+            if (_di1_L_Servo_Driver_Warning.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di1_L_Servo_Driver_Warning.Index}  alarm");
+            }
+            if (_di1_Search_ORG_Fail_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di1_Search_ORG_Fail_Alarm.Index}  alarm");
+            }
+            if (_di1_ABS_Fail_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di1_ABS_Fail_Alarm.Index}  alarm");
+            }
+            if (_di1_Up_Limit_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di1_Up_Limit_Alarm.Index}  alarm");
+            }
+            if (_di1_Down_Limit_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di1_Down_Limit_Alarm.Index}  alarm");
+            }
+            if (_di1_Over_Software_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di1_Over_Software_Alarm.Index}  alarm");
+            }
+
+            if (_di2_L_Servo_Driver_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di2_L_Servo_Driver_Alarm.Index}  alarm");
+            }
+            if (_di2_L_Servo_Driver_Warning.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di2_L_Servo_Driver_Warning.Index}  alarm");
+            }
+            if (_di2_Search_ORG_Fail_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di2_Search_ORG_Fail_Alarm.Index}  alarm");
+            }
+            if (_di2_ABS_Fail_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di2_ABS_Fail_Alarm.Index}  alarm");
+            }
+            if (_di2_Up_Limit_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di2_Up_Limit_Alarm.Index}  alarm");
+            }
+            if (_di2_Down_Limit_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di2_Down_Limit_Alarm.Index}  alarm");
+            }
+            if (_di2_Over_Software_Alarm.Value)
+            {
+                NoDuplicatedAlarm($"Lift Pin DI-{_di2_Over_Software_Alarm.Index}  alarm");
+            }
+
             if (_currentTarget == Position.Invalid)
                 return;
 
             if ((_currentTarget == Position.position1 && _diP1.Value) ||
                 (_currentTarget == Position.position2 && _diP2.Value) ||
                 (_currentTarget == Position.position3 && _diP3.Value) ||
-                (_currentTarget == Position.origin && (_diOrigin.Value && _diOrigin2.Value)))
+                (_currentTarget == Position.origin && swOrigin.ElapsedMilliseconds > 1000 && (_diOrigin.Value && _diOrigin2.Value && _diOrigin3.Value)))
             {
-                EV.PostInfoLog(Module, $"Lift Pin arrive {_currentTarget}");
+                EV.PostInfoLog(Module, $"Lift Pin arrive {_currentTarget}, ({_diOrigin.Index})_DI_Lift_Servo_1_Servo_Origin_Complete={_diOrigin.Value} ({_diOrigin2.Index})_DI_Lift_Servo_2_Servo_Origin_Complete={_diOrigin2.Value} ({_diOrigin3.Index})_DI_Lift_Servo_Group_Go_Pos_Origin_Complete={_diOrigin3.Value} ");
                 Reset();
                 return;
             }
@@ -389,6 +487,7 @@ namespace VirgoRT.Devices
         {
             _currentTarget = Position.Invalid;
             sw.Reset();
+            swOrigin.Reset();
             _doP1.Value = false;
             _doP2.Value = false;
             _doP3.Value = false;

+ 1 - 1
VirgoRT/Devices/JetPM.cs

@@ -780,7 +780,7 @@ namespace VirgoRT.Devices
             else if (ws == WaferSize.WS6 || ws == WaferSize.WS8 || ws == WaferSize.WS12)
                 return true;
             else
-                return false;
+                return true;
         }
 
         private void SetGuidePinSmall(MovementPosition dirt)

+ 41 - 3
VirgoRT/Modules/LPs/LoadPortHomeRoutine.cs

@@ -13,7 +13,8 @@ namespace VirgoRT.Modules.LPs
         {
              
             Home,
-             
+            QueryStatus,
+
         }
 
         private int _timeout = 0;
@@ -47,7 +48,7 @@ namespace VirgoRT.Modules.LPs
             {
                  
                 Home((int)RoutineStep.Home, _timeout);
-                 
+                QueryStatus((int)RoutineStep.QueryStatus, _timeout);
             }
             catch (RoutineBreakException)
             {
@@ -100,7 +101,44 @@ namespace VirgoRT.Modules.LPs
             }
         }
 
- 
+        public void QueryStatus(int id, int timeout)
+        {
+            Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
+            {
+                Notify($"Start SIGSTAT {_lpModule.Name}");
+
+                _lpModule.LPDevice.SIGSTAT();
+
+                return true;
+            }, () =>
+            {
+                if (_lpModule.LPDevice.IsError)
+                    return null;
+
+                if (_lpModule.LPDevice.IsBusy)
+                    return false;
+
+                return true;
+            }, timeout * 1000);
+
+            if (ret.Item1)
+            {
+                if (ret.Item2 == Result.FAIL)
+                {
+                    Stop(string.Format("SIGSTAT failed."));
+                    throw (new RoutineFaildException());
+                }
+                else if (ret.Item2 == Result.TIMEOUT) //timeout
+                {
+                    Stop(string.Format("SIGSTAT timeout, can not complete in {0} seconds", timeout));
+                    throw (new RoutineFaildException());
+                }
+                else
+                    throw (new RoutineBreakException());
+            }
+        }
+
+
         public void Abort()
         {
 

+ 4 - 2
VirgoRT/Modules/LPs/LoadPortLoadRoutine.cs

@@ -59,7 +59,7 @@ namespace VirgoRT.Modules.LPs
         {
             try
             {
-                Wait((int)RoutineStep.WaitEFEMReady, WaitEFEMReady, _wait_timeout);
+                //Wait((int)RoutineStep.WaitEFEMReady, WaitEFEMReady, _wait_timeout);
                 Load((int)RoutineStep.Load,  _timeout); 
             }
             catch (RoutineBreakException)
@@ -123,7 +123,9 @@ namespace VirgoRT.Modules.LPs
                 {
                     Notify($"Start Load {_lpModule.Name}");
 
-                    return Singleton<RouteManager>.Instance.EFEM.CheckToPostMessage((int)EfemEntity.MSG.Load, Module);
+                    _lpModule.LPDevice.Load();
+                    return true;
+                    //return Singleton<RouteManager>.Instance.EFEM.CheckToPostMessage((int)EfemEntity.MSG.Load, Module);
 
                 }, () =>
                 {

+ 2 - 2
VirgoRT/Modules/ManualTransfer.cs

@@ -234,10 +234,10 @@ namespace VirgoRT.Modules
                 return Result.FAIL;
             }
 
-            if (ModuleHelper.IsAligner(_source.Module) || ModuleHelper.IsCooling(_source.Module))
+            if ((Singleton<RouteManager>.Instance.EFEM.EFEMType != EfemEntity.EfemType.BeamSUNWAY && ModuleHelper.IsAligner(_source.Module)) || ModuleHelper.IsCooling(_source.Module))
                 _source.Cooling(_moveTask.CoolingTime);
 
-            if (ModuleHelper.IsAligner(_destination.Module) || ModuleHelper.IsCooling(_destination.Module))
+            if ((Singleton<RouteManager>.Instance.EFEM.EFEMType != EfemEntity.EfemType.BeamSUNWAY && ModuleHelper.IsAligner(_destination.Module)) || ModuleHelper.IsCooling(_destination.Module))
                 _destination.Cooling(_moveTask.CoolingTime);
 
             if (_moveTask.SourceModule == ModuleName.EfemRobot)

+ 1 - 1
VirgoRT/Modules/PMs/PMHomeRoutine.cs

@@ -36,7 +36,7 @@ namespace VirgoRT.Modules.PMs
             {
                 if (_chamber != null && _chamber.IsInstalled)
                 {
-                    SetLiftPinPos((int)RoutineStep.LiftPinOrig,     MovementPosition.Origin,    20);
+                    SetLiftPinPos((int)RoutineStep.LiftPinOrig,     MovementPosition.Origin,    200);
                     Home((int)RoutineStep.Home,                     10);
                 }
             }

+ 2 - 2
VirgoRT/Modules/Schedulers/SchedulerAligner.cs

@@ -92,7 +92,7 @@ namespace VirgoRT.Modules.Schedulers
             _timerCooling.Start(_paramCoolingTime * 1000);
 
             _timerDelay.Restart();
-            if (_entity.EFEMType == EfemEntity.EfemType.BrooksEFEM)
+            if (_entity.EFEMType == EfemEntity.EfemType.BrooksEFEM || _entity.EFEMType == EfemEntity.EfemType.BeamSUNWAY)
             {
                 _token = _entity.InvokeAlign(Module.ToString(), time);
             }
@@ -173,7 +173,7 @@ namespace VirgoRT.Modules.Schedulers
 
         private bool IsAligned()
         {
-            if(_entity.EFEMType == EfemEntity.EfemType.BrooksEFEM)
+            if(_entity.EFEMType == EfemEntity.EfemType.BrooksEFEM || _entity.EFEMType == EfemEntity.EfemType.BeamSUNWAY)
                 return _entity.CheckAcked(_token);
             else
                 return !_entity.EfemDevice.IsBufferPinUp[Module];

+ 1 - 1
VirgoSimulator/Config/_ioDefineVirgo.xml

@@ -129,7 +129,7 @@
     <DI_ITEM Index="125" Name="" />
     <DI_ITEM Index="126" Name="" />
     <DI_ITEM Index="127" Name="" />
-    <DI_ITEM Index="128" Name="" />
+    <DI_ITEM Index="128" Name="DI_Lift_Servo_Group_Go_Pos_Origin_Complete" Addr="W28.00" Device=""  Note=""/>
     <DI_ITEM Index="129" Name="" />
     <DI_ITEM Index="130" Name="DI_Lift_Servo_2_Servo_On" Addr="W28.02" Device=""  Note="1=On,0=Off    伺服-1ON" />
     <DI_ITEM Index="131" Name="DI_Lift_Servo_2_Servo_Origin_Complete" Addr="W28.03" Device=""  Note="1=On,0=Off    伺服-1回原点完成" />

+ 26 - 3
VirgoSimulator/Devices/EfemSimulator.cs

@@ -71,7 +71,8 @@ namespace VirgoSimulator.Devices
 
             // 发送ACK 表示收到
             string ack = Regex.Replace(str, CMD_PATTERN, ACK);
-            OnWriteMessage(ack);
+            if(!str.Contains("SIGSTAT"))
+                OnWriteMessage(ack);
 
             // 处理INF
             var a = OnWork(ack);
@@ -147,7 +148,8 @@ namespace VirgoSimulator.Devices
                 SendSystemData();
                 SendLP1Data();
                 SendLP2Data();
-                    return;
+                strINF = strACK.Replace(ACK, "INF");
+                break;
             case EfemOperation.Map:
                 Match m2 = Regex.Match(strACK, SFOUP);
                 if (m2.Success)
@@ -157,12 +159,33 @@ namespace VirgoSimulator.Devices
                     strINF = s2 + strACK.Replace(ACK, "INF");
                 }
                 break;
+            case EfemOperation.SigStatus:
+                {
+                    if(strACK.Contains("P1"))
+                    {
+                            uint data = GetLP1Data1();
+                            string msg = $"ACK:SIGSTAT/P1/{data:X8}/00000000;\r";
+                            OnWriteMessage(msg);
+                            msg = $"INF:SIGSTAT/P1/{data:X8}/00000000;\r";
+                            OnWriteMessage(msg);
+                            return;
+                        }
+                    if (strACK.Contains("P2"))
+                    {
+                            uint data = GetLP2Data1();
+                            string msg = $"ACK:SIGSTAT/P2/{data:X8}/00000000;\r";
+                            OnWriteMessage(msg);
+                            msg = $"INF:SIGSTAT/P2/{data:X8}/00000000;\r";
+                            OnWriteMessage(msg);
+                            return;
+                        }
+                        break;
+                }
             case EfemOperation.Align:
             case EfemOperation.Pick:
             case EfemOperation.Place:
             case EfemOperation.Orgsh:
             case EfemOperation.Light:
-            case EfemOperation.SigStatus:
             default:
                 strINF = strACK.Replace(ACK, "INF");
                 break;

+ 6 - 0
VirgoSimulator/Instances/SimulatorSystem.cs

@@ -70,6 +70,8 @@ namespace VirgoSimulator.Instances
             IO.DI[$"{mod}.DI_MFC5_Pressure"].Value = true;
             IO.DI[$"{mod}.DI_EFEM_Side_Panel_Closed"].Value = true;
             IO.DI[$"{mod}.DI_Generator_Hardware_Interlock"].Value = true;
+            IO.DI[$"{mod}.DI_ACR_Smoke_Monitoring"].Value = true;
+            IO.DI[$"{mod}.DI_ACR_Power_On"].Value = true;
             IO.DI[$"{mod}.DI_N2_Pressure"].Value = true;
             // slit door
             IO.DI[$"{mod}.DI_Slit_Door_Open_Pos"].Value = false;
@@ -267,6 +269,7 @@ namespace VirgoSimulator.Instances
             {
                 IO.DI[$"{mod}.DI_Lift_Virtual_Servo_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_1_Servo_Origin_Complete"].Value = false;
+                IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_2_Servo_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_1_Complete"].Value = true;
                 IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_2_Complete"].Value = false;
@@ -276,6 +279,7 @@ namespace VirgoSimulator.Instances
             {
                 IO.DI[$"{mod}.DI_Lift_Virtual_Servo_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_1_Servo_Origin_Complete"].Value = false;
+                IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_2_Servo_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_1_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_2_Complete"].Value = true;
@@ -285,6 +289,7 @@ namespace VirgoSimulator.Instances
             {
                 IO.DI[$"{mod}.DI_Lift_Virtual_Servo_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_1_Servo_Origin_Complete"].Value = false;
+                IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_2_Servo_Origin_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_1_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_2_Complete"].Value = false;
@@ -295,6 +300,7 @@ namespace VirgoSimulator.Instances
             {
                 IO.DI[$"{mod}.DI_Lift_Virtual_Servo_Origin_Complete"].Value = true;
                 IO.DI[$"{mod}.DI_Lift_Servo_1_Servo_Origin_Complete"].Value = true;
+                IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_Origin_Complete"].Value = true;
                 IO.DI[$"{mod}.DI_Lift_Servo_2_Servo_Origin_Complete"].Value = true;
                 IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_1_Complete"].Value = false;
                 IO.DI[$"{mod}.DI_Lift_Servo_Group_Go_Pos_2_Complete"].Value = false;

+ 2 - 2
VirgoUI/Models/Operate/Overview/OverViewModel.cs

@@ -789,7 +789,7 @@ namespace VirgoUI.Client.Models.Operate
         {
             get
             {
-                return Foup2Present && string.IsNullOrEmpty(LP2JobStatus) && !IsLoadedLP2 && LP1Status != "Loading";
+                return Foup2Present && string.IsNullOrEmpty(LP2JobStatus) && !IsLoadedLP2 && LP2Status != "Loading";
             }
         }
 
@@ -804,7 +804,7 @@ namespace VirgoUI.Client.Models.Operate
         {
             get
             {
-                return Foup2Present && (string.IsNullOrEmpty(LP2JobStatus) || LP2JobStatus == "Completed") && IsLoadedLP2 && LP1Status != "Unloading";
+                return Foup2Present && (string.IsNullOrEmpty(LP2JobStatus) || LP2JobStatus == "Completed") && IsLoadedLP2 && LP2Status != "Unloading";
             }
         }