Sfoglia il codice sorgente

1.SETM Pressure Control update
2.SETM UI Update

hecl 1 anno fa
parent
commit
d331213da1

+ 11 - 1
Venus/Venus_MainPages/ViewModels/SETMOperationViewModel.cs

@@ -180,6 +180,10 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand TmHome =>
             _tmhome ?? (_tmhome = new DelegateCommand(tmhome));
 
+        private DelegateCommand _abort;
+        public DelegateCommand Abort =>
+            _abort ?? (_abort = new DelegateCommand(abort));
+
 
         private DelegateCommand _VCEHome;
         public DelegateCommand VCEHome => _VCEHome ?? (_VCEHome = new DelegateCommand(vceHome));
@@ -216,7 +220,9 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"SETM.TMPressure.Value");
             m_RtDataKeys.Add($"SETM.VCEPressure.Value");
             m_RtDataKeys.Add($"VCE1.VCEOutDoorClosed");
-
+            m_RtDataKeys.Add($"SETM.TM_MFC1.FeedBack");
+            m_RtDataKeys.Add($"SETM.TM_MFC1.SetPoint");
+           
         }
         private void timer_Tick(object sender, EventArgs e)
         {
@@ -256,6 +262,10 @@ namespace Venus_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation("SETM.Home");
         }
