Browse Source

1.Add Tru match
2.Add Venus DE recipe
3.fix chamber UI bugs

hecl 11 months ago
parent
commit
9d28f8ee7d

+ 90 - 2
Venus/Venus_Core/ProcessUnitDefine.cs

@@ -81,7 +81,12 @@ namespace Venus_Core
 
     public enum VenusDEUnits
     {
-
+        PressureByPressureModeUnit,
+        MagnetUnit,
+        BiasUnit,
+        VenusDEGasControlUnit,
+        ESCHVUnit,
+        ProcessKitUnit
     }
 
     public partial class PressureByPressureModeUnit : ProcessUnitBase
@@ -336,7 +341,22 @@ namespace Venus_Core
         [IsTolerance]
         public int Gas6AlarmRange { get; set; }
     }
+    public class MagnetUnit : ProcessUnitBase
+    {
+        public string UnitName { get; set; } = "Magnet";
+
+        [IsTolerance]
+        public ToleranceMode ToleranceMode { get; set; } = ToleranceMode.Value;
+        [IsTolerance]
+        [CustomName("ToleranceDelayTime(ms)")]
+        public int ToleranceDelayTime { get; set; } = 3000;
+        public float MagnetIntensity { get; set; }
+        [IsTolerance]
+        public int IntensityWarningRange { get; set; } = 5;
+        public float FieldRatio { get; set; }
+        public int MagnetWaveform { get; set; }
 
+    }
     public class VenusSEGasControlUnit : ProcessUnitBase
     {
         public string UnitName { get; set; } = "SEGasControlUnit";
@@ -406,7 +426,75 @@ namespace Venus_Core
         [IsTolerance]
         public int Gas12AlarmRange { get; set; } = 10;
     }
-
+    public class VenusDEGasControlUnit : ProcessUnitBase
+    {
+        public string UnitName { get; set; } = "DEGasControlUnit";
+        [IsTolerance]
+        public ToleranceMode ToleranceMode { get; set; } = ToleranceMode.Value;
+        [IsTolerance]
+        [CustomName("ToleranceDelayTime(ms)")]
+        public int ToleranceDelayTime { get; set; } = 3000;
+        public int Gas1 { get; set; }
+        [IsTolerance]
+        public int Gas1WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas1AlarmRange { get; set; } = 10;
+        public int Gas2 { get; set; }
+        [IsTolerance]
+        public int Gas2WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas2AlarmRange { get; set; } = 10;
+        public int Gas3 { get; set; }
+        [IsTolerance]
+        public int Gas3WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas3AlarmRange { get; set; } = 10;
+        public int Gas4 { get; set; }
+        [IsTolerance]
+        public int Gas4WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas4AlarmRange { get; set; } = 10;
+        public int Gas5 { get; set; }
+        [IsTolerance]
+        public int Gas5WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas5AlarmRange { get; set; } = 10;
+        public int Gas6 { get; set; }
+        [IsTolerance]
+        public int Gas6WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas6AlarmRange { get; set; } = 10;
+        public int Gas7 { get; set; }
+        [IsTolerance]
+        public int Gas7WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas7AlarmRange { get; set; } = 10;
+        public int Gas8 { get; set; }
+        [IsTolerance]
+        public int Gas8WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas8AlarmRange { get; set; } = 10;
+        public int Gas9 { get; set; }
+        [IsTolerance]
+        public int Gas9WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas9AlarmRange { get; set; } = 10;
+        public int Gas10 { get; set; }
+        [IsTolerance]
+        public int Gas10WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas10AlarmRange { get; set; } = 10;
+        public int Gas11 { get; set; }
+        [IsTolerance]
+        public int Gas11WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas11AlarmRange { get; set; } = 10;
+        public int Gas12 { get; set; }
+        [IsTolerance]
+        public int Gas12WarningRange { get; set; } = 5;
+        [IsTolerance]
+        public int Gas12AlarmRange { get; set; } = 10;
+    }
     public class ESCHVUnit : ProcessUnitBase
     {
         public string UnitName { get; set; } = "ESCHVUnit";

+ 14 - 0
Venus/Venus_Core/Recipe.cs

@@ -548,6 +548,12 @@ namespace Venus_Core
                         case "SEGasControlUnit":
                             unit.Add(JsonConvert.DeserializeObject<VenusSEGasControlUnit>(step.LstUnit[i].ToString()));
                             break;
+                        case "DEGasControlUnit":
+                            unit.Add(JsonConvert.DeserializeObject<VenusDEGasControlUnit>(step.LstUnit[i].ToString()));
+                            break;
+                        case "Magnet":
+                            unit.Add(JsonConvert.DeserializeObject<MagnetUnit>(step.LstUnit[i].ToString()));
+                            break;
                     }
                 }
                 step.LstUnit.Clear();
@@ -703,6 +709,14 @@ namespace Venus_Core
                         LstUnit.Add(obj);
                     }
                     break;
+                case JetChamber.VenusDE:
+                    foreach (var item in Enum.GetValues(typeof(VenusDEUnits)))
+                    {
+                        Type t = Type.GetType($"Venus_Core.{item.ToString()}");
+                        var obj = System.Activator.CreateInstance(t);
+                        LstUnit.Add(obj);
+                    }
+                    break;
             }
             return LstUnit;
         }

+ 2 - 3
Venus/Venus_MainPages/ViewModels/OverVenusDEViewModel.cs

@@ -1224,7 +1224,7 @@ namespace Venus_MainPages.ViewModels
             CurrentModuleRecipes = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, "Process")).ToList();
 
             DispatcherTimer timer = new DispatcherTimer();
-            timer.Interval = TimeSpan.FromSeconds(0.1);
+            timer.Interval = TimeSpan.FromSeconds(0.5);
             timer.Tick += timer_Tick;
             timer.Start();
         }
@@ -1489,8 +1489,7 @@ namespace Venus_MainPages.ViewModels
         //    }
         //}
         private async void OnSetBRf()
