소스 검색

1 add rotbot upper vacuum
2 revise clamshell closed check

chenzk 1 주 전
부모
커밋
52a72c1330

+ 28 - 9
PunkHPX8_MainPages/ViewModels/EfemViewModel.cs

@@ -45,7 +45,8 @@ namespace PunkHPX8_MainPages.ViewModels
         private bool m_srd1IsInstalled;
         private bool m_srd2IsInstalled;
         private bool _isAlignerVacuumOn;
-        private bool _isRobotVacuumOn;
+        private bool _isRobotAVacuumOn;
+        private bool _isRobotBVacuumOn;
 
 
         private ModuleInfo m_LP1ModuleInfo;
@@ -349,10 +350,15 @@ namespace PunkHPX8_MainPages.ViewModels
             get { return _isAlignerVacuumOn; }
             set { SetProperty(ref _isAlignerVacuumOn, value); }
         }
-        public bool IsRobotVacuumOn
+        public bool IsRobotAVacuumOn
         {
-            get { return _isRobotVacuumOn; }
-            set { SetProperty(ref _isRobotVacuumOn, value); }
+            get { return _isRobotAVacuumOn; }
+            set { SetProperty(ref _isRobotAVacuumOn, value); }
+        }
+        public bool IsRobotBVacuumOn
+        {
+            get { return _isRobotBVacuumOn; }
+            set { SetProperty(ref _isRobotBVacuumOn, value); }
         }
         public string LP1Status
         {
@@ -660,9 +666,12 @@ namespace PunkHPX8_MainPages.ViewModels
         public DelegateCommand AlignerVacuumCommand =>
             _AlignerVacuumCommand ?? (_AlignerVacuumCommand = new DelegateCommand(AlignerVacuum));
         
-        private DelegateCommand _RobotVacuumCommand;
-        public DelegateCommand RobotVacuumCommand =>
-            _RobotVacuumCommand ?? (_RobotVacuumCommand = new DelegateCommand(RobotVacuum));
+        private DelegateCommand _RobotBVacuumCommand;
+        public DelegateCommand RobotBVacuumCommand =>
+            _RobotBVacuumCommand ?? (_RobotBVacuumCommand = new DelegateCommand(RobotBVacuum));
+        private DelegateCommand _RobotAVacuumCommand;
+        public DelegateCommand RobotAVacuumCommand =>
+            _RobotAVacuumCommand ?? (_RobotAVacuumCommand = new DelegateCommand(RobotAVacuum));
 
         private ICommand _lP1CycleCommand;
         public ICommand LP1CycleCommand => _lP1CycleCommand ?? (_lP1CycleCommand = new DelegateCommand<object>(OnLP1CycleAction));
@@ -889,9 +898,19 @@ namespace PunkHPX8_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"{ModuleName.Aligner1}.{EfemOperation.Vacuum}", ModuleName.Aligner1,IsAlignerVacuumOn);
         }