+        private void abort()
+        {
+            InvokeClient.Instance.Service.DoOperation("SETM.Abort");
+        }
         private void OnVent(object obj)
         {
             switch (obj.ToString())

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

@@ -877,8 +877,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="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="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" />

+ 5 - 3
Venus/Venus_MainPages/Views/SETMOperationView.xaml

@@ -157,8 +157,9 @@
 
                     <!-- TM vent -->
                     <!-- Soft vent -->
-                    <userControls:TextboxWithLabel  Canvas.Top="-106" Canvas.Left="324" TextBoxValue="{Binding HeGasSetpoint,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"    LabelValue="MFC"  TextBoxColor="White" IsReadOnly="False" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="3"/>
-                    <customControls:CommonValveControl Canvas.Left="405" Canvas.Top="-86" Status="{Binding TMSoftVentIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Tag="TMSoftVent" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}" Panel.ZIndex="3"/>
+                    <userControls:TextboxWithLabel  Canvas.Top="-106" Canvas.Left="320" TextBoxValue="{Binding  RtDataValues[SETM.TM_MFC1.SetPoint],StringFormat='F1'}"    LabelValue="MFC"  TextBoxColor="White" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="3" Width="74"/>
+                    <userControls:TextboxWithLabel  Canvas.Top="-89" Canvas.Left="320" LabelValue="" TextBoxValue="{Binding RtDataValues[SETM.TM_MFC1.FeedBack],StringFormat='F1'}" TextBoxColor="#D7E4BD" Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Center" Width="74" Height="45" />
+                    <customControls:CommonValveControl Canvas.Left="412" Canvas.Top="-87" Status="{Binding TMSoftVentIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Tag="TMSoftVent" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}" Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     <userControls:FlowPipe   Height="8"  Width="120" Canvas.Left="315" Canvas.Top="-81" IsFlowing="{Binding TMSoftVentIsOpen}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                     <userControls:FlowPipe   Height="8"  Width="30" Canvas.Left="315" Canvas.Top="-110" IsFlowing="{Binding TMSoftVentIsOpen}" RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top"></userControls:FlowPipe>
                     <userControls:FlowPipe   Height="8"  Width="30" Canvas.Left="445" Canvas.Top="-110" IsFlowing="{Binding TMSoftVentIsOpen}" RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top"></userControls:FlowPipe>
@@ -346,7 +347,7 @@
                     <!-- 文字 -->
                     <TextBlock  FontSize="15" Canvas.Top="70" Canvas.Left="162" Text="V1"/>
                     <TextBlock  FontSize="15" Canvas.Top="-174" Canvas.Left="317" Text="TM Fast vent V5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-                    <TextBlock  FontSize="15" Canvas.Top="-51" Canvas.Left="356" Text="TM Soft vent V4" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                    <TextBlock  FontSize="15" Canvas.Top="-62" Canvas.Left="394" HorizontalAlignment="Left" VerticalAlignment="Top" Height="43" Width="60"><Run Text="TM Soft "/><LineBreak/><Run Text="vent V4"/></TextBlock>
                     <TextBlock  FontSize="15" Canvas.Top="173" Canvas.Left="316" Text="VCE Fast vent V5" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                     <TextBlock  FontSize="15" Canvas.Top="285" Canvas.Left="315" Text="VCE Soft vent V4" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                     <TextBlock  FontSize="15" Canvas.Top="173" Canvas.Left="846" Text="VCE Soft Pump V3" HorizontalAlignment="Left" VerticalAlignment="Center"/>
@@ -404,6 +405,7 @@
                                     <Button  Grid.Row="0" Margin="2">Online</Button>
                                     <Button  Grid.Row="1" Margin="2">Offline</Button>
                                     <Button  Grid.Row="2" Margin="2"  Command="{Binding TmHome}">Home</Button>
+                                    <Button  Grid.Row="3" Margin="2"  Command="{Binding Abort}">Abort</Button>
                                 </Grid>
                             </Grid>
                         </Border>

+ 5 - 1
Venus/Venus_RT/Config/System.sccfg

@@ -348,7 +348,11 @@
 			<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="PressureControl" nameView="PressureControl" >
+      <config default="true" name="ControlWriteMode" nameView="ControlWriteMode" description="Control Write Mode:True is Flow,False is Pressure" tag="" unit="" type="Bool" />
+      <config default="1" name="TargetMFC" nameView="TargetMFC" description="Target MFC" max="10" min="0" tag="" unit="sccm" type="Double" />
+      <config default="760000" name="TargetPressure" nameView="TargetPressure" description="Target Pressure" max="760000" min="0" tag="" unit="mTorr" type="Double" />
+    </configs>
 	</configs>
 
 	<!--VCE-->

BIN
Venus/Venus_RT/Config/TM/DeviceModelVenusSE_MF.xml


+ 143 - 0
Venus/Venus_RT/Devices/IODevices/IoHongHuControl.cs

@@ -0,0 +1,143 @@
+using Aitex.Core.Common.DeviceData;
+using Aitex.Core.RT.Device;
+using Aitex.Core.RT.IOCore;
+using Aitex.Core.RT.SCCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml;
+
+namespace Venus_RT.Devices.IODevices
+{
+    
+    public class IoHongHuControl : BaseDevice, IDevice
+    {
+        private bool _lastValue;
+        //WriteMode分为两种模式 一种是Flow模式 一种是控压模式
+        private SCConfigItem _scWriteMode;
+        private SCConfigItem _scTargetMFC;
+        private SCConfigItem _scTargetPressure;
+        private readonly DOAccessor _FlowMode;
+        private readonly DOAccessor _PressureMode;
+        private readonly AOAccessor _MFCSetPoint;
+        private readonly AOAccessor _PressureSetPoint;
+
+
+        public IoHongHuControl(string module, XmlElement node, string ioModule = "")
+        {
+            base.Module = module;
+            base.Name = node.GetAttribute("id");
+            base.Display = node.GetAttribute("display");
+            base.DeviceID = node.GetAttribute("schematicId");
+
+            _scWriteMode        = SC.GetConfigItem($"{Module}.{Name}.ControlWriteMode");
+            _scTargetMFC        = SC.GetConfigItem($"{Module}.{Name}.TargetMFC");
+            _scTargetPressure   = SC.GetConfigItem($"{Module}.{Name}.TargetPressure");
+
+
+            _FlowMode           = ParseDoNode("doMFCFlow", node, ioModule);
+            _PressureMode       = ParseDoNode("doPressureMode", node, ioModule);
+            _MFCSetPoint        = ParseAoNode("aoMFCFlow", node, ioModule);
+            _PressureSetPoint   = ParseAoNode("aoPressure", node, ioModule);
+
+        }
+
+        //
+        public bool Initialize()
+        {
+
+            return true;
+        }
+
+        public void Monitor()
+        {
+            //如果是true MFC模式
+            if (_scWriteMode.BoolValue)
+            {
+                if(_FlowMode != null && _FlowMode.Value !=true)
+                    _FlowMode.SetValue(true,out string _);
+                if (_PressureMode != null && _PressureMode.Value != false)
+                    _PressureMode.SetValue(false,out  _);
+                if (_MFCSetPoint != null)
+                {
+
+                    byte[] flow;
+                    flow = BitConverter.GetBytes(float.Parse(_scTargetMFC.Value.ToString()));
+                    _MFCSetPoint.Buffer[_MFCSetPoint.Index] = BitConverter.ToInt16(flow, 0);
+                    _MFCSetPoint.Buffer[_MFCSetPoint.Index + 1] = BitConverter.ToInt16(flow, 2);
+                }
+
+                //if (_lastValue != _scWriteMode.BoolValue)
+                //{
+                //    if (_ventvalve != null && _ventvalve.Value != false)
+                //        _ventvalve.SetValue(false, out _);
+                //    if (_pumpvalve != null && _pumpvalve.Value != false)
+                //        _pumpvalve.SetValue(false, out _);
+                //}
+            }
+            else
+            {
+                if (_FlowMode != null && _FlowMode.Value != false)
+                    _FlowMode.SetValue(false, out string _);
+                if (_PressureMode != null && _PressureMode.Value != true)
+                    _PressureMode.SetValue(true, out string _);
+                if (_PressureSetPoint != null )
+                {
+                    byte[] pressure;
+                    pressure = BitConverter.GetBytes(float.Parse(_scTargetPressure.Value.ToString()));
+                    _PressureSetPoint.Buffer[_PressureSetPoint.Index] = BitConverter.ToInt16(pressure, 0);
+                    _PressureSetPoint.Buffer[_PressureSetPoint.Index + 1] = BitConverter.ToInt16(pressure, 2);
+                }
+                //if (_lastValue != _scWriteMode.BoolValue)
+                //{
+                //    if (_ventvalve != null && _ventvalve.Value != true)
+                //        _ventvalve.SetValue(true, out _);
+                //    if (_pumpvalve != null && _pumpvalve.Value != true)
+                //        _pumpvalve.SetValue(true, out _);
+                //}
+            }
+            _lastValue = _scWriteMode.BoolValue;
+        }
+
+        public void Reset()
+        {
+            if (_FlowMode != null && _FlowMode.Value != true)
+                _FlowMode.SetValue(true, out string _);
+            if (_PressureMode != null && _PressureMode.Value != false)
+                _PressureMode.SetValue(false, out _);
+            if (_MFCSetPoint != null)
+            {
+                byte[] flow;
+                flow = BitConverter.GetBytes(float.Parse("0"));
+                _MFCSetPoint.Buffer[_MFCSetPoint.Index] = BitConverter.ToInt16(flow, 0);
+                _MFCSetPoint.Buffer[_MFCSetPoint.Index + 1] = BitConverter.ToInt16(flow, 2);
+            }
+            //if (_ventvalve != null && _ventvalve.Value != false)
+            //    _ventvalve.SetValue(false, out _);
+            //if (_pumpvalve != null && _pumpvalve.Value != false)
+            //    _pumpvalve.SetValue(false, out _);
+        }
+
+        public void Terminate()
+        {
+            if (_FlowMode != null && _FlowMode.Value != true)
+                _FlowMode.SetValue(true, out string _);
+            if (_PressureMode != null && _PressureMode.Value != false)
+                _PressureMode.SetValue(false, out _);
+            if (_MFCSetPoint != null)
+            {
+                byte[] flow;
+                flow = BitConverter.GetBytes(float.Parse("0"));
+                _MFCSetPoint.Buffer[_MFCSetPoint.Index] = BitConverter.ToInt16(flow, 0);
+                _MFCSetPoint.Buffer[_MFCSetPoint.Index + 1] = BitConverter.ToInt16(flow, 2);
+            }
+            //if (_ventvalve != null && _ventvalve.Value != false)
+            //    _ventvalve.SetValue(false, out _);
+            //if (_pumpvalve != null && _pumpvalve.Value != false)
+            //    _pumpvalve.SetValue(false, out _);
+        }
+
+    }
+}

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

@@ -1168,11 +1168,22 @@ namespace Venus_RT.Devices
 
         public override bool StartControlPressure(int pressureSetpoint, int flowSetpoint)
         {
-            OpenValve(ValveType.PV14, true);
-            FlowGas(5, flowSetpoint);
-            TurnPendulumValve(true);
-            SetPVPressure(pressureSetpoint);
-            return true;
+            if (_HeISOValve.Status)
+            {
+                OpenValve(ValveType.PV14, true);
+                OpenValve(ValveType.GasFinal, false);
+                OpenValve(ValveType.N2, true);
+                OpenValve(ValveType.PVN22, true);
+                //FlowGas(12, flowSetpoint);
+                TurnPendulumValve(true);
+                SetPVPressure(pressureSetpoint);
+                return true;
+            }
+            else
+            {
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot control pressure,cause He ISO Valve is Close");
+                return true;
+            }
         }
 
     }

