Browse Source

1.IoMagnet device Logical supplement
2.Tru Rf Logical supplement
3.Venus DE Chamber bugs fix

hecl 1 year ago
parent
commit
b3a13fc6c7

+ 0 - 4
Venus/Venus_Core/Recipe.cs

@@ -533,13 +533,9 @@ namespace Venus_Core
                         case "ESCHVUnit":
                             unit.Add(JsonConvert.DeserializeObject<ESCHVUnit>(step.LstUnit[i].ToString()));
                             break;
-                        case "SEESCHVUnit":
-                            unit.Add(JsonConvert.DeserializeObject<ESCHVUnit>(step.LstUnit[i].ToString()));
-                            break;
                         case "ProcessKitUnit":
                             unit.Add(JsonConvert.DeserializeObject<ProcessKitUnit>(step.LstUnit[i].ToString()));
                             break;
-
                         case "HeaterUnit":
                             unit.Add(JsonConvert.DeserializeObject<HeaterUnit>(step.LstUnit[i].ToString()));
                             break;

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

@@ -1490,7 +1490,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);
@@ -1507,18 +1507,7 @@ namespace Venus_MainPages.ViewModels
         }
         private async void OnSetMagnet()
         {
-
-            if (MagnetData.IsMagnetOn == true)
-            {
-                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetMagnet", MagnetIntensity, false);
-            }
-            else
-            {
-                if (true)
-                {
-                    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetMagnet", MagnetIntensity, true);
-                }
-            }
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetMagnet", MagnetIntensity, true);
         }
 
         private void OnPMAbort()
@@ -1808,7 +1797,7 @@ namespace Venus_MainPages.ViewModels
                 MFCHeData = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcHe");
                 MFCN2Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcN2");
 
-                SRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.Rf}.DeviceData");
+               // SRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.Rf}.DeviceData");
                 BRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasRf}.DeviceData");
                 PendulumValveData = CommonFunction.GetValue<AITPendulumValveData>(RtDataValues, $"{ModuleName}.{VenusDevice.PendulumValve}.DeviceData");
                 ESCHVData = CommonFunction.GetValue<AITHVData>(RtDataValues, $"{ModuleName}.{VenusDevice.ESCHV}.DeviceData");

+ 2 - 2
Venus/Venus_MainPages/Views/OverVenusDEView.xaml

@@ -1485,7 +1485,7 @@
                 <!--<TextBlock Grid.Row="18"  Grid.Column="1" Text="{Binding MFC11Data.FeedBack,StringFormat='F1'}"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="19"  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="18"  Grid.Column="1" Text="{Binding ESCHVData.OutputVoltage}"          Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center" />
-                <TextBlock Grid.Row="19"  Grid.Column="1" Text="{Binding ChillerTemperature,StringFormat='F1'}"        Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
+                <TextBlock Grid.Row="19"  Grid.Column="1" Text="{Binding HVTemperature,StringFormat='F1'}"        Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="20"  Grid.Column="1" Text="{Binding ESCHePressure,StringFormat='F1'}"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="21"  Grid.Column="1" Text="{Binding MFCHeData.FeedBack,StringFormat='F1'}"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
 
@@ -1660,7 +1660,7 @@
         <!--<Ellipse Width="20" Height="20" Fill="{Binding SRFData.IsRfOn,Converter={StaticResource boolToColor}}"  Canvas.Left="500" Canvas.Top="375" Stroke="Silver" StrokeThickness="2"/>
         <Button Height="20" Width="100" Content="SRF ON/OFF" Canvas.Left="530" Canvas.Top="375" Command="{Binding SetSRfCommand}"  Style="{StaticResource SysBtnStyle}"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>-->
         <Ellipse Width="20" Height="20" Fill="{Binding MagnetData.IsMagnetOn,Converter={StaticResource boolToColor}}"  Canvas.Left="501" Canvas.Top="374" Stroke="Silver" StrokeThickness="2" HorizontalAlignment="Left" VerticalAlignment="Top"/>
-        <Button Height="20" Width="100" Content="Magnet ON/OFF" Canvas.Left="530" Canvas.Top="374" Command="{Binding SetMagnetCommand}"  Style="{StaticResource SysBtnStyle}"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
+        <Button Height="20" Width="100" Content="Set Magnet" Canvas.Left="530" Canvas.Top="374" Command="{Binding SetMagnetCommand}"  Style="{StaticResource SysBtnStyle}"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
 
         <Ellipse Width="20" Height="20" Fill="{Binding ESCHVData.IsOn,Converter={StaticResource boolToColor}}" Canvas.Left="501" Canvas.Top="247" Stroke="Silver" StrokeThickness="2"/>
         <Button Height="20" Width="100" Content="HV ON/OFF" Canvas.Left="531" Canvas.Top="247" Command="{Binding HVCommand}" CommandParameter="True" Style="{StaticResource SysBtnStyle}"  IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>

+ 1 - 1
Venus/Venus_MainPages/Views/OverVenusSEView.xaml

@@ -1430,7 +1430,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 ChillerTemperature,StringFormat='F1'}"        Background="#D0D8E8"   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="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"/>
 

+ 13 - 8
Venus/Venus_RT/Config/PM/VenusDE/VenusDEDeviceModel.xml

@@ -54,7 +54,7 @@
 		isDefaultOpen="false" diOpen="" doOpen="DO_PVC1" diCloseSensor="" diOpenSensor="" />
 		<IoValve id="ValvePVC2" display="PVC2 Valve" schematicId="PVC2" unit="" isNc="true"
 				isDefaultOpen="false" diOpen="" doOpen="DO_PVC2" diCloseSensor="" diOpenSensor="" />
-    <IoValve id="ValvePurge" display="Purge valve" schematicId="PV2" unit="" isNc="true"
+    <IoValve id="ValvePurge" display="Purge valve" schematicId="" unit="" isNc="true"
 				 isDefaultOpen="false" diOpen="" doOpen="DO_Purge_Valve" diCloseSensor="" diOpenSensor="" />
 		<IoValve id="ValveN2" display="N2 valve" schematicId=""
 				unit="" isNc="true" isDefaultOpen="false" diOpen="" doOpen="DO_N2_Valve" diCloseSensor="" diOpenSensor="" />
@@ -200,7 +200,7 @@
 		<IoSensor id="N2PressureOk" display="N2 Pressure OK"  schematicId="" unit="" di="DI_PN2_Pressure_Switch" isLowAsNormal="" textOutTrigValue="false"
 			   infoText="" warningText="N2 Pressure Alarm" alarmText="" />
 		<IoSensor id="GeneratorInterlock" display="RFG hardware interlock"  schematicId="" unit="" di="DI_RF_HV_Interlock_OK" isLowAsNormal="" textOutTrigValue="false" infoText="Generator interlock" warningText="" alarmText="" />
