aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-05-03 16:00:01 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-03 16:00:01 +0300
commit09862076bf6569468e722dd5a8a236f7020ab7b5 (patch)
treeecb78c76c586c7dc10c87cd3c5fcea61bb8ec878 /Software/Visual_Studio
parent52ada8c6fa887d0dc418194655bea0f8e88e9805 (diff)
downloadTango-09862076bf6569468e722dd5a8a236f7020ab7b5.tar.gz
Tango-09862076bf6569468e722dd5a8a236f7020ab7b5.zip
Lots of work !!
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs46
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DispenserTemplate.xaml54
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MotorTemplate.xaml46
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs42
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs56
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml165
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs240
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs160
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs20
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs34
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechMotor.cs104
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs13
-rw-r--r--Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs48
-rw-r--r--Software/Visual_Studio/Tango.BL/ExtensionMethods/ConfigurationExtensions.cs1
-rw-r--r--Software/Visual_Studio/Tango.BL/LiquidVolume.cs6
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesContext.cs8
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs38
-rw-r--r--Software/Visual_Studio/Tango.BL/Tango.BL.csproj1
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs12
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs8
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTOR_TYPES.cs1
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs3
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs1
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx147
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram135
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_MOTORS.cs25
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj3
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs5
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs48
-rw-r--r--Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs4
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs390
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs235
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs39
-rw-r--r--Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs2
42 files changed, 1075 insertions, 1121 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
index 88007b5f4..21021c6b8 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
@@ -347,7 +347,7 @@ namespace Tango.MachineStudio.ColorLab.ViewModels
{
if (SelectedMachine != null)
{
- LiquidVolumes = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => new LiquidVolumeVM()
+ LiquidVolumes = SelectedMachine.Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex).Select(x => new LiquidVolumeVM()
{
Color = x.LiquidType.Color,
Name = x.LiquidType.Name,
@@ -364,12 +364,12 @@ namespace Tango.MachineStudio.ColorLab.ViewModels
{
if (SelectedRML != null && SelectedMachine != null)
{
- LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList();
+ LiquidTypesRmls = SelectedMachine.Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList();
//RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active);
LiquidsCalibrationData = new ObservableCollection<CalibrationDataVM>();
- foreach (var idsPack in SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex))
+ foreach (var idsPack in SelectedMachine.Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex))
{
CalibrationDataVM vm = new CalibrationDataVM();
vm.Name = idsPack.LiquidType.Name;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index b2f476eab..f557e2923 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -1223,7 +1223,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
if (SelectedRML != null && SelectedMachine != null)
{
LogManager.Log("Invalidating liquid factors, process parameters and process group history...");
- LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList();
+ LiquidTypesRmls = SelectedMachine.Configuration.NoneEmptyIdsPacks.Where(x => !x.IsEmpty).OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList();
RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active);
var selectedHistory = RmlProcessParametersTableGroup;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs
index f92c51aa4..c4f391c55 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs
@@ -151,8 +151,11 @@ namespace Tango.MachineStudio.Logging.ViewModels
Dates.Add(day);
}
- MinDate = Dates.Min();
- MaxDate = Dates.Max();
+ if (Dates.Count > 0)
+ {
+ MinDate = Dates.Min();
+ MaxDate = Dates.Max();
+ }
SelectedDate = Dates.FirstOrDefault();
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
index 421f2daa7..a1da10db9 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
@@ -479,26 +479,38 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
foreach (var pack in Configuration.IdsPacks)
{
- if (pack.Name.IsNullOrWhiteSpace())
+ if (pack.LiquidType != null || pack.CartridgeType != null || pack.DispenserType != null || pack.IdsPackFormula != null || pack.MidTankType != null)
{
- errors.Add(String.Format("Name is required on IDS pack number '{0}'.", Configuration.IdsPacks.IndexOf(pack) + 1));
- continue;
- }
- if (pack.CartridgeType == null)
- {
- errors.Add(String.Format("Cartridge type is required on IDS pack '{0}'.", pack.Name));
- }
- if (pack.DispenserType == null)
- {
- errors.Add(String.Format("Dispenser type is required on IDS pack '{0}'.", pack.Name));
- }
- if (pack.LiquidType == null)
- {
- errors.Add(String.Format("Liquid type is required on IDS pack '{0}'.", pack.Name));
+ if (pack.Name.IsNullOrWhiteSpace())
+ {
+ errors.Add(String.Format("Name is required on IDS pack number '{0}'.", Configuration.IdsPacks.IndexOf(pack) + 1));
+ continue;
+ }
+ if (pack.CartridgeType == null)
+ {
+ errors.Add(String.Format("Cartridge type is required on IDS pack '{0}'.", pack.Name));
+ }
+ if (pack.DispenserType == null)
+ {
+ errors.Add(String.Format("Dispenser type is required on IDS pack '{0}'.", pack.Name));
+ }
+ if (pack.LiquidType == null)
+ {
+ errors.Add(String.Format("Liquid type is required on IDS pack '{0}'.", pack.Name));
+ }
+ if (pack.MidTankType == null)
+ {
+ errors.Add(String.Format("Mid Tank type is required on IDS pack '{0}'.", pack.Name));
+ }
+ if (pack.IdsPackFormula == null)
+ {
+ errors.Add(String.Format("Formula type is required on IDS pack '{0}'.", pack.Name));
+ }
}
- if (pack.MidTankType == null)
+ else
{
- errors.Add(String.Format("Mid Tank type is required on IDS pack '{0}'.", pack.Name));
+ pack.IsEmpty = true;
+ pack.Name = String.Empty;
}
}
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 fb0466177..7c575d7af 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
@@ -162,7 +162,7 @@
</Border>
</Grid>
- <Grid Grid.Column="1" Grid.Row="1" Visibility="{Binding TechMotor.SupportsHoming,Converter={StaticResource BoolToVisibilityConverter}}">
+ <Grid Grid.Column="1" Grid.Row="1" Visibility="{Binding HardwareMotorType.SupportsHoming,Converter={StaticResource BoolToVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="115*"/>
@@ -232,7 +232,7 @@
<!--Content-->
<Grid>
<Border Margin="0 0 0 -23" VerticalAlignment="Bottom">
- <TextBlock Text="{Binding TechMotor.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock>
+ <TextBlock Text="{Binding HardwareMotorType.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock>
</Border>
</Grid>
<!--Content-->
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DispenserTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DispenserTemplate.xaml
index a732e2924..df9ebbd4e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DispenserTemplate.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DispenserTemplate.xaml
@@ -5,7 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
- xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
mc:Ignorable="d"
@@ -13,6 +16,7 @@
<UserControl.Resources>
<converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+ <sharedConverters:DoubleToIntConverter x:Key="DoubleToIntConverter" />
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
<Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" />
@@ -24,14 +28,54 @@
<StackPanel>
<GroupBox Header="DISPENSER">
<StackPanel>
- <TextBlock FontSize="10">Selected Motor</TextBlock>
+ <TextBlock FontSize="10">Selected Dispenser</TextBlock>
<ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechDispensers}" SelectedItem="{Binding TechDispenser,Mode=TwoWay}" DisplayMemberPath="Description" />
-
- <TextBlock FontSize="10" Margin="0 20 0 0"><Run>Speed</Run> <Run Text="{Binding Speed,StringFormat={}{0:N0} ms,FallbackValue=0}"></Run></TextBlock>
- <Slider Margin="0 5 0 0" Minimum="1" Maximum="1000" Value="{Binding Speed,Mode=TwoWay}"></Slider>
</StackPanel>
</GroupBox>
+ <GroupBox Header="PARAMETERS" Margin="0 10 0 0">
+ <editors:ParameterizedEditor ParameterizedObject="{Binding DispenserType}" Padding="10">
+ <editors:ParameterizedEditor.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel></StackPanel>
+ </ItemsPanelTemplate>
+ </editors:ParameterizedEditor.ItemsPanel>
+ <editors:ParameterizedEditor.DoubleTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,UpdateSourceTrigger=PropertyChanged}" HasDecimals="True" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.DoubleTemplate>
+ <editors:ParameterizedEditor.Int32Template>
+ <DataTemplate>
+ <DockPanel>
+ <DockPanel.Style>
+ <Style TargetType="DockPanel">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Name}" Value="Code">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </DockPanel.Style>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,Converter={StaticResource DoubleToIntConverter},UpdateSourceTrigger=PropertyChanged}" HasDecimals="False" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.Int32Template>
+ <editors:ParameterizedEditor.BooleanTemplate>
+ <DataTemplate>
+ <DockPanel Margin="0 5 0 0">
+ <ToggleButton DockPanel.Dock="Right" Width="100" IsChecked="{Binding Value}" HorizontalAlignment="Right" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.BooleanTemplate>
+ </editors:ParameterizedEditor>
+ </GroupBox>
+
<GroupBox Header="COLOR" Margin="0 10 0 0">
<StackPanel>
<Viewbox Margin="0 5 0 0">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MotorTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MotorTemplate.xaml
index 0d92230ad..9c166bab0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MotorTemplate.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MotorTemplate.xaml
@@ -4,8 +4,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
- xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
mc:Ignorable="d"
@@ -13,9 +15,10 @@
<UserControl.Resources>
<converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+ <sharedConverters:DoubleToIntConverter x:Key="DoubleToIntConverter" />
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
- <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="mahApps:ControlsHelper.HeaderFontSize" Value="14" />
<Setter Property="Margin" Value="2" />
</Style>
</UserControl.Resources>
@@ -25,13 +28,44 @@
<GroupBox Header="MOTOR">
<StackPanel>
<TextBlock FontSize="10">Selected Motor</TextBlock>
- <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechMotors}" SelectedItem="{Binding TechMotor,Mode=TwoWay}" DisplayMemberPath="Description" />
-
- <TextBlock FontSize="10" Margin="0 20 0 0"><Run>Speed</Run> <Run Text="{Binding Speed,StringFormat={}{0:N0} ms,FallbackValue=0}"></Run></TextBlock>
- <Slider Margin="0 5 0 0" Minimum="1" Maximum="1000" Value="{Binding Speed,Mode=TwoWay}"></Slider>
+ <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.HardwareMotorTypes}" SelectedItem="{Binding HardwareMotorType,Mode=TwoWay}" DisplayMemberPath="Description" />
</StackPanel>
</GroupBox>
+ <GroupBox Header="PARAMETERS" Margin="0 10 0 0">
+ <editors:ParameterizedEditor ParameterizedObject="{Binding HardwareMotor}" Padding="10">
+ <editors:ParameterizedEditor.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel></StackPanel>
+ </ItemsPanelTemplate>
+ </editors:ParameterizedEditor.ItemsPanel>
+ <editors:ParameterizedEditor.DoubleTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,UpdateSourceTrigger=PropertyChanged}" HasDecimals="True" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.DoubleTemplate>
+ <editors:ParameterizedEditor.Int32Template>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,Converter={StaticResource DoubleToIntConverter},UpdateSourceTrigger=PropertyChanged}" HasDecimals="False" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.Int32Template>
+ <editors:ParameterizedEditor.BooleanTemplate>
+ <DataTemplate>
+ <DockPanel Margin="0 5 0 0">
+ <ToggleButton DockPanel.Dock="Right" Width="100" IsChecked="{Binding Value}" HorizontalAlignment="Right" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.BooleanTemplate>
+ </editors:ParameterizedEditor>
+ </GroupBox>
+
<GroupBox Header="COLOR" Margin="0 10 0 0">
<StackPanel>
<Viewbox Margin="0 5 0 0">
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 b0d4cb595..573e497d5 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
@@ -23,6 +23,26 @@ namespace Tango.MachineStudio.Technician.TechItems
/// </summary>
public event EventHandler<MotorActionType> ActionExecuted;
+ private static List<DispenserType> _dispenserTypes;
+ /// <summary>
+ /// Gets or sets the motor configurations.
+ /// </summary>
+ public static List<DispenserType> DispenserTypes
+ {
+ get { return _dispenserTypes; }
+ set { _dispenserTypes = value; }
+ }
+
+ static DispenserItem()
+ {
+ DispenserTypes = new List<DispenserType>();
+
+ foreach (var techDispenser in BL.ObservablesEntitiesAdapter.Instance.TechDispensers)
+ {
+ DispenserTypes.Add(new DispenserType() { Code = int.Parse(techDispenser.Name.Replace("Dispenser", "")) - 1 });
+ }
+ }
+
/// <summary>
/// Occurs when dispenser homing has completed.
/// </summary>
@@ -36,7 +56,26 @@ namespace Tango.MachineStudio.Technician.TechItems
public TechDispenser TechDispenser
{
get { return _techDispenser; }
- set { _techDispenser = value; RaisePropertyChangedAuto(); TechName = _techDispenser != null ? _techDispenser.Description : null; ItemGuid = value != null ? value.Guid : null; }
+ set
+ {
+ _techDispenser = value; RaisePropertyChangedAuto(); TechName = _techDispenser != null ? _techDispenser.Description : null; ItemGuid = value != null ? value.Guid : null;
+
+ if (_techDispenser != null)
+ {
+ DispenserType = DispenserTypes.SingleOrDefault(x => x.Code == int.Parse(_techDispenser.Name.Replace("Dispenser", "")) - 1);
+ }
+ }
+ }
+
+ private DispenserType _dispenserType;
+ /// <summary>
+ /// Gets or sets the type of the dispenser.
+ /// </summary>
+ [XmlIgnore]
+ public DispenserType DispenserType
+ {
+ get { return _dispenserType; }
+ set { _dispenserType = value; RaisePropertyChangedAuto(); }
}
private bool _isHoming;
@@ -119,6 +158,7 @@ namespace Tango.MachineStudio.Technician.TechItems
Description = "Dispenser Controller";
Image = ResourceHelper.GetImageFromResources("Images/dispenser-big.png");
Color = Colors.White;
+ DispenserType = new DispenserType();
}
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs
index 8199dd11e..5cdb8017e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs
@@ -30,23 +30,23 @@ namespace Tango.MachineStudio.Technician.TechItems
/// </summary>
public event EventHandler HomingCompleted;
- private SelectedObjectCollection<TechMotor> _selectedMotors;
+ private SelectedObjectCollection<HardwareMotorType> _selectedMotors;
/// <summary>
/// Gets or sets the selected db tech motors.
/// </summary>
[XmlIgnore]
- public SelectedObjectCollection<TechMotor> SelectedMotors
+ public SelectedObjectCollection<HardwareMotorType> SelectedMotors
{
get { return _selectedMotors; }
set { _selectedMotors = value; RaisePropertyChangedAuto(); }
}
- private ObservableCollection<TechMotor> _techMotors;
+ private ObservableCollection<HardwareMotorType> _techMotors;
/// <summary>
/// Gets or sets the available db tech motors.
/// </summary>
[XmlIgnore]
- public ObservableCollection<TechMotor> TechMotors
+ public ObservableCollection<HardwareMotorType> TechMotors
{
get { return _techMotors; }
set { _techMotors = value; RaisePropertyChangedAuto(); SetSelectedMotors(); }
@@ -59,7 +59,7 @@ namespace Tango.MachineStudio.Technician.TechItems
{
if (TechMotors != null)
{
- SelectedMotors = new SelectedObjectCollection<TechMotor>(ObservablesEntitiesAdapter.Instance.TechMotors.ToObservableCollection(), TechMotors);
+ SelectedMotors = new SelectedObjectCollection<HardwareMotorType>(ObservablesEntitiesAdapter.Instance.HardwareMotorTypes.ToObservableCollection(), TechMotors);
}
}
@@ -155,7 +155,7 @@ namespace Tango.MachineStudio.Technician.TechItems
public MotorGroupItem() : base()
{
ItemsGuids = new List<string>();
- TechMotors = new ObservableCollection<TechMotor>();
+ TechMotors = new ObservableCollection<HardwareMotorType>();
Name = "Motor Group";
Description = "Motor Group Controller";
Image = ResourceHelper.GetImageFromResources("Images/motor-group.png");
@@ -179,7 +179,7 @@ namespace Tango.MachineStudio.Technician.TechItems
public override TechItem Clone()
{
MotorGroupItem cloned = base.Clone() as MotorGroupItem;
- cloned.TechMotors = new ObservableCollection<TechMotor>(TechMotors);
+ cloned.TechMotors = new ObservableCollection<HardwareMotorType>(TechMotors);
cloned.Speed = Speed;
cloned.ItemsGuids = ItemsGuids;
cloned.TechMotors = cloned.TechMotors.ToObservableCollection();
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 294c137dc..2df926093 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
@@ -8,6 +8,7 @@ using System.Xml.Serialization;
using Tango.Core.Commands;
using Tango.BL.Entities;
using Tango.SharedUI.Helpers;
+using System.Collections.ObjectModel;
namespace Tango.MachineStudio.Technician.TechItems
{
@@ -23,22 +24,62 @@ namespace Tango.MachineStudio.Technician.TechItems
/// </summary>
public event EventHandler<MotorActionType> ActionExecuted;
+ private static List<HardwareMotor> _motorConfigurations;
+ /// <summary>
+ /// Gets or sets the motor configurations.
+ /// </summary>
+ public static List<HardwareMotor> MotorConfigurations
+ {
+ get { return _motorConfigurations; }
+ set { _motorConfigurations = value; }
+ }
+
+ static MotorItem()
+ {
+ MotorConfigurations = new List<HardwareMotor>();
+
+ foreach (var motorType in BL.ObservablesEntitiesAdapter.Instance.HardwareMotorTypes)
+ {
+ MotorConfigurations.Add(new HardwareMotor() { HardwareMotorType = motorType });
+ }
+ }
+
/// <summary>
/// Occurs when motor homing has completed.
/// </summary>
public event EventHandler HomingCompleted;
- private TechMotor _techMotor;
+ private HardwareMotorType _hardwareMotorType;
/// <summary>
/// Gets or sets the db tech motor.
/// </summary>
[XmlIgnore]
- public TechMotor TechMotor
+ public HardwareMotorType HardwareMotorType
+ {
+ get { return _hardwareMotorType; }
+ set
+ {
+ _hardwareMotorType = value; RaisePropertyChangedAuto(); TechName = _hardwareMotorType != null ? _hardwareMotorType.Description : null; ItemGuid = value != null ? value.Guid : null;
+
+ if (_hardwareMotorType != null)
+ {
+ HardwareMotor = MotorConfigurations.SingleOrDefault(x => x.HardwareMotorType == _hardwareMotorType);
+ }
+ }
+ }
+
+ private HardwareMotor _hardwareMotor;
+ /// <summary>
+ /// Gets or sets the hardware motor.
+ /// </summary>
+ [XmlIgnore]
+ public HardwareMotor HardwareMotor
{
- get { return _techMotor; }
- set { _techMotor = value; RaisePropertyChangedAuto(); TechName = _techMotor != null ? _techMotor.Description : null; ItemGuid = value != null ? value.Guid : null; }
+ get { return _hardwareMotor; }
+ set { _hardwareMotor = value; RaisePropertyChangedAuto(); }
}
+
private bool _isHoming;
/// <summary>
/// Gets or sets a value indicating whether the motor is currently homing.
@@ -119,15 +160,16 @@ namespace Tango.MachineStudio.Technician.TechItems
Description = "Motor Controller";
Image = ResourceHelper.GetImageFromResources("Images/engine.png");
Color = Colors.White;
+ HardwareMotor = new HardwareMotor();
}
/// <summary>
/// Initializes a new instance of the <see cref="MotorItem"/> class.
/// </summary>
/// <param name="techMotor">The tech motor.</param>
- public MotorItem(TechMotor techMotor) : this()
+ public MotorItem(HardwareMotorType techMotor) : this()
{
- TechMotor = techMotor;
+ HardwareMotorType = techMotor;
}
/// <summary>
@@ -137,7 +179,7 @@ namespace Tango.MachineStudio.Technician.TechItems
public override TechItem Clone()
{
MotorItem cloned = base.Clone() as MotorItem;
- cloned.TechMotor = TechMotor;
+ cloned.HardwareMotorType = HardwareMotorType;
cloned.Speed = Speed;
return cloned;
}
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 91c80a41a..4cc1852a6 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
@@ -49,7 +49,6 @@ namespace Tango.MachineStudio.Technician.ViewModels
private IEventLogger _eventLogger;
private DateTime _lastDiagnosticsResponseUpdate;
private const int MIN_DIAGNOSTICS_UPDATE_MILI = 500;
- private bool _isViewLoaded;
#region Properties
@@ -458,7 +457,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
}
else if (item is MotorItem)
{
- var editor = CreateElement<MotorElementEditor, MotorItem, TechMotor>(bounds, Adapter.TechMotors.FirstOrDefault());
+ var editor = CreateElement<MotorElementEditor, MotorItem, HardwareMotorType>(bounds, Adapter.HardwareMotorTypes.FirstOrDefault());
InitMotorItem(editor.MotorItem);
}
else if (item is DispenserItem)
@@ -552,7 +551,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
}
else if (item is MotorItem)
{
- (item as MotorItem).TechMotor = Adapter.TechMotors.FirstOrDefault(x => x.Guid == item.ItemGuid);
+ (item as MotorItem).HardwareMotorType = Adapter.HardwareMotorTypes.FirstOrDefault(x => x.Guid == item.ItemGuid);
var editor = CreateElement<MotorElementEditor>(item);
InitMotorItem(editor.MotorItem);
}
@@ -709,7 +708,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StartMotorJogging(new MotorJoggingRequest()
{
- Code = item.TechMotor.Code,
+ Code = item.HardwareMotorType.Code,
Direction = MotorDirection.Forward,
});
}
@@ -717,14 +716,14 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopMotorJogging(new MotorAbortJoggingRequest()
{
- Code = item.TechMotor.Code,
+ Code = item.HardwareMotorType.Code,
});
}
else if (action == MotorActionType.BackwardPressed)
{
await MachineOperator.StartMotorJogging(new MotorJoggingRequest()
{
- Code = item.TechMotor.Code,
+ Code = item.HardwareMotorType.Code,
Direction = MotorDirection.Backward,
});
}
@@ -732,7 +731,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopMotorJogging(new MotorAbortJoggingRequest()
{
- Code = item.TechMotor.Code,
+ Code = item.HardwareMotorType.Code,
});
}
else if (action == MotorActionType.HomingStarted)
@@ -743,7 +742,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
MachineOperator.StartMotorHoming(new MotorHomingRequest()
{
- Code = item.TechMotor.Code
+ Code = item.HardwareMotorType.Code
})
.Subscribe((response) =>
{
@@ -763,7 +762,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopMotorHoming(new MotorAbortHomingRequest()
{
- Code = item.TechMotor.Code,
+ Code = item.HardwareMotorType.Code,
});
item.IsHoming = false;
@@ -1130,7 +1129,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
if (item is MotorGroupItem)
{
- (item as MotorGroupItem).TechMotors = ObservablesEntitiesAdapter.Instance.TechMotors.Where(x => (item as MotorGroupItem).ItemsGuids.Contains(x.Guid)).ToObservableCollection();
+ (item as MotorGroupItem).TechMotors = ObservablesEntitiesAdapter.Instance.HardwareMotorTypes.Where(x => (item as MotorGroupItem).ItemsGuids.Contains(x.Guid)).ToObservableCollection();
}
AddTechItem(item);
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
index 53fcafb8f..6d4f3aefd 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
@@ -206,7 +206,7 @@
</ListBox>
</StackPanel>
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="0 0 255 10" VerticalAlignment="Bottom">
+ <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="0 0 335 10" VerticalAlignment="Bottom">
<ListBox x:Name="listMode" SelectedIndex="0" Style="{StaticResource MaterialDesignToolToggleListBox}">
<ListBoxItem Height="40" Width="60" HorizontalContentAlignment="Center" ToolTip="Edit Mode">
<materialDesign:PackIcon HorizontalAlignment="Center" Width="30" Height="30" Kind="Pencil" />
@@ -216,24 +216,13 @@
</ListBoxItem>
</ListBox>
</StackPanel>
-
- <Border HorizontalAlignment="Right" Width="220" Margin="10 0 5 8" BorderBrush="Gainsboro" BorderThickness="1 0 1 1" Padding="5">
- <Grid>
- <StackPanel TextElement.FontSize="10" VerticalAlignment="Center" TextElement.Foreground="Gray">
- <TextBlock HorizontalAlignment="Center"><Run FontWeight="SemiBold" FontStyle="Italic">Version Name:</Run> <Run Text="{Binding MachineOperator.DeviceInformation.Name,FallbackValue='N/A'}"></Run></TextBlock>
- <TextBlock HorizontalAlignment="Center" Margin="0 2 0 0"><Run FontWeight="SemiBold" FontStyle="Italic">Version Number:</Run> <Run Text="{Binding MachineOperator.DeviceInformation.Version,FallbackValue='N/A'}"></Run></TextBlock>
- <TextBlock HorizontalAlignment="Center" Margin="0 2 0 0"><Run FontWeight="SemiBold" FontStyle="Italic">Build Date:</Run> <Run Text="{Binding MachineOperator.DeviceInformation.BuildDate,FallbackValue='N/A'}"></Run></TextBlock>
- <TextBlock HorizontalAlignment="Center" Margin="0 2 0 0"><Run FontWeight="SemiBold" FontStyle="Italic">Diagnostics Frame Size:</Run> <Run Text="{Binding CurrentDiagnosticsResponseSize,Converter={StaticResource NumberToFileSizeConverter},FallbackValue='N/A'}"></Run></TextBlock>
- </StackPanel>
- </Grid>
- </Border>
</Grid>
</Grid>
<Grid Grid.Row="1" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="220"/>
+ <ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<Grid>
@@ -321,84 +310,88 @@
<Grid Grid.Column="1">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="0 -30 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement}" Text="{Binding TechName}" FontSize="16" FontWeight="Bold" FontStyle="Italic"></TextBlock>
- <GroupBox DockPanel.Dock="Top" Header="BOUNDS" Padding="5">
+
+ <ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel>
- <!--Position-->
- <UniformGrid Columns="2" Margin="0 5 0 0">
- <StackPanel Margin="0 0 5 0">
- <TextBlock>Left</TextBlock>
- <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Left}"></mahapps:NumericUpDown>
- </StackPanel>
- <StackPanel Margin="5 0 0 0">
- <TextBlock>Top</TextBlock>
- <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Top}"></mahapps:NumericUpDown>
- </StackPanel>
- </UniformGrid>
+ <GroupBox DockPanel.Dock="Top" Header="BOUNDS" Padding="5">
+ <StackPanel>
+ <!--Position-->
+ <UniformGrid Columns="2" Margin="0 5 0 0">
+ <StackPanel Margin="0 0 5 0">
+ <TextBlock>Left</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Left}"></mahapps:NumericUpDown>
+ </StackPanel>
+ <StackPanel Margin="5 0 0 0">
+ <TextBlock>Top</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Top}"></mahapps:NumericUpDown>
+ </StackPanel>
+ </UniformGrid>
- <!--Size-->
- <UniformGrid Columns="2" Margin="0 20 0 0">
- <StackPanel Margin="0 0 5 0">
- <TextBlock>Width</TextBlock>
- <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Width}"></mahapps:NumericUpDown>
- </StackPanel>
- <StackPanel Margin="5 0 0 0">
- <TextBlock>Height</TextBlock>
- <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Height}"></mahapps:NumericUpDown>
+ <!--Size-->
+ <UniformGrid Columns="2" Margin="0 20 0 0">
+ <StackPanel Margin="0 0 5 0">
+ <TextBlock>Width</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Width}"></mahapps:NumericUpDown>
+ </StackPanel>
+ <StackPanel Margin="5 0 0 0">
+ <TextBlock>Height</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Height}"></mahapps:NumericUpDown>
+ </StackPanel>
+ </UniformGrid>
+
+ <!--<Angle-->
+ <Grid Margin="0 20 0 0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="22*"></ColumnDefinition>
+ <ColumnDefinition Width="20*"></ColumnDefinition>
+ </Grid.ColumnDefinitions>
+ <TextBlock VerticalAlignment="Center" Margin="0 0 10 0" HorizontalAlignment="Left">Angle</TextBlock>
+ <mahapps:NumericUpDown Grid.Column="1" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Maximum="360" Minimum="-360" HasDecimals="False" Margin="0 5 0 0" Value="{Binding ElementName=editor,Path=SelectedElement.Angle}"></mahapps:NumericUpDown>
+ </Grid>
</StackPanel>
- </UniformGrid>
+ </GroupBox>
+ <ContentControl Margin="0 10 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement}" Content="{Binding ElementName=editor,Path=SelectedElement.HostedElement}">
+ <ContentControl.Resources>
+ <DataTemplate DataType="{x:Type sys:Nullable}">
- <!--<Angle-->
- <Grid Margin="0 20 0 0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="22*"></ColumnDefinition>
- <ColumnDefinition Width="20*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBlock VerticalAlignment="Center" Margin="0 0 10 0" HorizontalAlignment="Left">Angle</TextBlock>
- <mahapps:NumericUpDown Grid.Column="1" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Maximum="360" Minimum="-360" HasDecimals="False" Margin="0 5 0 0" Value="{Binding ElementName=editor,Path=SelectedElement.Angle}"></mahapps:NumericUpDown>
- </Grid>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:ControllerItem}">
+ <templates:ControllerTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MonitorItem}">
+ <templates:MonitorTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:DigitalInItem}">
+ <templates:DigitalInTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MotorGroupItem}">
+ <templates:MotorGroupTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:ThreadMotionItem}">
+ <templates:ThreadMotionTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:DigitalOutItem}">
+ <templates:DigitalOutTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:DispenserItem}">
+ <templates:DispenserTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MotorItem}">
+ <templates:MotorTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MeterItem}">
+ <templates:MeterTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:SingleGraphItem}">
+ <templates:SingleGraphTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MultiGraphItem}">
+ <templates:MultiGraphTemplate/>
+ </DataTemplate>
+ </ContentControl.Resources>
+ </ContentControl>
</StackPanel>
- </GroupBox>
-
- <ContentControl Margin="0 10 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement}" Content="{Binding ElementName=editor,Path=SelectedElement.HostedElement}">
- <ContentControl.Resources>
- <DataTemplate DataType="{x:Type sys:Nullable}">
-
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:ControllerItem}">
- <templates:ControllerTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MonitorItem}">
- <templates:MonitorTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:DigitalInItem}">
- <templates:DigitalInTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MotorGroupItem}">
- <templates:MotorGroupTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:ThreadMotionItem}">
- <templates:ThreadMotionTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:DigitalOutItem}">
- <templates:DigitalOutTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:DispenserItem}">
- <templates:DispenserTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MotorItem}">
- <templates:MotorTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MeterItem}">
- <templates:MeterTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:SingleGraphItem}">
- <templates:SingleGraphTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MultiGraphItem}">
- <templates:MultiGraphTemplate/>
- </DataTemplate>
- </ContentControl.Resources>
- </ContentControl>
+ </ScrollViewer>
</DockPanel>
</Grid>
</Grid>
diff --git a/Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs b/Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs
index 9bbe2c5cc..b641ab83b 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/DispenserType.cs
@@ -94,246 +94,6 @@ namespace Tango.BL.Entities
}
- protected Int32 _minfrequency;
- /// <summary>
- /// Gets or sets the dispensertype min frequency.
- /// </summary>
- [Column("MIN_FREQUENCY")]
-
- public Int32 MinFrequency
- {
- get
- {
- return _minfrequency;
- }
-
- set
- {
- _minfrequency = value; RaisePropertyChanged(nameof(MinFrequency));
- }
-
- }
-
- protected Int32 _maxfrequency;
- /// <summary>
- /// Gets or sets the dispensertype max frequency.
- /// </summary>
- [Column("MAX_FREQUENCY")]
-
- public Int32 MaxFrequency
- {
- get
- {
- return _maxfrequency;
- }
-
- set
- {
- _maxfrequency = value; RaisePropertyChanged(nameof(MaxFrequency));
- }
-
- }
-
- protected Int32 _minmicrostep;
- /// <summary>
- /// Gets or sets the dispensertype min micro step.
- /// </summary>
- [Column("MIN_MICRO_STEP")]
-
- public Int32 MinMicroStep
- {
- get
- {
- return _minmicrostep;
- }
-
- set
- {
- _minmicrostep = value; RaisePropertyChanged(nameof(MinMicroStep));
- }
-
- }
-
- protected Int32 _maxmicrostep;
- /// <summary>
- /// Gets or sets the dispensertype max micro step.
- /// </summary>
- [Column("MAX_MICRO_STEP")]
-
- public Int32 MaxMicroStep
- {
- get
- {
- return _maxmicrostep;
- }
-
- set
- {
- _maxmicrostep = value; RaisePropertyChanged(nameof(MaxMicroStep));
- }
-
- }
-
- protected Double _correctiongain;
- /// <summary>
- /// Gets or sets the dispensertype correction gain.
- /// </summary>
- [Column("CORRECTION_GAIN")]
-
- public Double CorrectionGain
- {
- get
- {
- return _correctiongain;
- }
-
- set
- {
- _correctiongain = value; RaisePropertyChanged(nameof(CorrectionGain));
- }
-
- }
-
- protected Double _ratiotodryerspeed;
- /// <summary>
- /// Gets or sets the dispensertype ratio to dryer speed.
- /// </summary>
- [Column("RATIO_TO_DRYER_SPEED")]
-
- public Double RatioToDryerSpeed
- {
- get
- {
- return _ratiotodryerspeed;
- }
-
- set
- {
- _ratiotodryerspeed = value; RaisePropertyChanged(nameof(RatioToDryerSpeed));
- }
-
- }
-
- protected Double _kp;
- /// <summary>
- /// Gets or sets the dispensertype kp.
- /// </summary>
- [Column("KP")]
-
- public Double Kp
- {
- get
- {
- return _kp;
- }
-
- set
- {
- _kp = value; RaisePropertyChanged(nameof(Kp));
- }
-
- }
-
- protected Double _ki;
- /// <summary>
- /// Gets or sets the dispensertype ki.
- /// </summary>
- [Column("KI")]
-
- public Double Ki
- {
- get
- {
- return _ki;
- }
-
- set
- {
- _ki = value; RaisePropertyChanged(nameof(Ki));
- }
-
- }
-
- protected Double _kd;
- /// <summary>
- /// Gets or sets the dispensertype kd.
- /// </summary>
- [Column("KD")]
-
- public Double Kd
- {
- get
- {
- return _kd;
- }
-
- set
- {
- _kd = value; RaisePropertyChanged(nameof(Kd));
- }
-
- }
-
- protected Double _changeslope;
- /// <summary>
- /// Gets or sets the dispensertype change slope.
- /// </summary>
- [Column("CHANGE_SLOPE")]
-
- public Double ChangeSlope
- {
- get
- {
- return _changeslope;
- }
-
- set
- {
- _changeslope = value; RaisePropertyChanged(nameof(ChangeSlope));
- }
-
- }
-
- protected Double _highlengthmicrosecond;
- /// <summary>
- /// Gets or sets the dispensertype high length micro second.
- /// </summary>
- [Column("HIGH_LENGTH_MICRO_SECOND")]
-
- public Double HighLengthMicroSecond
- {
- get
- {
- return _highlengthmicrosecond;
- }
-
- set
- {
- _highlengthmicrosecond = value; RaisePropertyChanged(nameof(HighLengthMicroSecond));
- }
-
- }
-
- protected Int32 _controltiming;
- /// <summary>
- /// Gets or sets the dispensertype control timing.
- /// </summary>
- [Column("CONTROL_TIMING")]
-
- public Int32 ControlTiming
- {
- get
- {
- return _controltiming;
- }
-
- set
- {
- _controltiming = value; RaisePropertyChanged(nameof(ControlTiming));
- }
-
- }
-
protected ObservableCollection<IdsPack> _idspacks;
/// <summary>
/// Gets or sets the dispensertype ids packs.
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs
index 75fb30549..781297287 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs
@@ -276,6 +276,166 @@ namespace Tango.BL.Entities
}
+ protected Int32 _kvalhold;
+ /// <summary>
+ /// Gets or sets the hardwaremotor kval hold.
+ /// </summary>
+ [Column("KVAL_HOLD")]
+
+ public Int32 KvalHold
+ {
+ get
+ {
+ return _kvalhold;
+ }
+
+ set
+ {
+ _kvalhold = value; RaisePropertyChanged(nameof(KvalHold));
+ }
+
+ }
+
+ protected Int32 _kvalrun;
+ /// <summary>
+ /// Gets or sets the hardwaremotor kval run.
+ /// </summary>
+ [Column("KVAL_RUN")]
+
+ public Int32 KvalRun
+ {
+ get
+ {
+ return _kvalrun;
+ }
+
+ set
+ {
+ _kvalrun = value; RaisePropertyChanged(nameof(KvalRun));
+ }
+
+ }
+
+ protected Int32 _kvalacc;
+ /// <summary>
+ /// Gets or sets the hardwaremotor kval acc.
+ /// </summary>
+ [Column("KVAL_ACC")]
+
+ public Int32 KvalAcc
+ {
+ get
+ {
+ return _kvalacc;
+ }
+
+ set
+ {
+ _kvalacc = value; RaisePropertyChanged(nameof(KvalAcc));
+ }
+
+ }
+
+ protected Int32 _kvaldec;
+ /// <summary>
+ /// Gets or sets the hardwaremotor kval dec.
+ /// </summary>
+ [Column("KVAL_DEC")]
+
+ public Int32 KvalDec
+ {
+ get
+ {
+ return _kvaldec;
+ }
+
+ set
+ {
+ _kvaldec = value; RaisePropertyChanged(nameof(KvalDec));
+ }
+
+ }
+
+ protected Int32 _overcurrentthreshold;
+ /// <summary>
+ /// Gets or sets the hardwaremotor over current threshold.
+ /// </summary>
+ [Column("OVER_CURRENT_THRESHOLD")]
+
+ public Int32 OverCurrentThreshold
+ {
+ get
+ {
+ return _overcurrentthreshold;
+ }
+
+ set
+ {
+ _overcurrentthreshold = value; RaisePropertyChanged(nameof(OverCurrentThreshold));
+ }
+
+ }
+
+ protected Int32 _stallthreshold;
+ /// <summary>
+ /// Gets or sets the hardwaremotor stall threshold.
+ /// </summary>
+ [Column("STALL_THRESHOLD")]
+
+ public Int32 StallThreshold
+ {
+ get
+ {
+ return _stallthreshold;
+ }
+
+ set
+ {
+ _stallthreshold = value; RaisePropertyChanged(nameof(StallThreshold));
+ }
+
+ }
+
+ protected Int32 _thermalcompensationfactor;
+ /// <summary>
+ /// Gets or sets the hardwaremotor thermal compensation factor.
+ /// </summary>
+ [Column("THERMAL_COMPENSATION_FACTOR")]
+
+ public Int32 ThermalCompensationFactor
+ {
+ get
+ {
+ return _thermalcompensationfactor;
+ }
+
+ set
+ {
+ _thermalcompensationfactor = value; RaisePropertyChanged(nameof(ThermalCompensationFactor));
+ }
+
+ }
+
+ protected Boolean _lowspeedoptimization;
+ /// <summary>
+ /// Gets or sets the hardwaremotor low speed optimization.
+ /// </summary>
+ [Column("LOW_SPEED_OPTIMIZATION")]
+
+ public Boolean LowSpeedOptimization
+ {
+ get
+ {
+ return _lowspeedoptimization;
+ }
+
+ set
+ {
+ _lowspeedoptimization = value; RaisePropertyChanged(nameof(LowSpeedOptimization));
+ }
+
+ }
+
protected HardwareMotorType _hardwaremotortype;
/// <summary>
/// Gets or sets the hardwaremotor hardware motor types.
diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs
index 61309e984..a7a71527f 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotorType.cs
@@ -74,6 +74,26 @@ namespace Tango.BL.Entities
}
+ protected Boolean _supportshoming;
+ /// <summary>
+ /// Gets or sets the hardwaremotortype supports homing.
+ /// </summary>
+ [Column("SUPPORTS_HOMING")]
+
+ public Boolean SupportsHoming
+ {
+ get
+ {
+ return _supportshoming;
+ }
+
+ set
+ {
+ _supportshoming = value; RaisePropertyChanged(nameof(SupportsHoming));
+ }
+
+ }
+
protected ObservableCollection<HardwareMotor> _hardwaremotors;
/// <summary>
/// Gets or sets the hardwaremotortype hardware motors.
diff --git a/Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs b/Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs
index 387379fe7..4955baaec 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/IdsPack.cs
@@ -119,6 +119,27 @@ namespace Tango.BL.Entities
}
+ protected String _idspackformulaguid;
+ /// <summary>
+ /// Gets or sets the idspack ids pack formula guid.
+ /// </summary>
+ [Column("IDS_PACK_FORMULA_GUID")]
+ [ForeignKey("IdsPackFormula")]
+
+ public String IdsPackFormulaGuid
+ {
+ get
+ {
+ return _idspackformulaguid;
+ }
+
+ set
+ {
+ _idspackformulaguid = value; RaisePropertyChanged(nameof(IdsPackFormulaGuid));
+ }
+
+ }
+
protected String _name;
/// <summary>
/// Gets or sets the idspack name.
@@ -159,23 +180,22 @@ namespace Tango.BL.Entities
}
- protected String _idspackformulaguid;
+ protected Boolean _isempty;
/// <summary>
- /// Gets or sets the idspack ids pack formula guid.
+ /// Gets or sets the idspack is empty.
/// </summary>
- [Column("IDS_PACK_FORMULA_GUID")]
- [ForeignKey("IdsPackFormula")]
+ [Column("IS_EMPTY")]
- public String IdsPackFormulaGuid
+ public Boolean IsEmpty
{
get
{
- return _idspackformulaguid;
+ return _isempty;
}
set
{
- _idspackformulaguid = value; RaisePropertyChanged(nameof(IdsPackFormulaGuid));
+ _isempty = value; RaisePropertyChanged(nameof(IsEmpty));
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechMotor.cs b/Software/Visual_Studio/Tango.BL/Entities/TechMotor.cs
deleted file mode 100644
index 95006dfd1..000000000
--- a/Software/Visual_Studio/Tango.BL/Entities/TechMotor.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Xml.Serialization;
-using Newtonsoft.Json;
-using System.Linq;
-using Tango.DAL.Remote.DB;
-
-namespace Tango.BL.Entities
-{
- [Table("TECH_MOTORS")]
- public partial class TechMotor : ObservableEntity<TechMotor>
- {
-
- protected Int32 _code;
- /// <summary>
- /// Gets or sets the techmotor code.
- /// </summary>
- [Column("CODE")]
-
- public Int32 Code
- {
- get
- {
- return _code;
- }
-
- set
- {
- _code = value; RaisePropertyChanged(nameof(Code));
- }
-
- }
-
- protected String _name;
- /// <summary>
- /// Gets or sets the techmotor name.
- /// </summary>
- [Column("NAME")]
-
- public String Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- _name = value; RaisePropertyChanged(nameof(Name));
- }
-
- }
-
- protected String _description;
- /// <summary>
- /// Gets or sets the techmotor description.
- /// </summary>
- [Column("DESCRIPTION")]
-
- public String Description
- {
- get
- {
- return _description;
- }
-
- set
- {
- _description = value; RaisePropertyChanged(nameof(Description));
- }
-
- }
-
- protected Boolean _supportshoming;
- /// <summary>
- /// Gets or sets the techmotor supports homing.
- /// </summary>
- [Column("SUPPORTS_HOMING")]
-
- public Boolean SupportsHoming
- {
- get
- {
- return _supportshoming;
- }
-
- set
- {
- _supportshoming = value; RaisePropertyChanged(nameof(SupportsHoming));
- }
-
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TechMotor" /> class.
- /// </summary>
- public TechMotor() : base()
- {
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
index 8ab24b308..ad5781b7b 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
@@ -164,7 +164,7 @@ namespace Tango.BL.Entities
{
LiquidVolumes = new ObservableCollection<LiquidVolume>();
- foreach (var idsPack in configuration.IdsPacks)
+ foreach (var idsPack in configuration.NoneEmptyIdsPacks)
{
LiquidVolumes.Add(new LiquidVolume(configuration, idsPack, rml, processParametersTable, this));
}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs
index 963ed638d..2b0673317 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Configuration.cs
@@ -1,13 +1,24 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Xml.Serialization;
namespace Tango.BL.Entities
{
public partial class Configuration
{
+ [NotMapped]
+ [XmlIgnore]
+ [JsonIgnore]
+ public IEnumerable<IdsPack> NoneEmptyIdsPacks
+ {
+ get { return IdsPacks.Where(x => !x.IsEmpty); }
+ }
+
public override void DefferedDelete(ObservablesContext context)
{
IdsPacks.ToList().ForEach(x => x.DefferedDelete(context));
diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs
index 389510997..61d149a90 100644
--- a/Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs
+++ b/Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs
@@ -87,5 +87,53 @@ namespace Tango.BL.Enumerations
[Description("Winder Motor")]
MotorWinder = 12,
+ /// <summary>
+ /// (Dispenser 1)
+ /// </summary>
+ [Description("Dispenser 1")]
+ Dispenser1 = 13,
+
+ /// <summary>
+ /// (Dispenser 2)
+ /// </summary>
+ [Description("Dispenser 2")]
+ Dispenser2 = 14,
+
+ /// <summary>
+ /// (Dispenser 3)
+ /// </summary>
+ [Description("Dispenser 3")]
+ Dispenser3 = 15,
+
+ /// <summary>
+ /// (Dispenser 4)
+ /// </summary>
+ [Description("Dispenser 4")]
+ Dispenser4 = 16,
+
+ /// <summary>
+ /// (Dispenser 5)
+ /// </summary>
+ [Description("Dispenser 5")]
+ Dispenser5 = 17,
+
+ /// <summary>
+ /// (Dispenser 6)
+ /// </summary>
+ [Description("Dispenser 6")]
+ Dispenser6 = 18,
+
+ /// <summary>
+ /// (Dispenser 7)
+ /// </summary>
+ [Description("Dispenser 7")]
+ Dispenser7 = 19,
+
+ /// <summary>
+ /// (Dispenser 8)
+ /// </summary>
+ [Description("Dispenser 8")]
+ Dispenser8 = 20,
+
}
}
diff --git a/Software/Visual_Studio/Tango.BL/ExtensionMethods/ConfigurationExtensions.cs b/Software/Visual_Studio/Tango.BL/ExtensionMethods/ConfigurationExtensions.cs
index 323e4744b..9dab200d6 100644
--- a/Software/Visual_Studio/Tango.BL/ExtensionMethods/ConfigurationExtensions.cs
+++ b/Software/Visual_Studio/Tango.BL/ExtensionMethods/ConfigurationExtensions.cs
@@ -28,6 +28,7 @@ public static class ConfigurationExtensions
clonedPack.CartridgeType = idsPack.CartridgeType;
clonedPack.MidTankType = idsPack.MidTankType;
clonedPack.IdsPackFormula = idsPack.IdsPackFormula;
+ clonedPack.IsEmpty = idsPack.IsEmpty;
cloned.IdsPacks.Add(clonedPack);
}
diff --git a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
index 32cd00a86..7049b5fd0 100644
--- a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
+++ b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
@@ -86,7 +86,7 @@ namespace Tango.BL
{
_volume = DispensingCalcService.CoerceVolume(this);
- typeof(BrushStop).GetProperty("V" + Configuration.IdsPacks.IndexOf(IdsPack)).SetValue(BrushStop, Volume);
+ typeof(BrushStop).GetProperty("V" + IdsPack.PackIndex).SetValue(BrushStop, Volume);
RaisePropertyChanged(nameof(LiquidMaxNanoliterPerCentimeter));
RaisePropertyChanged(nameof(NanoliterPerSecond));
RaisePropertyChanged(nameof(PulsePerSecond));
@@ -107,7 +107,7 @@ namespace Tango.BL
Configuration = configuration;
RML = rml;
- Volume = (double)typeof(BrushStop).GetProperty("V" + Configuration.IdsPacks.IndexOf(IdsPack)).GetValue(BrushStop);
+ Volume = (double)typeof(BrushStop).GetProperty("V" + IdsPack.PackIndex).GetValue(BrushStop);
}
private void OnVolumeChanged()
@@ -122,7 +122,7 @@ namespace Tango.BL
{
if (Configuration != null && RML != null)
{
- List<LiquidTypesRml> factors = Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == RML.Guid).ToList();
+ List<LiquidTypesRml> factors = Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == RML.Guid).ToList();
if (BrushStop.LiquidVolumes.IndexOf(this) > factors.Count - 1)
{
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs
index cfeccaeb6..29f244c52 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs
@@ -525,14 +525,6 @@ namespace Tango.BL
}
/// <summary>
- /// Gets or sets the TechMotors.
- /// </summary>
- public DbSet<TechMotor> TechMotors
- {
- get; set;
- }
-
- /// <summary>
/// Gets or sets the TechValves.
/// </summary>
public DbSet<TechValf> TechValves
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs
index e4c4cfd00..3032cb9a3 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs
@@ -270,8 +270,6 @@ namespace Tango.BL
TechMonitors = Context.TechMonitors.ToObservableCollection();
- TechMotors = Context.TechMotors.ToObservableCollection();
-
TechDispensers = Context.TechDispensers.ToObservableCollection();
TechValves = Context.TechValves.ToObservableCollection();
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs
index c3be8cb1e..eef938260 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs
@@ -2311,42 +2311,6 @@ namespace Tango.BL
}
- private ObservableCollection<TechMotor> _techmotors;
- /// <summary>
- /// Gets or sets the TechMotors.
- /// </summary>
- public ObservableCollection<TechMotor> TechMotors
- {
- get
- {
- return _techmotors;
- }
-
- set
- {
- _techmotors = value; RaisePropertyChanged(nameof(TechMotors));
- }
-
- }
-
- private ICollectionView _techmotorsViewSource;
- /// <summary>
- /// Gets or sets the TechMotors View Source.
- ///</summary>
- public ICollectionView TechMotorsViewSource
- {
- get
- {
- return _techmotorsViewSource;
- }
-
- set
- {
- _techmotorsViewSource = value; RaisePropertyChanged(nameof(TechMotorsViewSource));
- }
-
- }
-
private ObservableCollection<TechValf> _techvalves;
/// <summary>
/// Gets or sets the TechValves.
@@ -2625,8 +2589,6 @@ namespace Tango.BL
TechMonitorsViewSource = CreateCollectionView(TechMonitors);
- TechMotorsViewSource = CreateCollectionView(TechMotors);
-
TechValvesViewSource = CreateCollectionView(TechValves);
UsersViewSource = CreateCollectionView(Users);
diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
index f9b55d97e..3308fd103 100644
--- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
+++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
@@ -160,7 +160,6 @@
<Compile Include="Entities\TechDispenser.cs" />
<Compile Include="Entities\TechIo.cs" />
<Compile Include="Entities\TechMonitor.cs" />
- <Compile Include="Entities\TechMotor.cs" />
<Compile Include="Entities\TechValf.cs" />
<Compile Include="Entities\User.cs" />
<Compile Include="Entities\UsersRole.cs" />
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs
index 61ac91506..efe9286f2 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs
@@ -27,18 +27,6 @@ namespace Tango.DAL.Remote.DB
public string NAME { get; set; }
public double NL_PER_PULSE { get; set; }
public double CAPACITY { get; set; }
- public int MIN_FREQUENCY { get; set; }
- public int MAX_FREQUENCY { get; set; }
- public int MIN_MICRO_STEP { get; set; }
- public int MAX_MICRO_STEP { get; set; }
- public double CORRECTION_GAIN { get; set; }
- public double RATIO_TO_DRYER_SPEED { get; set; }
- public double KP { get; set; }
- public double KI { get; set; }
- public double KD { get; set; }
- public double CHANGE_SLOPE { get; set; }
- public double HIGH_LENGTH_MICRO_SECOND { get; set; }
- public int CONTROL_TIMING { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<IDS_PACKS> IDS_PACKS { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs
index 2124049f6..fc57b4b9f 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs
@@ -30,6 +30,14 @@ namespace Tango.DAL.Remote.DB
public double PULLEY_RADIUS { get; set; }
public int CONFIG_WORD { get; set; }
public bool DIRECTION_THREAD_WIZE { get; set; }
+ public int KVAL_HOLD { get; set; }
+ public int KVAL_RUN { get; set; }
+ public int KVAL_ACC { get; set; }
+ public int KVAL_DEC { get; set; }
+ public int OVER_CURRENT_THRESHOLD { get; set; }
+ public int STALL_THRESHOLD { get; set; }
+ public int THERMAL_COMPENSATION_FACTOR { get; set; }
+ public bool LOW_SPEED_OPTIMIZATION { get; set; }
public virtual HARDWARE_MOTOR_TYPES HARDWARE_MOTOR_TYPES { get; set; }
public virtual HARDWARE_VERSIONS HARDWARE_VERSIONS { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTOR_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTOR_TYPES.cs
index 490405f81..61802718a 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTOR_TYPES.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTOR_TYPES.cs
@@ -26,6 +26,7 @@ namespace Tango.DAL.Remote.DB
public int CODE { get; set; }
public string NAME { get; set; }
public string DESCRIPTION { get; set; }
+ public bool SUPPORTS_HOMING { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<HARDWARE_MOTORS> HARDWARE_MOTORS { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs
index 6275098a8..c6f44d5a4 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs
@@ -22,9 +22,10 @@ namespace Tango.DAL.Remote.DB
public string LIQUID_TYPE_GUID { get; set; }
public string CARTRIDGE_TYPE_GUID { get; set; }
public string MID_TANK_TYPE_GUID { get; set; }
+ public string IDS_PACK_FORMULA_GUID { get; set; }
public string NAME { get; set; }
public int PACK_INDEX { get; set; }
- public string IDS_PACK_FORMULA_GUID { get; set; }
+ public bool IS_EMPTY { get; set; }
public virtual CARTRIDGE_TYPES CARTRIDGE_TYPES { get; set; }
public virtual CONFIGURATION CONFIGURATION { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs
index 06a12e5c7..fd204e9d0 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs
@@ -89,7 +89,6 @@ namespace Tango.DAL.Remote.DB
public virtual DbSet<TECH_DISPENSERS> TECH_DISPENSERS { get; set; }
public virtual DbSet<TECH_IOS> TECH_IOS { get; set; }
public virtual DbSet<TECH_MONITORS> TECH_MONITORS { get; set; }
- public virtual DbSet<TECH_MOTORS> TECH_MOTORS { get; set; }
public virtual DbSet<TECH_VALVES> TECH_VALVES { get; set; }
public virtual DbSet<USER> USERS { get; set; }
public virtual DbSet<USERS_ROLES> USERS_ROLES { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
index 4af57cfdd..bcd54d76c 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
@@ -226,18 +226,6 @@
<Property Name="NAME" Type="nvarchar" MaxLength="50" Nullable="false" />
<Property Name="NL_PER_PULSE" Type="float" Nullable="false" />
<Property Name="CAPACITY" Type="float" Nullable="false" />
- <Property Name="MIN_FREQUENCY" Type="int" Nullable="false" />
- <Property Name="MAX_FREQUENCY" Type="int" Nullable="false" />
- <Property Name="MIN_MICRO_STEP" Type="int" Nullable="false" />
- <Property Name="MAX_MICRO_STEP" Type="int" Nullable="false" />
- <Property Name="CORRECTION_GAIN" Type="float" Nullable="false" />
- <Property Name="RATIO_TO_DRYER_SPEED" Type="float" Nullable="false" />
- <Property Name="KP" Type="float" Nullable="false" />
- <Property Name="KI" Type="float" Nullable="false" />
- <Property Name="KD" Type="float" Nullable="false" />
- <Property Name="CHANGE_SLOPE" Type="float" Nullable="false" />
- <Property Name="HIGH_LENGTH_MICRO_SECOND" Type="float" Nullable="false" />
- <Property Name="CONTROL_TIMING" Type="int" Nullable="false" />
</EntityType>
<EntityType Name="EMBEDDED_FIRMWARE_VERSIONS">
<Key>
@@ -366,6 +354,7 @@
<Property Name="CODE" Type="int" Nullable="false" />
<Property Name="NAME" Type="varchar" MaxLength="50" Nullable="false" />
<Property Name="DESCRIPTION" Type="varchar" MaxLength="100" Nullable="false" />
+ <Property Name="SUPPORTS_HOMING" Type="bit" Nullable="false" />
</EntityType>
<EntityType Name="HARDWARE_MOTORS">
<Key>
@@ -387,6 +376,14 @@
<Property Name="PULLEY_RADIUS" Type="float" Nullable="false" />
<Property Name="CONFIG_WORD" Type="int" Nullable="false" />
<Property Name="DIRECTION_THREAD_WIZE" Type="bit" Nullable="false" />
+ <Property Name="KVAL_HOLD" Type="int" Nullable="false" />
+ <Property Name="KVAL_RUN" Type="int" Nullable="false" />
+ <Property Name="KVAL_ACC" Type="int" Nullable="false" />
+ <Property Name="KVAL_DEC" Type="int" Nullable="false" />
+ <Property Name="OVER_CURRENT_THRESHOLD" Type="int" Nullable="false" />
+ <Property Name="STALL_THRESHOLD" Type="int" Nullable="false" />
+ <Property Name="THERMAL_COMPENSATION_FACTOR" Type="int" Nullable="false" />
+ <Property Name="LOW_SPEED_OPTIMIZATION" Type="bit" Nullable="false" />
</EntityType>
<EntityType Name="HARDWARE_PID_CONTROL_TYPES">
<Key>
@@ -490,13 +487,14 @@
<Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" />
<Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" />
<Property Name="CONFIGURATION_GUID" Type="varchar" MaxLength="36" Nullable="false" />
- <Property Name="DISPENSER_TYPE_GUID" Type="varchar" MaxLength="36" Nullable="false" />
- <Property Name="LIQUID_TYPE_GUID" Type="varchar" MaxLength="36" Nullable="false" />
- <Property Name="CARTRIDGE_TYPE_GUID" Type="varchar" MaxLength="36" Nullable="false" />
- <Property Name="MID_TANK_TYPE_GUID" Type="varchar" MaxLength="36" Nullable="false" />
+ <Property Name="DISPENSER_TYPE_GUID" Type="varchar" MaxLength="36" />
+ <Property Name="LIQUID_TYPE_GUID" Type="varchar" MaxLength="36" />
+ <Property Name="CARTRIDGE_TYPE_GUID" Type="varchar" MaxLength="36" />
+ <Property Name="MID_TANK_TYPE_GUID" Type="varchar" MaxLength="36" />
+ <Property Name="IDS_PACK_FORMULA_GUID" Type="varchar" MaxLength="36" />
<Property Name="NAME" Type="nvarchar" MaxLength="50" Nullable="false" />
<Property Name="PACK_INDEX" Type="int" Nullable="false" />
- <Property Name="IDS_PACK_FORMULA_GUID" Type="varchar" MaxLength="36" Nullable="false" />
+ <Property Name="IS_EMPTY" Type="bit" Nullable="false" />
</EntityType>
<EntityType Name="JOB_RUNS">
<Key>
@@ -892,18 +890,6 @@
<Property Name="MULTI_CHANNEL" Type="bit" Nullable="false" />
<Property Name="CHANNEL_COUNT" Type="int" Nullable="false" />
</EntityType>
- <EntityType Name="TECH_MOTORS">
- <Key>
- <PropertyRef Name="GUID" />
- </Key>
- <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
- <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" />
- <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" />
- <Property Name="CODE" Type="int" Nullable="false" />
- <Property Name="NAME" Type="varchar" MaxLength="100" Nullable="false" />
- <Property Name="DESCRIPTION" Type="varchar" MaxLength="100" Nullable="false" />
- <Property Name="SUPPORTS_HOMING" Type="bit" Nullable="false" />
- </EntityType>
<EntityType Name="TECH_VALVES">
<Key>
<PropertyRef Name="GUID" />
@@ -1107,7 +1093,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_CONFIGURATIONS_DISPENSERS_LIQUIDS">
- <End Role="LIQUID_TYPES" Type="Self.LIQUID_TYPES" Multiplicity="1" />
+ <End Role="LIQUID_TYPES" Type="Self.LIQUID_TYPES" Multiplicity="0..1" />
<End Role="IDS_PACKS" Type="Self.IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="LIQUID_TYPES">
@@ -1327,7 +1313,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_IDS_PACKS_CARTRIDGE_TYPES">
- <End Role="CARTRIDGE_TYPES" Type="Self.CARTRIDGE_TYPES" Multiplicity="1" />
+ <End Role="CARTRIDGE_TYPES" Type="Self.CARTRIDGE_TYPES" Multiplicity="0..1" />
<End Role="IDS_PACKS" Type="Self.IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="CARTRIDGE_TYPES">
@@ -1353,7 +1339,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_IDS_PACKS_DISPENSER_TYPES">
- <End Role="DISPENSER_TYPES" Type="Self.DISPENSER_TYPES" Multiplicity="1" />
+ <End Role="DISPENSER_TYPES" Type="Self.DISPENSER_TYPES" Multiplicity="0..1" />
<End Role="IDS_PACKS" Type="Self.IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="DISPENSER_TYPES">
@@ -1365,7 +1351,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_IDS_PACKS_IDS_PACK_FORMULAS">
- <End Role="IDS_PACK_FORMULAS" Type="Self.IDS_PACK_FORMULAS" Multiplicity="1" />
+ <End Role="IDS_PACK_FORMULAS" Type="Self.IDS_PACK_FORMULAS" Multiplicity="0..1" />
<End Role="IDS_PACKS" Type="Self.IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="IDS_PACK_FORMULAS">
@@ -1377,7 +1363,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_IDS_PACKS_MID_TANK_TYPES">
- <End Role="MID_TANK_TYPES" Type="Self.MID_TANK_TYPES" Multiplicity="1" />
+ <End Role="MID_TANK_TYPES" Type="Self.MID_TANK_TYPES" Multiplicity="0..1" />
<End Role="IDS_PACKS" Type="Self.IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="MID_TANK_TYPES">
@@ -1933,7 +1919,6 @@
<EntitySet Name="TECH_DISPENSERS" EntityType="Self.TECH_DISPENSERS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="TECH_IOS" EntityType="Self.TECH_IOS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="TECH_MONITORS" EntityType="Self.TECH_MONITORS" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="TECH_MOTORS" EntityType="Self.TECH_MOTORS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="TECH_VALVES" EntityType="Self.TECH_VALVES" Schema="dbo" store:Type="Tables" />
<EntitySet Name="USERS" EntityType="Self.USERS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="USERS_ROLES" EntityType="Self.USERS_ROLES" Schema="dbo" store:Type="Tables" />
@@ -2292,7 +2277,6 @@
<EntitySet Name="TECH_DISPENSERS" EntityType="RemoteModel.TECH_DISPENSERS" />
<EntitySet Name="TECH_IOS" EntityType="RemoteModel.TECH_IOS" />
<EntitySet Name="TECH_MONITORS" EntityType="RemoteModel.TECH_MONITORS" />
- <EntitySet Name="TECH_MOTORS" EntityType="RemoteModel.TECH_MOTORS" />
<EntitySet Name="TECH_VALVES" EntityType="RemoteModel.TECH_VALVES" />
<EntitySet Name="USERS" EntityType="RemoteModel.USER" />
<EntitySet Name="USERS_ROLES" EntityType="RemoteModel.USERS_ROLES" />
@@ -2835,18 +2819,6 @@
<Property Name="NAME" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="NL_PER_PULSE" Type="Double" Nullable="false" />
<Property Name="CAPACITY" Type="Double" Nullable="false" />
- <Property Name="MIN_FREQUENCY" Type="Int32" Nullable="false" />
- <Property Name="MAX_FREQUENCY" Type="Int32" Nullable="false" />
- <Property Name="MIN_MICRO_STEP" Type="Int32" Nullable="false" />
- <Property Name="MAX_MICRO_STEP" Type="Int32" Nullable="false" />
- <Property Name="CORRECTION_GAIN" Type="Double" Nullable="false" />
- <Property Name="RATIO_TO_DRYER_SPEED" Type="Double" Nullable="false" />
- <Property Name="KP" Type="Double" Nullable="false" />
- <Property Name="KI" Type="Double" Nullable="false" />
- <Property Name="KD" Type="Double" Nullable="false" />
- <Property Name="CHANGE_SLOPE" Type="Double" Nullable="false" />
- <Property Name="HIGH_LENGTH_MICRO_SECOND" Type="Double" Nullable="false" />
- <Property Name="CONTROL_TIMING" Type="Int32" Nullable="false" />
<NavigationProperty Name="IDS_PACKS" Relationship="RemoteModel.FK_IDS_PACKS_DISPENSER_TYPES" FromRole="DISPENSER_TYPES" ToRole="IDS_PACKS" />
</EntityType>
<EntityType Name="EMBEDDED_FIRMWARE_VERSIONS">
@@ -2992,6 +2964,7 @@
<Property Name="CODE" Type="Int32" Nullable="false" />
<Property Name="NAME" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="DESCRIPTION" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
+ <Property Name="SUPPORTS_HOMING" Type="Boolean" Nullable="false" />
<NavigationProperty Name="HARDWARE_MOTORS" Relationship="RemoteModel.FK_HARDWARE_MOTORS_HARDWARE_MOTOR_TYPES" FromRole="HARDWARE_MOTOR_TYPES" ToRole="HARDWARE_MOTORS" />
</EntityType>
<EntityType Name="HARDWARE_MOTORS">
@@ -3014,6 +2987,14 @@
<Property Name="PULLEY_RADIUS" Type="Double" Nullable="false" />
<Property Name="CONFIG_WORD" Type="Int32" Nullable="false" />
<Property Name="DIRECTION_THREAD_WIZE" Type="Boolean" Nullable="false" />
+ <Property Name="KVAL_HOLD" Type="Int32" Nullable="false" />
+ <Property Name="KVAL_RUN" Type="Int32" Nullable="false" />
+ <Property Name="KVAL_ACC" Type="Int32" Nullable="false" />
+ <Property Name="KVAL_DEC" Type="Int32" Nullable="false" />
+ <Property Name="OVER_CURRENT_THRESHOLD" Type="Int32" Nullable="false" />
+ <Property Name="STALL_THRESHOLD" Type="Int32" Nullable="false" />
+ <Property Name="THERMAL_COMPENSATION_FACTOR" Type="Int32" Nullable="false" />
+ <Property Name="LOW_SPEED_OPTIMIZATION" Type="Boolean" Nullable="false" />
<NavigationProperty Name="HARDWARE_MOTOR_TYPES" Relationship="RemoteModel.FK_HARDWARE_MOTORS_HARDWARE_MOTOR_TYPES" FromRole="HARDWARE_MOTORS" ToRole="HARDWARE_MOTOR_TYPES" />
<NavigationProperty Name="HARDWARE_VERSIONS" Relationship="RemoteModel.FK_HARDWARE_MOTORS_HARDWARE_VERSIONS" FromRole="HARDWARE_MOTORS" ToRole="HARDWARE_VERSIONS" />
</EntityType>
@@ -3132,13 +3113,14 @@
<Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
<Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" />
<Property Name="CONFIGURATION_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
- <Property Name="DISPENSER_TYPE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
- <Property Name="LIQUID_TYPE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
- <Property Name="CARTRIDGE_TYPE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
- <Property Name="MID_TANK_TYPE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="DISPENSER_TYPE_GUID" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="LIQUID_TYPE_GUID" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="CARTRIDGE_TYPE_GUID" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="MID_TANK_TYPE_GUID" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="IDS_PACK_FORMULA_GUID" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
<Property Name="NAME" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="PACK_INDEX" Type="Int32" Nullable="false" />
- <Property Name="IDS_PACK_FORMULA_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="IS_EMPTY" Type="Boolean" Nullable="false" />
<NavigationProperty Name="CARTRIDGE_TYPES" Relationship="RemoteModel.FK_IDS_PACKS_CARTRIDGE_TYPES" FromRole="IDS_PACKS" ToRole="CARTRIDGE_TYPES" />
<NavigationProperty Name="CONFIGURATION" Relationship="RemoteModel.FK_IDS_PACKS_CONFIGURATIONS" FromRole="IDS_PACKS" ToRole="CONFIGURATION" />
<NavigationProperty Name="DISPENSER_TYPES" Relationship="RemoteModel.FK_IDS_PACKS_DISPENSER_TYPES" FromRole="IDS_PACKS" ToRole="DISPENSER_TYPES" />
@@ -3601,18 +3583,6 @@
<Property Name="MULTI_CHANNEL" Type="Boolean" Nullable="false" />
<Property Name="CHANNEL_COUNT" Type="Int32" Nullable="false" />
</EntityType>
- <EntityType Name="TECH_MOTORS">
- <Key>
- <PropertyRef Name="GUID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
- <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" />
- <Property Name="CODE" Type="Int32" Nullable="false" />
- <Property Name="NAME" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
- <Property Name="DESCRIPTION" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
- <Property Name="SUPPORTS_HOMING" Type="Boolean" Nullable="false" />
- </EntityType>
<EntityType Name="TECH_VALVES">
<Key>
<PropertyRef Name="GUID" />
@@ -3800,7 +3770,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_IDS_PACKS_CARTRIDGE_TYPES">
- <End Type="RemoteModel.CARTRIDGE_TYPES" Role="CARTRIDGE_TYPES" Multiplicity="1" />
+ <End Type="RemoteModel.CARTRIDGE_TYPES" Role="CARTRIDGE_TYPES" Multiplicity="0..1" />
<End Type="RemoteModel.IDS_PACKS" Role="IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="CARTRIDGE_TYPES">
@@ -3996,7 +3966,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_IDS_PACKS_DISPENSER_TYPES">
- <End Type="RemoteModel.DISPENSER_TYPES" Role="DISPENSER_TYPES" Multiplicity="1" />
+ <End Type="RemoteModel.DISPENSER_TYPES" Role="DISPENSER_TYPES" Multiplicity="0..1" />
<End Type="RemoteModel.IDS_PACKS" Role="IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="DISPENSER_TYPES">
@@ -4204,7 +4174,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_IDS_PACKS_IDS_PACK_FORMULAS">
- <End Type="RemoteModel.IDS_PACK_FORMULAS" Role="IDS_PACK_FORMULAS" Multiplicity="1" />
+ <End Type="RemoteModel.IDS_PACK_FORMULAS" Role="IDS_PACK_FORMULAS" Multiplicity="0..1" />
<End Type="RemoteModel.IDS_PACKS" Role="IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="IDS_PACK_FORMULAS">
@@ -4216,7 +4186,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_CONFIGURATIONS_DISPENSERS_LIQUIDS">
- <End Type="RemoteModel.LIQUID_TYPES" Role="LIQUID_TYPES" Multiplicity="1" />
+ <End Type="RemoteModel.LIQUID_TYPES" Role="LIQUID_TYPES" Multiplicity="0..1" />
<End Type="RemoteModel.IDS_PACKS" Role="IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="LIQUID_TYPES">
@@ -4228,7 +4198,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_IDS_PACKS_MID_TANK_TYPES">
- <End Type="RemoteModel.MID_TANK_TYPES" Role="MID_TANK_TYPES" Multiplicity="1" />
+ <End Type="RemoteModel.MID_TANK_TYPES" Role="MID_TANK_TYPES" Multiplicity="0..1" />
<End Type="RemoteModel.IDS_PACKS" Role="IDS_PACKS" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="MID_TANK_TYPES">
@@ -4820,18 +4790,6 @@
<EntitySetMapping Name="DISPENSER_TYPES">
<EntityTypeMapping TypeName="RemoteModel.DISPENSER_TYPES">
<MappingFragment StoreEntitySet="DISPENSER_TYPES">
- <ScalarProperty Name="CONTROL_TIMING" ColumnName="CONTROL_TIMING" />
- <ScalarProperty Name="HIGH_LENGTH_MICRO_SECOND" ColumnName="HIGH_LENGTH_MICRO_SECOND" />
- <ScalarProperty Name="CHANGE_SLOPE" ColumnName="CHANGE_SLOPE" />
- <ScalarProperty Name="KD" ColumnName="KD" />
- <ScalarProperty Name="KI" ColumnName="KI" />
- <ScalarProperty Name="KP" ColumnName="KP" />
- <ScalarProperty Name="RATIO_TO_DRYER_SPEED" ColumnName="RATIO_TO_DRYER_SPEED" />
- <ScalarProperty Name="CORRECTION_GAIN" ColumnName="CORRECTION_GAIN" />
- <ScalarProperty Name="MAX_MICRO_STEP" ColumnName="MAX_MICRO_STEP" />
- <ScalarProperty Name="MIN_MICRO_STEP" ColumnName="MIN_MICRO_STEP" />
- <ScalarProperty Name="MAX_FREQUENCY" ColumnName="MAX_FREQUENCY" />
- <ScalarProperty Name="MIN_FREQUENCY" ColumnName="MIN_FREQUENCY" />
<ScalarProperty Name="CAPACITY" ColumnName="CAPACITY" />
<ScalarProperty Name="NL_PER_PULSE" ColumnName="NL_PER_PULSE" />
<ScalarProperty Name="NAME" ColumnName="NAME" />
@@ -4972,6 +4930,7 @@
<EntitySetMapping Name="HARDWARE_MOTOR_TYPES">
<EntityTypeMapping TypeName="RemoteModel.HARDWARE_MOTOR_TYPES">
<MappingFragment StoreEntitySet="HARDWARE_MOTOR_TYPES">
+ <ScalarProperty Name="SUPPORTS_HOMING" ColumnName="SUPPORTS_HOMING" />
<ScalarProperty Name="DESCRIPTION" ColumnName="DESCRIPTION" />
<ScalarProperty Name="NAME" ColumnName="NAME" />
<ScalarProperty Name="CODE" ColumnName="CODE" />
@@ -4984,6 +4943,14 @@
<EntitySetMapping Name="HARDWARE_MOTORS">
<EntityTypeMapping TypeName="RemoteModel.HARDWARE_MOTORS">
<MappingFragment StoreEntitySet="HARDWARE_MOTORS">
+ <ScalarProperty Name="LOW_SPEED_OPTIMIZATION" ColumnName="LOW_SPEED_OPTIMIZATION" />
+ <ScalarProperty Name="THERMAL_COMPENSATION_FACTOR" ColumnName="THERMAL_COMPENSATION_FACTOR" />
+ <ScalarProperty Name="STALL_THRESHOLD" ColumnName="STALL_THRESHOLD" />
+ <ScalarProperty Name="OVER_CURRENT_THRESHOLD" ColumnName="OVER_CURRENT_THRESHOLD" />
+ <ScalarProperty Name="KVAL_DEC" ColumnName="KVAL_DEC" />
+ <ScalarProperty Name="KVAL_ACC" ColumnName="KVAL_ACC" />
+ <ScalarProperty Name="KVAL_RUN" ColumnName="KVAL_RUN" />
+ <ScalarProperty Name="KVAL_HOLD" ColumnName="KVAL_HOLD" />
<ScalarProperty Name="DIRECTION_THREAD_WIZE" ColumnName="DIRECTION_THREAD_WIZE" />
<ScalarProperty Name="CONFIG_WORD" ColumnName="CONFIG_WORD" />
<ScalarProperty Name="PULLEY_RADIUS" ColumnName="PULLEY_RADIUS" />
@@ -5107,9 +5074,10 @@
<EntitySetMapping Name="IDS_PACKS">
<EntityTypeMapping TypeName="RemoteModel.IDS_PACKS">
<MappingFragment StoreEntitySet="IDS_PACKS">
- <ScalarProperty Name="IDS_PACK_FORMULA_GUID" ColumnName="IDS_PACK_FORMULA_GUID" />
+ <ScalarProperty Name="IS_EMPTY" ColumnName="IS_EMPTY" />
<ScalarProperty Name="PACK_INDEX" ColumnName="PACK_INDEX" />
<ScalarProperty Name="NAME" ColumnName="NAME" />
+ <ScalarProperty Name="IDS_PACK_FORMULA_GUID" ColumnName="IDS_PACK_FORMULA_GUID" />
<ScalarProperty Name="MID_TANK_TYPE_GUID" ColumnName="MID_TANK_TYPE_GUID" />
<ScalarProperty Name="CARTRIDGE_TYPE_GUID" ColumnName="CARTRIDGE_TYPE_GUID" />
<ScalarProperty Name="LIQUID_TYPE_GUID" ColumnName="LIQUID_TYPE_GUID" />
@@ -5544,19 +5512,6 @@
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
- <EntitySetMapping Name="TECH_MOTORS">
- <EntityTypeMapping TypeName="RemoteModel.TECH_MOTORS">
- <MappingFragment StoreEntitySet="TECH_MOTORS">
- <ScalarProperty Name="SUPPORTS_HOMING" ColumnName="SUPPORTS_HOMING" />
- <ScalarProperty Name="DESCRIPTION" ColumnName="DESCRIPTION" />
- <ScalarProperty Name="NAME" ColumnName="NAME" />
- <ScalarProperty Name="CODE" ColumnName="CODE" />
- <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
- <ScalarProperty Name="GUID" ColumnName="GUID" />
- <ScalarProperty Name="ID" ColumnName="ID" />
- </MappingFragment>
- </EntityTypeMapping>
- </EntitySetMapping>
<EntitySetMapping Name="TECH_VALVES">
<EntityTypeMapping TypeName="RemoteModel.TECH_VALVES">
<MappingFragment StoreEntitySet="TECH_VALVES">
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
index 5e2999f23..4ec7750f2 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
@@ -5,75 +5,74 @@
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1">
- <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="6" PointY="75.75" />
- <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="78.125" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="34.75" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="64.125" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="31.875" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_VERSIONS" Width="1.5" PointX="1.5" PointY="58.25" />
- <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="12.75" PointY="12.125" />
+ <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="3" PointY="111.5" />
+ <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="41" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="58.25" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="81.625" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="72.875" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_VERSIONS" Width="1.5" PointX="1.5" PointY="75.75" />
+ <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="10.75" PointY="6.375" />
<EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="6" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="15.625" />
- <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="32.875" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="10.5" PointY="6.5" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="8.25" PointY="8.25" />
- <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="0.75" PointY="39.375" />
- <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="74.125" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="6" PointY="62.625" />
- <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="61.25" />
- <EntityTypeShape EntityType="RemoteModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="55.375" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="6" PointY="70.875" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="8.25" PointY="71.75" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="3.75" PointY="75" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="3.75" PointY="71.875" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="28.375" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="19.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="1.5" PointY="83" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="3.75" PointY="51.25" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="1.5" PointY="87" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="3.75" PointY="55.875" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="4.5" PointY="83" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="6.75" PointY="55.375" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="51.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="4.5" PointY="79" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="6.75" PointY="51.875" />
- <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="3.75" PointY="68.5" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="47.25" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="21.625" />
- <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="10.5" PointY="17.625" />
- <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="8.25" PointY="14" />
- <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="8.75" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="8.625" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="11.875" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="8.25" PointY="37.875" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="0.75" PointY="47.375" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="3" PointY="45.625" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="5.25" PointY="43.625" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="8.25" PointY="33.25" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="15.875" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="22.5" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="11.625" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="25.5" />
- <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="37.625" />
- <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="0.75" PointY="69.375" />
- <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="9" PointY="41.625" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="26.875" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="28.125" />
- <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="13.25" />
- <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="9" PointY="2.5" />
- <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="11.25" PointY="2.625" />
- <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="10.5" PointY="14.125" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="6" PointY="7.25" />
- <EntityTypeShape EntityType="RemoteModel.SYNC_CONFIGURATIONS" Width="1.5" PointX="0.75" PointY="2" />
- <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="2" />
- <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="12.75" PointY="6" />
- <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="14.75" PointY="2" />
- <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="14.75" PointY="7" />
- <EntityTypeShape EntityType="RemoteModel.TECH_MOTORS" Width="1.5" PointX="14.75" PointY="12" />
- <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="14.75" PointY="16" />
- <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="6" PointY="19.625" />
- <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="11.25" PointY="21.5" />
- <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="6" PointY="3.75" />
+ <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="8.25" PointY="15.875" />
+ <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="33.125" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="8.5" PointY="37.75" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="6.25" PointY="39.5" />
+ <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="0.75" PointY="62.75" />
+ <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="51" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="6" PointY="43.125" />
+ <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="55.25" />
+ <EntityTypeShape EntityType="RemoteModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="78.625" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="3" PointY="95.625" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="5.25" PointY="96.5" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="0.75" PointY="93.25" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="0.75" PointY="99.625" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="9" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="11.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="4.5" PointY="79.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="6.75" PointY="68.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="3.5" PointY="89.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="5.75" PointY="61.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="1.5" PointY="107.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="3.75" PointY="72.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="69.125" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="1.5" PointY="103.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="3.75" PointY="69.375" />
+ <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="0.75" PointY="96.375" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="46.5" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="31.875" />
+ <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="7.5" PointY="26.875" />
+ <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="5.25" PointY="13.25" />
+ <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="25.75" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="6" PointY="3.875" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="8.25" PointY="12.125" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="5.25" PointY="82.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="0.75" PointY="31.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="3" PointY="45.5" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="5.25" PointY="55.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="5.25" PointY="51" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="16.125" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="28.625" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="19.875" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="22.75" />
+ <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="73.625" />
+ <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="0.75" PointY="37.25" />
+ <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="6" PointY="90.5" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="19.875" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="21.125" />
+ <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="13.5" />
+ <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="6" PointY="86.375" />
+ <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="8.25" PointY="86.5" />
+ <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="7.5" PointY="8.375" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="3" PointY="84.625" />
+ <EntityTypeShape EntityType="RemoteModel.SYNC_CONFIGURATIONS" Width="1.5" PointX="0.75" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="2.75" PointY="6.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="4.75" PointY="8.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="8.75" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="10.75" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="3" PointY="61.5" />
+ <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="8.25" PointY="62.375" />
+ <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="3" PointY="37.5" />
<AssociationConnector Association="RemoteModel.FK_EVENTS_ACTIONS_ACTIONS" />
<AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" />
<AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" />
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_MOTORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_MOTORS.cs
deleted file mode 100644
index e4b77478d..000000000
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_MOTORS.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated from a template.
-//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Tango.DAL.Remote.DB
-{
- using System;
- using System.Collections.Generic;
-
- public partial class TECH_MOTORS
- {
- public int ID { get; set; }
- public string GUID { get; set; }
- public System.DateTime LAST_UPDATED { get; set; }
- public int CODE { get; set; }
- public string NAME { get; set; }
- public string DESCRIPTION { get; set; }
- public bool SUPPORTS_HOMING { get; set; }
- }
-}
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj
index 51d3510ce..cdb6990e9 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj
+++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj
@@ -272,9 +272,6 @@
<Compile Include="DB\TECH_MONITORS.cs">
<DependentUpon>RemoteADO.tt</DependentUpon>
</Compile>
- <Compile Include="DB\TECH_MOTORS.cs">
- <DependentUpon>RemoteADO.tt</DependentUpon>
- </Compile>
<Compile Include="DB\TECH_VALVES.cs">
<DependentUpon>RemoteADO.tt</DependentUpon>
</Compile>
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
index efe4fe7af..9d1364012 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
@@ -101,9 +101,10 @@ namespace Tango.Integration.Operation
/// <summary>
/// Uploads the specified hardware configuration to the embedded device.
/// </summary>
- /// <param name="hardwareConfiguration">The hardware configuration.</param>
+ /// <param name="hardwareVersion">Machine version.</param>
+ /// <param name="configuration">Machine configuration.</param>
/// <returns></returns>
- Task<UploadHardwareConfigurationResponse> UploadHardwareConfiguration(HardwareConfiguration hardwareConfiguration);
+ Task<UploadHardwareConfigurationResponse> UploadHardwareConfiguration(HardwareVersion hardwareVersion, Configuration configuration);
/// <summary>
/// Starts jogging the specified motor.
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 118bbc38a..64cf2f7dc 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -551,10 +551,54 @@ namespace Tango.Integration.Operation
/// <summary>
/// Uploads the specified hardware configuration to the embedded device.
/// </summary>
- /// <param name="hardwareConfiguration">The hardware configuration.</param>
+ /// <param name="hardwareVersion">Machine version.</param>
+ /// <param name="configuration">Machine configuration.</param>
/// <returns></returns>
- public async Task<UploadHardwareConfigurationResponse> UploadHardwareConfiguration(HardwareConfiguration hardwareConfiguration)
+ public async Task<UploadHardwareConfigurationResponse> UploadHardwareConfiguration(HardwareVersion hardwareVersion, Configuration configuration)
{
+ HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+ foreach (var dancer in hardwareVersion.HardwareDancers)
+ {
+ PMR.Hardware.HardwareDancer item = new PMR.Hardware.HardwareDancer();
+ dancer.MapPrimitivesTo(item);
+ item.HardwareDancerType = (PMR.Hardware.HardwareDancerType)dancer.HardwareDancerType.Code;
+ hardwareConfiguration.Dancers.Add(item);
+ }
+
+ foreach (var motor in hardwareVersion.HardwareMotors)
+ {
+ PMR.Hardware.HardwareMotor item = new PMR.Hardware.HardwareMotor();
+ motor.MapPrimitivesTo(item);
+ item.HardwareMotorType = (PMR.Hardware.HardwareMotorType)motor.HardwareMotorType.Code;
+ hardwareConfiguration.Motors.Add(item);
+ }
+
+ foreach (var pid in hardwareVersion.HardwarePidControls)
+ {
+ PMR.Hardware.HardwarePidControl item = new PMR.Hardware.HardwarePidControl();
+ pid.MapPrimitivesTo(item);
+ item.HardwarePidControlType = (PMR.Hardware.HardwarePidControlType)pid.HardwarePidControlType.Code;
+ hardwareConfiguration.PidControls.Add(item);
+ }
+
+ foreach (var winder in hardwareVersion.HardwareWinders)
+ {
+ PMR.Hardware.HardwareWinder item = new PMR.Hardware.HardwareWinder();
+ winder.MapPrimitivesTo(item);
+ item.HardwareWinderType = (PMR.Hardware.HardwareWinderType)winder.HardwareWinderType.Code;
+ hardwareConfiguration.Winders.Add(item);
+ }
+
+ foreach (var idsPack in configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex))
+ {
+ PMR.Hardware.HardwareDispenser item = new PMR.Hardware.HardwareDispenser();
+ idsPack.DispenserType.MapPrimitivesTo(item);
+ item.HardwareDispenserType = (PMR.Hardware.HardwareDispenserType)idsPack.DispenserType.Code;
+ item.Index = idsPack.PackIndex;
+ hardwareConfiguration.Dispensers.Add(item);
+ }
+
UploadHardwareConfigurationRequest request = new UploadHardwareConfigurationRequest();
request.HardwareConfiguration = hardwareConfiguration;
diff --git a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs
index 3a255480d..6e4e81579 100644
--- a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs
+++ b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs
@@ -13,14 +13,14 @@ namespace Tango.PMR
/// <summary>
/// Contains PMR extension methods.
/// </summary>
- public static class ExtensionMethods
+ public static class ExtensionMethods
{
/// <summary>
/// Gets the protobuf <see cref="OriginalNameAttribute"/> attribute value from the message type.
/// </summary>
/// <param name="value">The value.</param>
/// <returns></returns>
- public static String ToOriginalName(this MessageType value)
+ public static String ToOriginalName(this MessageType value)
{
FieldInfo fi = value.GetType().GetField(value.ToString());
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
index ce7036ca2..9e5920f01 100644
--- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
@@ -23,21 +23,15 @@ namespace Tango.PMR.Hardware {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChdIYXJkd2FyZURpc3BlbnNlci5wcm90bxISVGFuZ28uUE1SLkhhcmR3YXJl",
- "GhtIYXJkd2FyZURpc3BlbnNlclR5cGUucHJvdG8i/QIKEUhhcmR3YXJlRGlz",
+ "GhtIYXJkd2FyZURpc3BlbnNlclR5cGUucHJvdG8ikgEKEUhhcmR3YXJlRGlz",
"cGVuc2VyEkgKFUhhcmR3YXJlRGlzcGVuc2VyVHlwZRgBIAEoDjIpLlRhbmdv",
- "LlBNUi5IYXJkd2FyZS5IYXJkd2FyZURpc3BlbnNlclR5cGUSEgoKTmxQZXJQ",
- "dWxzZRgCIAEoARIQCghDYXBhY2l0eRgDIAEoARIUCgxNaW5GcmVxdWVuY3kY",
- "BCABKAUSFAoMTWF4RnJlcXVlbmN5GAUgASgFEhQKDE1pbk1pY3JvU3RlcBgG",
- "IAEoBRIUCgxNYXhNaWNyb1N0ZXAYByABKAUSFgoOQ29ycmVjdGlvbkdhaW4Y",
- "CCABKAESGQoRUmF0aW9Ub0RyeWVyU3BlZWQYCSABKAESCgoCS3AYCiABKAES",
- "CgoCS2kYCyABKAESCgoCS2QYDCABKAESEwoLQ2hhbmdlU2xvcGUYDSABKAES",
- "HQoVSGlnaExlbmd0aE1pY3JvU2Vjb25kGA4gASgBEhUKDUNvbnRyb2xUaW1p",
- "bmcYDyABKAVCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJv",
- "dG8z"));
+ "LlBNUi5IYXJkd2FyZS5IYXJkd2FyZURpc3BlbnNlclR5cGUSDQoFSW5kZXgY",
+ "AiABKAUSEgoKTmxQZXJQdWxzZRgDIAEoARIQCghDYXBhY2l0eRgEIAEoAUIe",
+ "Chxjb20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareDispenserTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareDispenser), global::Tango.PMR.Hardware.HardwareDispenser.Parser, new[]{ "HardwareDispenserType", "NlPerPulse", "Capacity", "MinFrequency", "MaxFrequency", "MinMicroStep", "MaxMicroStep", "CorrectionGain", "RatioToDryerSpeed", "Kp", "Ki", "Kd", "ChangeSlope", "HighLengthMicroSecond", "ControlTiming" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareDispenser), global::Tango.PMR.Hardware.HardwareDispenser.Parser, new[]{ "HardwareDispenserType", "Index", "NlPerPulse", "Capacity" }, null, null, null)
}));
}
#endregion
@@ -69,20 +63,9 @@ namespace Tango.PMR.Hardware {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public HardwareDispenser(HardwareDispenser other) : this() {
hardwareDispenserType_ = other.hardwareDispenserType_;
+ index_ = other.index_;
nlPerPulse_ = other.nlPerPulse_;
capacity_ = other.capacity_;
- minFrequency_ = other.minFrequency_;
- maxFrequency_ = other.maxFrequency_;
- minMicroStep_ = other.minMicroStep_;
- maxMicroStep_ = other.maxMicroStep_;
- correctionGain_ = other.correctionGain_;
- ratioToDryerSpeed_ = other.ratioToDryerSpeed_;
- kp_ = other.kp_;
- ki_ = other.ki_;
- kd_ = other.kd_;
- changeSlope_ = other.changeSlope_;
- highLengthMicroSecond_ = other.highLengthMicroSecond_;
- controlTiming_ = other.controlTiming_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -101,8 +84,19 @@ namespace Tango.PMR.Hardware {
}
}
+ /// <summary>Field number for the "Index" field.</summary>
+ public const int IndexFieldNumber = 2;
+ private int index_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Index {
+ get { return index_; }
+ set {
+ index_ = value;
+ }
+ }
+
/// <summary>Field number for the "NlPerPulse" field.</summary>
- public const int NlPerPulseFieldNumber = 2;
+ public const int NlPerPulseFieldNumber = 3;
private double nlPerPulse_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double NlPerPulse {
@@ -113,7 +107,7 @@ namespace Tango.PMR.Hardware {
}
/// <summary>Field number for the "Capacity" field.</summary>
- public const int CapacityFieldNumber = 3;
+ public const int CapacityFieldNumber = 4;
private double capacity_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double Capacity {
@@ -123,138 +117,6 @@ namespace Tango.PMR.Hardware {
}
}
- /// <summary>Field number for the "MinFrequency" field.</summary>
- public const int MinFrequencyFieldNumber = 4;
- private int minFrequency_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int MinFrequency {
- get { return minFrequency_; }
- set {
- minFrequency_ = value;
- }
- }
-
- /// <summary>Field number for the "MaxFrequency" field.</summary>
- public const int MaxFrequencyFieldNumber = 5;
- private int maxFrequency_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int MaxFrequency {
- get { return maxFrequency_; }
- set {
- maxFrequency_ = value;
- }
- }
-
- /// <summary>Field number for the "MinMicroStep" field.</summary>
- public const int MinMicroStepFieldNumber = 6;
- private int minMicroStep_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int MinMicroStep {
- get { return minMicroStep_; }
- set {
- minMicroStep_ = value;
- }
- }
-
- /// <summary>Field number for the "MaxMicroStep" field.</summary>
- public const int MaxMicroStepFieldNumber = 7;
- private int maxMicroStep_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int MaxMicroStep {
- get { return maxMicroStep_; }
- set {
- maxMicroStep_ = value;
- }
- }
-
- /// <summary>Field number for the "CorrectionGain" field.</summary>
- public const int CorrectionGainFieldNumber = 8;
- private double correctionGain_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double CorrectionGain {
- get { return correctionGain_; }
- set {
- correctionGain_ = value;
- }
- }
-
- /// <summary>Field number for the "RatioToDryerSpeed" field.</summary>
- public const int RatioToDryerSpeedFieldNumber = 9;
- private double ratioToDryerSpeed_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double RatioToDryerSpeed {
- get { return ratioToDryerSpeed_; }
- set {
- ratioToDryerSpeed_ = value;
- }
- }
-
- /// <summary>Field number for the "Kp" field.</summary>
- public const int KpFieldNumber = 10;
- private double kp_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Kp {
- get { return kp_; }
- set {
- kp_ = value;
- }
- }
-
- /// <summary>Field number for the "Ki" field.</summary>
- public const int KiFieldNumber = 11;
- private double ki_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Ki {
- get { return ki_; }
- set {
- ki_ = value;
- }
- }
-
- /// <summary>Field number for the "Kd" field.</summary>
- public const int KdFieldNumber = 12;
- private double kd_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Kd {
- get { return kd_; }
- set {
- kd_ = value;
- }
- }
-
- /// <summary>Field number for the "ChangeSlope" field.</summary>
- public const int ChangeSlopeFieldNumber = 13;
- private double changeSlope_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double ChangeSlope {
- get { return changeSlope_; }
- set {
- changeSlope_ = value;
- }
- }
-
- /// <summary>Field number for the "HighLengthMicroSecond" field.</summary>
- public const int HighLengthMicroSecondFieldNumber = 14;
- private double highLengthMicroSecond_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double HighLengthMicroSecond {
- get { return highLengthMicroSecond_; }
- set {
- highLengthMicroSecond_ = value;
- }
- }
-
- /// <summary>Field number for the "ControlTiming" field.</summary>
- public const int ControlTimingFieldNumber = 15;
- private int controlTiming_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int ControlTiming {
- get { return controlTiming_; }
- set {
- controlTiming_ = value;
- }
- }
-
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as HardwareDispenser);
@@ -269,20 +131,9 @@ namespace Tango.PMR.Hardware {
return true;
}
if (HardwareDispenserType != other.HardwareDispenserType) return false;
+ if (Index != other.Index) return false;
if (NlPerPulse != other.NlPerPulse) return false;
if (Capacity != other.Capacity) return false;
- if (MinFrequency != other.MinFrequency) return false;
- if (MaxFrequency != other.MaxFrequency) return false;
- if (MinMicroStep != other.MinMicroStep) return false;
- if (MaxMicroStep != other.MaxMicroStep) return false;
- if (CorrectionGain != other.CorrectionGain) return false;
- if (RatioToDryerSpeed != other.RatioToDryerSpeed) return false;
- if (Kp != other.Kp) return false;
- if (Ki != other.Ki) return false;
- if (Kd != other.Kd) return false;
- if (ChangeSlope != other.ChangeSlope) return false;
- if (HighLengthMicroSecond != other.HighLengthMicroSecond) return false;
- if (ControlTiming != other.ControlTiming) return false;
return true;
}
@@ -290,20 +141,9 @@ namespace Tango.PMR.Hardware {
public override int GetHashCode() {
int hash = 1;
if (HardwareDispenserType != 0) hash ^= HardwareDispenserType.GetHashCode();
+ if (Index != 0) hash ^= Index.GetHashCode();
if (NlPerPulse != 0D) hash ^= NlPerPulse.GetHashCode();
if (Capacity != 0D) hash ^= Capacity.GetHashCode();
- if (MinFrequency != 0) hash ^= MinFrequency.GetHashCode();
- if (MaxFrequency != 0) hash ^= MaxFrequency.GetHashCode();
- if (MinMicroStep != 0) hash ^= MinMicroStep.GetHashCode();
- if (MaxMicroStep != 0) hash ^= MaxMicroStep.GetHashCode();
- if (CorrectionGain != 0D) hash ^= CorrectionGain.GetHashCode();
- if (RatioToDryerSpeed != 0D) hash ^= RatioToDryerSpeed.GetHashCode();
- if (Kp != 0D) hash ^= Kp.GetHashCode();
- if (Ki != 0D) hash ^= Ki.GetHashCode();
- if (Kd != 0D) hash ^= Kd.GetHashCode();
- if (ChangeSlope != 0D) hash ^= ChangeSlope.GetHashCode();
- if (HighLengthMicroSecond != 0D) hash ^= HighLengthMicroSecond.GetHashCode();
- if (ControlTiming != 0) hash ^= ControlTiming.GetHashCode();
return hash;
}
@@ -318,62 +158,18 @@ namespace Tango.PMR.Hardware {
output.WriteRawTag(8);
output.WriteEnum((int) HardwareDispenserType);
}
+ if (Index != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Index);
+ }
if (NlPerPulse != 0D) {
- output.WriteRawTag(17);
+ output.WriteRawTag(25);
output.WriteDouble(NlPerPulse);
}
if (Capacity != 0D) {
- output.WriteRawTag(25);
+ output.WriteRawTag(33);
output.WriteDouble(Capacity);
}
- if (MinFrequency != 0) {
- output.WriteRawTag(32);
- output.WriteInt32(MinFrequency);
- }
- if (MaxFrequency != 0) {
- output.WriteRawTag(40);
- output.WriteInt32(MaxFrequency);
- }
- if (MinMicroStep != 0) {
- output.WriteRawTag(48);
- output.WriteInt32(MinMicroStep);
- }
- if (MaxMicroStep != 0) {
- output.WriteRawTag(56);
- output.WriteInt32(MaxMicroStep);
- }
- if (CorrectionGain != 0D) {
- output.WriteRawTag(65);
- output.WriteDouble(CorrectionGain);
- }
- if (RatioToDryerSpeed != 0D) {
- output.WriteRawTag(73);
- output.WriteDouble(RatioToDryerSpeed);
- }
- if (Kp != 0D) {
- output.WriteRawTag(81);
- output.WriteDouble(Kp);
- }
- if (Ki != 0D) {
- output.WriteRawTag(89);
- output.WriteDouble(Ki);
- }
- if (Kd != 0D) {
- output.WriteRawTag(97);
- output.WriteDouble(Kd);
- }
- if (ChangeSlope != 0D) {
- output.WriteRawTag(105);
- output.WriteDouble(ChangeSlope);
- }
- if (HighLengthMicroSecond != 0D) {
- output.WriteRawTag(113);
- output.WriteDouble(HighLengthMicroSecond);
- }
- if (ControlTiming != 0) {
- output.WriteRawTag(120);
- output.WriteInt32(ControlTiming);
- }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -382,48 +178,15 @@ namespace Tango.PMR.Hardware {
if (HardwareDispenserType != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HardwareDispenserType);
}
+ if (Index != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
+ }
if (NlPerPulse != 0D) {
size += 1 + 8;
}
if (Capacity != 0D) {
size += 1 + 8;
}
- if (MinFrequency != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinFrequency);
- }
- if (MaxFrequency != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxFrequency);
- }
- if (MinMicroStep != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinMicroStep);
- }
- if (MaxMicroStep != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxMicroStep);
- }
- if (CorrectionGain != 0D) {
- size += 1 + 8;
- }
- if (RatioToDryerSpeed != 0D) {
- size += 1 + 8;
- }
- if (Kp != 0D) {
- size += 1 + 8;
- }
- if (Ki != 0D) {
- size += 1 + 8;
- }
- if (Kd != 0D) {
- size += 1 + 8;
- }
- if (ChangeSlope != 0D) {
- size += 1 + 8;
- }
- if (HighLengthMicroSecond != 0D) {
- size += 1 + 8;
- }
- if (ControlTiming != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(ControlTiming);
- }
return size;
}
@@ -435,48 +198,15 @@ namespace Tango.PMR.Hardware {
if (other.HardwareDispenserType != 0) {
HardwareDispenserType = other.HardwareDispenserType;
}
+ if (other.Index != 0) {
+ Index = other.Index;
+ }
if (other.NlPerPulse != 0D) {
NlPerPulse = other.NlPerPulse;
}
if (other.Capacity != 0D) {
Capacity = other.Capacity;
}
- if (other.MinFrequency != 0) {
- MinFrequency = other.MinFrequency;
- }
- if (other.MaxFrequency != 0) {
- MaxFrequency = other.MaxFrequency;
- }
- if (other.MinMicroStep != 0) {
- MinMicroStep = other.MinMicroStep;
- }
- if (other.MaxMicroStep != 0) {
- MaxMicroStep = other.MaxMicroStep;
- }
- if (other.CorrectionGain != 0D) {
- CorrectionGain = other.CorrectionGain;
- }
- if (other.RatioToDryerSpeed != 0D) {
- RatioToDryerSpeed = other.RatioToDryerSpeed;
- }
- if (other.Kp != 0D) {
- Kp = other.Kp;
- }
- if (other.Ki != 0D) {
- Ki = other.Ki;
- }
- if (other.Kd != 0D) {
- Kd = other.Kd;
- }
- if (other.ChangeSlope != 0D) {
- ChangeSlope = other.ChangeSlope;
- }
- if (other.HighLengthMicroSecond != 0D) {
- HighLengthMicroSecond = other.HighLengthMicroSecond;
- }
- if (other.ControlTiming != 0) {
- ControlTiming = other.ControlTiming;
- }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -491,60 +221,16 @@ namespace Tango.PMR.Hardware {
hardwareDispenserType_ = (global::Tango.PMR.Hardware.HardwareDispenserType) input.ReadEnum();
break;
}
- case 17: {
- NlPerPulse = input.ReadDouble();
+ case 16: {
+ Index = input.ReadInt32();
break;
}
case 25: {
- Capacity = input.ReadDouble();
- break;
- }
- case 32: {
- MinFrequency = input.ReadInt32();
- break;
- }
- case 40: {
- MaxFrequency = input.ReadInt32();
- break;
- }
- case 48: {
- MinMicroStep = input.ReadInt32();
- break;
- }
- case 56: {
- MaxMicroStep = input.ReadInt32();
- break;
- }
- case 65: {
- CorrectionGain = input.ReadDouble();
- break;
- }
- case 73: {
- RatioToDryerSpeed = input.ReadDouble();
- break;
- }
- case 81: {
- Kp = input.ReadDouble();
- break;
- }
- case 89: {
- Ki = input.ReadDouble();
- break;
- }
- case 97: {
- Kd = input.ReadDouble();
- break;
- }
- case 105: {
- ChangeSlope = input.ReadDouble();
- break;
- }
- case 113: {
- HighLengthMicroSecond = input.ReadDouble();
+ NlPerPulse = input.ReadDouble();
break;
}
- case 120: {
- ControlTiming = input.ReadInt32();
+ case 33: {
+ Capacity = input.ReadDouble();
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs
index 093270524..6f6e2abdd 100644
--- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs
@@ -23,7 +23,7 @@ namespace Tango.PMR.Hardware {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChNIYXJkd2FyZU1vdG9yLnByb3RvEhJUYW5nby5QTVIuSGFyZHdhcmUaF0hh",
- "cmR3YXJlTW90b3JUeXBlLnByb3RvItACCg1IYXJkd2FyZU1vdG9yEkAKEUhh",
+ "cmR3YXJlTW90b3JUeXBlLnByb3RvIowECg1IYXJkd2FyZU1vdG9yEkAKEUhh",
"cmR3YXJlTW90b3JUeXBlGAEgASgOMiUuVGFuZ28uUE1SLkhhcmR3YXJlLkhh",
"cmR3YXJlTW90b3JUeXBlEhQKDE1pbkZyZXF1ZW5jeRgCIAEoBRIUCgxNYXhG",
"cmVxdWVuY3kYAyABKAUSFAoMU2V0TWljcm9TdGVwGAQgASgFEhEKCU1pY3Jv",
@@ -31,11 +31,16 @@ namespace Tango.PMR.Hardware {
"Z3RoTWljcm9TZWNvbmQYByABKAESEwoLU3BlZWRNYXN0ZXIYCCABKAgSFQoN",
"UHVsc2VQZXJSb3VuZBgJIAEoBRIUCgxQdWxsZXlSYWRpdXMYCiABKAESEgoK",
"Q29uZmlnV29yZBgLIAEoBRIbChNEaXJlY3Rpb25UaHJlYWRXaXplGAwgASgI",
- "Qh4KHGNvbS50d2luZS50YW5nby5wbXIuaGFyZHdhcmViBnByb3RvMw=="));
+ "EhAKCEt2YWxIb2xkGA0gASgFEg8KB0t2YWxSdW4YDiABKAUSDwoHS3ZhbEFj",
+ "YxgPIAEoBRIPCgdLdmFsRGVjGBAgASgFEhwKFE92ZXJDdXJyZW50VGhyZXNo",
+ "b2xkGBEgASgFEhYKDlN0YWxsVGhyZXNob2xkGBIgASgFEiEKGVRoZXJtYWxD",
+ "b21wZW5zYXRpb25GYWN0b3IYEyABKAUSHAoUTG93U3BlZWRPcHRpbWl6YXRp",
+ "b24YFCABKAhCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJv",
+ "dG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareMotorTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareMotor), global::Tango.PMR.Hardware.HardwareMotor.Parser, new[]{ "HardwareMotorType", "MinFrequency", "MaxFrequency", "SetMicroStep", "MicroStep", "MaxChangeSlope", "HighLengthMicroSecond", "SpeedMaster", "PulsePerRound", "PulleyRadius", "ConfigWord", "DirectionThreadWize" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareMotor), global::Tango.PMR.Hardware.HardwareMotor.Parser, new[]{ "HardwareMotorType", "MinFrequency", "MaxFrequency", "SetMicroStep", "MicroStep", "MaxChangeSlope", "HighLengthMicroSecond", "SpeedMaster", "PulsePerRound", "PulleyRadius", "ConfigWord", "DirectionThreadWize", "KvalHold", "KvalRun", "KvalAcc", "KvalDec", "OverCurrentThreshold", "StallThreshold", "ThermalCompensationFactor", "LowSpeedOptimization" }, null, null, null)
}));
}
#endregion
@@ -78,6 +83,14 @@ namespace Tango.PMR.Hardware {
pulleyRadius_ = other.pulleyRadius_;
configWord_ = other.configWord_;
directionThreadWize_ = other.directionThreadWize_;
+ kvalHold_ = other.kvalHold_;
+ kvalRun_ = other.kvalRun_;
+ kvalAcc_ = other.kvalAcc_;
+ kvalDec_ = other.kvalDec_;
+ overCurrentThreshold_ = other.overCurrentThreshold_;
+ stallThreshold_ = other.stallThreshold_;
+ thermalCompensationFactor_ = other.thermalCompensationFactor_;
+ lowSpeedOptimization_ = other.lowSpeedOptimization_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -217,6 +230,94 @@ namespace Tango.PMR.Hardware {
}
}
+ /// <summary>Field number for the "KvalHold" field.</summary>
+ public const int KvalHoldFieldNumber = 13;
+ private int kvalHold_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int KvalHold {
+ get { return kvalHold_; }
+ set {
+ kvalHold_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "KvalRun" field.</summary>
+ public const int KvalRunFieldNumber = 14;
+ private int kvalRun_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int KvalRun {
+ get { return kvalRun_; }
+ set {
+ kvalRun_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "KvalAcc" field.</summary>
+ public const int KvalAccFieldNumber = 15;
+ private int kvalAcc_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int KvalAcc {
+ get { return kvalAcc_; }
+ set {
+ kvalAcc_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "KvalDec" field.</summary>
+ public const int KvalDecFieldNumber = 16;
+ private int kvalDec_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int KvalDec {
+ get { return kvalDec_; }
+ set {
+ kvalDec_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "OverCurrentThreshold" field.</summary>
+ public const int OverCurrentThresholdFieldNumber = 17;
+ private int overCurrentThreshold_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OverCurrentThreshold {
+ get { return overCurrentThreshold_; }
+ set {
+ overCurrentThreshold_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "StallThreshold" field.</summary>
+ public const int StallThresholdFieldNumber = 18;
+ private int stallThreshold_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int StallThreshold {
+ get { return stallThreshold_; }
+ set {
+ stallThreshold_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ThermalCompensationFactor" field.</summary>
+ public const int ThermalCompensationFactorFieldNumber = 19;
+ private int thermalCompensationFactor_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int ThermalCompensationFactor {
+ get { return thermalCompensationFactor_; }
+ set {
+ thermalCompensationFactor_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "LowSpeedOptimization" field.</summary>
+ public const int LowSpeedOptimizationFieldNumber = 20;
+ private bool lowSpeedOptimization_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool LowSpeedOptimization {
+ get { return lowSpeedOptimization_; }
+ set {
+ lowSpeedOptimization_ = value;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as HardwareMotor);
@@ -242,6 +343,14 @@ namespace Tango.PMR.Hardware {
if (PulleyRadius != other.PulleyRadius) return false;
if (ConfigWord != other.ConfigWord) return false;
if (DirectionThreadWize != other.DirectionThreadWize) return false;
+ if (KvalHold != other.KvalHold) return false;
+ if (KvalRun != other.KvalRun) return false;
+ if (KvalAcc != other.KvalAcc) return false;
+ if (KvalDec != other.KvalDec) return false;
+ if (OverCurrentThreshold != other.OverCurrentThreshold) return false;
+ if (StallThreshold != other.StallThreshold) return false;
+ if (ThermalCompensationFactor != other.ThermalCompensationFactor) return false;
+ if (LowSpeedOptimization != other.LowSpeedOptimization) return false;
return true;
}
@@ -260,6 +369,14 @@ namespace Tango.PMR.Hardware {
if (PulleyRadius != 0D) hash ^= PulleyRadius.GetHashCode();
if (ConfigWord != 0) hash ^= ConfigWord.GetHashCode();
if (DirectionThreadWize != false) hash ^= DirectionThreadWize.GetHashCode();
+ if (KvalHold != 0) hash ^= KvalHold.GetHashCode();
+ if (KvalRun != 0) hash ^= KvalRun.GetHashCode();
+ if (KvalAcc != 0) hash ^= KvalAcc.GetHashCode();
+ if (KvalDec != 0) hash ^= KvalDec.GetHashCode();
+ if (OverCurrentThreshold != 0) hash ^= OverCurrentThreshold.GetHashCode();
+ if (StallThreshold != 0) hash ^= StallThreshold.GetHashCode();
+ if (ThermalCompensationFactor != 0) hash ^= ThermalCompensationFactor.GetHashCode();
+ if (LowSpeedOptimization != false) hash ^= LowSpeedOptimization.GetHashCode();
return hash;
}
@@ -318,6 +435,38 @@ namespace Tango.PMR.Hardware {
output.WriteRawTag(96);
output.WriteBool(DirectionThreadWize);
}
+ if (KvalHold != 0) {
+ output.WriteRawTag(104);
+ output.WriteInt32(KvalHold);
+ }
+ if (KvalRun != 0) {
+ output.WriteRawTag(112);
+ output.WriteInt32(KvalRun);
+ }
+ if (KvalAcc != 0) {
+ output.WriteRawTag(120);
+ output.WriteInt32(KvalAcc);
+ }
+ if (KvalDec != 0) {
+ output.WriteRawTag(128, 1);
+ output.WriteInt32(KvalDec);
+ }
+ if (OverCurrentThreshold != 0) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(OverCurrentThreshold);
+ }
+ if (StallThreshold != 0) {
+ output.WriteRawTag(144, 1);
+ output.WriteInt32(StallThreshold);
+ }
+ if (ThermalCompensationFactor != 0) {
+ output.WriteRawTag(152, 1);
+ output.WriteInt32(ThermalCompensationFactor);
+ }
+ if (LowSpeedOptimization != false) {
+ output.WriteRawTag(160, 1);
+ output.WriteBool(LowSpeedOptimization);
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -359,6 +508,30 @@ namespace Tango.PMR.Hardware {
if (DirectionThreadWize != false) {
size += 1 + 1;
}
+ if (KvalHold != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(KvalHold);
+ }
+ if (KvalRun != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(KvalRun);
+ }
+ if (KvalAcc != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(KvalAcc);
+ }
+ if (KvalDec != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(KvalDec);
+ }
+ if (OverCurrentThreshold != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(OverCurrentThreshold);
+ }
+ if (StallThreshold != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(StallThreshold);
+ }
+ if (ThermalCompensationFactor != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(ThermalCompensationFactor);
+ }
+ if (LowSpeedOptimization != false) {
+ size += 2 + 1;
+ }
return size;
}
@@ -403,6 +576,30 @@ namespace Tango.PMR.Hardware {
if (other.DirectionThreadWize != false) {
DirectionThreadWize = other.DirectionThreadWize;
}
+ if (other.KvalHold != 0) {
+ KvalHold = other.KvalHold;
+ }
+ if (other.KvalRun != 0) {
+ KvalRun = other.KvalRun;
+ }
+ if (other.KvalAcc != 0) {
+ KvalAcc = other.KvalAcc;
+ }
+ if (other.KvalDec != 0) {
+ KvalDec = other.KvalDec;
+ }
+ if (other.OverCurrentThreshold != 0) {
+ OverCurrentThreshold = other.OverCurrentThreshold;
+ }
+ if (other.StallThreshold != 0) {
+ StallThreshold = other.StallThreshold;
+ }
+ if (other.ThermalCompensationFactor != 0) {
+ ThermalCompensationFactor = other.ThermalCompensationFactor;
+ }
+ if (other.LowSpeedOptimization != false) {
+ LowSpeedOptimization = other.LowSpeedOptimization;
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -461,6 +658,38 @@ namespace Tango.PMR.Hardware {
DirectionThreadWize = input.ReadBool();
break;
}
+ case 104: {
+ KvalHold = input.ReadInt32();
+ break;
+ }
+ case 112: {
+ KvalRun = input.ReadInt32();
+ break;
+ }
+ case 120: {
+ KvalAcc = input.ReadInt32();
+ break;
+ }
+ case 128: {
+ KvalDec = input.ReadInt32();
+ break;
+ }
+ case 136: {
+ OverCurrentThreshold = input.ReadInt32();
+ break;
+ }
+ case 144: {
+ StallThreshold = input.ReadInt32();
+ break;
+ }
+ case 152: {
+ ThermalCompensationFactor = input.ReadInt32();
+ break;
+ }
+ case 160: {
+ LowSpeedOptimization = input.ReadBool();
+ break;
+ }
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs
index ec7ae44c1..482ed763a 100644
--- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs
@@ -23,13 +23,16 @@ namespace Tango.PMR.Hardware {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChxIYXJkd2FyZVBpZENvbnRyb2xUeXBlLnByb3RvEhJUYW5nby5QTVIuSGFy",
- "ZHdhcmUqiAIKFkhhcmR3YXJlUGlkQ29udHJvbFR5cGUSFAoQRHJ5ZXJIZWF0",
+ "ZHdhcmUqiAMKFkhhcmR3YXJlUGlkQ29udHJvbFR5cGUSFAoQRHJ5ZXJIZWF0",
"ZXIxMDAwdxAAEhQKEERyeWVySGVhdGVyMjAwdzEQARIUChBEcnllckhlYXRl",
"cjIwMHcyEAISEAoMSGVhZEhlYXRlcloxEAMSEAoMSGVhZEhlYXRlcloyEAQS",
"EAoMSGVhZEhlYXRlclozEAUSEAoMSGVhZEhlYXRlclo0EAYSDwoLTWl4ZXJI",
"ZWF0ZXIQBxIQCgxXYXN0ZUNvbnRyb2wQCBIOCgpNb3RvckRyeWVyEAkSDwoL",
"TW90b3JGZWVkZXIQChIPCgtNb3RvclBvb2xlchALEg8KC01vdG9yV2luZGVy",
- "EAxCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJvdG8z"));
+ "EAwSDgoKRGlzcGVuc2VyMRANEg4KCkRpc3BlbnNlcjIQDhIOCgpEaXNwZW5z",
+ "ZXIzEA8SDgoKRGlzcGVuc2VyNBAQEg4KCkRpc3BlbnNlcjUQERIOCgpEaXNw",
+ "ZW5zZXI2EBISDgoKRGlzcGVuc2VyNxATEg4KCkRpc3BlbnNlcjgQFEIeChxj",
+ "b20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Hardware.HardwarePidControlType), }, null));
@@ -91,6 +94,38 @@ namespace Tango.PMR.Hardware {
///Winder Motor
/// </summary>
[pbr::OriginalName("MotorWinder")] MotorWinder = 12,
+ /// <summary>
+ ///Dispenser 1
+ /// </summary>
+ [pbr::OriginalName("Dispenser1")] Dispenser1 = 13,
+ /// <summary>
+ ///Dispenser 2
+ /// </summary>
+ [pbr::OriginalName("Dispenser2")] Dispenser2 = 14,
+ /// <summary>
+ ///Dispenser 3
+ /// </summary>
+ [pbr::OriginalName("Dispenser3")] Dispenser3 = 15,
+ /// <summary>
+ ///Dispenser 4
+ /// </summary>
+ [pbr::OriginalName("Dispenser4")] Dispenser4 = 16,
+ /// <summary>
+ ///Dispenser 5
+ /// </summary>
+ [pbr::OriginalName("Dispenser5")] Dispenser5 = 17,
+ /// <summary>
+ ///Dispenser 6
+ /// </summary>
+ [pbr::OriginalName("Dispenser6")] Dispenser6 = 18,
+ /// <summary>
+ ///Dispenser 7
+ /// </summary>
+ [pbr::OriginalName("Dispenser7")] Dispenser7 = 19,
+ /// <summary>
+ ///Dispenser 8
+ /// </summary>
+ [pbr::OriginalName("Dispenser8")] Dispenser8 = 20,
}
#endregion
diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
index 0ee99f1fa..2b6f7174b 100644
--- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
@@ -186,6 +186,8 @@ namespace Tango.PMRGenerator.CLI
messageFile.Properties.Add(new ProtoProperty("HardwareDispenserType", "HardwareDispenserType"));
+ messageFile.Properties.Add(new ProtoProperty("Index", "int32"));
+
foreach (var prop in typeof(DispenserType).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive))
{
if (prop.Name != "Name" && prop.Name != "Code")