+ 5 - 0
Venus/Venus_RT/Modules/TM/VenusEntity/SETMEntity.cs

@@ -208,6 +208,7 @@ namespace Venus_RT.Modules.TM.VenusEntity
 
             OP.Subscribe("SETM.Goto", (cmd, args) => RobotGoto(args));
             OP.Subscribe("SETM.Home", (cmd, args) => { PostMsg(MSG.Home); return true; });
+            OP.Subscribe("SETM.Abort", (cmd, args) => { PostMsg(MSG.Abort); return true; });
             OP.Subscribe("SETM.Pick", (cmd, args) => { PostMsg(MSG.Pick, args); return true; });
             OP.Subscribe("SETM.Place", (cmd, args) => { PostMsg(MSG.Place, args); return true; });
             OP.Subscribe("SETM.Extend", (cmd, args) => { PostMsg(MSG.Extend, args); return true; });
@@ -583,11 +584,15 @@ namespace Venus_RT.Modules.TM.VenusEntity
 
         private bool fnOffline(object[] param)
         {
+            //IsOnline = false;
+            //return true;
             throw new NotImplementedException();
         }
 
         private bool fnOnline(object[] param)
         {
+            //IsOnline = true;
+            //return true;
             throw new NotImplementedException();
         }
 

+ 1 - 0
Venus/Venus_RT/Venus_RT.csproj

