Browse Source

add IsHome =>false when error happened in driver of HongHu Robot && Change storage unit from GB to MB in ResourceMonitor

zhouhr 1 year ago
parent
commit
57607fb800

+ 12 - 20
Venus/Venus_MainPages/Views/OverVenusSEView.xaml

@@ -94,7 +94,7 @@
         <!--</Border>-->
         <Canvas Canvas.Top="40" >
 
-            <ctrls:Pipe2    Canvas.Left="487"  Canvas.Top="674" HorizontalAlignment="Left" VerticalAlignment="Center" RotateTransformValue="90"  Panel.ZIndex="9"/>
+            <!--<ctrls:Pipe2    Canvas.Left="487"  Canvas.Top="674" HorizontalAlignment="Left" VerticalAlignment="Center" RotateTransformValue="90"  Panel.ZIndex="9"/>-->
             <!--N2-->
             <ctrls:FlowPipe Name="N2Pipe2"  Height="8"  Width="230" Canvas.Left="255" Canvas.Top="120">
                 <ctrls:FlowPipe.IsFlowing>
@@ -533,7 +533,7 @@
             <customControls:CommonValveControl Status="{Binding MFC12ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="436" Canvas.Top="673" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="Mfc12" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
             <ctrls:FlowPipe   Height="8"  Width="22" Canvas.Left="178"  Canvas.Top="685" RotateTransformValue="90" IsFlowing="{Binding PVC2ValveIsOpen}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
             <ctrls:Pipe2     Canvas.Left="183"  Canvas.Top="717" HorizontalAlignment="Center" VerticalAlignment="Top" RotateTransformValue="-180" />
-            <ctrls:FlowPipe   Height="8"  Width="46" Canvas.Left="257"  Canvas.Top="664" RotateTransformValue="90" IsReverse="True" HorizontalAlignment="Center" VerticalAlignment="Top">
+            <ctrls:FlowPipe   Height="8"  Width="48" Canvas.Left="257"  Canvas.Top="664" RotateTransformValue="90" IsReverse="True" HorizontalAlignment="Center" VerticalAlignment="Top">
                 <ctrls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
                         <Binding Path="PVC2ValveIsOpen"/>
@@ -541,7 +541,7 @@
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
 
-            <ctrls:FlowPipe   Height="8"  Width="46" Canvas.Left="257"  Canvas.Top="711" RotateTransformValue="90" IsReverse="True" HorizontalAlignment="Left" VerticalAlignment="Top">
+            <ctrls:FlowPipe   Height="8"  Width="40" Canvas.Left="487"  Canvas.Top="672" RotateTransformValue="90" IsReverse="True" HorizontalAlignment="Center" VerticalAlignment="Top">
                 <ctrls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
                         <Binding Path="PVC2ValveIsOpen"/>
@@ -549,21 +549,13 @@
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
 
-            <ctrls:FlowPipe   Height="8"  Width="90" Canvas.Left="487"  Canvas.Top="672" RotateTransformValue="90" IsReverse="True" HorizontalAlignment="Center" VerticalAlignment="Top">
-                <ctrls:FlowPipe.IsFlowing>
-                    <MultiBinding Converter="{StaticResource toBoolMultiValueConverter2}">
-                        <Binding Path="PVC2ValveIsOpen"/>
-                    </MultiBinding>
-                </ctrls:FlowPipe.IsFlowing>
-            </ctrls:FlowPipe>
-
-            <ctrls:FlowPipe   Height="7"  Width="291"  Canvas.Left="249"  Canvas.Top="756" IsFlowing="{Binding PVC2ValveIsOpen}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+            <ctrls:FlowPipe  Panel.ZIndex="20" Height="8"  Width="290"  Canvas.Left="248"  Canvas.Top="709" IsFlowing="{Binding PVC2ValveIsOpen}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
             <customControls:CommonValveControl Status="{Binding PVC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="200" Canvas.Top="703" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="PVC2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
 
 
-            <TextBlock  Canvas.Left="552"  Canvas.Top="751" HorizontalAlignment="Left" VerticalAlignment="Top">To Pump</TextBlock>
-            <TextBlock  Canvas.Left="337"  Canvas.Top="735" HorizontalAlignment="Left" VerticalAlignment="Top">Main Purge</TextBlock>
-            <TextBlock  Canvas.Left="494"  Canvas.Top="735" HorizontalAlignment="Center" VerticalAlignment="Top">second Purge</TextBlock>
+            <TextBlock  FontSize="15"  Canvas.Left="550"  Canvas.Top="705" HorizontalAlignment="Left" VerticalAlignment="Top">To Pump</TextBlock>
+            <TextBlock  Canvas.Left="335"  Canvas.Top="724" HorizontalAlignment="Left" VerticalAlignment="Top">Main Purge</TextBlock>
+            <TextBlock  Canvas.Left="487"  Canvas.Top="724" HorizontalAlignment="Left" VerticalAlignment="Top">second Purge</TextBlock>
 
 
             <ctrls:FlowPipe   Height="8"  Width="41" Canvas.Left="487"  Canvas.Top="640" RotateTransformValue="90" IsReverse="True" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="5">