-		<IoSensor id="SensorSourceRFFan" display="Bias RF Water Flow Switch"  schematicId="" unit="" di="DI_BIAS_RF_Water_Flow_Switch" isLowAsNormal="" textOutTrigValue="true" infoText="Bias RF Water Flow" warningText="" alarmText="Bias RF Water Flow Error" />
+		<!--<IoSensor id="SensorSourceRFFan" display="Bias RF Water Flow Switch"  schematicId="" unit="" di="DI_BIAS_RF_Water_Flow_Switch" isLowAsNormal="" textOutTrigValue="true" infoText="Bias RF Water Flow" warningText="" alarmText="Bias RF Water Flow Error" />-->
 		<IoSensor id="SensorLinerDoorClosed" display="Liner Door Closed"  schematicId="" unit="" di="DI_Liner_Door_Close_Position" isLowAsNormal="" textOutTrigValue="false" infoText="" warningText="" alarmText="" />
 		<IoSensor id="TurboPumpInterlock" display="Turbo Pump Interlock"  schematicId="" unit="" di="DI_Turbo_Pump_Interlock" isLowAsNormal="" textOutTrigValue="false" infoText="" warningText="" alarmText="" />
 		<IoSensor id="GasBoxDoorSW" display="Gas Box Door SW"  schematicId="" unit="" di="DI_Gas_Box_Door_Switch" isLowAsNormal="" textOutTrigValue="false" infoText="" warningText="" alarmText="" />
@@ -297,11 +297,11 @@
   </IoHeaters>
   <IoMagnets assembly="Venus_RT" classType="Venus_RT.Devices.IODevices.IoMagnet">
     <IoMagnet id="AIoMagnet" display="Valve IoMagnet" schematicId="" unit="A"
-           doPowerOn="DO_Magnets_Contact_ON"
-           doMagnets1A="DO_Magnets_1A_coil_OFF"
-           doMagnets1B="DO_Magnets_1B_coil_OFF"
-           doMagnets2A="DO_Magnets_2A_coil_OFF"
-           doMagnets2B="DO_Magnets_2B_coil_OFF"
+           diPowerOn="DI_Magnets_Coils_ON_FB"
+           doMagnets1A="DO_Magnets_1A_coil_ON"
+           doMagnets1B="DO_Magnets_1B_coil_ON"
+           doMagnets2A="DO_Magnets_2A_coil_ON"
+           doMagnets2B="DO_Magnets_2B_coil_ON"
            diMagnetsCoils="DI_Magnets_Coils_ON_FB"
            diOTSwitch="DI_Magnets_Coils_OT_Switch_Alarm"
            diDriver1="DI_Magnets_Driver1_Current_overload_alarm"
@@ -312,10 +312,15 @@
            aiMagnet2U="AI_Magnet_Driver_2_Phase_U_Current"
            aiMagnet2V="AI_Magnet_Driver_2_Phase_V_Current"
            aiMagnet2W="AI_Magnet_Driver_2_Phase_W_Current"
-           aoSetPoint="AO_Magnet_voltage_amplitude"
+           aoSetPoint="AO_Magnet_Intensity"
            aoWaveSsquare="AO_Magnet_sine_wave_square_switch"
            aoCurrentLimit="AO_Magnet_Driver_Current_Limit_Setpoint"
            aoCycletime="AO_Magnet_cycle_time"
+           aoMagnetFieldRadio="AO_Magnet_Field_Ratio"
+           ao1Aoutput="AO_Magnet_1A_output_full_scale"
+           ao1Boutput="AO_Magnet_1B_output_full_scale"
+           ao2Aoutput="AO_Magnet_2A_output_full_scale"
+           ao2Boutput="AO_Magnet_2B_output_full_scale"
            />
   </IoMagnets>
   

+ 12 - 13
Venus/Venus_RT/Config/PM/VenusDE/VenusDEIoDefine.xml

@@ -20,7 +20,7 @@
     <DI_ITEM Index="13"  Name="DI_ESC_Coolant_Inlet_TC_Broken_Alarm" Device="TC模块信号" Addr="w20.13" />
     <DI_ITEM Index="14"  Name="DI_ESC_Coolant_Outlet_TC_Broken_Alarm" Device="TC模块信号" Addr="w20.14" />
     <DI_ITEM Index="15"  Name="DI_Chamber_Pressure_10t_Gauge_Alarm" Device="VG_PPH_真空值比较" Addr="w20.15" />
-    <DI_ITEM Index="16"  Name="DI_Process_Pressure_1t_Gauge_Alarm" Device="VG PPL" Addr="w21.00" /> 
+    <DI_ITEM Index="16"  Name="DI_Process_Pressure_1t_Gauge_Alarm" Device="VG PPL" Addr="w21.00" />
     <DI_ITEM Index="17"  Name="" />
     <DI_ITEM Index="18"  Name="DI_Foreline_Pressure_10t_Gauge_Alarm" Device="TC模块信号" Addr="w21.02" />
     <DI_ITEM Index="19"  Name="" />
@@ -198,11 +198,11 @@
     <DO_ITEM Index="77" Name="" />
     <DO_ITEM Index="78" Name="" />
     <DO_ITEM Index="79" Name="" />
-    <DO_ITEM Index="80" Name="DO_Magnets_Contact_ON"  Device="" Addr="w5.00"/>
-    <DO_ITEM Index="81" Name="DO_Magnets_1A_coil_OFF" Device="" Addr="w5.01"/>
-    <DO_ITEM Index="82" Name="DO_Magnets_1B_coil_OFF" Device="" Addr="w5.02" />
-    <DO_ITEM Index="83" Name="DO_Magnets_2A_coil_OFF" Device="" Addr="w5.03" />
-    <DO_ITEM Index="84" Name="DO_Magnets_2B_coil_OFF" Device="" Addr="w5.04" />
+    <DO_ITEM Index="80" Name="DO_Magnets_Contact_ON" Device="" Addr="w5.00"/>
+    <DO_ITEM Index="81" Name="DO_Magnets_1A_coil_ON" Device="" Addr="w5.01"/>
+    <DO_ITEM Index="82" Name="DO_Magnets_1B_coil_ON" Device="" Addr="w5.02" />
+    <DO_ITEM Index="83" Name="DO_Magnets_2A_coil_ON" Device="" Addr="w5.03" />
+    <DO_ITEM Index="84" Name="DO_Magnets_2B_coil_ON" Device="" Addr="w5.04" />
     <DO_ITEM Index="85" Name="" />
     <DO_ITEM Index="86" Name="" />
     <DO_ITEM Index="87" Name="" />
@@ -268,16 +268,15 @@
     <AO_ITEM Index="33" Name="" />
     <AO_ITEM Index="34" Name="" />
     <AO_ITEM Index="35" Name="AO_Magnet_cycle_time" BufferOffset="70" Device="" Addr="d1070" Note="MFC"/>