-        private void RobotVacuum()
+        /// <summary>
+        /// 下手臂真空 B
+        /// </summary>
+        private void RobotBVacuum()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Vacuum}", ModuleName.EfemRobot, IsRobotBVacuumOn,Hand.Blade1);
+        }
+        /// <summary>
+        /// 上手臂真空 A
+        /// </summary>
+        private void RobotAVacuum()
         {
-            InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Vacuum}", ModuleName.EfemRobot, IsRobotVacuumOn);
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Vacuum}", ModuleName.EfemRobot, IsRobotAVacuumOn, Hand.Blade2);
         }
         private void OnRobotHome()
         {

+ 10 - 8
PunkHPX8_MainPages/Views/EfemView.xaml

@@ -147,20 +147,22 @@
             </Border>
             <Border Grid.Row="1"  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,0" Background="{DynamicResource Table_BG_Content}" >
                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
-                    <customControls:PathButton Content="Home" Height="33" Width="120" Margin="20,0,20,0" Command="{Binding RobotHomeCommand}"/>
-                    <customControls:PathButton Content="Power On" Height="33" Width="120" Margin="20,0,20,0" Command="{Binding RobotPowerOnCommand}"/>
-                    <customControls:PathButton Content="Power Off" Height="33" Width="120" Margin="20,0,20,0" Command="{Binding RobotPowerOffCommand}"/>
-
+                    <customControls:PathButton Content="Home" Height="33" Width="120" Margin="10,0,10,0" Command="{Binding RobotHomeCommand}"/>
+                    <customControls:PathButton Content="Power On" Height="33" Width="120" Margin="10,0,10,0" Command="{Binding RobotPowerOnCommand}"/>
+                    <customControls:PathButton Content="Power Off" Height="33" Width="120" Margin="10,0,20,0" Command="{Binding RobotPowerOffCommand}"/>
+                    <CheckBox Grid.Column="0"  VerticalAlignment="Center" HorizontalAlignment="Center" Content="Upper Vacuum On"  FontSize="12" FontWeight="Bold" Margin="-10,0,0,0"
+                            IsChecked="{Binding IsRobotAVacuumOn, Mode=TwoWay}" Command="{Binding RobotAVacuumCommand}"/>
                 </StackPanel>
             </Border>
             <Border Grid.Row="2"  BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,0" Background="{DynamicResource Table_BG_Content}" Margin="0,0,0,64" >
                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
 
-                    <customControls:PathButton Content="Map Dummy" Height="33" Width="120" Margin="20,0,20,0" Command="{Binding BFMapCommand}"/>
-                    <customControls:PathButton Content="Speed" Height="33" Width="120" Margin="20,0,0,0" Command="{Binding SetRobotSpeedCommand}"/>
+                    <customControls:PathButton Content="Map Dummy" Height="33" Width="120" Margin="10,0,10,0" Command="{Binding BFMapCommand}"/>
+                    <customControls:PathButton Content="Speed" Height="33" Width="120" Margin="10,0,0,0" Command="{Binding SetRobotSpeedCommand}"/>
                     <TextBox Text="{Binding RobotSpeedValue, Mode=TwoWay}" Width="60" Height="33"  VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="5,0,20,0" FontSize="20"/>
-                    <CheckBox Grid.Column="0"  VerticalAlignment="Center" HorizontalAlignment="Center" Content="Vacuum On"  FontSize="13" FontWeight="Bold" 
-                       IsChecked="{Binding IsRobotVacuumOn, Mode=TwoWay}" Command="{Binding RobotVacuumCommand}"/>
+
+                    <CheckBox Grid.Column="0"  VerticalAlignment="Center" HorizontalAlignment="Center" Content="Lower Vacuum On"  FontSize="12" FontWeight="Bold" Margin="65,0,10,0"
+                       IsChecked="{Binding IsRobotBVacuumOn, Mode=TwoWay}" Command="{Binding RobotBVacuumCommand}"/>
                 </StackPanel>
             </Border>
             <!--<Border  Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}"   >-->

+ 1 - 1
PunkHPX8_RT/Devices/EFEM/EfemBase.cs

@@ -115,7 +115,7 @@ namespace PunkHPX8_RT.Devices.EFEM
 
         public abstract bool Resume();
         public abstract bool RequestMapResult(ModuleName mod);
-        public abstract bool Vacuum(ModuleName mod,bool VacuumState);
+        public abstract bool Vacuum(ModuleName mod,bool VacuumState,Hand hand=Hand.Blade1);
         public abstract bool SetPinUp(ModuleName mod);
         public abstract bool SetPinDown(ModuleName mod);
         public abstract bool SetAlignWaferSize();

+ 1 - 1
PunkHPX8_RT/Devices/EFEM/JetEfem.cs

@@ -147,7 +147,7 @@ namespace PunkHPX8_RT.Devices.EFEM
         }
         public override bool RobotPowerOn(ModuleName mod, bool status)
         { return false; }
-        public override bool Vacuum(ModuleName mod, bool state)
+        public override bool Vacuum(ModuleName mod, bool state,Hand hand=Hand.Blade1)
         {
             return false;
         }

+ 1 - 1
PunkHPX8_RT/Devices/EFEM/SunWayEfem.cs

@@ -535,7 +535,7 @@ namespace PunkHPX8_RT.Devices.EFEM
             return _socket.Write(_currentMsg.ToString());
         }
 
-        public override bool Vacuum(ModuleName mod,bool VacuumState)
+        public override bool Vacuum(ModuleName mod,bool VacuumState, Hand hand)
         {
             //判断机台是否准备就绪
             if (!_isComm)

+ 2 - 2
PunkHPX8_RT/Devices/EFEM/SunWayRobot.cs

@@ -701,7 +701,7 @@ namespace PunkHPX8_RT.Devices.EFEM
             return WriteCommand(cmd);
         }
 
-        public override bool Vacuum(ModuleName mod,bool VacuumState)
+        public override bool Vacuum(ModuleName mod,bool VacuumState,Hand hand)
         {
             if (_status == RState.Running && _currentMessage != null)
             {
@@ -728,7 +728,7 @@ namespace PunkHPX8_RT.Devices.EFEM
             }
             else
             {
-                 cmd = $"VAC {strVacuum} ARM {_armString[Hand.Blade1]}\r";
+                 cmd = $"VAC {strVacuum} ARM {_armString[hand]}\r";
             }
             return WriteCommand(cmd);
         }

