diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
5 files changed, 25 insertions, 5 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml index 81ddfd184..122ef091c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml @@ -85,8 +85,14 @@ <RotateTransform x:Name="propRotate" Angle="0" /> </Image.RenderTransform> </Image>--> + </Grid> </Border> + + <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -40 -80"> + <TextBlock Text="{Binding Speed,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" FontSize="12" VerticalAlignment="Center" Foreground="Black" Margin="0 -10 0 0"></TextBlock> + <visuals:Knob Width="50" Height="50" TicksHighlightBrush="Black" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" /> + </StackPanel> </Grid> <Grid> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml index 7c575d7af..6210178c5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml @@ -5,9 +5,10 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems" - xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" - xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors" + xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors" xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors" mc:Ignorable="d" d:DesignHeight="164.393" d:DesignWidth="224.65" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:MotorItem, IsDesignTimeCreatable=False}"> @@ -65,7 +66,7 @@ </Border.Background> <Grid> - <Path RenderTransformOrigin="0.5,0.5" StrokeThickness="1" Stroke="#202020" Stretch="Uniform" Margin="15" Data="M500.633 211.454l-58.729-14.443c-3.53-11.133-8.071-21.929-13.55-32.256c8.818-14.678 27.349-45.571 27.349-45.571 c3.545-5.903 2.607-13.462-2.256-18.325l-42.422-42.422c-4.863-4.878-12.407-5.815-18.325-2.256L347.055 83.53 c-10.269-5.435-21.006-9.932-32.065-13.433l-14.443-58.729C298.876 4.688 292.885 0 286 0h-60 c-6.885 0-12.891 4.688-14.546 11.367c0 0-10.005 40.99-14.429 58.715c-11.792 3.735-23.188 8.584-34.043 14.502l-47.329-28.403 c-5.918-3.516-13.447-2.607-18.325 2.256l-42.422 42.422c-4.863 4.863-5.801 12.422-2.256 18.325l29.268 48.882 c-4.717 9.302-8.672 18.984-11.821 28.901l-58.729 14.487C4.688 213.124 0 219.115 0 226v60c0 6.885 4.688 12.891 11.367 14.546 l58.744 14.443c3.56 11.294 8.188 22.266 13.799 32.798l-26.191 43.652c-3.545 5.903-2.607 13.462 2.256 18.325l42.422 42.422 c4.849 4.849 12.407 5.771 18.325 2.256c0 0 29.37-17.607 43.755-26.221c10.415 5.552 21.313 10.137 32.549 13.696l14.429 58.715 C213.109 507.313 219.115 512 226 512h60c6.885 0 12.876-4.688 14.546-11.367l14.429-58.715 c11.558-3.662 22.69-8.394 33.281-14.136c14.78 8.862 44.443 26.66 44.443 26.66c5.903 3.53 13.462 2.622 18.325-2.256 l42.422-42.422c4.863-4.863 5.801-12.422 2.256-18.325l-26.968-44.927c5.317-10.093 9.727-20.654 13.169-31.523l58.729-14.443 C507.313 298.876 512 292.885 512 286v-60C512 219.115 507.313 213.124 500.633 211.454z M256 361c-57.891 0-105-47.109-105-105 s47.109-105 105-105s105 47.109 105 105S313.891 361 256 361z"> + <Path RenderTransformOrigin="0.5,0.5" StrokeThickness="1" Stroke="#202020" Stretch="Uniform" Margin="10" Data="M500.633 211.454l-58.729-14.443c-3.53-11.133-8.071-21.929-13.55-32.256c8.818-14.678 27.349-45.571 27.349-45.571 c3.545-5.903 2.607-13.462-2.256-18.325l-42.422-42.422c-4.863-4.878-12.407-5.815-18.325-2.256L347.055 83.53 c-10.269-5.435-21.006-9.932-32.065-13.433l-14.443-58.729C298.876 4.688 292.885 0 286 0h-60 c-6.885 0-12.891 4.688-14.546 11.367c0 0-10.005 40.99-14.429 58.715c-11.792 3.735-23.188 8.584-34.043 14.502l-47.329-28.403 c-5.918-3.516-13.447-2.607-18.325 2.256l-42.422 42.422c-4.863 4.863-5.801 12.422-2.256 18.325l29.268 48.882 c-4.717 9.302-8.672 18.984-11.821 28.901l-58.729 14.487C4.688 213.124 0 219.115 0 226v60c0 6.885 4.688 12.891 11.367 14.546 l58.744 14.443c3.56 11.294 8.188 22.266 13.799 32.798l-26.191 43.652c-3.545 5.903-2.607 13.462 2.256 18.325l42.422 42.422 c4.849 4.849 12.407 5.771 18.325 2.256c0 0 29.37-17.607 43.755-26.221c10.415 5.552 21.313 10.137 32.549 13.696l14.429 58.715 C213.109 507.313 219.115 512 226 512h60c6.885 0 12.876-4.688 14.546-11.367l14.429-58.715 c11.558-3.662 22.69-8.394 33.281-14.136c14.78 8.862 44.443 26.66 44.443 26.66c5.903 3.53 13.462 2.622 18.325-2.256 l42.422-42.422c4.863-4.863 5.801-12.422 2.256-18.325l-26.968-44.927c5.317-10.093 9.727-20.654 13.169-31.523l58.729-14.443 C507.313 298.876 512 292.885 512 286v-60C512 219.115 507.313 213.124 500.633 211.454z M256 361c-57.891 0-105-47.109-105-105 s47.109-105 105-105s105 47.109 105 105S313.891 361 256 361z"> <Path.Fill> <LinearGradientBrush> <GradientStop Color="Black"/> @@ -76,6 +77,11 @@ <RotateTransform x:Name="propRotate" Angle="0" /> </Path.RenderTransform> </Path> + + <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -40 -80"> + <TextBlock Text="{Binding Speed,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" FontSize="12" VerticalAlignment="Center" Foreground="Black" Margin="0 -10 0 0"></TextBlock> + <visuals:Knob Width="50" Height="50" TicksHighlightBrush="Black" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" /> + </StackPanel> </Grid> </Border> </Grid> @@ -226,7 +232,6 @@ </Grid> </Grid> - </Grid> <!--Content--> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs index 5acb2e7e5..f058036d0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs @@ -167,6 +167,7 @@ namespace Tango.MachineStudio.Technician.TechItems { Name = "Dispenser"; Description = "Dispenser Controller"; + Speed = 500; Image = ResourceHelper.GetImageFromResources("Images/dispenser-big.png"); Color = Colors.White; DispenserType = new DispenserType(); @@ -190,6 +191,7 @@ namespace Tango.MachineStudio.Technician.TechItems DispenserItem cloned = base.Clone() as DispenserItem; cloned.TechDispenser = TechDispenser; cloned.DisplayName = DisplayName; + cloned.Speed = Speed; return cloned; } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs index 2df926093..779919039 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs @@ -158,6 +158,7 @@ namespace Tango.MachineStudio.Technician.TechItems { Name = "Motor"; Description = "Motor Controller"; + Speed = 500; Image = ResourceHelper.GetImageFromResources("Images/engine.png"); Color = Colors.White; HardwareMotor = new HardwareMotor(); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index f79ebb29b..333e43187 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -903,6 +903,7 @@ namespace Tango.MachineStudio.Technician.ViewModels await MachineOperator.StartMotorJogging(new MotorJoggingRequest() { MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code, + Speed = item.Speed, Direction = MotorDirection.Forward, }); } @@ -918,6 +919,7 @@ namespace Tango.MachineStudio.Technician.ViewModels await MachineOperator.StartMotorJogging(new MotorJoggingRequest() { MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code, + Speed = item.Speed, Direction = MotorDirection.Backward, }); } @@ -937,6 +939,7 @@ namespace Tango.MachineStudio.Technician.ViewModels MachineOperator.StartMotorHoming(new MotorHomingRequest() { MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code, + Speed = item.Speed, }) .Subscribe((response) => { @@ -988,6 +991,7 @@ namespace Tango.MachineStudio.Technician.ViewModels { Index = item.TechDispenser.Code, Direction = MotorDirection.Forward, + Speed = item.Speed, }); } else if (action == MotorActionType.ForwardReleased) @@ -1003,6 +1007,7 @@ namespace Tango.MachineStudio.Technician.ViewModels { Index = item.TechDispenser.Code, Direction = MotorDirection.Backward, + Speed = item.Speed, }); } else if (action == MotorActionType.BackwardReleased) @@ -1020,7 +1025,8 @@ namespace Tango.MachineStudio.Technician.ViewModels MachineOperator.StartDispenserHoming(new DispenserHomingRequest() { - Index = item.TechDispenser.Code + Index = item.TechDispenser.Code, + Speed = item.Speed, }) .Subscribe((response) => { |
