Browse Source

1. 增加Home R轴的页面配置
2. 增加HomeAxis的各个状态下的出入状态

zhouhr 2 months ago
parent
commit
4f59f4194f

+ 2 - 2
Mars/EfemDualRT/Config/System.sccfg

@@ -1858,7 +1858,7 @@
       <config default="3" name="Position3Value" nameView="Position3 Value" description="" max="20" min="0" paramter="" tag="" unit="mm" type="Double" />
       <config default="4" name="Position4Value" nameView="Position4 Value" description="" max="20" min="0" paramter="" tag="" unit="mm" type="Double" />
       <config default="5" name="SpeedValue"     nameView="Speed Value"     description="" max="20" min="0" paramter="" tag="" unit="mm" type="Double" />
-      <config default="5" name="MotionTimeOut"  nameView="Motion Time Out" description="" max="60" min="0" paramter="" tag="" unit="s"  type="Integer" />
+      <config default="5" name="MotionTimeOut"  nameView="Motion Time Out" description="" max="120" min="0" paramter="" tag="" unit="s"  type="Integer" />
     </configs>
     <configs name="LiftPin2" nameView="LiftPin2">
       <config default="1" name="Position1Value" nameView="Position1 Value" description="" max="20" min="0" paramter="" tag="" unit="mm" type="Double" />
@@ -1866,7 +1866,7 @@
       <config default="3" name="Position3Value" nameView="Position3 Value" description="" max="20" min="0" paramter="" tag="" unit="mm" type="Double" />
       <config default="4" name="Position4Value" nameView="Position4 Value" description="" max="20" min="0" paramter="" tag="" unit="mm" type="Double" />
       <config default="5" name="SpeedValue"     nameView="Speed Value"     description="" max="20" min="0" paramter="" tag="" unit="mm" type="Double" />
-      <config default="5" name="MotionTimeOut"  nameView="Motion Time Out" description="" max="60" min="0" paramter="" tag="" unit="s"  type="Integer" />
+      <config default="5" name="MotionTimeOut"  nameView="Motion Time Out" description="" max="120" min="0" paramter="" tag="" unit="s"  type="Integer" />
     </configs>
   </configs>
 </root>

+ 10 - 2
Mars/EfemDualUI/Views/Platforms/TMs/TMView.xaml

@@ -611,7 +611,11 @@
 
                                 <Button Grid.Column="0" Grid.Row="1" Margin="50,5" cal:Message.Attach="[Event Click]=[Action SetOnline('VCEA')]" IsEnabled="{Binding VCEAIsOffline}">Online</Button>
                                 <Button Grid.Column="2" Grid.Row="1" Margin="50,5" cal:Message.Attach="[Event Click]=[Action SetOffline('VCEA')]" IsEnabled="{Binding VCEAIsOnline}">Offline</Button>
-                                <Button Grid.Column="0" Grid.Row="2" Margin="50,5" IsEnabled="{Binding VCEAIsOffline}" cal:Message.Attach="[Event Click]=[Action Home('VCEA')]" Content="Home"></Button>
+                                <Button Grid.Column="0" Grid.Row="2" Margin="50,5" IsEnabled="{Binding VCEAIsOffline}" Padding="0" cal:Message.Attach="[Event Click]=[Action Home('VCEA')]" Content="Home" Visibility="{Binding VCEANotPLUS, Converter={StaticResource bool2VisibilityConverter}}"></Button>
+                                <StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal" Visibility="{Binding VCEAIsPLUS, Converter={StaticResource bool2VisibilityConverter}}">
+                                    <Button Margin="50,5,0,5" IsEnabled="{Binding VCEAIsOffline}" Padding="0" cal:Message.Attach="[Event Click]=[Action Home('VCEA')]" Content="HomeALL"></Button>
+                                    <Button Margin="5" IsEnabled="{Binding VCEAIsOffline}" Padding="5,0" cal:Message.Attach="[Event Click]=[Action Home('VCEA', 'R')]" Content="HomeR"></Button>
+                                </StackPanel>
                                 <Button Grid.Column="0" Grid.Row="3" Margin="50,5" IsEnabled="{Binding VCEAIsOffline}" cal:Message.Attach="[Event Click]=[Action Load('VCEA')]"  Content="Load"></Button>
                                 <Button Grid.Column="2" Grid.Row="2" Margin="50,5" IsEnabled="{Binding VCEAIsOffline}" cal:Message.Attach="[Event Click]=[Action LoadPrepare('VCEA')]" Content="LoadPrepare"></Button>
                                 <Button Grid.Column="2" Grid.Row="3" Margin="50,5" IsEnabled="{Binding VCEAIsOffline}" cal:Message.Attach="[Event Click]=[Action UnLoad('VCEA')]" Content="UnLoad"></Button>
