verbessern vom pickeing, on goin

This commit is contained in:
Roland Drabesch
2022-08-15 15:52:07 +02:00
parent 0b9f98aa1f
commit 4a5a7da7c1
5 changed files with 134 additions and 36 deletions
@@ -130,8 +130,74 @@ namespace CordonelAssemblyLine.Model
NotifyPropertyChanged(nameof(Result));
}
}
string _lblS01Text;
public string lblS01Text { get { return _lblS01Text; } set { _lblS01Text = value; NotifyPropertyChanged(nameof(lblS01Text)); } }
string _lblS02Text;
public string lblS02Text { get { return _lblS02Text; } set { _lblS02Text = value; NotifyPropertyChanged(nameof(lblS02Text)); } }
string _lblS03Text;
public string lblS03Text { get { return _lblS03Text; } set { _lblS03Text = value; NotifyPropertyChanged(nameof(lblS03Text)); } }
string _lblS04Text;
public string lblS04Text { get { return _lblS04Text; } set { _lblS04Text = value; NotifyPropertyChanged(nameof(lblS04Text)); } }
string _lblS05Text;
public string lblS05Text { get { return _lblS05Text; } set { _lblS05Text = value; NotifyPropertyChanged(nameof(lblS05Text)); } }
string _lblS06Text;
public string lblS06Text { get { return _lblS06Text; } set { _lblS06Text = value; NotifyPropertyChanged(nameof(lblS06Text)); } }
string _lblS07Text;
public string lblS07Text { get { return _lblS07Text; } set { _lblS07Text = value; NotifyPropertyChanged(nameof(lblS07Text)); } }
string _lblS08Text;
public string lblS08Text { get { return _lblS08Text; } set { _lblS08Text = value; NotifyPropertyChanged(nameof(lblS08Text)); } }
string _lblS09Text;
public string lblS09Text { get { return _lblS09Text; } set { _lblS09Text = value; NotifyPropertyChanged(nameof(lblS09Text)); } }
string _lblS10Text;
public string lblS10Text { get { return _lblS10Text; } set { _lblS10Text = value; NotifyPropertyChanged(nameof(lblS10Text)); } }
string _lblS11Text;
public string lblS11Text { get { return _lblS11Text; } set { _lblS11Text = value; NotifyPropertyChanged(nameof(lblS11Text)); } }
System.Windows.Media.Brush _lblS01Color;
public System.Windows.Media.Brush lblS01Color { get { return _lblS01Color; } set { _lblS01Color = value; NotifyPropertyChanged(nameof(lblS01Color)); } }
System.Windows.Media.Brush _lblS02Color;
public System.Windows.Media.Brush lblS02Color { get { return _lblS02Color; } set { _lblS02Color = value; NotifyPropertyChanged(nameof(lblS02Color)); } }
System.Windows.Media.Brush _lblS03Color;
public System.Windows.Media.Brush lblS03Color { get { return _lblS03Color; } set { _lblS03Color = value; NotifyPropertyChanged(nameof(lblS03Color)); } }
System.Windows.Media.Brush _lblS04Color;
public System.Windows.Media.Brush lblS04Color { get { return _lblS04Color; } set { _lblS04Color = value; NotifyPropertyChanged(nameof(lblS04Color)); } }
System.Windows.Media.Brush _lblS05Color;
public System.Windows.Media.Brush lblS05Color { get { return _lblS05Color; } set { _lblS05Color = value; NotifyPropertyChanged(nameof(lblS05Color)); } }
System.Windows.Media.Brush _lblS06Color;
public System.Windows.Media.Brush lblS06Color { get { return _lblS06Color; } set { _lblS06Color = value; NotifyPropertyChanged(nameof(lblS06Color)); } }
System.Windows.Media.Brush _lblS07Color;
public System.Windows.Media.Brush lblS07Color { get { return _lblS07Color; } set { _lblS07Color = value; NotifyPropertyChanged(nameof(lblS07Color)); } }
System.Windows.Media.Brush _lblS08Color;
public System.Windows.Media.Brush lblS08Color { get { return _lblS08Color; } set { _lblS08Color = value; NotifyPropertyChanged(nameof(lblS08Color)); } }
System.Windows.Media.Brush _lblS09Color;
public System.Windows.Media.Brush lblS09Color { get { return _lblS09Color; } set { _lblS09Color = value; NotifyPropertyChanged(nameof(lblS09Color)); } }
System.Windows.Media.Brush _lblS10Color;
public System.Windows.Media.Brush lblS10Color { get { return _lblS10Color; } set { _lblS10Color = value; NotifyPropertyChanged(nameof(lblS10Color)); } }
System.Windows.Media.Brush _lblS11Color;
public System.Windows.Media.Brush lblS11Color { get { return _lblS11Color; } set { _lblS11Color = value; NotifyPropertyChanged(nameof(lblS11Color)); } }
public PickingViewModel()
{
_lblS01Text = "Auftrag Scan";
_lblS02Text = "Detektiere Pcb";
_lblS03Text = "Lade Autrag";
_lblS04Text = "Prüfe Region/ Frequenz";
_lblS05Text = "Prüfe Drucksensor";
_lblS06Text = "Prüfe FW Version";
_lblS07Text = "Prüfe Dateisystem";
_lblS08Text = "Battery fix";
_lblS09Text = "Produktions-datum";
_lblS10Text = "Display";
_lblS11Text = "Montage bestätigen";
InitProgressBar();
}
@@ -232,7 +298,7 @@ namespace CordonelAssemblyLine.Model
Input = ex.Message;
isRuning = false;
}
}
@@ -494,7 +560,7 @@ namespace CordonelAssemblyLine.Model
if (hasDetect)
{
setState( $"Pcb gefunden {PcbId}");
setState($"Pcb gefunden {PcbId}");
Log($"New PcbID detected {PcbId}");
sm = PickingStateMachine.GetOrderDetails;
ProgressBar.Where(n => n.Name == "Connect").First().State = Ui.ProductionControls.Enums.ImgStatus.Success;
@@ -534,7 +600,7 @@ namespace CordonelAssemblyLine.Model
{
OrderOverview = JsonConvert.DeserializeObject<OrderOverViewCordonelWithPicking>(str);
OrderDetails = OrderOverview.PickingCompareItem;
if (OrderOverview.OrderOverViewCordonel.Count == OrderOverview.OrderOverViewCordonel.AssignedPicking)
{
Result = "Auftrag schon komplett";
@@ -546,7 +612,7 @@ namespace CordonelAssemblyLine.Model
else
{
setState($"Auftragsdaten geladen {Order}");
sm = PickingStateMachine.Compare;
ProgressBar.Where(n => n.Name == "Order data").First().State = Ui.ProductionControls.Enums.ImgStatus.Success;
ProgressBar.Where(n => n.Name == "Compare").First().State = Ui.ProductionControls.Enums.ImgStatus.InProgress;
@@ -566,7 +632,7 @@ namespace CordonelAssemblyLine.Model
{
setState($"Fehlgeschlagen Register ist zu alt! Bitte QS informieren. KitronProductionDate:{OrderOverview.KitronProductionDate }");
// sm = PickingStateMachine.MeterError;
// sm = PickingStateMachine.MeterError;
var b = (System.Windows.Media.Brush)converter.ConvertFromString("#FFFF00");
b.Freeze();
@@ -575,7 +641,7 @@ namespace CordonelAssemblyLine.Model
//break;
}
if (Compare(OrderDetails.CheckAppsIdVersion, OrderDetails.FrequencyIndicator, OrderDetails.MeterSize, OrderDetails.PressurePresent))
{
@@ -596,7 +662,7 @@ namespace CordonelAssemblyLine.Model
break;
case PickingStateMachine.MeterError:
OrderDetails = null;
OrderOverview = null;
OrderOverview = null;
setState($"Vergleich abgeschlossen:{State}");
Result = $"Vergleich fertig fehlgeschlagen";
Thread.Sleep(10000);
@@ -685,7 +751,7 @@ namespace CordonelAssemblyLine.Model
ResultColor = b;
Thread.Sleep(5000);
setState($"Montage Rückmeldung erhalten, auftrag Scannen");
sm = PickingStateMachine.StartCom;
}
}
+56 -24
View File
@@ -7,50 +7,82 @@
xmlns:ProductionControls="clr-namespace:Ui.ProductionControls;assembly=Ui.ProductionControls"
xmlns:ProductionControls1="clr-namespace:Ui.ProductionControls;assembly=ProductionControls" x:Class="CordonelAssemblyLine.Picking"
mc:Ignorable="d"
Title="Kommissionierung" Height="450" Width="883.713" Background="Aquamarine" Loaded="Window_Loaded" FontSize="18" >
Title="Kommissionierung" Height="600" Width="883.713" Background="Aquamarine" Loaded="Window_Loaded" FontSize="18" >
<Grid Background="{Binding ResultColor}" Margin="0,0,18,0">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="150*" MinHeight="150"/>
<RowDefinition Height="28"/>
<RowDefinition Height="40" />
<RowDefinition Height="90"/>
<RowDefinition Height="47*" MinHeight="150"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="125"/>
<ColumnDefinition Width="125"/>
<ColumnDefinition Width="125"/>
<ColumnDefinition Width="125"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="25*"/>
<ColumnDefinition Width="22*"/>
<ColumnDefinition Width="110"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<Label Content="Kommissionierung Cordonel" HorizontalAlignment="Left" Margin="11,0,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" Height="36" Width="366" Grid.ColumnSpan="4" />
<Label Content="Kommissionierung Cordonel" HorizontalAlignment="Left" Margin="11,0,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" Height="36" Width="366" Grid.ColumnSpan="2" />
<Label Background="{Binding ResultColor}" Content="Scanner:" HorizontalAlignment="Left" Margin="10,1,0,0" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" Height="36" Width="115" />
<Label Background="{Binding ResultColor}" Content="Scanner:" HorizontalAlignment="Left" Margin="10,1,0,0" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" Height="36" Width="115" Grid.ColumnSpan="2" />
<Label Background="{Binding ResultColor}" Content="{Binding Scanner, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="11,1,0,0" VerticalAlignment="Top" Grid.Row="1" Grid.Column="1" Height="36" Width="126" Grid.ColumnSpan="2" />
<Label Background="{Binding ResultColor}" Content="Ep:" HorizontalAlignment="Left" Margin="12,1,0,0" VerticalAlignment="Top" Grid.Row="1" Grid.Column="2" Height="36" Width="115" Grid.ColumnSpan="2" />
<Label Background="{Binding ResultColor}" Content="{Binding Scanner, UpdateSourceTrigger=PropertyChanged}" Margin="11,1,0,0" VerticalAlignment="Top" Grid.Row="1" Grid.Column="1" Height="36" HorizontalAlignment="Left" Width="527" />
<Label Background="{Binding ResultColor}" Content="{Binding Slot, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="13,1,0,0" VerticalAlignment="Top" Grid.Row="1" Grid.Column="3" Height="36" Width="115" Grid.ColumnSpan="3" />
<Label Background="{Binding ResultColor}" Content="{Binding Slot, UpdateSourceTrigger=PropertyChanged}" Margin="10,4,0,0" VerticalAlignment="Top" Grid.Row="4" Grid.Column="1" Height="36" HorizontalAlignment="Left" Width="528" />
<Label Background="{Binding ResultColor}" Content="Medlung:" HorizontalAlignment="Left" Margin="10,1,0,0" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" Height="36" Width="115" />
<Label Background="{Binding ResultColor}" Content="Medlung:" HorizontalAlignment="Left" Margin="10,1,0,0" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" Height="36" Width="115" Grid.ColumnSpan="2" />
<Label Background="{Binding ResultColor}" Content="{Binding State, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="37,1,0,0" VerticalAlignment="Top" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" Height="36" Width="332" />
<Label Background="{Binding ResultColor}" Content="{Binding State, UpdateSourceTrigger=PropertyChanged}" Margin="10,1,0,0" VerticalAlignment="Top" Grid.Row="2" Grid.Column="1" Height="36" HorizontalAlignment="Left" Width="528" />
<Label Background="{Binding ResultColor}" Content="Ergebnis:" HorizontalAlignment="Left" Margin="10,1,0,0" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" Height="36" Width="115" />
<Label Background="{Binding ResultColor}" Content="Ergebnis:" HorizontalAlignment="Left" Margin="10,1,0,0" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" Height="36" Width="115" Grid.ColumnSpan="2" />
<Label Background="{Binding ResultColor}" Content="{Binding Result, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="11,1,0,0" VerticalAlignment="Top" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" Height="36" Width="359" />
<TextBlock Background="{Binding ResultColor}" Text="{Binding LogText, UpdateSourceTrigger=PropertyChanged}" FontSize="10" Grid.ColumnSpan="3" Grid.Column="1" HorizontalAlignment="Left" Height="218" Margin="11,10,0,-19" Grid.Row="4" TextWrapping="Wrap" VerticalAlignment="Top" Width="358" Grid.RowSpan="3"/>
<Label Background="{Binding ResultColor}" Content="Log:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Grid.Row="4" Grid.Column="0" Height="36" Width="115" />
<Label Background="{Binding ResultColor}" Content="Historie:" HorizontalAlignment="Left" Margin="22,9,0,0" VerticalAlignment="Top" Grid.Column="5" Height="36" Width="288" Grid.ColumnSpan="2" />
<TextBlock Background="{Binding ResultColor}" Text="{Binding HistoryText, UpdateSourceTrigger=PropertyChanged}" FontSize="10" Grid.ColumnSpan="2" Grid.Column="5" HorizontalAlignment="Left" Height="313" Margin="22,10,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="315" Grid.RowSpan="4"/>
<Label Background="{Binding ResultColor}" Content="{Binding Result, UpdateSourceTrigger=PropertyChanged}" Margin="11,1,0,0" VerticalAlignment="Top" Grid.Row="3" Grid.Column="1" Height="36" HorizontalAlignment="Left" Width="527" />
<TextBlock Background="{Binding ResultColor}" Text="{Binding LogText, UpdateSourceTrigger=PropertyChanged}" FontSize="10" Grid.Column="1" Height="218" Margin="12,23,0,0" Grid.Row="6" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Left" Width="526"/>
<Label Background="{Binding ResultColor}" Content="Log:" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Grid.Row="6" Grid.Column="0" Height="36" Width="115" Grid.ColumnSpan="2" />
<Label Background="{Binding ResultColor}" Content="Historie:" HorizontalAlignment="Left" Margin="22,9,0,0" VerticalAlignment="Top" Grid.Column="3" Height="36" Width="288" Grid.RowSpan="2" />
<TextBlock Background="{Binding ResultColor}" Text="{Binding HistoryText, UpdateSourceTrigger=PropertyChanged}" FontSize="10" Grid.Column="2" HorizontalAlignment="Left" Margin="22,10,0,0" Grid.Row="1" TextWrapping="Wrap" Width="168" Grid.RowSpan="4" Height="140" VerticalAlignment="Top"/>
<Label Background="{Binding ResultColor}" Content="Ep:" HorizontalAlignment="Left" Margin="11,0,0,0" VerticalAlignment="Top" Grid.Row="4" Height="36" Width="115" Grid.ColumnSpan="2" />
<Border Margin="10,10,10,0" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="5" VerticalAlignment="Top" BorderBrush="Black" BorderThickness="2">
<Grid >
<ProductionControls1:ctlPictureProgressBar Name="progressBar" HorizontalAlignment="Left" Height="100" Margin="11,0,0,-44" Grid.Row="5" VerticalAlignment="Top" Width="837" Grid.RowSpan="2" Grid.ColumnSpan="7"/>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS01Color}" Text="{Binding lblS01Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS02Color}" Text="{Binding lblS02Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="1" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS03Color}" Text="{Binding lblS03Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="2" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS04Color}" Text="{Binding lblS04Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="3" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS05Color}" Text="{Binding lblS05Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="4" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS06Color}" Text="{Binding lblS06Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="5" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS07Color}" Text="{Binding lblS07Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="6" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS08Color}" Text="{Binding lblS08Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="7" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS09Color}" Text="{Binding lblS09Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="8" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS10Color}" Text="{Binding lblS10Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="9" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
<TextBlock TextWrapping="WrapWithOverflow" Background="{Binding lblS11Color}" Text="{Binding lblS11Text, UpdateSourceTrigger=PropertyChanged}" Margin="1,1,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="10" Height="36" Grid.RowSpan="2" HorizontalAlignment="Left" FontSize="12" />
</Grid>
</Border>
</Grid>
</Window>
+2 -2
View File
@@ -45,8 +45,8 @@ namespace CordonelAssemblyLine
{
Model.StartPicking(GlobalCancellationToken, ScannerPort, SlotNr);
progressBar.AddRange(Model.ProgressBar);
}
}
}