-        {
-            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBRf", BRFFwdPowerSetpoint, true);
+        {       
             if (BRFData.IsRfOn == true)
             {
                 InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBRf", BRFFwdPowerSetpoint, false);

+ 8 - 7
Venus/Venus_MainPages/Views/OverVenusDEView.xaml

@@ -995,8 +995,8 @@
         <Canvas Canvas.Right="2050" Canvas.Top="70">
             <Ellipse Width="20" Height="20" Fill="{Binding PVHe1ValveIsOpen,Converter={StaticResource boolToColor}}"  Canvas.Left="793" Canvas.Top="715" Stroke="Silver" StrokeThickness="2" HorizontalAlignment="Left" VerticalAlignment="Top"/>
             <Button Width="100" Content="He ON/OFF"  Style="{StaticResource SysBtnStyle}"  Command="{Binding HeCommand}"                Canvas.Left="823" Canvas.Top="715" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
-            <RadioButton Canvas.Left="790" Canvas.Top="684" Content="Flow Mode" FontSize="15"     IsChecked="{Binding HeIsPressureMode,Converter={StaticResource BoolToBool},UpdateSourceTrigger=PropertyChanged}"/>
-            <RadioButton Canvas.Left="890" Canvas.Top="684" Content="Pressure Mode" FontSize="15" IsChecked="{Binding HeIsPressureMode,UpdateSourceTrigger=PropertyChanged}"/>
+            <RadioButton Canvas.Left="813" Canvas.Top="692" Content="Flow Mode" FontSize="15"     IsChecked="{Binding HeIsPressureMode,Converter={StaticResource BoolToBool},UpdateSourceTrigger=PropertyChanged}"/>
+            <RadioButton Canvas.Left="917" Canvas.Top="692" Content="Pressure Mode" FontSize="15" IsChecked="{Binding HeIsPressureMode,UpdateSourceTrigger=PropertyChanged}"/>
 
             <!--与chamber右上角连接的管道-->
             <ctrls:FlowPipe  Height="8"  Width="40" Canvas.Left="1343" Canvas.Top="355"  RotateTransformValue="90" />
@@ -1217,7 +1217,7 @@
 
             <ctrls:TextboxWithLabel  Canvas.Top="633" Canvas.Left="1280" LabelValue="CM3(mTorr)" TextBoxValue="{Binding  ForelinePressure,StringFormat='F1'}" TextBoxColor="#D7E4BD" />
             <ctrls:TextboxWithLabel  Canvas.Top="464" Canvas.Left="1290" LabelValue="Position(‰)" TextBoxValue="{Binding PendulumValvePosition,StringFormat='F0'}" TextBoxColor="#D7E4BD" />
-            <ctrls:TextboxWithLabel  Canvas.Top="510" Canvas.Left="1330" LabelValue="Flow(sccm)" TextBoxValue="{Binding MFCN2Data.FeedBack,StringFormat='F1'}" TextBoxColor="#D7E4BD" />
+            <ctrls:ZhenValve Width="34" Height="34" Canvas.Top="511" Canvas.Left="1344" Panel.ZIndex="2"/>
             <!--<ctrls:TextboxWithLabel  Canvas.Top="510" Canvas.Left="1367" TextBoxValue="{Binding N2SetPoint,Mode=TwoWay}" IsReadOnly="False"  LabelValue="Turbo N2" ToolTip="{Binding MFCN2Data.SetPoint,StringFormat='F1'}" TextBoxColor="White" />-->
 
             <ctrls:TextboxWithLabel  Canvas.Top="556" Canvas.Left="952" LabelValue="Pressure(mTorr)" TextBoxValue="{Binding ESCHePressure,StringFormat='F1'}"  TextBoxColor="#D7E4BD"/>
@@ -1886,12 +1886,13 @@
                 </MultiBinding>
             </userControls:FlowPipe.IsFlowing>
         </userControls:FlowPipe>
-        <customControls:CommonValveControl Status="{Binding SecondPurgeValveIsOpen, Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="436" Canvas.Top="743" IsCanEdit="{Binding IsAutoMode, Converter={StaticResource BoolToBool}}" Tag="SecondPurge" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
-        <customControls:CommonValveControl Status="{Binding MainPurgeValveIsOpen, Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="511" Canvas.Top="743" IsCanEdit="{Binding IsAutoMode, Converter={StaticResource BoolToBool}}" Tag="MainPurge" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-        <TextBlock Canvas.Left="400" Canvas.Top="762" HorizontalAlignment="Center" VerticalAlignment="Top" Height="15"><Run Text="Second"/><Run Language="zh-cn" Text=" purge"/><LineBreak/><Run/></TextBlock>
+        <customControls:CommonValveControl Status="{Binding MainPurgeValveIsOpen, Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="436" Canvas.Top="743" IsCanEdit="{Binding IsAutoMode, Converter={StaticResource BoolToBool}}" Tag="MainPurge" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+        <customControls:CommonValveControl Status="{Binding SecondPurgeValveIsOpen, Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="511" Canvas.Top="743" IsCanEdit="{Binding IsAutoMode, Converter={StaticResource BoolToBool}}" Tag="SecondPurge" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+        <TextBlock Canvas.Left="411" Canvas.Top="763" HorizontalAlignment="Left" VerticalAlignment="Top" Height="15" Text="Main purge" />
 
-        <TextBlock Canvas.Left="485"  Text="Primary purge" Canvas.Top="763" Height="15" HorizontalAlignment="Center" VerticalAlignment="Top"/>
+        <TextBlock Canvas.Left="485"  Text="Second purge" Canvas.Top="763" Height="15" HorizontalAlignment="Center" VerticalAlignment="Top"/>
         <userControls:Pipe2     Canvas.Left="262"  Canvas.Top="757" RotateTransformValue="-180" HorizontalAlignment="Left" VerticalAlignment="Top" />
+        <TextBlock  FontSize="15"  Canvas.Left="580"  Canvas.Top="744" HorizontalAlignment="Left" VerticalAlignment="Top">To Pump</TextBlock>
 
 
     </Canvas>

+ 13 - 26
Venus/Venus_MainPages/Views/OverVenusSEView.xaml

@@ -105,7 +105,7 @@
                     </MultiBinding>
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
-            <TextBlock Text="Vent Valve" Canvas.Left="416" Canvas.Top="90"/>
+            <TextBlock Text="Vent Valve" Canvas.Left="416" Canvas.Top="95"/>
 
             <customControls:CommonValveControl Status="{Binding N2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="114" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="N2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
@@ -114,7 +114,6 @@
                     <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
                         <!--<Binding Path="PVN21ValveIsOpen"/>-->
                         <Binding Path="PVN22ValveIsOpen"/>
-                        <Binding Path="N2ValveIsOpen"/>
 
                     </MultiBinding>
                 </ctrls:FlowPipe.IsFlowing>
@@ -638,9 +637,10 @@
             <ctrls:FlowPipe  Height="8"  Width="120" Canvas.Left="1013" Canvas.Top="129" RotateTransformValue="90">
                 <ctrls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource toBoolMultiValueConverter7}">
-                        <Binding Path="GasFinalValveIsOpen"/>
+                        
                         <Binding Path="PV14ValveIsOpen"/>
                         <Binding Path="PVN22ValveIsOpen"/>
+                        <Binding Path="GasFinalValveIsOpen"/>
                         <Binding Path="N2ValveIsOpen"/>
                         <Binding Path="MFC1ValveIsOpen"/>
                         <Binding Path="MFC2ValveIsOpen"/>
@@ -658,30 +658,17 @@
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
 
-            <TextBlock Text="PV14" Canvas.Left="916" Canvas.Top="60" FontSize="15"/>
-            <ctrls:FlowPipe   Height="8"  Width="108" Canvas.Left="880"  Canvas.Top="84" HorizontalAlignment="Left" VerticalAlignment="Top">
+            <TextBlock Text="PV14" Canvas.Left="517" Canvas.Top="60" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Top"/>
+            <ctrls:FlowPipe   Height="8"  Width="658" Canvas.Left="330"  Canvas.Top="84" HorizontalAlignment="Left" VerticalAlignment="Top">
                 <ctrls:FlowPipe.IsFlowing>
-                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter6}">
+                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter}">
                         <Binding Path="PV14ValveIsOpen"/>
                         <Binding Path="PVN22ValveIsOpen"/>
-                        <Binding Path="N2ValveIsOpen"/>
-                        <Binding Path="MFC1ValveIsOpen"/>
-                        <Binding Path="MFC2ValveIsOpen"/>
-                        <Binding Path="MFC3ValveIsOpen"/>
-                        <Binding Path="MFC4ValveIsOpen"/>
-                        <Binding Path="MFC5ValveIsOpen"/>
-                        <Binding Path="MFC6ValveIsOpen"/>
-                        <Binding Path="MFC7ValveIsOpen"/>
-                        <Binding Path="MFC8ValveIsOpen"/>
-                        <Binding Path="MFC9ValveIsOpen"/>
-                        <Binding Path="MFC10ValveIsOpen"/>
-                        <Binding Path="MFC11ValveIsOpen"/>
-                        <Binding Path="MFC12ValveIsOpen"/>
                     </MultiBinding>
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
             <ctrls:FlowPipe   Height="8"  Width="29" Canvas.Left="995"  Canvas.Top="95" IsFlowing="{Binding PV14ValveIsOpen}" HorizontalAlignment="Center" VerticalAlignment="Top"  RotateTransformValue="90"/>
-            <ctrls:FlowPipe   Height="8"  Width="29" Canvas.Left="857.5"  Canvas.Top="105" IsFlowing="{Binding PV14ValveIsOpen}" HorizontalAlignment="Center" VerticalAlignment="Center"  RotateTransformValue="-90" RenderTransformOrigin="-0.063,-1.271">
+            <ctrls:FlowPipe   Height="8"  Width="29" Canvas.Left="307.5"  Canvas.Top="105" IsFlowing="{Binding PV14ValveIsOpen}" HorizontalAlignment="Center" VerticalAlignment="Center"  RotateTransformValue="-90" RenderTransformOrigin="-0.063,-1.271">
                 <userControls:FlowPipe.RenderTransform>
                     <TransformGroup>
                         <ScaleTransform/>
@@ -691,10 +678,10 @@
                     </TransformGroup>
                 </userControls:FlowPipe.RenderTransform>
             </ctrls:FlowPipe>
-            <ctrls:Pipe2  Canvas.Left="868"  Canvas.Top="97" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-90" />
+            <ctrls:Pipe2  Canvas.Left="318"  Canvas.Top="97" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="-90" />
             <ctrls:Pipe2  Canvas.Left="982"  Canvas.Top="84" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="0" />
 
-            <customControls:CommonValveControl Status="{Binding PV14ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="922" Canvas.Top="77" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="PV14" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
+            <customControls:CommonValveControl Status="{Binding PV14ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="525" Canvas.Top="78" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="PV14" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"/>
 
 
 
@@ -933,8 +920,8 @@
         <Canvas Canvas.Right="2050" Canvas.Top="70">
             <Ellipse Width="20" Height="20" Fill="{Binding PVHe1ValveIsOpen,Converter={StaticResource boolToColor}}"  Canvas.Left="926" Canvas.Top="687" Stroke="Silver" StrokeThickness="2"/>
             <Button Width="100" Content="He ON/OFF"  Style="{StaticResource SysBtnStyle}"  Command="{Binding HeCommand}"                Canvas.Left="951" Canvas.Top="689" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
-            <RadioButton Canvas.Left="785" Canvas.Top="721" Content="Flow Mode" FontSize="15"     IsChecked="{Binding HeIsPressureMode,Converter={StaticResource BoolToBool},UpdateSourceTrigger=PropertyChanged}"/>
-            <RadioButton Canvas.Left="889" Canvas.Top="721" Content="Pressure Mode" FontSize="15" IsChecked="{Binding HeIsPressureMode,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
+            <!--<RadioButton Canvas.Left="785" Canvas.Top="721" Content="Flow Mode" FontSize="15"     IsChecked="{Binding HeIsPressureMode,Converter={StaticResource BoolToBool},UpdateSourceTrigger=PropertyChanged}"/>
+            <RadioButton Canvas.Left="889" Canvas.Top="721" Content="Pressure Mode" FontSize="15" IsChecked="{Binding HeIsPressureMode,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Top"/>-->
 
             <!--与chamber右上角连接的管道-->
             <ctrls:FlowPipe  Height="8"  Width="40" Canvas.Left="1262" Canvas.Top="275"  RotateTransformValue="90" />
@@ -1238,7 +1225,7 @@
                 </i:Interaction.Triggers>
             </ComboBox>
             <Border Width="210" Height="28"  Canvas.Left="840" Canvas.Top="90" BorderBrush="Black" BorderThickness=".7">
-                <ComboBox  ItemsSource="{Binding CurrentModuleRecipes}" SelectedIndex="{Binding SelectedRecipeIndex}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Style="{StaticResource customeComboBoxStyle}" BorderBrush="White" FontSize="15">
+                <ComboBox  ItemsSource="{Binding CurrentModuleRecipes}" SelectedIndex="{Binding SelectedRecipeIndex}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Style="{StaticResource customeComboBoxStyle}" BorderBrush="White" FontSize="15" Margin="0,0,-190,0">
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="DropDownOpened">
                             <i:InvokeCommandAction Command="{Binding LoadRecipeCommand}"/>
@@ -1430,7 +1417,7 @@
                 <TextBlock IsEnabled="{Binding Valve11Visible}" Grid.Row="20"  Grid.Column="1" Text="{Binding MFC11Data.FeedBack,StringFormat='F1'}"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock IsEnabled="{Binding Valve12Visible}" Grid.Row="21"  Grid.Column="1" Text="{Binding MFC12Data.FeedBack,StringFormat='F1'}"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="22"  Grid.Column="1" Text="{Binding ESCHVData.OutputVoltage}"          Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center" />
-                <TextBlock Grid.Row="23"  Grid.Column="1" Text="{Binding HVTemperature,StringFormat='F1'}"        Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="23"  Grid.Column="1" Text="{Binding ChillerTemperature,StringFormat='F1'}"        Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="24"  Grid.Column="1" Text="{Binding ESCHePressure,StringFormat='F1'}"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="25"  Grid.Column="1" Text="{Binding MFCHeData.FeedBack,StringFormat='F1'}"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
 

+ 3 - 3
Venus/Venus_RT/Config/PM/VenusDE/VenusDEDeviceModel.xml

@@ -222,8 +222,8 @@
 						    scOffset=""/>
 		<IoPressureMeter id="ForelineGauge" display="Foreline Pressure" schematicId="" unit="mTorr"
 						    aiValue="AI_Foreline_Pressure_10t" diGaugeFail="DI_Foreline_Pressure_10t_Gauge_Alarm" scPrecision="" scOffset=""/>
-		<!--<IoPressureMeter id="ESCHeGauge" display="ESC He Pressure" schematicId="" unit="mTorr"
-						    aiValue="AI_He_Pressure_100t" diGaugeFail="DI_ESC_He_Pressure_100t_Gauge_Alarm" scPrecision="" scOffset=""/>-->
+    <IoPressureMeter id="ESCHeGauge" display="ESC He Pressure" schematicId="" unit="Torr"
+						    aiValue="AI_He_Pressure1" diGaugeFail="" scPrecision="" scOffset=""/>
 	</IoPressureMeters>
 	<IoPressureControls assembly="Venus_RT" classType="Venus_RT.Devices.IoPressureControl">
 		<IoPressureControl id="PressureControl" display="PressureControl" schematicId="PressureControl" unit="mTorr"
@@ -234,7 +234,7 @@
 						   scIsBoostPumpInstalled="EnableBoosterPump"
 						   scTvInstalled="EnableThrottleValve"
 						   boost="" tv="ThrottleValve" drypump="MainPump"
-						   pressureMeter ="PressureGauge" processMeter="ProcessGauge" forelineMeter="ForelineGauge" loadlockMeter="" escHeGauge=""/>
+						   pressureMeter ="PressureGauge" processMeter="ProcessGauge" forelineMeter="ForelineGauge" loadlockMeter="" escHeGauge="ESCHeGauge"/>
 	</IoPressureControls>
 	<IoHeartbeats assembly="Venus_RT" classType=" Venus_RT.Devices.IODevices.IoHeartbeat">
 		<IoHeartbeat  id="Heartbeat" display="" schematicId="" unit="" ao="AO_Heartbeat" ai="AI_Heartbeat_FB" />

+ 8 - 3
Venus/Venus_RT/Config/System_VenusSE.sccfg

@@ -426,8 +426,9 @@
 		<config default="30" name="MaxDeviationInMFCVerification" nameView="MFC verification允许的最大偏差值(%)" max="100000" min="0" paramter="" tag="" unit="%" visible="false" type="Double" />
 		<config default="150" name="WallHeaterSetPointLimit" nameView="Wall Heater Set Point Limit" description="" max="500" min="0" paramter="" tag="" unit="" type="Integer" />
 		<config default="150" name="PendulumHeaterSetPointLimit" nameView="Pendulum Heater Set Point Limit" description="" max="500" min="0" paramter="" tag="" unit="" type="Integer" />
+    <config default="50" name="TurboPumpPumpingValveMinForelinePressure" nameView="TurboPump Pump Valve Min Foreline Pressure" description="Pumping Valve开启的前端管道压力值" max="500" min="0" paramter="" tag="" unit="mtorr" type="Integer" />
 
-		<config default="false" name="EnableWallHeater" nameView="Enable Chamber Wall Heater" description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
+    <config default="false" name="EnableWallHeater" nameView="Enable Chamber Wall Heater" description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="false" name="EnableGridHeater" nameView="Enable Chamber Grid Heater" description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="5" name="RecipeToleranceIgnoreTime" nameView="Ignore Time Before Check Recipe Step Tolerance" description="" max="60" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="1" name="RecipeRunningMode" nameView="0, only run current recipe; 1, include chuck/dechuck recipe" description="" max="5" min="0" paramter="" tag="" unit="" type="Integer" />
@@ -509,7 +510,7 @@
 			<config default="20" name="ChamberForelinePressureTimeout" nameView="Chamber Foreline Pressure Timeout" description="" max="3000" min="0" paramter="" tag="" unit="s" type="Integer" />
 		</configs>
 		<configs name="Magnet" nameView="Magnet" visible="true">
-			<config default="1" name="Magnetwareform" nameView="Magnet wareform" description="波形, 0:Single,1:Squre" max="2" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
+			<config default="1" name="Magnetwareform" nameView="Magnet wareform" description="波形, 0:SIN 1=Squre 2=Single" max="2" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
 			<config default="25" name="MagentFieldRatio" nameView="Magent Field Ratio" description="" max="100" min="0" paramter="" tag="" unit="%" type="Integer" visible="true"/>
 			<config default="4" name="Magnetcycleperiod" nameView="Magnet cycle period" description="serial port name of pump" max="10" min="0" paramter="" tag="" unit="s" type="Integer" visible="true"/>
 			<config default="50" name="Magnet_1A_output_full_scale" nameView="Magnet 1A output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true"/>
@@ -1075,6 +1076,7 @@
 		<config default="80"  name="ControlPressureOffset"   nameView="Control Pressure offset"   description="PM Chamber 控压 误差范围" max="200" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
 		<config default="300"  name="ControlPressureN2FlowSetPoint"   nameView="Control Pressure N2 Flow SetPoint"   description="PM Chamber 控压 设定值" max="500" min="0" paramter="" tag="" unit="sccm" type="Integer" />
 
+    <config default="50" name="TurboPumpPumpingValveMinForelinePressure" nameView="TurboPump Pump Valve Min Foreline Pressure" description="Pumping Valve开启的前端管道压力值" max="500" min="0" paramter="" tag="" unit="mtorr" type="Integer" />
 		<configs name="MFCVerification" nameView="MFC Verification" >
 			<config default="1" name="BasePressure" nameView="开始条件:腔体压力达到时开始流气" max="100" min="1" paramter="" tag="" unit="mTorr" visible="true" type="Double" />
 			<config default="180" name="PumpingTime" nameView="抽气时间" max="7200" min="0" paramter="" tag="" unit="second" visible="true" type="Integer" />
@@ -1717,6 +1719,7 @@
 		<config default="80"  name="ControlPressureOffset"   nameView="Control Pressure offset"   description="PM Chamber 控压 误差范围" max="200" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
 		<config default="300"  name="ControlPressureN2FlowSetPoint"   nameView="Control Pressure N2 Flow SetPoint"   description="PM Chamber 控压 设定值" max="500" min="0" paramter="" tag="" unit="sccm" type="Integer" />
 
+    <config default="50" name="TurboPumpPumpingValveMinForelinePressure" nameView="TurboPump Pump Valve Min Foreline Pressure" description="Pumping Valve开启的前端管道压力值" max="500" min="0" paramter="" tag="" unit="mtorr" type="Integer" />
 		<configs name="MFCVerification" nameView="MFC Verification" >
 			<config default="1" name="BasePressure" nameView="开始条件:腔体压力达到时开始流气" max="100" min="1" paramter="" tag="" unit="mTorr" visible="true" type="Double" />
 			<config default="180" name="PumpingTime" nameView="抽气时间" max="7200" min="0" paramter="" tag="" unit="second" visible="true" type="Integer" />
@@ -2348,7 +2351,9 @@
 		<config default="80"  name="ControlPressureSetPoint"   nameView="Control Pressure SetPoint"   description="PM Chamber 控压 设定值" max="2000" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
 		<config default="80"  name="ControlPressureOffset"   nameView="Control Pressure offset"   description="PM Chamber 控压 误差范围" max="200" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
 		<config default="300"  name="ControlPressureN2FlowSetPoint"   nameView="Control Pressure N2 Flow SetPoint"   description="PM Chamber 控压 设定值" max="500" min="0" paramter="" tag="" unit="sccm" type="Integer" />
-		<configs name="MFCVerification" nameView="MFC Verification" >
+
+    <config default="50" name="TurboPumpPumpingValveMinForelinePressure" nameView="TurboPump Pump Valve Min Foreline Pressure" description="Pumping Valve开启的前端管道压力值" max="500" min="0" paramter="" tag="" unit="mtorr" type="Integer" />
+    <configs name="MFCVerification" nameView="MFC Verification" >
 			<config default="1" name="BasePressure" nameView="开始条件:腔体压力达到时开始流气" max="100" min="1" paramter="" tag="" unit="mTorr" visible="true" type="Double" />
 			<config default="180" name="PumpingTime" nameView="抽气时间" max="7200" min="0" paramter="" tag="" unit="second" visible="true" type="Integer" />
 			<config default="10" name="GasFlowTime" nameView="结束条件:流气多长时间" max="600" min="0" paramter="" tag="" unit="second" visible="true" type="Integer" />

+ 6 - 0
Venus/Venus_RT/Devices/DeviceManager.cs

@@ -347,6 +347,12 @@ namespace Venus_RT.Instances
             {
                 AddCustomModuleDevice(new LzMatch_Ethercat(mod, Venus_Core.VenusDevice.BiasMatch, v_board_id));
             }
+            else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
+                SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
+                SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Tru)
+            {
+                AddCustomModuleDevice(new TruPlasmaMatch(mod, Venus_Core.VenusDevice.BiasMatch));
+            }
         }
         private void AddRF(ModuleName mod)
         {

+ 6 - 6
Venus/Venus_RT/Devices/IODevices/IoMagnet.cs

@@ -132,7 +132,7 @@ namespace Venus_RT.Devices.IODevices
             {
                 if (_aiMagnet1V == null) return -1;
                 float real = _GetRealFloat(_aiMagnet1V);
-                return real;
+                return (float)Math.Round(real, 1);
             }
         }
         public float Magent1U