+ 4 - 4
PunkHPX8_RT/Devices/PlatingCell/ClamShellCloseRoutine.cs

@@ -72,8 +72,8 @@ namespace PunkHPX8_RT.Devices.PlatingCell
                 if (_device.PlatingCellDeviceData.ClamShellDistance <= _closeSensor)
                 {
                     LOG.WriteLog(eEvent.INFO_PLATINGCELL, Module, $"ClamShell is Closed");
-                    _device.PlatingCellDeviceData.ClamShellClosed = true;
-                    _device.PlatingCellDeviceData.ClamShellOpened = false;
+                    //_device.PlatingCellDeviceData.ClamShellClosed = true;
+                    //_device.PlatingCellDeviceData.ClamShellOpened = false;
                     return true;
                 }
                 else
@@ -86,8 +86,8 @@ namespace PunkHPX8_RT.Devices.PlatingCell
                 if (_device.PlatingCellDeviceData.ClamShellDistance > _openSensor)
                 {
                     LOG.WriteLog(eEvent.INFO_PLATINGCELL, Module, $"ClamShell is Opened");
-                    _device.PlatingCellDeviceData.ClamShellClosed = false;
-                    _device.PlatingCellDeviceData.ClamShellOpened = true;
+                    //_device.PlatingCellDeviceData.ClamShellClosed = false;
+                    //_device.PlatingCellDeviceData.ClamShellOpened = true;
                     return true;
                 }
                 else

+ 26 - 0
PunkHPX8_RT/Devices/PlatingCell/PlatingCellDevice.cs

@@ -31,6 +31,7 @@ using System.Linq;
 using System.Reflection;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Media.Animation;
 
 namespace PunkHPX8_RT.Devices.PlatingCell
 {
@@ -132,6 +133,14 @@ namespace PunkHPX8_RT.Devices.PlatingCell
         /// 对应reservoir槽体化学液
         /// </summary>
         private string _reservoirChemistry;
+        /// <summary>
+        /// clamshell open sensor config
+        /// </summary>
+        private int _openSensor = 55;
+        /// <summary>
+        /// clamshell close sensor config
+        /// </summary>
+        private int _closeSensor = 5;
         #endregion
 
         #region 属性
@@ -326,6 +335,9 @@ namespace PunkHPX8_RT.Devices.PlatingCell
             _overflowLevelHigh = SC.GetValue<int>($"PlatingCell.OverflowLevelHigh");
             _overflowLevelLow = SC.GetValue<int>($"PlatingCell.OverflowLevelLow");
 
+            _openSensor = SC.GetValue<int>("PlatingCell.ClamShellOpenDistanceThreshold");
+            _closeSensor = SC.GetValue<int>("PlatingCell.ClamShellCloseDistanceThreshold");
+
             _reservoirData = GetReservoirDevice().ReservoirData;
             _reservoirName = GetReservoirDevice().Module;
             
@@ -386,6 +398,20 @@ namespace PunkHPX8_RT.Devices.PlatingCell
                         _platingCellData.OverFlowStatus = "Full";
                     } 
                 }
+                if(variable == CLAMSHELL_DISTANCE)
+                {
+                    double distance = Convert.ToDouble(value);
+                    if(distance <= _closeSensor)
+                    {
+                        _platingCellData.ClamShellClosed = true;
+                        _platingCellData.ClamShellOpened = false;
+                    }
+                    if(distance >= _openSensor)
+                    {
+                        _platingCellData.ClamShellClosed = false;
+                        _platingCellData.ClamShellOpened = true;
+                    }
+                }
             }
             if (_variableInitializeDic.ContainsKey(variable) && !_variableInitializeDic[variable])
             {

+ 1 - 1
PunkHPX8_RT/Modules/EFEM/EfemEntity.cs

@@ -326,7 +326,7 @@ namespace PunkHPX8_RT.Modules
             OP.Subscribe($"{ModuleName.EfemRobot}.{EfemOperation.Speed}", (cmd, args) => { 
                 return _efem.SetRobotSpeed(ModuleName.EfemRobot, (int)args[0]); });
             OP.Subscribe($"{ModuleName.EfemRobot}.{EfemOperation.Vacuum}", (cmd, args) => {
-                return _efem.Vacuum(ModuleName.EfemRobot, (bool)args[1]); });
+                return _efem.Vacuum(ModuleName.EfemRobot, (bool)args[1], (Hand)args[2]); });
             OP.Subscribe($"{ModuleName.EfemRobot}.{EfemOperation.PowerOn}", (cmd, args) => { 
                 return _efem.RobotPowerOn(ModuleName.EfemRobot, (bool)args[0]); });