@@ -707,7 +711,11 @@
 
                                 <Button Grid.Column="0" Grid.Row="1" Margin="50,5" cal:Message.Attach="[Event Click]=[Action SetOnline('VCEB')]" IsEnabled="{Binding VCEBIsOffline}">Online</Button>
                                 <Button Grid.Column="2" Grid.Row="1" Margin="50,5" cal:Message.Attach="[Event Click]=[Action SetOffline('VCEB')]" IsEnabled="{Binding VCEBIsOnline}">Offline</Button>
-                                <Button Grid.Column="0" Grid.Row="2" Margin="50,5" IsEnabled="{Binding VCEBIsOffline}" cal:Message.Attach="[Event Click]=[Action Home('VCEB')]" Content="Home"></Button>
+                                <Button Grid.Column="0" Grid.Row="2" Margin="50,5" IsEnabled="{Binding VCEBIsOffline}" Padding="0" cal:Message.Attach="[Event Click]=[Action Home('VCEB')]" Content="Home" Visibility="{Binding VCEBNotPLUS, Converter={StaticResource bool2VisibilityConverter}}"></Button>
+                                <StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal" Visibility="{Binding VCEBIsPLUS, Converter={StaticResource bool2VisibilityConverter}}">
+                                    <Button Margin="50,5,0,5" IsEnabled="{Binding VCEBIsOffline}" Padding="0" cal:Message.Attach="[Event Click]=[Action Home('VCEB')]" Content="HomeALL"></Button>
+                                    <Button Margin="5" IsEnabled="{Binding VCEBIsOffline}" Padding="5,0" cal:Message.Attach="[Event Click]=[Action Home('VCEB', 'R')]" Content="HomeR"></Button>
+                                </StackPanel>
                                 <Button Grid.Column="0" Grid.Row="3" Margin="50,5" IsEnabled="{Binding VCEBIsOffline}" cal:Message.Attach="[Event Click]=[Action Load('VCEB')]"  Content="Load"></Button>
                                 <Button Grid.Column="2" Grid.Row="2" Margin="50,5" IsEnabled="{Binding VCEBIsOffline}" cal:Message.Attach="[Event Click]=[Action LoadPrepare('VCEB')]" Content="LoadPrepare"></Button>
                                 <Button Grid.Column="2" Grid.Row="3" Margin="50,5" IsEnabled="{Binding VCEBIsOffline}" cal:Message.Attach="[Event Click]=[Action UnLoad('VCEB')]" Content="UnLoad"></Button>

+ 29 - 1
Mars/EfemDualUI/Views/Platforms/TMs/TMViewModel.cs

@@ -130,7 +130,23 @@ namespace EfemDualUI.Views.Platforms.TMs
                 return Permission == 3;
             }
         }
-        
+
+        private bool _VCEAIsPLUS = false;
+        private bool _VCEBIsPLUS = false;
+
+        public bool VCEAIsPLUS
+        {
+            get { return _VCEAIsPLUS; }
+            set { _VCEAIsPLUS = value; }
+        }
+        public bool VCEBIsPLUS
+        {
+            get { return _VCEBIsPLUS; }
+            set { _VCEBIsPLUS = value; }
+        }
+
+        public bool VCEANotPLUS => !VCEAIsPLUS;
+        public bool VCEBNotPLUS => !VCEBIsPLUS;
 
         public bool TMIsOnline => (bool)QueryDataClient.Instance.Service.GetData("VTM.IsOnline");
         public bool TMIsOffline => !(bool)QueryDataClient.Instance.Service.GetData("VTM.IsOnline");
@@ -166,6 +182,7 @@ namespace EfemDualUI.Views.Platforms.TMs
         public bool VCEAOutDoorIsClose => !VCEAOutDoorIsOpen;
         public bool VCEBOutDoorIsClose => !VCEBOutDoorIsOpen;
 
+
         public bool VCEALeftCassetteArrive => false;
         public bool VCEARightCassetteArrive => false;
         public bool VCEBLeftCassetteArrive => false;