@@ -141,7 +141,7 @@ namespace Venus_RT.Devices.IODevices
             {
                 if (_aiMagnet1U == null) return -1;
                 float real = _GetRealFloat(_aiMagnet1U);
-                return real;
+                return (float)Math.Round(real, 1);
             }
         }
         public bool MagnetOn
@@ -154,7 +154,7 @@ namespace Venus_RT.Devices.IODevices
             {
                 if (_aiMagnet1W == null) return -1;
                 float real = _GetRealFloat(_aiMagnet1W);
-                return real;
+                return (float)Math.Round(real, 1);
             }
         }
         public float Magent2U
@@ -163,7 +163,7 @@ namespace Venus_RT.Devices.IODevices
             {
                 if (_aiMagnet2U == null) return -1;
                 float real = _GetRealFloat(_aiMagnet2U);
-                return real;
+                return (float)Math.Round(real, 1);
             }
         }
         public float Magent2V
@@ -172,7 +172,7 @@ namespace Venus_RT.Devices.IODevices
             {
                 if (_aiMagnet2V == null) return -1;
                 float real = _GetRealFloat(_aiMagnet2V);
-                return real;
+                return (float)Math.Round(real, 1);
             }
         }
         public bool SetMagnetPower(float val)
@@ -186,7 +186,7 @@ namespace Venus_RT.Devices.IODevices
             {
                 if (_aiMagnet2W == null) return -1;
                 float real = _GetRealFloat(_aiMagnet2W);
-                return real;
+                return (float)Math.Round(real, 1);
             }
         }
         public float MagnetPowerIntensity