@@ -573,7 +565,7 @@
                     </MultiBinding>
                 </ctrls:FlowPipe.IsFlowing>
             </ctrls:FlowPipe>
-            <ctrls:Pipe2    Canvas.Left="257"  Canvas.Top="704" HorizontalAlignment="Center" VerticalAlignment="Top" RotateTransformValue="90" Panel.ZIndex="5" />
+            <!--<ctrls:Pipe2    Canvas.Left="257"  Canvas.Top="704" HorizontalAlignment="Center" VerticalAlignment="Top" RotateTransformValue="90" Panel.ZIndex="5" />-->
 
             <!--<TextBlock Text="Pressure Alarm" Canvas.Left="68" Canvas.Top="94"/>-->
             <Ellipse Width="20" Height="20"  Canvas.Left="90" Canvas.Top="114" Fill="{Binding MFCN2Data.IsWarning,Converter={StaticResource boolToColor4}}"   Stroke="Silver" StrokeThickness="2" ToolTip="Pressure Alarm"></Ellipse>
@@ -729,8 +721,8 @@
 
             <TextBlock Text="VC2" Canvas.Left="200" Canvas.Top="688" HorizontalAlignment="Left" VerticalAlignment="Center"/>
 
-            <customControls:CommonValveControl Status="{Binding PVC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="360" Canvas.Top="750" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="PVC2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-            <customControls:CommonValveControl Status="{Binding PVC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="507" Canvas.Top="750" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="PVC2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+            <customControls:CommonValveControl Panel.ZIndex="22" Status="{Binding PVC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="358" Canvas.Top="704" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="PVC2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+            <customControls:CommonValveControl Panel.ZIndex="22" Status="{Binding PVC2ValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20" Canvas.Left="506" Canvas.Top="704" IsCanEdit="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" Tag="PVC2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
 
 
 
@@ -773,8 +765,8 @@
 
 
 
-            <Ellipse Width="20" Height="20" Fill="{Binding GasIsFlowing,Converter={StaticResource boolToColor}}"  Canvas.Left="319" Canvas.Top="713" Stroke="Silver" StrokeThickness="2" HorizontalAlignment="Left" VerticalAlignment="Top"/>
-            <Button Width="100" Content="Gas ON/OFF" Canvas.Left="349" Canvas.Top="713" Style="{StaticResource SysBtnStyle}"  Command="{Binding GasCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+            <Ellipse Width="20" Height="20" Fill="{Binding GasIsFlowing,Converter={StaticResource boolToColor}}"  Canvas.Left="300" Canvas.Top="791" Stroke="Silver" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Top"/>
+            <Button Width="100" Content="Gas ON/OFF" Canvas.Left="330" Canvas.Top="791" Style="{StaticResource SysBtnStyle}"  Command="{Binding GasCommand}" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
             <TextBlock FontSize="12" Text="Vent N2" Canvas.Left="35" Canvas.Top="117" Foreground="Black"  Block.TextAlignment="Right"  Panel.ZIndex="4"/>
             <TextBlock FontSize="12" Canvas.Left="-5" Canvas.Top="158" Block.TextAlignment="Right" Width="85" TextAlignment="Right" Panel.ZIndex="4">
                 <TextBlock.Text>

+ 1 - 0
Venus/Venus_RT/Devices/JetVenusSEPM.cs

@@ -986,6 +986,7 @@ namespace Venus_RT.Devices
         public override bool SetSlitDoor(bool open, out string reason)
         {
             reason = string.Empty;
+            // 泓浒TM将提供开关门的interlock
             OP.DoOperation($"{ModuleName.SETM}.SetSlitDoor",Module,open);
             return true;
         }

+ 3 - 1
Venus/Venus_RT/Devices/TM/HongHuVR.cs

@@ -339,7 +339,7 @@ namespace Venus_RT.Devices.VCE
 
                             _currentStep = VRStep.Idle;
                             _status = RState.End;
-                            _IsHomed = true;
+                            //_IsHomed = true;
                         }
                     }
                     break;
@@ -374,6 +374,8 @@ namespace Venus_RT.Devices.VCE
             {
                 LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.TMRobot, $"Dictionary Not Contains error code:{errorcode}");
             }
+
+            _IsHomed = false;
         }
 
         private void OnErrorHappen(ErrorEventArgs args)

+ 3 - 3
Venus/Venus_RT/Modules/ResourceMonitor.cs

@@ -241,9 +241,9 @@ namespace Venus_RT.Modules
                 if (drive.IsReady)
                 {
                     drive_use += $"{drive.Name}";
-                    drive_use += $" Total:{drive.TotalSize / 1024 / 1024 / 1024}GB";
-                    drive_use += $" Used:{(drive.TotalSize - drive.AvailableFreeSpace) / 1024 / 1024 / 1024}GB";
-                    drive_use += $" Free:{drive.AvailableFreeSpace / 1024 / 1024 / 1024}GB\t";
+                    drive_use += $" Total:{drive.TotalSize / 1024 / 1024 }MB";
+                    drive_use += $" Used:{(drive.TotalSize - drive.AvailableFreeSpace) / 1024 / 1024 }MB";
+                    drive_use += $" Free:{drive.AvailableFreeSpace / 1024 / 1024 }MB\t";
                 }
             }
             return drive_use;