Browse Source

Revise SRD related Bugs; Modify SRD Rotation deceleration

niuyx 5 days ago
parent
commit
690b52a232

+ 2 - 2
CyberX8_MainPages/Views/SRDHomePageView.xaml

@@ -69,8 +69,8 @@
             </Grid.ColumnDefinitions>
             <Button Grid.Column="1" Style="{StaticResource SysBtnStyle}" IsEnabled="{Binding IsEnabled}" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Center"  Content="Switch On" Command="{Binding SwitchOnCommand}"/>
             <Button Grid.Column="2" Style="{StaticResource SysBtnStyle}" IsEnabled="{Binding IsEnabled}" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Center"  Content="Switch Off" Command="{Binding SwitchOffCommand}"/>
-            <Button Grid.Row="1" Grid.Column="1" Style="{StaticResource SysBtnStyle}" IsEnabled="{Binding IsEnabled}" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Center"  Content="Loader" Command="{Binding LoaderCommand}"/>
-            <Button Grid.Row="1" Grid.Column="2" Style="{StaticResource SysBtnStyle}" IsEnabled="{Binding IsEnabled}" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Center"  Content="Unloader" Command="{Binding UnloaderCommand}"/>
+            <Button Grid.Row="1" Grid.Column="1" Style="{StaticResource SysBtnStyle}" IsEnabled="{Binding IsEnabled}" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Center"  Content="Load" Command="{Binding LoaderCommand}"/>
+            <Button Grid.Row="1" Grid.Column="2" Style="{StaticResource SysBtnStyle}" IsEnabled="{Binding IsEnabled}" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Center"  Content="Unload" Command="{Binding UnloaderCommand}"/>
         </Grid>
         <Grid Grid.Row="2" Grid.Column="3" Height="155" VerticalAlignment="Top">
             <UserControls:OperatingModeControl HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" 

+ 2 - 2
CyberX8_RT/Config/Devices/GalilControllerCfg.xml

@@ -200,7 +200,7 @@
 		<GalilAxisConfig Name="SRD1.Rotation" Index="0" Type="GalilRotation" CNType="-1">
 			<Speed>529400</Speed>
 			<Acceleration>84000</Acceleration>
-			<Deceleration>500000</Deceleration>
+			<Deceleration>4000000</Deceleration>
 			<HomingSpeed>2500</HomingSpeed>
 			<HomingOffset>0</HomingOffset>
 			<HomingTimeOut>60000</HomingTimeOut>
@@ -214,7 +214,7 @@
 		<GalilAxisConfig Name="SRD2.Rotation" Index="1" Type="GalilRotation" CNType="-1">
 			<Speed>529400</Speed>
 			<Acceleration>84000</Acceleration>
-			<Deceleration>500000</Deceleration>
+			<Deceleration>4000000</Deceleration>
 			<HomingSpeed>2500</HomingSpeed>
 			<HomingOffset>0</HomingOffset>
 			<HomingTimeOut>60000</HomingTimeOut>

+ 2 - 2
CyberX8_RT/Config/Devices/WagoControllerCfg.xml

@@ -475,8 +475,8 @@
 		</Dig_Out>
 		<Ano_In>
 			<AIGroup Name="1">
-				<AI Name="r_SRD1_CHUCK_VACUUM_anlg"  Address="0" Scaling="0=3276.7,-757.5=16383.5" DataType="short"/>
-				<AI Name="r_SRD2_CHUCK_VACUUM_anlg"  Address="1" Scaling="0=3276.7,-757.5=16383.5" DataType="short"/>
+				<AI Name="r_SRD1_CHUCK_VACUUM_anlg"  Address="0" Scaling="-757.5=3276.7,757.5=16383.5" DataType="short"/>
+				<AI Name="r_SRD2_CHUCK_VACUUM_anlg"  Address="1" Scaling="-757.5=3276.7,757.5=16383.5" DataType="short"/>
 				<AI Name="AI2"  Address="2" Scaling="13=0,150=32767" DataType="short"/>
 				<AI Name="AI3"  Address="3" Scaling="13=0,150=32767" DataType="short"/>
 			</AIGroup>