+ 19 - 7
Venus/Venus_RT/Devices/JetVenusDEPM.cs

@@ -286,9 +286,9 @@ namespace Venus_RT.Devices
             // Bias Match
             if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
             SC.GetValue<int>($"{Module}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
-            SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
+            SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.Tru)
             {
-                _BiasMatch = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.BiasMatch}");
+                _BiasMatch = DEVICE.GetDevice<TruPlasmaMatch>($"{Module}.{VenusDevice.BiasMatch}");
             }
 
 
@@ -470,7 +470,7 @@ namespace Venus_RT.Devices
 
         //public override double ProcessHighPressure => _pressureController.ProcessHigh.Value;
 
-        public override double ProcessPressure => _pressureController.ProcessGauge.Value;
+        public override double ProcessPressure => _pendulumValve.Pressure >= 950 ? 950 : _pendulumValve.Pressure;
 
         public override double ChamberPressure => _pressureController.PressureGauge.Value;
 
@@ -478,7 +478,7 @@ namespace Venus_RT.Devices
 
         public override double TargetPressure => _pressureController.TargetPressure;
 
-        public override double ESCHePressure => 1.0;
+        public override double ESCHePressure => _pressureController.ESCHeGauge.Value;
 
         public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
 
@@ -620,10 +620,14 @@ namespace Venus_RT.Devices
                 return -100;
             }
         }