-    <AO_ITEM Index="36" Name="AO_Magnet_voltage_amplitude" BufferOffset="72" Device="" Addr="d1072" Note="MFC" />
+    <AO_ITEM Index="36" Name="AO_Magnet_Intensity" BufferOffset="72" Device="" Addr="d1072" Note="MFC" />
     <AO_ITEM Index="37" Name="AO_Magnet_sine_wave_square_switch" BufferOffset="74" Device="" Addr="d1074" Note="MFC" />
     <AO_ITEM Index="38" Name="" />
-    <AO_ITEM Index="39" Name="" />
+    <AO_ITEM Index="39" Name="AO_Magnet_Field_Ratio" BufferOffset="78" Device="" Addr="d1078" Note="MFC"/>
     <AO_ITEM Index="40" Name="AO_Magnet_Driver_Current_Limit_Setpoint" BufferOffset="80" Device="" Addr="d1080" Note="MFC"/>
-    <AO_ITEM Index="41" Name="" />
-    <AO_ITEM Index="42" Name="" />
-    <AO_ITEM Index="43" Name="" />
-    <AO_ITEM Index="44" Name="" />
-    <AO_ITEM Index="45" Name="" />
+    <AO_ITEM Index="41" Name="AO_Magnet_1A_output_full_scale" BufferOffset="82" Device="" Addr="d1082" Note="MFC"/>
+    <AO_ITEM Index="42" Name="AO_Magnet_1B_output_full_scale" BufferOffset="84" Device="" Addr="d1084" Note="MFC"/>
+    <AO_ITEM Index="43" Name="AO_Magnet_2A_output_full_scale" BufferOffset="86" Device="" Addr="d1086" Note="MFC"/>
+    <AO_ITEM Index="44" Name="AO_Magnet_2B_output_full_scale" BufferOffset="88" Device="" Addr="d1088" Note="MFC"/>
     <AO_ITEM Index="46" Name="" />
     <AO_ITEM Index="47" Name="" />
     <AO_ITEM Index="48" Name="" />

+ 30 - 40
Venus/Venus_RT/Config/System_VenusSE.sccfg

@@ -434,7 +434,7 @@
 		<config default="751" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="2000" min="500" paramter="" tag="" unit="°C" type="Double" />
 		<config default="false" name="IsEnableRecipeExtension" nameView="Is Enable Recipe Extension"  description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<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="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" >
@@ -509,13 +509,13 @@
 			<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:SIN,1:Squre,2:Single" max="2" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
-			<config default="0.25" name="MagentFieldRatio" nameView="Magent Field Ratio" description="" max="1" 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="String" visible="true"/>
-			<config default="50" name="Magnet_1A_output_full_scale" nameView="Magnet 1A output full scale" description="" max="100" min="50" paramter="" tag="" unit="gs" type="Double" visible="true"/>
-			<config default="50" name="Magnet_1B_output_full_scale" nameView="Magnet 1B output full scale" description="" max="100" min="50" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="50" name="Magnet_2A_output_full_scale" nameView="Magnet 2A output full scale" description="" max="100" min="50" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="50" name="Magnet_2B_output_full_scale" nameView="Magnet 2B output full scale" description="" max="100" min="50" paramter="" tag="" unit="gs" type="Integer" 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="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"/>
+			<config default="50" name="Magnet_1B_output_full_scale" nameView="Magnet 1B output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
+			<config default="50" name="Magnet_2A_output_full_scale" nameView="Magnet 2A output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
+			<config default="50" name="Magnet_2B_output_full_scale" nameView="Magnet 2B output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
 			<config default="3" name="Min_Magnet_Coil_Current" nameView="Min Magnet Coil current" description="" max="100" min="0" paramter="" tag="" unit="A" type="Integer" visible="true" />
 		</configs>
 		<configs name="Rf" nameView="Source RF"  visible="false">
@@ -569,7 +569,7 @@
 		</configs>
 		<configs name="BiasRf" nameView="Bias RF" >
 			<config default="true" name="EnableBiasRF" nameView="Enable Bias RF" description="enable bias RF or not" max="1" min="0" tag="" unit="" type="Bool" />
-			<config default="2" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet;3:Tru_Eth;4:Tru" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
+			<config default="2" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet;3:Tru;4:Tru_Eth" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="2" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM14" name="Port" nameView="Port" description="serial port name of RFG" max="" min="" paramter="" tag="" unit="" type="String" />
 			<config default="127.0.0.1:502" name="IPAddress" nameView="IP Address" description="Bias RF IP,default 127.0.0.1:502" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -601,7 +601,7 @@
 		</configs>
 		<configs name="BiasMatch" nameView="Bias Match" >
 			<config default="false" name="EnableBiasMatch" nameView="Enable Bias Match" description="enable bias match or not" max="1" min="0" tag="" unit="" type="Bool" />
-			<config default="2" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet; 3:Revtech; 4:Tru" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
+			<config default="2" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet; 3:Revtech; 4:Tru;5:Tru_Eth" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="2" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM15" name="Port" nameView="Port" description="serial port name of match" max="" min="" paramter="" tag="" unit="" type="String" />
 			<config default="127.0.0.1:502" name="IPAddress" nameView="IP Address" description="Bias Match IP,default 127.0.0.1:502" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -1146,16 +1146,16 @@
 			<config default="1000" name="ChamberForelinePressureThreshold" nameView="Chamber Foreline Pressure Threshold" description="" max="10000" min="0" paramter="" tag="" unit="mtorr" type="Double" />
 			<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="false">
-			<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="0.25" name="MagentFieldRatio" nameView="Magent Field Ratio" description="" max="1" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
-			<config default="4s" name="Magnetcycleperiod" nameView="Magnet cycle period" description="serial port name of pump" max="10" min="0" paramter="" tag="" unit="s" type="String" visible="true"/>
-			<config default="50" name="Magnet 1A output full scale" nameView="Magnet 1A output full scale" description="" max="100" min="50" paramter="" tag="" unit="gs" type="Double" visible="true"/>
-			<config default="50" name="Magnet 1B output full scale" nameView="Magnet 1B output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="50" name="Magnet 2A output full scale" nameView="Magnet 2A output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="50" name="Magnet 2B output full scale" nameView="Magnet 2B output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="3" name="Min Magnet Coil current" nameView="Min Magnet Coil current" description="" max="100" min="0" paramter="" tag="" unit="A" type="Integer" visible="true" />
-		</configs>
+    <configs name="Magnet" nameView="Magnet" 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="Double" visible="true"/>
+      <config default="50" name="Magnet_1B_output_full_scale" nameView="Magnet 1B output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
+      <config default="50" name="Magnet_2A_output_full_scale" nameView="Magnet 2A output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
+      <config default="50" name="Magnet_2B_output_full_scale" nameView="Magnet 2B output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
+      <config default="3" name="Min_Magnet_Coil_Current" nameView="Min Magnet Coil current" description="" max="100" min="0" paramter="" tag="" unit="A" type="Integer" visible="true" />
+    </configs>
 		<configs name="Rf" nameView="Source RF" >
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
@@ -1788,16 +1788,16 @@
 			<config default="1000" name="ChamberForelinePressureThreshold" nameView="Chamber Foreline Pressure Threshold" description="" max="10000" min="0" paramter="" tag="" unit="mtorr" type="Double" />
 			<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="false">