@@ -347,6 +364,9 @@ namespace EfemDualUI.Views.Platforms.TMs
         protected override void OnInitialize()
         {
             base.OnInitialize();
+
+            VCEAIsPLUS = (bool)QueryDataClient.Instance.Service.GetConfig("VCEA.IsPlus");
+            VCEBIsPLUS = (bool)QueryDataClient.Instance.Service.GetConfig("VCEB.IsPlus");
             //base.InitCooling();
             //_isPMAVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.PMA.IsInstalled");
             //_isPMBVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.PMB.IsInstalled");
@@ -508,6 +528,14 @@ namespace EfemDualUI.Views.Platforms.TMs
                 InvokeClient.Instance.Service.DoOperation($"{chamber}.HOME");
         }
 
+        public void Home(string chamber, string axis)
+        {
+            if (chamber == "TM")
+                InvokeClient.Instance.Service.DoOperation($"V{chamber}.HOMEAxis", axis);
+            else
+                InvokeClient.Instance.Service.DoOperation($"{chamber}.HOMEAxis", axis);
+        }
+
         public void Load(string chamber)
         {
             InvokeClient.Instance.Service.DoOperation($"{chamber}.SafeLoad");

+ 36 - 0
Mars/JetMainframe/VCEs/VCEEntity.cs

@@ -173,6 +173,7 @@ namespace JetMainframe.VCEs
             });
 
             OP.Subscribe($"{_modulename}.HOME", (cmd, args) => { PostMsg(VceMSG.Home); return true; });
+            OP.Subscribe($"{_modulename}.HOMEAxis", (cmd, args) => { PostMsg(VceMSG.HomeAxis,args); return true; });
             OP.Subscribe($"{_modulename}.DoorOpen", (cmd, args) => { PostMsg(VceMSG.DoorOpen); return true; });
             OP.Subscribe($"{_modulename}.DoorClose", (cmd, args) => { PostMsg(VceMSG.DoorClose); return true; });
             OP.Subscribe($"{_modulename}.Map", (cmd, args) => { PostMsg(VceMSG.Map); return true; });
@@ -231,6 +232,17 @@ namespace JetMainframe.VCEs
             Transition(VceSTATE.Homing, FSM_MSG.TIMER, fnHomeTimeout, VceSTATE.Idle);
             Transition(VceSTATE.Homing, VceMSG.Abort, fnAbortHome, VceSTATE.Init);
 
+            //HOME Axis->homing
+            Transition(VceSTATE.Init, VceMSG.HomeAxis, fnStartHomeAxis, VceSTATE.HomingAxisInInit);
+            Transition(VceSTATE.Idle, VceMSG.HomeAxis, fnStartHomeAxis, VceSTATE.HomingAxisInIdle);
+            Transition(VceSTATE.Error, VceMSG.HomeAxis, fnStartHomeAxis, VceSTATE.HomingAxisInError);
+            Transition(VceSTATE.HomingAxisInInit, FSM_MSG.TIMER, fnHomingAxisTimeout, VceSTATE.Init);
+            Transition(VceSTATE.HomingAxisInIdle, FSM_MSG.TIMER, fnHomingAxisTimeout, VceSTATE.Idle);
+            Transition(VceSTATE.HomingAxisInError, FSM_MSG.TIMER, fnHomingAxisTimeout, VceSTATE.Error);
+            Transition(VceSTATE.HomingAxisInInit, VceMSG.Abort, fnAbortHomeAxis, VceSTATE.Init);
+            Transition(VceSTATE.HomingAxisInIdle, VceMSG.Abort, fnAbortHomeAxis, VceSTATE.Idle);
+            Transition(VceSTATE.HomingAxisInError, VceMSG.Abort, fnAbortHomeAxis, VceSTATE.Error);
+
             //Open Door 开门
             Transition(VceSTATE.Idle, VceMSG.DoorOpen, fnStartOpenDoor, VceSTATE.DoorOpenning);
             Transition(VceSTATE.DoorOpenning, FSM_MSG.TIMER, fnOpenDoorTimeout, VceSTATE.Idle);
@@ -702,6 +714,30 @@ namespace JetMainframe.VCEs
             return true;
         }
 
+        private bool fnStartHomeAxis(object[] param)
+        {
+            if (param.Length == 1)
+                return _vce.Home(param[0].ToString());
+            else
+                return false;
+        }
+
+        private bool fnHomingAxisTimeout(object[] param)
+        {
+            if (_vce.Status == RState.Timeout || _vce.Status == RState.Failed)
+            {
+                PostMsg(VceMSG.Error);
+                return false;
+            }
+            return _vce.Status == RState.End;
+        }
+
+
+        private bool fnAbortHomeAxis(object[] param)
+        {
+            return true;
+        }
+
         private bool fnStartHome(object[] param)
         {
             if (!DoorIsLocked())