+        public override void Monitor()
+        {
+            CheckPermanentInterlock();
+        }
 
         public override void BuzzerBlinking(double time)
         {
-            LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist SignalTower!");
+            LOG.Write(eEvent.ERR_PM, Module, "VenusDE PM is not exist SignalTower!");
         }
         #endregion
 
@@ -972,6 +976,9 @@ namespace Venus_RT.Devices
             SetLinerDoor(false, out _);
             //SetSlitDoor(false, out _);
             OpenValve(ValveType.PVN22, false);
+            _MainPump?.ReConnect();
+            _TurboPump?.ReConnect();
+            _pendulumValve?.ReConnect();
         }
 
         public override void OnOffChiller(ChillerType chillerType, bool onoff)
@@ -1266,10 +1273,15 @@ namespace Venus_RT.Devices
 
         protected override void CheckPermanentInterlock()
         {
-            if (ProcessPressure > 100 && _GuageValve.SetPoint)
+            if (ProcessPressure > 950 && _GuageValve.SetPoint)
             {
                 _GuageValve.TurnValve(false, out _);
-                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ProcessPressure} exceed 100 mtorr, Guage Valve (DO-31) closed automaticlly.");
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ProcessPressure} exceed 950 mtorr, Guage Valve (DO-31) closed automaticlly.");
+            }
+            if (ProcessPressure < 950 && !_GuageValve.SetPoint)
+            {
+                _GuageValve.TurnValve(true, out _);
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ProcessPressure} exceed 950 mtorr, Guage Valve (DO-31) closed automaticlly.");
             }
         }
         public override void PMInError()