-			<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="0.25" name="MagentFieldRatio" nameView="Magent Field Ratio" description="" max="1" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
-			<config default="4s" name="Magnetcycleperiod" nameView="Magnet cycle period" description="serial port name of pump" max="10" min="0" paramter="" tag="" unit="s" type="String" visible="true"/>
-			<config default="50" name="Magnet 1A output full scale" nameView="Magnet 1A output full scale" description="" max="100" min="50" paramter="" tag="" unit="gs" type="Double" visible="true"/>
-			<config default="50" name="Magnet 1B output full scale" nameView="Magnet 1B output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="50" name="Magnet 2A output full scale" nameView="Magnet 2A output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="50" name="Magnet 2B output full scale" nameView="Magnet 2B output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="3" name="Min Magnet Coil current" nameView="Min Magnet Coil current" description="" max="100" min="0" paramter="" tag="" unit="A" type="Integer" visible="true" />
-		</configs>
+    <configs name="Magnet" nameView="Magnet" 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="Double" visible="true"/>
+      <config default="50" name="Magnet_1B_output_full_scale" nameView="Magnet 1B output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
+      <config default="50" name="Magnet_2A_output_full_scale" nameView="Magnet 2A output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
+      <config default="50" name="Magnet_2B_output_full_scale" nameView="Magnet 2B output full scale" description="" max="100" min="-100" paramter="" tag="" unit="%" type="Integer" visible="true" />
+      <config default="3" name="Min_Magnet_Coil_Current" nameView="Min Magnet Coil current" description="" max="100" min="0" paramter="" tag="" unit="A" type="Integer" visible="true" />
+    </configs>
 		<configs name="Rf" nameView="Source RF" >
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
@@ -2419,16 +2419,6 @@
 			<config default="1000" name="ChamberForelinePressureThreshold" nameView="Chamber Foreline Pressure Threshold" description="" max="10000" min="0" paramter="" tag="" unit="mtorr" type="Double" />
 			<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="false">
-			<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="0.25" name="MagentFieldRatio" nameView="Magent Field Ratio" description="" max="1" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
-			<config default="4s" name="Magnetcycleperiod" nameView="Magnet cycle period" description="serial port name of pump" max="10" min="0" paramter="" tag="" unit="s" type="String" visible="true"/>
-			<config default="50" name="Magnet 1A output full scale" nameView="Magnet 1A output full scale" description="" max="100" min="50" paramter="" tag="" unit="gs" type="Double" visible="true"/>
-			<config default="50" name="Magnet 1B output full scale" nameView="Magnet 1B output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="50" name="Magnet 2A output full scale" nameView="Magnet 2A output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="50" name="Magnet 2B output full scale" nameView="Magnet 2B output full scale" description="" max="100" min="0" paramter="" tag="" unit="gs" type="Integer" visible="true" />
-			<config default="3" name="Min Magnet Coil current" nameView="Min Magnet Coil current" description="" max="100" min="0" paramter="" tag="" unit="A" type="Integer" visible="true" />
-		</configs>
 		<configs name="Rf" nameView="Source RF" >
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:AdTec; 2:Comet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />

+ 4 - 2
Venus/Venus_RT/Devices/DataDefine.cs

@@ -150,7 +150,8 @@ namespace Venus_RT
     {
         AdTec = 1,
         Comet = 2,
-        Truplasma_Ethercat= 3
+        Truplasma=3,
+        Truplasma_Ethercat = 4
     }
 
     public enum MatchMFG
@@ -158,7 +159,8 @@ namespace Venus_RT
         AdTec =1,
         Comet = 2,
         Revtech=3,
-        Lz_Ethercat = 4
+        Tru = 4,
+        Lz_Ethercat= 5,
     }
 
     public enum ChillerMFG

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

@@ -570,6 +570,10 @@ namespace Venus_RT.Instances
                 {
                     AddCustomModuleDevice(new AdTecGenerator(mod, Venus_Core.VenusDevice.BiasRf));
                 }
+                else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma)
+                {
+                    AddCustomModuleDevice(new TruPlasmaRF(mod, Venus_Core.VenusDevice.BiasRf));
+                }
                 else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma_Ethercat && startEthercatOK)
                 {
                     AddCustomModuleDevice(new TruPlasmaRF_Ethercat(mod, Venus_Core.VenusDevice.BiasRf, v_board_id));

+ 36 - 43
Venus/Venus_RT/Devices/IODevices/IoMagnet.cs

@@ -7,6 +7,7 @@ using Aitex.Core.RT.SCCore;
 using Aitex.Core.RT.Tolerance;
 using Aitex.Core.UI.View.Common;
 using Aitex.Core.Util;
+using CdioCs;
 using MECF.Framework.Common.CommonData.DeviceData;
 using MECF.Framework.Common.Equipment;
 using System;
@@ -44,18 +45,17 @@ namespace Venus_RT.Devices.IODevices
             _aiMagnet2V = ParseAiNode("aiMagnet2V", node, ioModule);
             _aiMagnet2U = ParseAiNode("aiMagnet2U", node, ioModule);
             _aiMagnet2W = ParseAiNode("aiMagnet2W", node, ioModule);
-            _doMagnetOn = ParseDoNode("doPowerOn", node, ioModule);
+            _diMagnetOn = ParseDiNode("diPowerOn", node, ioModule);
             _aoMagnetintensity= ParseAoNode("aoSetPoint", node, ioModule);
             _aoMagnetWaveForm = ParseAoNode("aoWaveSsquare", node, ioModule);
-           // _aoMagnetFieldRadio = ParseAoNode("aoSetPoint", node, ioModule);
+            _aoMagnetFieldRadio = ParseAoNode("aoMagnetFieldRadio", node, ioModule);
             _aoMagnetCycle = ParseAoNode("aoCycletime", node, ioModule);
             _aoMinMagnet = ParseAoNode("aoCurrentLimit", node, ioModule);
-
+            _ao1Aoutput= ParseAoNode("ao1Aoutput", node, ioModule);
+            _ao1Boutput = ParseAoNode("ao1Boutput", node, ioModule);
+            _ao2Aoutput = ParseAoNode("ao2Aoutput", node, ioModule);
+            _ao2Boutput = ParseAoNode("ao2Boutput", node, ioModule);
         }
-        private SCConfigItem _scMagnetWaveForm;
-        private SCConfigItem _scMagnetFieldRadio;
-        private SCConfigItem _scMagnetCycle;
-        private SCConfigItem _scMinMagnet;
         public MagnetStatus Status { get; set; }
         private readonly AIAccessor _aiMagnet1U;    
         private readonly AIAccessor _aiMagnet1V;