@@ -200,6 +200,7 @@
     <Compile Include="Devices\IODevices\IoHeartbeat.cs" />
     <Compile Include="Devices\IODevices\IoHeater.cs" />
     <Compile Include="Devices\IODevices\IoHighTemperatureHeater.cs" />
+    <Compile Include="Devices\IODevices\IoHongHuControl.cs" />
     <Compile Include="Devices\IODevices\IoLid.cs" />
     <Compile Include="Devices\IODevices\IoMfc.cs" />
     <Compile Include="Devices\IODevices\IoPressureControl.cs" />

+ 2 - 3
Venus/Venus_Themes/UserControls/ChamberDE.xaml

@@ -307,8 +307,8 @@
                             <MenuItem Header="Close Door"  Click="CloseDoor_Click"  IsChecked="{Binding IsSlitDoorClosed}"  IsEnabled="{Binding IsSlitDoorClosed,Converter={StaticResource BoolToBool}}"/>
                         </ContextMenu>
                     </Grid.ContextMenu>
-                    <Rectangle x:Name="SlitValve_Top"  Style="{StaticResource SlitValve_Animation}" Fill="DimGray" VerticalAlignment="Top" Height="78" Margin="1,3,1,0" Grid.RowSpan="2"   />
-                    <Rectangle x:Name="SlitValve_Bottom" Style="{StaticResource SlitValve_Animation}" Width="8" Fill="DimGray" VerticalAlignment="Center" Height="78" Margin="1,0,1,0" Grid.Row="1" />
+                    <Rectangle x:Name="SlitValve_Top"  Style="{StaticResource SlitValve_Animation}" Fill="{StaticResource doorColor}" VerticalAlignment="Top" Height="78" Margin="1,3,1,0" Grid.RowSpan="2"   />
+                    <Rectangle x:Name="SlitValve_Bottom" Style="{StaticResource SlitValve_Animation}" Width="8" Fill="{StaticResource doorColor}" VerticalAlignment="Center" Height="78" Margin="1,0,1,0" Grid.Row="1" />
                 </Grid>
 
                 <!--slit door右边-->
@@ -565,7 +565,6 @@
                 </Style>
             </Rectangle.Style>
         </Rectangle>
-        <Rectangle x:Name="SlitValve_Bottom_Copy1"  Fill="DimGray" Width="8" Height="43" Canvas.Top="198" HorizontalAlignment="Center" VerticalAlignment="Top" />