+ 25 - 6
Venus/Venus_RT/Devices/JetVenusSEPM.cs

@@ -135,6 +135,10 @@ namespace Venus_RT.Devices
         public override double MFC11FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas11").FeedBack;
         public override double MFC12FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas12").FeedBack;
         public override double HeliumFeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcHe").FeedBack;
+        public override float ReflectPower => _Generator.ReflectPower;
+        public override float BiasReflectPower => _GeneratorBias.ReflectPower;
+        public override float ForwardPower => _Generator.ForwardPower;
+        public override float BiasForwardPower => _GeneratorBias.ForwardPower;
         public override float PendulumPressure => _pendulumValve.Pressure;
         public override float PendulumPosition => _pendulumValve.Position;
 
@@ -507,7 +511,7 @@ namespace Venus_RT.Devices
         //public override double ProcessHighPressure => _pressureController.ProcessHigh.Value;
         public override double ChamberPressure => _pressureController.PressureGauge.Value;
 
-        public override double ProcessPressure => _pendulumValve.Pressure;
+        public override double ProcessPressure => _pendulumValve.Pressure >= 95 ? 95 : _pendulumValve.Pressure;
 
         //public override double ChamberPressure => _pendulumValve.Pressure;
 
@@ -531,10 +535,6 @@ namespace Venus_RT.Devices
 
         public override bool ChillerIsRunning => _Chiller.IsRunning;
 
-        public override float ReflectPower => _Generator.ReflectPower;
-
-        public override float BiasReflectPower => _GeneratorBias.ReflectPower;
-
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
 
         public override MovementPosition LiftPinPosition
@@ -962,6 +962,11 @@ namespace Venus_RT.Devices
 
             //SetSlitDoor(false, out _);
             OpenValve(ValveType.PVN22, false);
+            _Generator?.ReConnect();
+            _Match?.ReConnect();
+            _MainPump?.ReConnect();
+            _TurboPump?.ReConnect();
+            _pendulumValve?.ReConnect();
         }
 
         public override void OnOffChiller(ChillerType chillerType, bool onoff)
@@ -980,6 +985,20 @@ namespace Venus_RT.Devices
                     return;
                 }
 
+                //if (vlvType == ValveType.TurboPumpPumping && on)
+                //{
+                //    if (!_MainPump.IsOn)
+                //    {
+                //        LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot open Turbo Pump Pump, cause Dry Pump Valve is not open");
+                //        return;
+                //    }
+
+                //    if (ForelinePressure > SC.GetValue<int>($"{Module}.TurboPumpPumpingValveMinForelinePressure"))
+                //    {
+                        
+                //    }
+                //}
+
                 Valve2IO[vlvType].TurnValve(on, out _);
                 LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{(on ? "打开" : "关闭")} 阀 {vlvType.ToString()}");
             }
@@ -1289,7 +1308,7 @@ namespace Venus_RT.Devices
                 SetPVPressure(pressureSetpoint);
                 OpenValve(ValveType.PV14, true);
                 OpenValve(ValveType.GasFinal, false);
-                OpenValve(ValveType.N2, true);
+                //OpenValve(ValveType.N2, true);
                 OpenValve(ValveType.PVN22, true);
                 //FlowGas(12, flowSetpoint);
                 return true;

+ 5 - 1
Venus/Venus_RT/Devices/PendulumValve.cs

@@ -314,10 +314,14 @@ namespace Venus_RT.Devices
                                     Pressure = Convert.ToSingle(ConvertPressureUnit.ConvertPaTomtorr(pressure * _pressure_ful_range / 1000000));
                                     //Pressure = pressure * _pressure_ful_range / 1000000;
                                 }
-                                else if (m_JetChamber == JetChamber.VenusSE || m_JetChamber == JetChamber.VenusDE)
+                                else if (m_JetChamber == JetChamber.VenusSE)
                                 {
                                     Pressure = Convert.ToSingle(pressure) / 100;
                                 }
+                                else if (m_JetChamber == JetChamber.VenusDE)
+                                {
+                                    Pressure = Convert.ToSingle(pressure);
+                                }
                                 else
                                 {
                                     Pressure = Convert.ToSingle(pressure) * _pressure_ful_range / 1000000;

+ 304 - 0
Venus/Venus_RT/Devices/TruPlasmaRF.cs

@@ -14,6 +14,7 @@ using MECF.Framework.Common.Equipment;
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Net;
 using Venus_Core;
@@ -245,4 +246,307 @@ namespace Venus_RT.Devices
 
         #endregion
     }