@@ -63,12 +63,16 @@ namespace Venus_RT.Devices.IODevices
         private readonly AIAccessor _aiMagnet2U;
         private readonly AIAccessor _aiMagnet2V;
         private readonly AIAccessor _aiMagnet2W;
-        private readonly DOAccessor _doMagnetOn;
+        private readonly DIAccessor _diMagnetOn;
         private readonly AOAccessor _aoMagnetintensity;
         private readonly AOAccessor _aoMagnetWaveForm;
         private readonly AOAccessor _aoMagnetFieldRadio;
         private readonly AOAccessor _aoMagnetCycle;
         private readonly AOAccessor _aoMinMagnet;
+        private readonly AOAccessor _ao1Aoutput;
+        private readonly AOAccessor _ao1Boutput;
+        private readonly AOAccessor _ao2Aoutput;
+        private readonly AOAccessor _ao2Boutput;
         private ToleranceChecker _toleranceChecker = new ToleranceChecker();
         public bool Initialize()
         {
@@ -76,6 +80,11 @@ namespace Venus_RT.Devices.IODevices
             _SetRealFloat(_aoMagnetWaveForm, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnetwareform").Value));          
             _SetRealFloat(_aoMagnetCycle, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnetcycleperiod").Value));
             _SetRealFloat(_aoMinMagnet, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Min_Magnet_Coil_Current").Value));
+            _SetRealFloat(_aoMagnetFieldRadio, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.MagentFieldRatio").Value));
+            _SetRealFloat(_ao1Aoutput, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnet_1A_output_full_scale").Value));
+            _SetRealFloat(_ao1Boutput, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnet_1B_output_full_scale").Value));
+            _SetRealFloat(_ao2Aoutput, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnet_2A_output_full_scale").Value));
+            _SetRealFloat(_ao2Boutput, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnet_2B_output_full_scale").Value));
             return true;
         }
 
@@ -99,11 +108,24 @@ namespace Venus_RT.Devices.IODevices
                 return deviceData;
             }
         }
+        public void Setpoint(AOAccessor ao,float config)
+        {
+            if (_GetRealFloat(ao) != config)
+            {
+                _SetRealFloat(ao, config);
+            }
+        }
         public void Monitor()
         {
-            //throw new NotImplementedException();
+            Setpoint(_aoMagnetFieldRadio, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.MagentFieldRatio").Value));
+            Setpoint(_ao1Aoutput, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnet_1A_output_full_scale").Value));
+            Setpoint(_ao1Boutput, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnet_1B_output_full_scale").Value));
+            Setpoint(_ao2Aoutput, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnet_2A_output_full_scale").Value));
+            Setpoint(_ao2Boutput, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnet_2B_output_full_scale").Value));
+            Setpoint(_aoMagnetCycle, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnetcycleperiod").Value));
+            Setpoint(_aoMagnetWaveForm, Convert.ToSingle(SC.GetConfigItem($"{Module}.Magnet.Magnetwareform").Value));
         }
-        [Subscription(AITMfcDataPropertyName.FeedBack)]
+       
         public float Magent1V
         {
             get
@@ -122,6 +144,10 @@ namespace Venus_RT.Devices.IODevices
                 return real;
             }
         }
+        public bool MagnetOn
+        {
+            get { return _diMagnetOn != null && _diMagnetOn.Value; }
+        }
         public float Magent1W
         {
             get
@@ -149,39 +175,6 @@ namespace Venus_RT.Devices.IODevices
                 return real;
             }
         }
-        public bool MagnetOn
-        {
-            get => Status == MagnetStatus.ON;
-            set { }
-        }
-        public bool SetMagnetOnOff(bool on, out string str)
-        {
-            str = "";
-            var _chamber = DEVICE.GetDevice<JetPMBase>(Module);
-            //if (on && !_chamber.CheckGeneratorAndHVInterlock(VenusDevice.Rf))
-            //{
-            //    return false;
-            //}
-
-            
-            if (!_doMagnetOn.SetValue(on, out string reason))
-            {
-                LOG.Write(eEvent.INFO_DEVICE_IO_MAGNET, ModuleHelper.Converter(Module), reason);
-                return false;
-            }
-
-            LOG.Write(eEvent.INFO_DEVICE_IO_MAGNET, ModuleHelper.Converter(Module), $"Set  Magnet Contact {(on ? "ON" : "OFF")}");
-            if (on)
-            {
-                Status = MagnetStatus.ON;
-            }
-            else
-            {
-                Status = MagnetStatus.OFF;  
-            }
-           
-            return true;
-        }
         public bool SetMagnetPower(float val)
         {
             _SetRealFloat(_aoMagnetintensity, val);

+ 1 - 16
Venus/Venus_RT/Devices/JetPMBase.cs

@@ -308,16 +308,7 @@ namespace Venus_RT.Devices
             {
 
                 var ison = (bool)args[1];
-                if (ison == true)
-                {
-                    MagnetPowerOn(true);
-
-                    MagnetSetpower((float)args[0]);
-                }
-                else
-                {
-                    MagnetPowerOn(false);
-                }
+                MagnetSetpower((float)args[0]);
                 return true;
             });
 
@@ -578,8 +569,6 @@ namespace Venus_RT.Devices
 
         public virtual bool GeneratorBiasPowerOn(bool on)
         { return false; }
-        public virtual bool MagnetPowerOn(bool on)
-        { return false; }
         public virtual bool MagnetSetpower(float val)
         { return false; }
         public virtual bool GeneratorBiasSetpower(float val)
@@ -695,10 +684,6 @@ namespace Venus_RT.Devices
         {
             return true;
         }
-        //public virtual bool SESetBacksideHeThreshold(float nMin, float nMax)
-        //{
-        //    return true;
-        //}
         public virtual bool HighTemperatureHeaterGotoPosition(HighTemperatureHeaterPosition highTemperatureHeaterPosition)
         {
             return false;

+ 33 - 29
Venus/Venus_RT/Devices/JetVenusDEPM.cs

@@ -193,14 +193,14 @@ namespace Venus_RT.Devices
             _RFG_Interlock = DEVICE.GetDevice<IoSensor>($"{Module}.GeneratorInterlock");
 
             _PM_Lid_Closed = DEVICE.GetDevice<IoSensor>($"{Module}.SensorPMLidClosed");
-            _Source_RF_Fan = DEVICE.GetDevice<IoSensor>($"{Module}.SensorSourceRFFan");
+            //_Source_RF_Fan = DEVICE.GetDevice<IoSensor>($"{Module}.SensorSourceRFFan");
             _TurboPumpInterlock = DEVICE.GetDevice<IoSensor>($"{Module}.TurboPumpInterlock");
             _GasBoxDoor = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxDoorSW");
             _GasBoxPressure = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxPressureSW");
 
             _ForelineTC = DEVICE.GetDevice<IoHeater>($"{Module}.ForelineHeater");
             _WallTC = DEVICE.GetDevice<IoHeater>($"{Module}.WallHeater");
-            
+
 
             _CDAPressure = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk");
             _pressureController = DEVICE.GetDevice<IoPressureControl>($"{Module}.{VenusDevice.PressureControl}");
@@ -253,7 +253,7 @@ namespace Venus_RT.Devices
                 _Generator = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.Rf}");
             }
 
-            // Ethernet Comet Generator Bias
+            // Ethernet & RS232  Generator Bias
             if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
             {
                 if (SC.GetValue<int>($"{Module}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
@@ -261,13 +261,13 @@ namespace Venus_RT.Devices
                 {
                     _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VenusDevice.BiasRf}");
                 }
-                else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
+                else if (SC.GetValue<int>($"{Module}.Rf.CommunicationType") == (int)CommunicationType.RS232 && SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
                 {
                     _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
                 }
-                else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma_Ethercat)
+                else if (SC.GetValue<int>($"{Module}.Rf.CommunicationType") == (int)CommunicationType.RS232 && SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma)
                 {
-                    _GeneratorBias = DEVICE.GetDevice<TruPlasmaRF_Ethercat>($"{Module}.{VenusDevice.BiasRf}");
+                    _GeneratorBias = DEVICE.GetDevice<TruPlasmaRF>($"{Module}.{VenusDevice.BiasRf}");
                 }
             }
 
@@ -277,11 +277,16 @@ namespace Venus_RT.Devices
             {
                 _Match = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.Match}");
             }
+            else if (SC.GetValue<int>($"{Module}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
+                SC.GetValue<int>($"{Module}.Match.MFG") == (int)MatchMFG.Tru)
+            {
+                _Match = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.Match}");
+            }
 
             // 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.CommunicationType") == (int)CommunicationType.RS232 &&
+            SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
             {
                 _BiasMatch = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.BiasMatch}");
             }
@@ -353,7 +358,7 @@ namespace Venus_RT.Devices
         {
             get
             {
-                if (Singleton<RouteManager>.Instance.seTM!=null)
+                if (Singleton<RouteManager>.Instance.seTM != null)
                 {
                     switch (Module)
                     {
@@ -392,7 +397,7 @@ namespace Venus_RT.Devices
 
         public override bool IsFastPumpOpened => _FastPumpValve.Status;
 
-        public override bool IsSoftPumpOpened { get;  }//_SoftPumpValve.Status
+        public override bool IsSoftPumpOpened { get; }//_SoftPumpValve.Status
 
         public override bool IsMfc1ValveOpened => _Mfc1Valve.Status;
 
@@ -441,7 +446,6 @@ namespace Venus_RT.Devices
 
         public override bool TurboPumpInterlock => _TurboPumpInterlock.Value;
 
-        public override bool SourceRFFanInterlock => _Source_RF_Fan.Value;
         public override bool LinerDoorClosed => _PM_LinerDoor_Closed.Value;
 
         public override bool SlitDoorClosed
@@ -541,7 +545,7 @@ namespace Venus_RT.Devices
 
         public override bool IsLidLoadlockClosed
         {
-            get 
+            get
             {
                 //LOG.Write(eEvent.ERR_PM,Module,"VenusSE PM is not exist Loadlock!");
                 return false;
@@ -600,7 +604,7 @@ namespace Venus_RT.Devices
                 return false;
             }
         }
-        public override float RFMatchC1 => _Match!=null? _Match.TunePosition1 : 0;
+        public override float RFMatchC1 => _Match != null ? _Match.TunePosition1 : 0;
 
         public override float RFMatchC2 => _Match != null ? _Match.TunePosition1 : 0;
 
@@ -672,11 +676,11 @@ namespace Venus_RT.Devices
                 return false;
             }
 
-            if (!SourceRFFanInterlock)
-            {
-                LOG.Write(evt, Module, $"Cannot Power ON {device} as Source RF Fan is OFF.");
-                return false;
-            }
+            //if (!SourceRFFanInterlock)
+            //{
+            //    LOG.Write(evt, Module, $"Cannot Power ON {device} as Source RF Fan is OFF.");
+            //    return false;
+            //}
 
             if (!SlitDoorClosed)
             {
@@ -765,12 +769,12 @@ namespace Venus_RT.Devices
         {
             return _LiftPin.State == CylinderState.Open;
         }
-        public override  bool CheckLinerDoorOpen()
+        public override bool CheckLinerDoorOpen()
         {
             return _linerDoor.State == CylinderState.Open;
         }
 
-        public override  bool CheckLinerDoorClose()
+        public override bool CheckLinerDoorClose()
         {
             return _linerDoor.State == CylinderState.Close;
         }
@@ -792,7 +796,7 @@ namespace Venus_RT.Devices
             _PV32Valve.TurnValve(false, out _);
             _PV41Valve.TurnValve(false, out _);
             _PV42Valve.TurnValve(false, out _);
-            
+
             _PVHe1Valve.TurnValve(false, out _);
             _PVHe2Valve.TurnValve(false, out _);
             _GasFinalValve.TurnValve(false, out _);
@@ -879,12 +883,12 @@ namespace Venus_RT.Devices
 
             return _GeneratorBias.SetPowerOnOff(on, out _);
         }
-        public override bool MagnetPowerOn(bool on)
-        {
-            if (_Magnet == null) return false;
+        //public override bool MagnetPowerOn(bool on)
+        //{
+        //    if (_Magnet == null) return false;
 
-            return _Magnet.SetMagnetOnOff(on, out _);
-        }
+        //    return _Magnet.SetMagnetOnOff(on, out _);
+        //}
         public override bool GeneratorBiasSetMatchMode(bool val)
         {
             if (_GeneratorBias == null) return false;
@@ -927,8 +931,8 @@ namespace Venus_RT.Devices
         {
             if (_Magnet == null) return false;
 
-            if (Math.Abs(val) > 0.01)
-                _Magnet.SetMagnetPower( val);
+            if (Math.Abs(val) >= 0)
+                _Magnet.SetMagnetPower(val);
             return true;
         }
         public override float GetPVPosition()
@@ -1095,7 +1099,7 @@ namespace Venus_RT.Devices
         public override bool SetSlitDoor(bool open, out string reason)
         {
             reason = string.Empty;
-            OP.DoOperation($"{ModuleName.SETM}.SetSlitDoor",Module,open);
+            OP.DoOperation($"{ModuleName.SETM}.SetSlitDoor", Module, open);
             return true;
         }
         public override bool SetLinerDoor(bool open, out string reason)

+ 5 - 10
Venus/Venus_RT/Devices/JetVenusSEPM.cs

@@ -400,9 +400,9 @@ namespace Venus_RT.Devices
                     {
                         case ModuleName.PMA:
                             return Singleton<RouteManager>.Instance.seTM.IsPMASlitDoorOpen;
-                        case ModuleName.PMB:                                          
+                        case ModuleName.PMB:
                             return Singleton<RouteManager>.Instance.seTM.IsPMBSlitDoorOpen;
-                        case ModuleName.PMC:                                          
+                        case ModuleName.PMC:
                             return Singleton<RouteManager>.Instance.seTM.IsPMCSlitDoorOpen;
                         default:
                             return false;
@@ -768,7 +768,7 @@ namespace Venus_RT.Devices
             _PV32Valve.TurnValve(false, out _);
             _PV41Valve.TurnValve(false, out _);
             _PV42Valve.TurnValve(false, out _);
-                       
+
             _PVHe1Valve.TurnValve(false, out _);
             _PVHe2Valve.TurnValve(false, out _);
             _GasFinalValve.TurnValve(false, out _);
@@ -990,7 +990,7 @@ namespace Venus_RT.Devices
         }
 
         public async override Task<bool> AbortControlPressure()
-        {           
+        {
             OpenValve(ValveType.PVN22, false);
             OpenValve(ValveType.N2, false);
             await Task.Delay(2000);
@@ -1027,11 +1027,6 @@ namespace Venus_RT.Devices
             if (_backsideHe == null) return false;
             return _backsideHe.SetFlowThreshold(nMin, nMax);
         }
-        //public override bool SESetBacksideHeThreshold(float nMin, float nMax)
-        //{
-        //    if (_backsideHe == null) return false;
-        //    return _backsideHe.SetFlowThreshold(nMin, nMax);
-        //}
         public override bool SetBiasMatchPosition(float c1, float c2)
         {
             if (_BiasMatch == null) return false;
@@ -1240,7 +1235,7 @@ namespace Venus_RT.Devices
             //2024-02-20 17:11:16 朱永吉确认所有气不流后关闭rf 任意一管打开都不关闭
             if (!_Generator.IsPowerOn && !_GeneratorBias.IsPowerOn && _closedelay.IsRunning)
             {
-                LOG.Write(eEvent.EV_DEVICE_INFO,Module,$"Turn On RF use:{_closedelay.ElapsedMilliseconds} ms");
+                LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"Turn On RF use:{_closedelay.ElapsedMilliseconds} ms");
                 _closedelay.Stop();
             }
 

+ 62 - 7
Venus/Venus_RT/Devices/TruPlasmaRF.cs

@@ -5,16 +5,17 @@ using Aitex.Core.RT.Log;
 using Aitex.Core.RT.OperationCenter;
 using Aitex.Core.RT.SCCore;
 using Aitex.Core.RT.Tolerance;
+using Aitex.Core.UI.Control;
+using Aitex.Core.Util;
 using MECF.Framework.Common.Communications;
 using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.Device.Bases;
 using MECF.Framework.Common.Equipment;
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
+using System.Net;
 using Venus_Core;
 
 namespace Venus_RT.Devices
@@ -22,6 +23,13 @@ namespace Venus_RT.Devices
     public class TruPlasmaRF : RfPowerBase
     {
         private readonly AsyncSerialPort _serial;
+        private static byte _ACK = 0x06;
+        private static byte ParamRead = 0x01;
+        private static byte ParamWrite = 0x02;
+        private static byte TelegramError = 0xFE;
+        private static byte MessageRead = 0x04;
+        private static byte CtllnterfaceAct= 0x05;
+       // private  bool  = 0x05;
         public TruPlasmaRF(ModuleName mod, VenusDevice device) : base(mod.ToString(), device.ToString())
         {
             var portNum = SC.GetStringValue(device == VenusDevice.Rf ? $"{mod}.Rf.Port" : $"{mod}.BiasRf.Port");
@@ -34,7 +42,7 @@ namespace Venus_RT.Devices
 
             if (_serial.Open())
             {
-                _serial.OnDataChanged += SerialPortDataReceived;
+                _serial.OnBinaryDataChanged += SerialPortDataReceived;
                 _serial.OnErrorHappened += SerialPortErrorOccurred;
             }
             else
@@ -45,11 +53,57 @@ namespace Venus_RT.Devices
          
             return true;
         }
-        private void SerialPortDataReceived(string str)
+        public new AITRfData DeviceData =>
+            new AITRfData
+            {
+                Module = Module,
+                DeviceName = Name,
+                ScalePower = ScalePower,
+                ForwardPower = ForwardPower,
+                ReflectPower = ReflectPower,
+                IsRfOn = IsPowerOn,
+                PowerSetPoint = PowerSetPoint,
+            };
+        private void SerialPortDataReceived(byte[] rawMessage)
         {
 
-        }
+            LOG.Write(eEvent.INFO_RF, Module, $"RF byte"+rawMessage.ToString());
+            try
+            {
+                if (rawMessage.Length==1&& rawMessage[1]== 0x06) //ACK 指令
+                {
 
+                }
+                else if (rawMessage.Length > 1)
+                {
+                    parsecmd(rawMessage);
+                }
+            }
+            catch (Exception ex)
+            {
+                LOG.WriteExeption(ex);
+            }
+        }
+        public void parsecmd(byte[] message)
+        {
+           switch (message[4]) 
+            {
+                case 0x01://ParamRead
+                    int DataValue = BitConverter.ToInt32(new byte[] { message[10], message[11], message[12], message[13] }, 0);
+                    ReflectPower = DataValue;
+                    break;
+                case 0x02://ParamWrite
+                    DataValue = BitConverter.ToInt32(new byte[] { message[10] ,message[11], message[12], message[13] }, 0);
+                    ForwardPower = DataValue;                   
+                   break;
+                case 0xFE://TelegramError
+                    LOG.Write(eEvent.ERR_RF, Module, "Telegram structure is not correct");
+                    break;
+                default:
+                    // 默认代码块
+                    break;
+            }
+        }
 
 
         private void SerialPortErrorOccurred(string obj)
@@ -58,7 +112,8 @@ namespace Venus_RT.Devices
         }
         public override void SetPower(float val)
         {
-            var power = !_scEnableCalibration.BoolValue ? val : CalibrationData(val, true);
+            //var power = !_scEnableCalibration.BoolValue ? val : CalibrationData(val, true);
+            ForwardPower=val;
             List<byte> baseBytes = new List<byte>() { 0xAA, 0x02, 0x0B, 0x00, 0x02, 0x06, 0x00, 0x01, 0x00, 0x04 };
             byte[] valueBytes = BitConverter.GetBytes((int)val);
             baseBytes.AddRange(valueBytes);

+ 19 - 6
Venus/Venus_RT/Modules/SETMCycle.cs

@@ -531,7 +531,7 @@ namespace Venus_RT.Modules
         {
             foreach (SchedulerPM pm in dictSchedulers.Values)
             {
-                if (ModuleHelper.IsPm(pm.Module) && pm.IsAvailable && pm.RunJobCleanTask(cj.PreJobClean))
+                if (ModuleHelper.IsPm(pm.Module) && JobNeedPM(cj,pm.Module) && pm.IsAvailable && pm.RunJobCleanTask(cj.PreJobClean))
                 {
                    cj.IsPreJobCleanStart = true;
                 }
@@ -570,7 +570,7 @@ namespace Venus_RT.Modules
                 ++CycleIndex;
                 if (CycleIndex >= CycleNum)
                 {
-                    _lstControlJobs.Find(lcj => lcj.State == EnumControlJobState.Executing).SetState(EnumControlJobState.Completed);
+                    //_lstControlJobs.Find(lcj => lcj.State == EnumControlJobState.Executing).SetState(EnumControlJobState.Completed);
                     if (_lstControlJobs.Exists(lcj => lcj.State == EnumControlJobState.Executing))
                     {
                         ControlJobInfo cj = _lstControlJobs.Find(lcj => lcj.State == EnumControlJobState.Executing);
@@ -578,7 +578,7 @@ namespace Venus_RT.Modules
                         {
                             foreach (SchedulerPM pm in dictSchedulers.Values)
                             {
-                                if (ModuleHelper.IsPm(pm.Module) && pm.IsAvailable)
+                                if (JobNeedPM(cj, pm.Module) && ModuleHelper.IsPm(pm.Module) && pm.IsAvailable)
                                 {
                                     pm.RunJobCleanTask(cj.PostJobClean);
                                 }
@@ -594,7 +594,11 @@ namespace Venus_RT.Modules
                             _cycleState = RState.End;
                         }
                     }
-                    
+                    if (_lstControlJobs.All(x => x.State == EnumControlJobState.Completed))
+                    {
+                        _cycleState = RState.End;
+                        return;
+                    }
                 }
                 else
                 {
@@ -606,7 +610,7 @@ namespace Venus_RT.Modules
                         {
                             foreach (SchedulerPM pm in dictSchedulers.Values)
                             {
-                                if (ModuleHelper.IsPm(pm.Module) && pm.IsAvailable)
+                                if (ModuleHelper.IsPm(pm.Module) && JobNeedPM(cj, pm.Module) && pm.IsAvailable)
                                 {
                                     pm.RunJobCleanTask(cj.PostJobClean);
                                 }
@@ -682,6 +686,15 @@ namespace Venus_RT.Modules
 
         }
 
+        private bool JobNeedPM(ControlJobInfo cj, ModuleName pm)
+        {
+            ProcessJobInfo pj = _lstProcessJobs.Find(x => x.LotName == cj.Name);
+            if (ModuleHelper.IsPm(pm))
+                return !string.IsNullOrEmpty(pj.Sequence.Steps[2].StepParameter[pm.ToString()+"Recipe"].ToString());
+            else
+                return false;
+        }
+
         //movingStatus is all Idle or no use
         private bool ALLStatusIsOver()
         {
@@ -1235,7 +1248,7 @@ namespace Venus_RT.Modules
         {
             foreach (var module in tmCycleRoutine)
             {
-                if (ModuleHelper.IsPm(module) && ModuleHelper.IsInstalled(module))
+                if (ModuleHelper.IsPm(module) && ModuleHelper.IsInstalled(module) && dictSchedulers.Keys.Contains(module))
                 {
                     if (!IsModuleAvailable(module))
                         return false;

+ 10 - 11
Venus/Venus_Simulator/Config/_ioDefineVenusDE.xml

@@ -199,10 +199,10 @@
     <DO_ITEM Index="78" Name="" />
     <DO_ITEM Index="79" Name="" />
     <DO_ITEM Index="80" Name="DO_Magnets_Contact_ON" Device="" Addr="w5.00"/>
-    <DO_ITEM Index="81" Name="DO_Magnets_1A_coil_OFF" Device="" Addr="w5.01"/>
-    <DO_ITEM Index="82" Name="DO_Magnets_1B_coil_OFF" Device="" Addr="w5.02" />
-    <DO_ITEM Index="83" Name="DO_Magnets_2A_coil_OFF" Device="" Addr="w5.03" />
-    <DO_ITEM Index="84" Name="DO_Magnets_2B_coil_OFF" Device="" Addr="w5.04" />
+    <DO_ITEM Index="81" Name="DO_Magnets_1A_coil_ON" Device="" Addr="w5.01"/>
+    <DO_ITEM Index="82" Name="DO_Magnets_1B_coil_ON" Device="" Addr="w5.02" />
+    <DO_ITEM Index="83" Name="DO_Magnets_2A_coil_ON" Device="" Addr="w5.03" />
+    <DO_ITEM Index="84" Name="DO_Magnets_2B_coil_ON" Device="" Addr="w5.04" />
     <DO_ITEM Index="85" Name="" />
     <DO_ITEM Index="86" Name="" />
     <DO_ITEM Index="87" Name="" />
@@ -268,16 +268,15 @@
     <AO_ITEM Index="33" Name="" />
     <AO_ITEM Index="34" Name="" />
     <AO_ITEM Index="35" Name="AO_Magnet_cycle_time" BufferOffset="70" Device="" Addr="d1070" Note="MFC"/>
-    <AO_ITEM Index="36" Name="AO_Magnet_voltage_amplitude" BufferOffset="72" Device="" Addr="d1072" Note="MFC" />
+    <AO_ITEM Index="36" Name="AO_Magnet_Intensity" BufferOffset="72" Device="" Addr="d1072" Note="MFC" />
     <AO_ITEM Index="37" Name="AO_Magnet_sine_wave_square_switch" BufferOffset="74" Device="" Addr="d1074" Note="MFC" />
     <AO_ITEM Index="38" Name="" />
-    <AO_ITEM Index="39" Name="" />
+    <AO_ITEM Index="39" Name="AO_Magnet_Field_Ratio" BufferOffset="78" Device="" Addr="d1078" Note="MFC"/>
     <AO_ITEM Index="40" Name="AO_Magnet_Driver_Current_Limit_Setpoint" BufferOffset="80" Device="" Addr="d1080" Note="MFC"/>
-    <AO_ITEM Index="41" Name="" />
-    <AO_ITEM Index="42" Name="" />
-    <AO_ITEM Index="43" Name="" />
-    <AO_ITEM Index="44" Name="" />
-    <AO_ITEM Index="45" Name="" />
+    <AO_ITEM Index="41" Name="AO_Magnet_1A_output_full_scale" BufferOffset="82" Device="" Addr="d1082" Note="MFC"/>
+    <AO_ITEM Index="42" Name="AO_Magnet_1B_output_full_scale" BufferOffset="84" Device="" Addr="d1084" Note="MFC"/>
+    <AO_ITEM Index="43" Name="AO_Magnet_2A_output_full_scale" BufferOffset="86" Device="" Addr="d1086" Note="MFC"/>
+    <AO_ITEM Index="44" Name="AO_Magnet_2B_output_full_scale" BufferOffset="88" Device="" Addr="d1088" Note="MFC"/>
     <AO_ITEM Index="46" Name="" />
     <AO_ITEM Index="47" Name="" />
     <AO_ITEM Index="48" Name="" />