+ 1 - 1
CyberX8_RT/Devices/AXIS/GalilRotation/GalilRotationStopPositionRoutine.cs

@@ -46,7 +46,7 @@ namespace CyberX8_RT.Devices.AXIS.GalilLipsel
 
         public RState Monitor()
         {
-            Runner.Run(StopPositionStep.SetStop, SetStop, CheckStop, _delay_5s)
+            Runner.Run(StopPositionStep.SetStop, SetStop, CheckStop, _delay_10s)
                 .Run(StopPositionStep.WriteTargePosition, () => { return WriteTargetPosition(); }, NullFun, 100)
                 .End(StopPositionStep.End, NullFun, 100);
             return Runner.Status;

+ 3 - 2
CyberX8_RT/Devices/SRD/SrdCommonChuckVacuumRoutine.cs

@@ -70,8 +70,9 @@ namespace CyberX8_RT.Devices.SRD
                 }
                 else
                 {
-                    LOG.WriteLog(eEvent.INFO_SRD, Module, $"Chuck Vacuum is off, VacuumValue:{_srdCommon.CommonData.VacuumValue}, VacuumOn Limit:{_vacuumOffLimit}");
-                    return _srdCommon.CommonData.VacuumValue > _vacuumOffLimit;
+                    //LOG.WriteLog(eEvent.INFO_SRD, Module, $"Chuck Vacuum is off, VacuumValue:{_srdCommon.CommonData.VacuumValue}, VacuumOn Limit:{_vacuumOffLimit}");
+                    //return _srdCommon.CommonData.VacuumValue > _vacuumOffLimit;
+                    return true;
                 }
             }
             else

+ 5 - 0
CyberX8_RT/Devices/SRD/SrdCommonDevice.cs

@@ -691,6 +691,11 @@ namespace CyberX8_RT.Devices.SRD
         /// <returns></returns>
         public bool ChuckATMOnAction(string cmd, object[] args)
         {
+            if(CommonData.LiftUp || CommonData.LiftUpStatus)
+            {
+                LOG.WriteLog(eEvent.ERR_SRD, Module, "LiftUp is on, can't chuckATM");
+                return false;
+            }
             return ChuckATM(true);
         }
         /// <summary>

+ 2 - 2
CyberX8_RT/Modules/SRD/SRDRunRecipeRoutine.cs

@@ -131,7 +131,7 @@ namespace CyberX8_RT.Modules.SRD
                 .Run(SRDRunRecipeStep.RunRecipe_ChangeDrySpeed, ChangeSpeed, _delay_1ms)
                 .Delay(SRDRunRecipeStep.RunRecipe_Drying, _srdRecipe.DryTime * 1000)
                 .Run(SRDRunRecipeStep.RunRecipe_StopRotation, StopRotation, _delay_1ms)
-                .Wait(SRDRunRecipeStep.RunRecipe_CheckRotationStopped, CheckRotationStopEndStatus, _delay_5s)
+                .Wait(SRDRunRecipeStep.RunRecipe_CheckRotationStopped, CheckRotationStopEndStatus, _delay_10s)
                 .WaitWithStopCondition(SRDRunRecipeStep.RunRecipe_CheckRotationHomed, CheckRotationHomeEndStatus, CheckRotationHomedStopStatus)
                 .End(SRDRunRecipeStep.End, NullFun, _delay_1ms);
             return Runner.Status;
@@ -499,7 +499,7 @@ namespace CyberX8_RT.Modules.SRD
         {
             if (!_rotationAxis.IsRun && _rotationAxis.Status == RState.End)
             {
-                bool homeResult = _rotationAxis.Home(false);
+                bool homeResult = _rotationAxis.Home();
                 if (!homeResult)
                 {
                     NotifyError(eEvent.ERR_SRD, $"{Module}.Rotation home action is failed", 0);