+    static class TruPlasmaMatchMessage
+    {
+        public const string PRESET = "G";
+        public const string AUTO = "L";
+        public const string MANUAL = "M";
+        public const string PRESET_MEM = "P";
+        public const string START_QUERY = "S3";
+        public const string STOP_QUERY = "SP";
+        public const string WRITE_POS = "$APGR";
+        public const string READ_POS = "$APRR";
+    }
+
+    class TruPlasmaMatch : RfMatchBase
+    {
+        private readonly AsyncSerialPort _serial;
+        private const ushort S3_HEAD_LENGTH = 2;
+        private readonly DeviceTimer _timerQueryStatus = new DeviceTimer();
+        private int QUERY_INTERVAL = 1000;
+        //private int                      _scMatchPresetMode;
+        //private int                      _scMatchMode;
+        //private readonly SCConfigItem    _scMatchPositionC1;
+        //private readonly SCConfigItem    _scMatchPositionC2;
+        //private readonly bool            _scEnableC1C2Position;
+
+        // --------------------------Properties------------------------
+        //
+        [Subscription("MatchWorkMode")]
+        public EnumRfMatchTuneMode WorkMode { get; set; }
+        public float C1 { get; set; }
+        public float C2 { get; set; }
+
+        //[Subscription("VPP")]
+        public ushort VPP { get; set; }
+        public new AITMatchData DeviceData
+        {
+            get
+            {
+                return new AITMatchData
+                {
+                    Module = Module,
+                    DeviceName = Name,
+                    WorkMode = WorkMode.ToString(),
+                    C1 = TunePosition1,
+                    C2 = TunePosition2,
+                    VPP = "",
+                    DCBias = DCBias.ToString()
+                };
+            }
+        }
+        public TruPlasmaMatch(ModuleName mod, VenusDevice device) : base(mod.ToString(), device.ToString())
+        {
+            var portNum = SC.GetStringValue($"{mod}.{device}.Port");
+
+            _serial = new AsyncSerialPort(portNum, 9600, 8);
+
+            //_scMatchPresetMode    = SC.GetValue<int>($"{Module}.Rf.PresetMode");
+            //_scMatchMode          = SC.GetValue<int>($"{Module}.Rf.MatchMode");
+            //_scMatchPositionC1    = SC.GetConfigItem($"{Module}.Rf.MatchPositionC1");
+            //_scMatchPositionC2    = SC.GetConfigItem($"{Module}.Rf.MatchPositionC2");
+            //_scEnableC1C2Position = SC.GetValue<bool>($"{Module}.Rf.EnableC1C2Position");
+            SerachCommandList = new List<string>()
+            {
+            AdTecMatchMessage.READ_POS,
+            AdTecMatchMessage.START_QUERY
+            };
+            intervalTime = 100;
+            sendDataChangedEvent += TruMatch_sendDataChangedEvent;
+            baseStopwatch.Start();
+            baseTimer.Enabled = true;
+        }
+
+        private void TruMatch_sendDataChangedEvent(string obj)
+        {
+            this.SendCmd(obj);
+        }
+
+        ~TruPlasmaMatch()
+        {
+            _serial?.Close();
+        }
+
+        public override bool Initialize()
+        {
+            base.Initialize();
+
+            if (_serial.Open())
+            {
+                _serial.OnBinaryDataChanged += SerialBinaryPortDataReceived;
+                _serial.OnErrorHappened += SerialPortErrorOccurred;
+            }
+            else
+            {
+                LOG.Write(eEvent.ERR_RF, Module, "Match 串口无法打开");
+                return false;
+            }
+
+            DATA.Subscribe($"{Module}.{Name}.C1", () => TunePosition1);
+            DATA.Subscribe($"{Module}.{Name}.C2", () => TunePosition2);
+            DATA.Subscribe($"{Module}.{Name}.WorkMode", () => WorkMode.ToString());
+
+
+            OP.Subscribe($"{Module}.{Name}.SetC1", (func, args) =>
+            {
+                return true;
+            });
+            OP.Subscribe($"{Module}.{Name}.SetC2", (func, args) =>
+            {
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.{Name}.{AITRfOperation.SetMatchPositionC1}", (out string reason, int time, object[] param) =>
+            {
+                SetMatchPositionC1((float)Convert.ToDouble(param[0]), out reason);
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.{Name}.{AITRfOperation.SetMatchPositionC2}", (out string reason, int time, object[] param) =>
+            {
+                SetMatchPositionC2((float)Convert.ToDouble(param[0]), out reason);
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.{Name}.{AITRfOperation.SetMatchPosition}", (out string reason, int time, object[] param) =>
+            {
+                SetMatchPosition((float)Convert.ToDouble(param[0]), (float)Convert.ToDouble(param[1]), out reason);
+                return true;
+            });
+
+            OP.Subscribe($"{Module}.{Name}.{AITRfOperation.SetMatchProcessMode}", (out string reason, int time, object[] param) =>
+            {
+                SetMatchMode((string)param[0] == "Auto" ? EnumRfMatchTuneMode.Auto : EnumRfMatchTuneMode.Manual, out reason);
+                return true;
+            });
+
+            _timerQueryStatus.Start(QUERY_INTERVAL);
+            this.SendCmd(AdTecMatchMessage.START_QUERY);
+
+            //LOG.Write(eEvent.ERR_RF, Module, "Initialize done.");
+            return true;
+        }
+
+        public override void Monitor()
+        {
+            //try
+            //{
+            //    if (_timerQueryStatus.IsTimeout())
+            //    {
+            //        this.SendCmd(AdTecMatchMessage.READ_POS);
+            //        _timerQueryStatus.Start(QUERY_INTERVAL);
+            //    }
+            //}
+            //catch (Exception ex)
+            //{
+            //    LOG.WriteExeption(ex);
+            //}
+        }
+
+        public override void Terminate()
+        {
+            this.SendCmd(AdTecMatchMessage.STOP_QUERY);
+        }
+
+        public override void Reset()
+        {
+            //SendCmd(AdTecMatchMessage.STOP_QUERY);
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="c1,c2">百分比数字</param>
+        /// <param name="c2"></param>
+        /// 
+        private void executeMatchPostion(float c1, float c2)
+        {
+            //SetWorkMode(EnumRfMatchTuneMode.Manual);
+            ////await Task.Delay(200);
+
+            SetPosition(c1, c2);
+            //await Task.Delay(200);
+
+            //SetPresetMemory(0);
+            //await Task.Delay(200);
+            // SetWorkMode(EnumRfMatchTuneMode.Auto);
+        }
+        public override void SetMatchPosition(float c1, float c2, out string reason)
+        {
+            float DataValue = BitConverter.ToSingle(new byte[] { 0x9A, 0x99, 0x19,0x3F }, 0);
+            byte[] floatAsBytes = BitConverter.GetBytes(DataValue);
+            float DataValue1= BitConverter.ToSingle(new byte[] { floatAsBytes[0], floatAsBytes[1], floatAsBytes[2], floatAsBytes[3] }, 0);
+            //LOG.Write(eEvent.WARN_RF, Module, $"AdTec Match error [{c1}, {c2}]");
+
+            base.SetMatchPosition(c1, c2, out reason);
+
+            executeMatchPostion(c1, c2);
+
+            reason = "";
+        }
+
+        public void SetPresetMode(RfMatchPresetMode mode)
+        {
+        }
+
+        // -----------------------Private Method-------------------------
+        //
+        private void SerialBinaryPortDataReceived(byte[] message)
+        {
+            if(message.Count()==0)
+            {
+                LOG.Write(eEvent.ERR_RF, Module, "收到 Match 数据为空");
+                       return;
+            }
+            else 
+            {
+                if (message[0] ==0x1D && message[6]==0x60 && message[7] == 0x00)
+                {
+                    this.TunePosition1 = BitConverter.ToSingle(new byte[] { message[10], message[11], message[12], message[13] }, 0) * 10;
+                    this.TunePosition2 = BitConverter.ToSingle(new byte[] { message[14], message[15], message[16], message[17] }, 0) * 10;
+                    switch (message[7])
+                    {
+                        case 0x01:
+                            this.WorkMode = EnumRfMatchTuneMode.Manual;
+                            break;
+                        case 0x02:
+                            this.WorkMode = EnumRfMatchTuneMode.Auto;
+                            break;
+                        case 0x20:
+                            this.WorkMode = EnumRfMatchTuneMode.Undefined;
+                            break;                           
+                        default:
+                            break;
+                    }
+                       
+                    
+                }
+            }
+                
+            }
+
+        
+
+        private void SerialPortErrorOccurred(string str)
+        {
+            LOG.Write(eEvent.ERR_RF, Module, $"AdTec Match error [{str}]");
+        }
+
+        private void SendCmd(string str)
+        {
+            _serial?.Write(str + "\r");
+            //EV.PostInfoLog(Module.ToString(), $"Match send [{str}]");
+        }
+
+        private void SetPosition(float c1val, float c2val)
+        {
+
+            List<byte> Len = new List<byte>() { 0x16, 0xE9};
+            List<byte> DstSrc = new List<byte>() { 0x00, 0x0A, 0x00, 0x00};
+            List<byte> Cmd = new List<byte> { 0x60, 0x40 };
+            byte[] val1Bytes = BitConverter.GetBytes(c1val / 100);
+            byte[] val2Bytes = BitConverter.GetBytes(c2val / 100);
+            List<byte> Act = new List<byte>() { 0x64 };
+            List<byte> Ctr123 = new List<byte> { 0x08, 0x01, 0x80 };            
+            List<byte> baseBytes = new List<byte>() { };
+            baseBytes.AddRange(Len);
+            baseBytes.AddRange(DstSrc);
+            baseBytes.AddRange(Cmd);
+            baseBytes.AddRange(val1Bytes);
+            baseBytes.AddRange(val2Bytes);
+            baseBytes.AddRange(Act);
+            baseBytes.AddRange(Ctr123);
+            byte ack=0x00;
+            for (int i=2; i< baseBytes.Count;i++)
+            {
+                ack += baseBytes[i];
+            }
+            baseBytes.Add(ack);
+            //SetPointCommandQueue.Add(cmd);
+            _serial.Write(baseBytes.ToArray());
+        }
+
+        public override bool SetMatchMode(EnumRfMatchTuneMode enumRfMatchTuneMode, out string reason)
+        {
+            reason = string.Empty;
+            SetWorkMode(enumRfMatchTuneMode);
+
+            return true;
+        }
+
+        private void SetWorkMode(EnumRfMatchTuneMode mode)
+        {
+            //string data = mode == EnumRfMatchTuneMode.Auto ? AdTecMatchMessage.AUTO :
+            //    mode == EnumRfMatchTuneMode.Manual ? AdTecMatchMessage.MANUAL : "";
+            //this.SendCmd(mode == EnumRfMatchTuneMode.Auto ? AdTecMatchMessage.AUTO :
+            //    mode == EnumRfMatchTuneMode.Manual ? AdTecMatchMessage.MANUAL : "");
+            //SetPointCommandQueue.Add(data);
+        }
+
+        private void SetPresetMemory(byte gear)
+        {
+            //this.SendCmd(AdTecMatchMessage.PRESET_MEM + gear.ToString());
+            //SetPointCommandQueue.Add(AdTecMatchMessage.PRESET_MEM + gear.ToString());
+        }
+    }
 }

+ 1 - 1
Venus/Venus_RT/Modules/PMs/ProcessDefine.cs

@@ -399,7 +399,7 @@ namespace Venus_RT.Modules.PMs
             if (ProcessUnit.ToleranceMode != ToleranceMode.None)
             {
                 toleranceObjects.Add(new ToleranceObject("BiasRF", ProcessUnit.BiasRFPower, ProcessUnit.RFPowerWarningRange, ProcessUnit.RFPowerAlarmRange, ProcessUnit.ToleranceDelayTime, ProcessUnit.ToleranceMode));
-                _RFToleranceChecker.Start(toleranceObjects, step.Type == StepType.Stable);
+                _BiasRFToleranceChecker.Start(toleranceObjects, step.Type == StepType.Stable);
             }
             _scBiasRFPowerAlarmTime = SC.GetValue<double>($"{Chamber.Name}.BiasRf.PowerAlarmTime");
             biasRfMatchC1.Clear();

+ 1 - 1
Venus/Venus_Themes/Converters/ToBoolMultiValueConverter7.cs

@@ -11,7 +11,7 @@ namespace Venus_Themes.Converters
     {
         public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
         {
-            if (((bool)values[0] == true && (bool)values[2] == true && (bool)values[3] == true)||((bool)values[1] == true && (bool)values[2] == true && (bool)values[3] == true))
+            if (((bool)values[0] == true && (bool)values[1] == true )||((bool)values[1] == true && (bool)values[2] == true && (bool)values[3] == true))
             {
                 return true;
             }