Push Alpha Version
This commit is contained in:
BIN
uniper_hmi/UniperHMI/Anlagenuebersicht.png
Normal file
BIN
uniper_hmi/UniperHMI/Anlagenuebersicht.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
@@ -1,7 +1,7 @@
|
||||
<Application x:Class="UniperHMI.App"
|
||||
<Application x:Class="InfineonHMI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:UniperHMI">
|
||||
xmlns:local="clr-namespace:InfineonHMI">
|
||||
<Application.Resources>
|
||||
<!-- MahApps Metro style themes -->
|
||||
<ResourceDictionary>
|
||||
|
||||
@@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using TcEventLoggerAdsProxyLib;
|
||||
|
||||
namespace UniperHMI;
|
||||
namespace InfineonHMI;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
@@ -18,10 +18,6 @@ public partial class App : Application
|
||||
services.AddSingleton<MainWindow>();
|
||||
services.AddSingleton<MainWindowVM>();
|
||||
services.AddSingleton<IAdsManager, AdsManager>();
|
||||
services.AddTransient<AutomaticModePageVM>();
|
||||
services.AddTransient<BatteryOverviewPageVM>();
|
||||
services.AddTransient<StringOverviewPageVM>();
|
||||
services.AddTransient<ModuleOverviewPageVM>();
|
||||
services.AddSingleton<TcEventLogger>();
|
||||
})
|
||||
.Build();
|
||||
|
||||
127
uniper_hmi/UniperHMI/Common/L4ItXmlSerializer.cs
Normal file
127
uniper_hmi/UniperHMI/Common/L4ItXmlSerializer.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace InfineonHMI.Common
|
||||
{
|
||||
public static class L4ItXmlSerializer
|
||||
{
|
||||
/// <summary>
|
||||
/// Serializes an object.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="serializableObject"></param>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="encrypt"></param>
|
||||
/// <param name="rootElementName"></param>
|
||||
|
||||
public static void SerializeObject<T>(T serializableObject, string fileName, bool encrypt = false, string rootElementName = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
return;
|
||||
|
||||
if (serializableObject == null)
|
||||
return;
|
||||
|
||||
XmlSerializer serializer;
|
||||
if (rootElementName != null)
|
||||
{
|
||||
var xmlRoot = new XmlRootAttribute(rootElementName);
|
||||
serializer = new XmlSerializer(serializableObject.GetType(), xmlRoot);
|
||||
}
|
||||
else
|
||||
{
|
||||
serializer = new XmlSerializer(serializableObject.GetType());
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var dir = new FileInfo(fileName).DirectoryName;
|
||||
if (dir != null && !Directory.Exists(dir)) // Überprüfen Sie, ob dir nicht null ist, bevor Sie es verwenden
|
||||
Directory.CreateDirectory(dir);
|
||||
|
||||
var xmlDocument = new XmlDocument();
|
||||
using var stream = new MemoryStream();
|
||||
serializer.Serialize(stream, serializableObject);
|
||||
stream.Position = 0;
|
||||
xmlDocument.Load(stream);
|
||||
if (encrypt && false)
|
||||
{
|
||||
//FileEncryption.SaveEncryptedToFile(fileName, xmlDocument.OuterXml);
|
||||
return;
|
||||
}
|
||||
xmlDocument.Save(fileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.Write(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Deserializes an xml file into an object list
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="decrypt"></param>
|
||||
/// <param name="rootElementName"></param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
///
|
||||
public static T DeSerializeObject<T>(string fileName, bool decrypt = false, string rootElementName = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileName) || !File.Exists(fileName)) return default!;
|
||||
|
||||
T objectOut;
|
||||
|
||||
try
|
||||
{
|
||||
string xmlString;
|
||||
if (decrypt && false)
|
||||
{
|
||||
//xmlString = FileEncryption.ReadDecryptedFromFile(fileName)!;
|
||||
}
|
||||
else
|
||||
{
|
||||
var xmlDocument = new XmlDocument();
|
||||
xmlDocument.Load(fileName);
|
||||
xmlString = xmlDocument.OuterXml;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(xmlString))
|
||||
{
|
||||
// Handle empty xmlString if necessary
|
||||
return default!;
|
||||
}
|
||||
|
||||
using var read = new StringReader(xmlString);
|
||||
var outType = typeof(T);
|
||||
|
||||
XmlSerializer serializer;
|
||||
if (rootElementName != null)
|
||||
{
|
||||
var root = new XmlRootAttribute(rootElementName);
|
||||
serializer = new XmlSerializer(outType, root);
|
||||
}
|
||||
else
|
||||
{
|
||||
serializer = new XmlSerializer(outType);
|
||||
}
|
||||
|
||||
using XmlReader reader = new XmlTextReader(read);
|
||||
objectOut = (T)serializer.Deserialize(reader)!;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.Write(ex);
|
||||
return default!;
|
||||
}
|
||||
|
||||
return objectOut;
|
||||
}
|
||||
}
|
||||
}
|
||||
83
uniper_hmi/UniperHMI/Common/MediaContainer.xaml
Normal file
83
uniper_hmi/UniperHMI/Common/MediaContainer.xaml
Normal file
@@ -0,0 +1,83 @@
|
||||
<UserControl x:Class="Common.MediaContainer"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:common="clr-namespace:Common"
|
||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit"
|
||||
d:DataContext="{d:DesignInstance Type=common:MediaContainerVm, IsDesignTimeCreatable=True}"
|
||||
mc:Ignorable="d"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
MinWidth="200">
|
||||
<UserControl.Resources>
|
||||
<HMIToolkit:FeedbackToColorConverter x:Key="feedbackConverter" />
|
||||
</UserControl.Resources>
|
||||
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
||||
<!-- Style to see things in the designer-->
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<!-- Property="Background" Value="White" /> -->
|
||||
<Setter Property="Height" Value="300" />
|
||||
<Setter Property="Width" Value="100" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
|
||||
<Grid Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="30*"/>
|
||||
<RowDefinition Height="30*"/>
|
||||
<RowDefinition Height="30*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="White" BorderThickness="2"/>
|
||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{Binding SName, Mode=OneWay }" HorizontalAlignment="Center" FontSize="24"/>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Übervoll" HorizontalAlignment="Center" FontSize="16"/>
|
||||
<RadioButton Margin="5" Grid.Row="1" IsChecked="{Binding Overload}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="0" Grid.Row="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Voll" HorizontalAlignment="Center" FontSize="16"/>
|
||||
<RadioButton Grid.Row="1" Margin="5" IsChecked="{Binding Full}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="White" BorderThickness="1" />
|
||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="1" />
|
||||
<Label Grid.Row="0" VerticalAlignment="Center" Content="Leer" HorizontalAlignment="Center" FontSize="16"/>
|
||||
<RadioButton Grid.Row="1" Margin="5" IsChecked="{Binding Empty}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Column="1" Grid.Row="1" Grid.RowSpan="3" BorderBrush="White" BorderThickness="1"></Border>
|
||||
<Grid Grid.Column="1" Grid.Row="1" Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button x:Name="btnFill" DataContext="{Binding FillButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="0" Grid.Column="0" Content="Füllen" Margin="5" />
|
||||
<Button x:Name="btnOpen" DataContext="{Binding EmptyButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="1" Grid.Column="0" Content="Leeren" Margin="5" />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
32
uniper_hmi/UniperHMI/Common/MediaContainer.xaml.cs
Normal file
32
uniper_hmi/UniperHMI/Common/MediaContainer.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AnalogValue.xaml
|
||||
/// </summary>
|
||||
public partial class MediaContainer : UserControl
|
||||
{
|
||||
public bool IsReadonly { get; set; }
|
||||
|
||||
public MediaContainer()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
|
||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
||||
{
|
||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
||||
e.Handled = regex.IsMatch(e.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
76
uniper_hmi/UniperHMI/Common/MediaContainerVm.cs
Normal file
76
uniper_hmi/UniperHMI/Common/MediaContainerVm.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TwinCAT.TypeSystem;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using HMIToolkit;
|
||||
|
||||
namespace Common;
|
||||
|
||||
public sealed partial class MediaContainerVm : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
private IAdsManager? _adsManager;
|
||||
private string? _variableName;
|
||||
|
||||
[ObservableProperty] private string? sName = "No Name";
|
||||
|
||||
[ObservableProperty] private bool empty = false;
|
||||
|
||||
[ObservableProperty] private bool full = false;
|
||||
|
||||
[ObservableProperty] private bool overload = false;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? emptyButton;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? fillButton;
|
||||
|
||||
|
||||
|
||||
public MediaContainerVm()
|
||||
{
|
||||
sName = "No Name";
|
||||
EmptyButton = new HMIControlButtonVM();
|
||||
FillButton = new HMIControlButtonVM();
|
||||
|
||||
}
|
||||
|
||||
public MediaContainerVm(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
sName = "No Name";
|
||||
|
||||
EmptyButton = new HMIControlButtonVM(_adsManager, _variableName + ".stEmptyButton");
|
||||
FillButton = new HMIControlButtonVM(_adsManager, _variableName + ".stFillButton");
|
||||
_adsManager.Register(_variableName + ".xEmpty", EmptyChanged);
|
||||
_adsManager.Register(_variableName + ".xFull", FullChanged);
|
||||
_adsManager.Register(_variableName + ".xOverload", OverloadChanged);
|
||||
|
||||
}
|
||||
private void EmptyChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Empty = (bool)e.Value;
|
||||
}
|
||||
private void FullChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Full = (bool)e.Value;
|
||||
}
|
||||
private void OverloadChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Overload = (bool)e.Value;
|
||||
}
|
||||
public void Dispose()
|
||||
{
|
||||
EmptyButton?.Dispose();
|
||||
EmptyButton = null;
|
||||
FillButton?.Dispose();
|
||||
FillButton = null;
|
||||
|
||||
_adsManager?.Deregister(_variableName + ".xEmpty", EmptyChanged);
|
||||
_adsManager?.Deregister(_variableName + ".xFull", FullChanged);
|
||||
_adsManager?.Deregister(_variableName + ".xOverload", OverloadChanged);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
33
uniper_hmi/UniperHMI/Common/ParamControlFloat.xaml
Normal file
33
uniper_hmi/UniperHMI/Common/ParamControlFloat.xaml
Normal file
@@ -0,0 +1,33 @@
|
||||
<UserControl x:Class="Common.ParamControlFloat"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Common"
|
||||
d:DataContext="{d:DesignInstance Type=local:ParamControlFloatVm, IsDesignTimeCreatable=True}"
|
||||
mc:Ignorable="d"
|
||||
Width="Auto"
|
||||
Height="Auto">
|
||||
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
||||
<!-- Style to see things in the designer-->
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<!-- Property="Background" Value="White" /> -->
|
||||
<Setter Property="Height" Value="40" />
|
||||
<Setter Property="Width" Value="280" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<Grid Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
||||
<Label x:Name="tbName" Grid.Column="0" Content="{Binding SName, Mode=OneWay }" Width="200"/>
|
||||
<TextBox x:Name="tbValue" Text="{Binding Value, Mode=TwoWay, StringFormat=N2}" Grid.Column="1" MaxLines="1" Width="80" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
|
||||
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
32
uniper_hmi/UniperHMI/Common/ParamControlFloat.xaml.cs
Normal file
32
uniper_hmi/UniperHMI/Common/ParamControlFloat.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AnalogValue.xaml
|
||||
/// </summary>
|
||||
public partial class ParamControlFloat : UserControl
|
||||
{
|
||||
public bool IsReadonly { get; set; }
|
||||
|
||||
public ParamControlFloat()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
|
||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
||||
{
|
||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
||||
e.Handled = regex.IsMatch(e.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
uniper_hmi/UniperHMI/Common/ParamControlFloatVM.cs
Normal file
27
uniper_hmi/UniperHMI/Common/ParamControlFloatVM.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TwinCAT.TypeSystem;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace Common;
|
||||
|
||||
public sealed partial class ParamControlFloatVm : ObservableValidator, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string sName;
|
||||
|
||||
[ObservableProperty]
|
||||
private float value;
|
||||
|
||||
public ParamControlFloatVm()
|
||||
{
|
||||
SName = "No Name:";
|
||||
Value = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
33
uniper_hmi/UniperHMI/Common/ParamControlInt.xaml
Normal file
33
uniper_hmi/UniperHMI/Common/ParamControlInt.xaml
Normal file
@@ -0,0 +1,33 @@
|
||||
<UserControl x:Class="Common.ParamControlInt"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:common="clr-namespace:Common"
|
||||
d:DataContext="{d:DesignInstance Type=common:ParamControlIntVm, IsDesignTimeCreatable=True}"
|
||||
mc:Ignorable="d"
|
||||
Width="Auto"
|
||||
Height="Auto">
|
||||
<!-- :DataContext="{d:DesignInstance Type=local:AnalogValueVM, IsDesignTimeCreatable=True}" -->
|
||||
<!-- Style to see things in the designer-->
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<!-- Property="Background" Value="White" /> -->
|
||||
<Setter Property="Height" Value="40" />
|
||||
<Setter Property="Width" Value="280" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<Grid Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
||||
<Label x:Name="tbName" Grid.Column="0" Content="{Binding SName, Mode=OneWay }" Width="200"/>
|
||||
<TextBox x:Name="tbValue" Text="{Binding Value, Mode=TwoWay}" Grid.Column="1" MaxLines="1" Width="80" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
|
||||
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
32
uniper_hmi/UniperHMI/Common/ParamControlInt.xaml.cs
Normal file
32
uniper_hmi/UniperHMI/Common/ParamControlInt.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AnalogValue.xaml
|
||||
/// </summary>
|
||||
public partial class ParamControlInt : UserControl
|
||||
{
|
||||
public bool IsReadonly { get; set; }
|
||||
|
||||
public ParamControlInt()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
|
||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
||||
{
|
||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
||||
e.Handled = regex.IsMatch(e.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
28
uniper_hmi/UniperHMI/Common/ParamControlIntVM.cs
Normal file
28
uniper_hmi/UniperHMI/Common/ParamControlIntVM.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TwinCAT.TypeSystem;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace Common;
|
||||
|
||||
public sealed partial class ParamControlIntVm : ObservableValidator, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string sName;
|
||||
|
||||
[ObservableProperty]
|
||||
private int value;
|
||||
|
||||
public ParamControlIntVm()
|
||||
{
|
||||
SName = "No Name:";
|
||||
Value = 0;
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public class DateTimeToEventTimeConverter : IValueConverter
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<Window xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="UniperHMI.BinaryValveWindow"
|
||||
<Window xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.BinaryValveWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:HMIToolkit"
|
||||
mc:Ignorable="d"
|
||||
Title="BinaryValveWindow" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
||||
<Grid>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für BinaryValveWindow.xaml
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
<!-- <Label Grid.Column="0" Content="{Binding SName}" VerticalAlignment="Center" HorizontalAlignment="Left"/> -->
|
||||
|
||||
<TextBox x:Name="tbValue" Text="{Binding RValue, Mode=TwoWay, StringFormat=N2}" Grid.Column="0" MaxLines="1" Width="125" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" IsReadOnly="{Binding Readonly}" />
|
||||
<Label Grid.Column="1" Content="{Binding SUnit}" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox x:Name="tbValue" Text="{Binding RValue, Mode=TwoWay, StringFormat=N2}" Grid.Column="0" MaxLines="1" FontSize="40" Width="150" HorizontalContentAlignment="Center" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Left" IsReadOnly="{Binding Readonly}" />
|
||||
<Label Grid.Column="1" Content="{Binding SUnit}" VerticalAlignment="Center" FontSize="35" HorizontalAlignment="Left"/>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -8,31 +8,33 @@
|
||||
mc:Ignorable="d"
|
||||
Height="Auto"
|
||||
Width="Auto">
|
||||
|
||||
<UserControl.Resources>
|
||||
<local:FeedbackToColorConverter x:Key="feedbackConverter" />
|
||||
</UserControl.Resources>
|
||||
<!-- Style to see things in the designer-->
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<!-- Property="Background" Value="White" /> -->
|
||||
<!--Property="Background" Value="White" />-->
|
||||
<Setter Property="Height" Value="Auto" />
|
||||
<Setter Property="Width" Value="Auto" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
|
||||
<Grid Margin="5" ShowGridLines="True">
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="55" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Row 0 -->
|
||||
<Label Grid.Row="0" Content="{Binding SName}" HorizontalAlignment="Center" FontSize="24" FontWeight="Bold"/>
|
||||
<Label Grid.Row="0" Content="{Binding SName}" HorizontalAlignment="Center" FontSize="35" FontWeight="Bold"/>
|
||||
|
||||
<!-- Row 1 -->
|
||||
<Label Grid.Row="1" Content="Interlocks:" Margin="0,0,0,-3"/>
|
||||
<Label Grid.Row="1" Content="Interlocks:" FontSize="30"/>
|
||||
|
||||
<!-- Row 2 -->
|
||||
<Grid Grid.Row="2">
|
||||
@@ -49,9 +51,9 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Control:" Margin="0,0,0,-3" />
|
||||
<Button x:Name="btnOpen" DataContext="{Binding OpenButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="1" Grid.Column="0" Content="Open" Height="80" Width="80" Margin="0,0,5,5" />
|
||||
<Button x:Name="btnClose" DataContext="{Binding CloseButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="1" Grid.Column="1" Content="Close" Height="80" Width="80" Margin="0,-5,0,0"/>
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="30" Content="Control:"/>
|
||||
<Button x:Name="btnOpen" DataContext="{Binding OpenButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="1" Grid.Column="0" Content="Open" FontSize="40" Height="100" Width="180" Margin="0,0,5,5" />
|
||||
<Button x:Name="btnClose" DataContext="{Binding CloseButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Background="{Binding IFeedback, Converter={StaticResource feedbackConverter}}" Grid.Row="1" Grid.Column="1" Content="Close" FontSize="40" Height="100" Width="180" Margin="0,-5,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Row 4 -->
|
||||
@@ -65,9 +67,9 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Mode:" Margin="0,0,0,-3" />
|
||||
<Button x:Name="btnAuto" DataContext="{Binding AutomaticButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Grid.Row="1" Grid.Column="0" Content="Auto" Height="80" Width="80" Margin="0,0,5,0"/>
|
||||
<Button x:Name="btnManual" DataContext="{Binding ManualButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Grid.Row="1" Grid.Column="1" Content="Man" Height="80" Width="80" Margin="0,-5,0,-5"/>
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="30" Content="Mode:" />
|
||||
<Button x:Name="btnAuto" DataContext="{Binding AutomaticButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Grid.Row="1" Grid.Column="0" Content="Auto" FontSize="35" Height="100" Width="180" Margin="0,0,5,0"/>
|
||||
<Button x:Name="btnManual" DataContext="{Binding ManualButton}" Command="{Binding ButtonClickedCommand}" IsEnabled="{Binding XRelease}" Grid.Row="1" Grid.Column="1" Content="Man" FontSize="35" Height="100" Width="180" Margin="0,-5,0,-5"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="0" Padding="0" Command="{Binding ShowProcessIntlksCommand}">
|
||||
<Button Grid.Column="0" FontSize="35" Height="80" Width="180" Padding="0" Command="{Binding ShowProcessIntlksCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label>Process</Label>
|
||||
<Rectangle Width="10" Height="10" Fill="{Binding Path=XProcessIntlkOk, Converter={StaticResource myBoolConverter}}" RadiusX="2" RadiusY="2" Margin="0,2,0,0"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Column="1" Padding="0" Margin="5,0,0,0" Command="{Binding ShowSafetyIntlksCommand}">
|
||||
<Button Grid.Column="1" Padding="0" FontSize="35" Height="80" Width="180" Margin="5,0,0,0" Command="{Binding ShowSafetyIntlksCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label>Safety</Label>
|
||||
<Rectangle Width="10" Height="10" Fill="{Binding Path=XSafetyIntlkOk, Converter={StaticResource myBoolConverter}}" RadiusX="2" RadiusY="2" Margin="0,2,0,0"/>
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Anlagenuebersicht.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Beckhoff.TwinCAT.Ads" Version="6.1.197" />
|
||||
<PackageReference Include="Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net" Version="2.7.11" />
|
||||
@@ -28,6 +32,21 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Anlagenuebersicht.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Common\MediaContainer.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Common\ParamControlInt.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Common\ParamControlFloat.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="HMIToolkit\HMIObjects\AnalogMotorControl\AnalogMotorControl.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -1,97 +1,190 @@
|
||||
<Window x:Class="UniperHMI.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||
xmlns:local="clr-namespace:UniperHMI" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
mc:Ignorable="d"
|
||||
x:Name="MainControlWindow"
|
||||
d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="Uniper HMI" Height="1030" Width="1900" ResizeMode="NoResize">
|
||||
<Window x:Class="InfineonHMI.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
x:Name="MainControlWindow"
|
||||
d:DataContext="{d:DesignInstance Type=uniperHmi:MainWindowVM}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="Infineon BiPolar" Height="2100" Width="3820" ResizeMode="NoResize">
|
||||
|
||||
<Grid HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Viewbox Stretch="Fill">
|
||||
<Grid Width="3840" Height="2100">
|
||||
|
||||
<!-- Latest event line -->
|
||||
<Grid Grid.Row="0">
|
||||
<Border BorderThickness="0px 0px 0px 2px" BorderBrush="White" Background="Black">
|
||||
<Label Content="{Binding EventsPageVM.CurrentEvent.Message}" FontSize="20" Height="45" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding StatusBarVisible}"/>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.08*"/>
|
||||
<RowDefinition Height="0.04*"/>
|
||||
<RowDefinition Height="0.04*"/>
|
||||
<RowDefinition Height="0.74*"/>
|
||||
<RowDefinition Height="0.10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header line -->
|
||||
<Grid Grid.Row="0" Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.Resources>
|
||||
<!--Set x: share to get the latest every time-->
|
||||
<system:DateTime x:Key="DateTime"
|
||||
x:Shared="False" />
|
||||
<Storyboard x:Key="Storyboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="DataContext"
|
||||
Duration="0:0:1"
|
||||
RepeatBehavior="Forever"
|
||||
AutoReverse="False">
|
||||
<DiscreteObjectKeyFrame KeyTime="50%"
|
||||
Value="{StaticResource DateTime}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</Grid.Resources>
|
||||
|
||||
<TextBlock Text="{Binding RelativeSource={RelativeSource Self},Path=DataContext.Now,StringFormat={}{0:dd.MM.yyyy}}"
|
||||
DataContext="{StaticResource DateTime}"
|
||||
FontSize="48"
|
||||
Foreground="White">
|
||||
<TextBlock.Triggers>
|
||||
<EventTrigger RoutedEvent="Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource Storyboard}" />
|
||||
</EventTrigger>
|
||||
</TextBlock.Triggers>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock Text="{Binding RelativeSource={RelativeSource Self},Path=DataContext.Now,StringFormat={}{0:hh:mm:ss}}"
|
||||
DataContext="{StaticResource DateTime}"
|
||||
FontSize="48"
|
||||
Margin="0,50,0,0"
|
||||
Foreground="White">
|
||||
|
||||
<TextBlock.Triggers>
|
||||
<EventTrigger RoutedEvent="Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource Storyboard}" />
|
||||
</EventTrigger>
|
||||
</TextBlock.Triggers>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
|
||||
<Button Grid.Column="10"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="10"
|
||||
FontSize="44"
|
||||
Content="{Binding ActualUser}"
|
||||
Command="{Binding ChangeUserClickedCommand}"/>
|
||||
|
||||
<Button Grid.Column="12"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="10"
|
||||
FontSize="44"
|
||||
Content="Auswahl
Betriebsart"
|
||||
Command="{Binding WorkingModeSelectionClickedCommand}"/>
|
||||
|
||||
<Label Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
Content="BiPolar Randätzer"
|
||||
FontSize="60"
|
||||
VerticalAlignment="Top"/>
|
||||
|
||||
<Label Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
Content="V 01.00"
|
||||
FontSize="40"
|
||||
VerticalAlignment="Bottom"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Latest event line -->
|
||||
<Border Grid.Row="1" BorderBrush="White" BorderThickness="0,0,0,2">
|
||||
<Label Content="{Binding EventsPageVM.CurrentEvent.Message}"
|
||||
FontSize="28"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<!-- Breadcrumb line -->
|
||||
<Label Grid.Row="2"
|
||||
Content="{Binding Breadcrumb}"
|
||||
FontSize="28"/>
|
||||
|
||||
<!-- Page frame -->
|
||||
<Frame x:Name="MainFrame"
|
||||
Grid.Row="3"
|
||||
NavigationUIVisibility="Hidden"
|
||||
Content="{Binding CurrentPage}"/>
|
||||
|
||||
<!-- Softkey grid -->
|
||||
<Grid Grid.Row="4" Margin="20">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<UniformGrid Columns="7" Grid.ColumnSpan="7">
|
||||
<!-- Softkey 1 -->
|
||||
<Button Grid.Column="0" Content="Übersicht" FontSize="38" Margin="10"
|
||||
Command="{Binding OverviewWindowClickedCommand}" />
|
||||
<!-- Command="{Binding AutomaticModeCommand}" -->
|
||||
|
||||
<!-- Softkey 2 -->
|
||||
<Button Grid.Column="0" Content="Stationen" FontSize="38" Margin="10"
|
||||
Command="{Binding ProductionWindowClickedCommand}"/>
|
||||
<!-- Command="{Binding ManualModeCommand}" -->
|
||||
|
||||
<!-- Softkey 3 -->
|
||||
<Button Grid.Column="0" Content="Protokoll" FontSize="38" Margin="10"
|
||||
Command="{Binding ProtocolWindowClickedCommand}" Visibility="Collapsed"/>
|
||||
|
||||
<!-- Softkey 4 -->
|
||||
<Button Grid.Column="0" Content="Rezepte" FontSize="38" Margin="10"
|
||||
Command="{Binding ReceipesWindowClickedCommand}" />
|
||||
<!-- Command="{Binding SettingsWindowCommand}" -->
|
||||
|
||||
<!-- Softkey 5 -->
|
||||
<Button Grid.Column="0" Content="Trend" FontSize="38" Margin="10"
|
||||
Command="{Binding TrendWindowClickedCommand}" Visibility="Collapsed"/>
|
||||
|
||||
<!-- Softkey 6 -->
|
||||
<Button Grid.Column="0" Content="Komponenten" FontSize="38" Margin="10"
|
||||
Command="{Binding ComponentsWindowClickedCommand}" Visibility="Collapsed"/>
|
||||
|
||||
<!-- Softkey 7 -->
|
||||
|
||||
|
||||
<!-- Softkey 8 -->
|
||||
<Button Content="Einstellungen" FontSize="38" Margin="10"
|
||||
Command="{Binding SettingsWindowClickedCommand}" Visibility="Collapsed"/>
|
||||
</UniformGrid>
|
||||
<Button Grid.Column="7" Content="Meldungen" FontSize="38" Margin="10"
|
||||
Command="{Binding EventsListClickedCommand}"/>
|
||||
<!-- Softkey 9 -->
|
||||
<Button Grid.Column="8" Content="Ack Alarms" FontSize="38" Margin="10"
|
||||
Command="{Binding AckAlarmsCommand}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Breadcrumb line -->
|
||||
<Label Grid.Row="1" Content="{Binding Breadcrumb}"/>
|
||||
|
||||
<!-- Page frame -->
|
||||
<Frame x:Name="MainFrame" NavigationUIVisibility="Hidden" Content="{Binding CurrentPage}" Grid.Row="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" />
|
||||
|
||||
<!-- Softkey grid -->
|
||||
<Grid Grid.Row="3" Margin="5,5,3,5" Width="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Softkey 1 -->
|
||||
<Button Grid.Column="0" MinWidth="80" MinHeight="{Binding RelativeSource={RelativeSource Self}, Path=ActualWidth}" Margin="0,0,2,0" Content="Automatik" Command="{Binding AutomaticModeClickedCommand}"/>
|
||||
<!-- Command="{Binding AutomaticModeCommand}" -->
|
||||
|
||||
<!-- Softkey 2 -->
|
||||
<Button Grid.Column="1" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Manuell" Command="{Binding ManualModeClickedCommand}" />
|
||||
<!-- Command="{Binding ManualModeCommand}" -->
|
||||
|
||||
<!-- Softkey 3 -->
|
||||
<Button Grid.Column="2" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Einstellungen" Command="{Binding SettingsWindowCommand}" />
|
||||
<!-- Command="{Binding SettingsWindowCommand}" -->
|
||||
|
||||
<!-- Softkey 4 -->
|
||||
<Button Grid.Column="3" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Trayfeeder 
Ein- /Ausgabe" Command="{Binding EventsListClickedCommand}"/>
|
||||
|
||||
<!-- Softkey 5 -->
|
||||
<Button Grid.Column="4" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Heiz-/Kühlplatte" Command="{Binding HotCoolplateClickedCommand}" />
|
||||
|
||||
<!-- Softkey 6 -->
|
||||
<Button Grid.Column="5" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Hochvolt-Test" />
|
||||
|
||||
<!-- Softkey 7 -->
|
||||
<Button Grid.Column="6" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Ätzstationen"/>
|
||||
|
||||
<!-- Softkey 8 -->
|
||||
<Button Grid.Column="7" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Ausrichtstation"/>
|
||||
|
||||
<!-- Softkey 9 -->
|
||||
<Button Grid.Column="8" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="NIO"/>
|
||||
|
||||
<!-- Softkey 10 -->
|
||||
<Button Grid.Column="9" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Tellermagazin" Command="{Binding ChuckMagazinClickedCommand}"/>
|
||||
|
||||
<!-- Softkey 11 -->
|
||||
<Button Grid.Column="10" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Kuka-Roboter" Command="{Binding KukaRobotClickedCommand}"/>
|
||||
|
||||
<Button Grid.Column="11" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Medien-Schrank"/>
|
||||
|
||||
<Button Grid.Column="12" Content="Back" Command="{Binding NavigateBackCommand}" IsEnabled="{Binding CanNavigateBack}" MinWidth="80" MinHeight="80" Margin="0,0,2,0" />
|
||||
|
||||
<Button Grid.Column="13" Content="Ack Alarms" Command="{Binding AckAlarmsCommand}" MinWidth="80" MinHeight="80" Margin="0,0,2,0" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</Window>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using HMIToolkit;
|
||||
using MahApps.Metro.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
|
||||
@@ -7,115 +7,166 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using TcEventLoggerAdsProxyLib;
|
||||
using InfineonHMI.Pages.Views;
|
||||
|
||||
namespace UniperHMI;
|
||||
namespace InfineonHMI;
|
||||
|
||||
public sealed partial class MainWindowVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty]
|
||||
private StringControlButtonVM dummyStringVM;
|
||||
[ObservableProperty] private StringControlButtonVM dummyStringVM;
|
||||
|
||||
[ObservableProperty]
|
||||
private Page currentPage;
|
||||
[ObservableProperty] private Page currentPage;
|
||||
|
||||
[ObservableProperty] private Visibility statusBarVisible;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canNavigateBack;
|
||||
[ObservableProperty] private string breadcrumb;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility statusBarVisible;
|
||||
[ObservableProperty] private string actualUser;
|
||||
|
||||
[ObservableProperty]
|
||||
private string breadcrumb;
|
||||
private const string _actualUserPrefix = "Aktueller Benutzer: \n";
|
||||
|
||||
private readonly IAdsManager _adsManager;
|
||||
private readonly IConfiguration _config;
|
||||
private readonly TcEventLogger _eventlogger;
|
||||
|
||||
private readonly IAdsManager _adsManager;
|
||||
private readonly IConfiguration _config;
|
||||
private readonly TcEventLogger _eventlogger;
|
||||
// Last active event
|
||||
[ObservableProperty] private string currentActiveEvent = "";
|
||||
|
||||
// Last active event
|
||||
[ObservableProperty]
|
||||
private string currentActiveEvent = "";
|
||||
private readonly object _lock = new();
|
||||
|
||||
private readonly object _lock = new();
|
||||
// Empty page
|
||||
private readonly Page _emptyPage;
|
||||
|
||||
// Empty page
|
||||
private readonly Page _emptyPage;
|
||||
// Last navigate message
|
||||
private readonly Stack<NavigateMessage> _messageStack = new();
|
||||
NavigateMessage? _currentMessage;
|
||||
|
||||
// Last navigate message
|
||||
private readonly Stack<NavigateMessage> _messageStack = new();
|
||||
NavigateMessage? _currentMessage;
|
||||
// Events page view model
|
||||
[ObservableProperty] EventsPageVM _eventsPageVM;
|
||||
|
||||
// Events page view model
|
||||
[ObservableProperty]
|
||||
EventsPageVM _eventsPageVM;
|
||||
// Settings page viem model
|
||||
SettingsPageVM? _settingsPageVM;
|
||||
|
||||
// Settings page viem model
|
||||
SettingsPageVM? _settingsPageVM;
|
||||
ProductionOverviewPageVM? _productionOverviewPageVM;
|
||||
|
||||
// Hot Coolplate page view model
|
||||
HotCoolPlatePageVM? _hotCoolplatePageVM;
|
||||
private MachineOverviewPageVM? _machineOverviewPageVM;
|
||||
|
||||
// Hot Coolplate page view model
|
||||
HotCoolPlatePageVM? _hotCoolplatePageVM;
|
||||
|
||||
// Chuck Magazin page view model
|
||||
ChuckMagazinPageVM? _chuckMagazinPageVM;
|
||||
|
||||
// Kuka Robot page view model
|
||||
KukaRobotPageVM? _kukaRobotPageVM;
|
||||
ReceipePageVM? _receipePageVM;
|
||||
|
||||
public MainWindowVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_config = config;
|
||||
public MainWindowVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_config = config;
|
||||
|
||||
// Create dummy string
|
||||
DummyStringVM = new StringControlButtonVM();
|
||||
ActualUser = _actualUserPrefix + "---------";
|
||||
// Create dummy string
|
||||
DummyStringVM = new StringControlButtonVM();
|
||||
|
||||
// Create empty page
|
||||
_emptyPage = new();
|
||||
// Create empty page
|
||||
_emptyPage = new();
|
||||
|
||||
// Create events page viewmodel
|
||||
_eventlogger = eventLogger;
|
||||
_eventsPageVM = new(_eventlogger);
|
||||
// Create events page viewmodel
|
||||
_eventlogger = eventLogger;
|
||||
_eventsPageVM = new(_eventlogger);
|
||||
|
||||
CurrentPage = _emptyPage;
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
_messageStack.Push(_currentMessage);
|
||||
CurrentPage = _emptyPage;
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
||||
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
||||
|
||||
breadcrumb = "";
|
||||
}
|
||||
breadcrumb = "";
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void SettingsWindow()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
NavigateMessage message = new("", typeof(SettingsPage));
|
||||
Receive(message);
|
||||
}
|
||||
public void NavigateFromOuterPage(NavigateMessage message, NavigateMessage nextMessage)
|
||||
{
|
||||
_currentMessage = message;
|
||||
|
||||
[RelayCommand]
|
||||
public void AutomaticModeClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["AutomaticModeVarName"]!, typeof(AutomaticModePage));
|
||||
Receive(message);
|
||||
}
|
||||
Navigate(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void ManualModeClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new("", typeof(BatteryOverviewPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
[RelayCommand]
|
||||
private void SettingsWindow()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
NavigateMessage message = new("", typeof(SettingsPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void ChangeUserClicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void WorkingModeSelectionClicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void OverviewWindowClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config[""]!, typeof(MachineOverviewPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void ProductionWindowClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config[""]!, typeof(ProductionOverviewPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void ProtocolWindowClicked()
|
||||
{
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void ReceipesWindowClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config[""]!, typeof(ReceipePage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void TrendWindowClicked()
|
||||
{
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void ComponentsWindowClicked()
|
||||
{
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void SettingsWindowClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
NavigateMessage message = new("", typeof(SettingsPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public void EventsListClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Collapsed;
|
||||
@@ -124,68 +175,8 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
NavigateMessage message = new("", typeof(EventsPage));
|
||||
Receive(message);
|
||||
}
|
||||
[RelayCommand]
|
||||
public void KukaRobotClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["KukaRobotVarName"]!, typeof(KukaRobotPage));
|
||||
Receive(message);
|
||||
}
|
||||
[RelayCommand]
|
||||
public void HotCoolplateClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["HotCoolplateVarName"]!, typeof(HotCoolPlatePage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void ChuckMagazinClicked()
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["ChuckMagazinVarName"]!, typeof(ChuckMagazinPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void NavigateBack()
|
||||
{
|
||||
if (_messageStack.Count == 0)
|
||||
{
|
||||
CanNavigateBack = false;
|
||||
return;
|
||||
}
|
||||
|
||||
_currentMessage = _messageStack.Pop();
|
||||
|
||||
// Update if we can use the navigate back button
|
||||
if (_messageStack.Count > 0)
|
||||
CanNavigateBack = true;
|
||||
else
|
||||
{
|
||||
StatusBarVisible = Visibility.Visible;
|
||||
CanNavigateBack = false;
|
||||
}
|
||||
|
||||
|
||||
// Remove last two entrys from Breadcrumbs
|
||||
int index = -1;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
index = Breadcrumb.LastIndexOf('>');
|
||||
if (index != -1)
|
||||
Breadcrumb = Breadcrumb[..index];
|
||||
}
|
||||
|
||||
// Navigate to page
|
||||
Navigate(_currentMessage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Only use for forward traversal!
|
||||
public void Receive(NavigateMessage message)
|
||||
@@ -201,13 +192,11 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
// Save current message for later push
|
||||
_currentMessage = message;
|
||||
|
||||
// Set can navigate back
|
||||
CanNavigateBack = true;
|
||||
|
||||
Navigate(message);
|
||||
}
|
||||
|
||||
private void Navigate(NavigateMessage message)
|
||||
private void Navigate(NavigateMessage message, NavigateMessage? nextMessage = null)
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentPage.DataContext is IDisposable viewModel)
|
||||
@@ -219,44 +208,21 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
// Create new page
|
||||
switch (message.type.Name)
|
||||
{
|
||||
case nameof(AutomaticModePage):
|
||||
var automaticModeViewModel = (AutomaticModePageVM)ActivatorUtilities.CreateInstance(App.AppHost!.Services, typeof(AutomaticModePageVM), message.VariableName); //App.AppHost!.Services.GetRequiredService<AutomaticModePageVM>();
|
||||
AutomaticModePage automaticModePage = new() { DataContext = automaticModeViewModel };
|
||||
CurrentPage = automaticModePage;
|
||||
Breadcrumb = "> Automatic";
|
||||
break;
|
||||
case nameof(ProductionOverviewPage):
|
||||
|
||||
case nameof(BatteryOverviewPage):
|
||||
var batteryOverviewPageVM = App.AppHost!.Services.GetRequiredService<BatteryOverviewPageVM>();
|
||||
BatteryOverviewPage batteryOverviewPage = new() { DataContext = batteryOverviewPageVM };
|
||||
CurrentPage = batteryOverviewPage;
|
||||
Breadcrumb = "> Manual";
|
||||
break;
|
||||
if (_productionOverviewPageVM == null || nextMessage != null)
|
||||
_productionOverviewPageVM = new ProductionOverviewPageVM(_adsManager, _config, _eventlogger, nextMessage);
|
||||
ProductionOverviewPage productionOverviewPage = new() { DataContext = _productionOverviewPageVM };
|
||||
CurrentPage = productionOverviewPage;
|
||||
break;
|
||||
|
||||
case nameof(StringOverviewPage):
|
||||
var stringOverviewVM = (StringOverviewPageVM)ActivatorUtilities.CreateInstance(App.AppHost!.Services, typeof(StringOverviewPageVM), message.VariableName);
|
||||
StringOverviewPage stringPage = new() { DataContext = stringOverviewVM };
|
||||
CurrentPage = stringPage;
|
||||
if (message.Header.Length > 0)
|
||||
AppendBreadcrumb(message.Header);
|
||||
break;
|
||||
case nameof(MachineOverviewPage):
|
||||
_machineOverviewPageVM?.Dispose();
|
||||
|
||||
case nameof(ModuleOverviewPage):
|
||||
var moduleOverviewVM = (ModuleOverviewPageVM)ActivatorUtilities.CreateInstance(App.AppHost!.Services, typeof(ModuleOverviewPageVM), message.VariableName);
|
||||
ModuleOverviewPage modulePage = new() { DataContext = moduleOverviewVM };
|
||||
CurrentPage = modulePage;
|
||||
if (message.Header.Length > 0)
|
||||
AppendBreadcrumb(message.Header);
|
||||
break;
|
||||
|
||||
case nameof(UnitOverviewPage):
|
||||
var unitOverviewVM = (UnitOverviewPageVM)ActivatorUtilities.CreateInstance(App.AppHost!.Services, typeof(UnitOverviewPageVM), message.VariableName);
|
||||
unitOverviewVM.UnitName = message.Header;
|
||||
UnitOverviewPage unitPage = new() { DataContext = unitOverviewVM };
|
||||
CurrentPage = unitPage;
|
||||
if (message.Header.Length > 0)
|
||||
AppendBreadcrumb(message.Header);
|
||||
break;
|
||||
_machineOverviewPageVM = new MachineOverviewPageVM(_adsManager, _config,this, new ProductionOverviewPageVM(_adsManager, _config, _eventlogger), _eventlogger);
|
||||
MachineOverviewPage machineOverviewPage = new() { DataContext = _machineOverviewPageVM };
|
||||
CurrentPage = machineOverviewPage;
|
||||
break;
|
||||
|
||||
case nameof(EventsPage):
|
||||
#pragma warning disable MVVMTK0034 // Direct field reference to [ObservableProperty] backing field
|
||||
@@ -276,15 +242,16 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
Breadcrumb = " > Settings";
|
||||
break;
|
||||
|
||||
case nameof(KukaRobotPage):
|
||||
// Create page view model only once
|
||||
if (_kukaRobotPageVM == null)
|
||||
_kukaRobotPageVM = new(_adsManager, "GVL_CONFIG.stRobotConfig");
|
||||
case nameof(ReceipePage):
|
||||
if (_receipePageVM == null)
|
||||
_receipePageVM = new();
|
||||
|
||||
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
||||
CurrentPage = kukaRobotPage;
|
||||
Breadcrumb = " > Kuka Roboter";
|
||||
break;
|
||||
ReceipePage receipePage = new() { DataContext = _receipePageVM };
|
||||
CurrentPage = receipePage;
|
||||
Breadcrumb = " > Kuka Roboter";
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case nameof(HotCoolPlatePage):
|
||||
if (_hotCoolplatePageVM == null)
|
||||
@@ -296,15 +263,7 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
break;
|
||||
|
||||
|
||||
case nameof(ChuckMagazinPage):
|
||||
if (_chuckMagazinPageVM == null)
|
||||
_chuckMagazinPageVM = new(_adsManager, "GVL_Config.stChuckMagazinConfig");
|
||||
|
||||
ChuckMagazinPage chuckMagazinPage = new() { DataContext= _chuckMagazinPageVM };
|
||||
CurrentPage = chuckMagazinPage;
|
||||
Breadcrumb = " > Tellermagazin";
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
CurrentPage = new Page();
|
||||
break;
|
||||
@@ -322,7 +281,7 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
||||
[RelayCommand]
|
||||
private void AckAlarms()
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stAckAlarmsButton.xRequest", true);
|
||||
_adsManager.WriteValue("GVL_SCADA.stConfirmAlarmsBtn.xRequest", true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace UniperHMI.Model
|
||||
namespace InfineonHMI.Model
|
||||
{
|
||||
public enum E_BMS_CONTROL_MODE : short
|
||||
{
|
||||
@@ -94,4 +94,45 @@ namespace UniperHMI.Model
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
|
||||
public enum Stationenum : uint
|
||||
{
|
||||
EINGABE = 1,
|
||||
QRCODE = 2,
|
||||
AUSRICHTEN = 4,
|
||||
AETZEN = 8,
|
||||
HEIZPLATTE = 16,
|
||||
KUEHLPLATTE = 32,
|
||||
HOCHVOLTHEISS = 64,
|
||||
HOCHVOLTKALT = 128,
|
||||
AUSGABE = 256,
|
||||
NIOSTATION = 512
|
||||
}
|
||||
|
||||
|
||||
public class StationEntry(Stationenum station, string name)
|
||||
{
|
||||
public Stationenum eStation = station;
|
||||
public string sName = name;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return sName;
|
||||
}
|
||||
}
|
||||
|
||||
public class FlowReceipeEntry()
|
||||
{
|
||||
public int NodeId { get; set; }
|
||||
public UInt16 Priority { get; set; }
|
||||
public required StationEntry Station { get; set; }
|
||||
public UInt16 MaxRetries { get; set; }
|
||||
|
||||
public int NextNodeSuccess { get; set; }
|
||||
public int NextNodeRetry { get; set; }
|
||||
public int NextNodeFail { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
225
uniper_hmi/UniperHMI/Model/ReceipeDto.cs
Normal file
225
uniper_hmi/UniperHMI/Model/ReceipeDto.cs
Normal file
@@ -0,0 +1,225 @@
|
||||
using System.IO;
|
||||
using System.Reflection.PortableExecutable;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using InfineonHMI.Common;
|
||||
|
||||
namespace InfineonHMI.Model;
|
||||
|
||||
public class ReceipeDto
|
||||
{
|
||||
|
||||
public ReceipeDto()
|
||||
{
|
||||
ReceipeObject = new ReceipeObject();
|
||||
}
|
||||
|
||||
public ReceipeObject ReceipeObject { get; set; }
|
||||
public void Write(string filename)
|
||||
{
|
||||
L4ItXmlSerializer.SerializeObject(ReceipeObject, filename);
|
||||
}
|
||||
|
||||
public void Read(string filename)
|
||||
{
|
||||
ReceipeObject = L4ItXmlSerializer.DeSerializeObject<ReceipeObject>(filename);
|
||||
}
|
||||
}
|
||||
|
||||
public class ReceipeObject
|
||||
{
|
||||
public MachineParameters MachineParameters { get; set; }
|
||||
public ProductParameters ProductParameters { get; set; }
|
||||
public ReceipeHotplate ReceipeHotplate { get; set; }
|
||||
public ReceipeCoolplate ReceipeCoolplate { get; set; }
|
||||
public ReceipeEtcher ReceipeEtcher { get; set; }
|
||||
public ReceipeHighvoltageTester ReceipeHvTester { get; set; }
|
||||
|
||||
public FlowReceipe Flowreceipe { get; set; }
|
||||
|
||||
|
||||
public ReceipeObject()
|
||||
{
|
||||
MachineParameters = new MachineParameters();
|
||||
ProductParameters = new ProductParameters();
|
||||
ReceipeHotplate = new ReceipeHotplate();
|
||||
ReceipeCoolplate = new ReceipeCoolplate();
|
||||
ReceipeEtcher = new ReceipeEtcher();
|
||||
ReceipeHvTester = new ReceipeHighvoltageTester();
|
||||
Flowreceipe = new FlowReceipe();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class MachineParameters
|
||||
{
|
||||
public List<TrayPosition> TrayPositions { get; set; }
|
||||
|
||||
public int CameraPrograms { get; set; }
|
||||
|
||||
public int Chucks { get; set; }
|
||||
|
||||
public int Gripper { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Erlaubten Strahlparameter Abweichungen
|
||||
/// </summary>
|
||||
public float PermissibleBeamParameterDeviations { get; set; }
|
||||
|
||||
public MachineParameters()
|
||||
{
|
||||
TrayPositions = new List<TrayPosition>();
|
||||
}
|
||||
}
|
||||
|
||||
public class ProductParameters
|
||||
{
|
||||
public float Diameter { get; set; }
|
||||
|
||||
public float Thickness { get; set; }
|
||||
|
||||
public float TimeIntervallBeamCheck { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class ReceipeHotplate
|
||||
{
|
||||
public float RestingTime { get; set; }
|
||||
public float TargetTemperature { get; set; }
|
||||
}
|
||||
public class ReceipeCoolplate
|
||||
{
|
||||
public float RestingTime { get; set; }
|
||||
public float TargetTemperature { get; set; }
|
||||
}
|
||||
|
||||
public class ReceipeHighvoltageTester
|
||||
{
|
||||
/// <summary>
|
||||
/// Test voltage in V
|
||||
/// </summary>
|
||||
public float TestVoltage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Maximum test Current
|
||||
/// </summary>
|
||||
public float MaximumTestCurrent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ramp Time in milliseconds
|
||||
/// </summary>
|
||||
public float RampTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Testfrequency in HZ
|
||||
/// </summary>
|
||||
public float TestFrequency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Polarity 1=Positive, 2=Negative
|
||||
/// </summary>
|
||||
public UInt16 Polarity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overpressure N2 in mbar
|
||||
/// </summary>
|
||||
public float TestpressureN2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// N2 pre purging time in seconds
|
||||
/// </summary>
|
||||
public float N2PrePurgetime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Test retries
|
||||
/// </summary>
|
||||
public UInt16 NumRetries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Temperature for testing (only used in heated HV station)
|
||||
/// </summary>
|
||||
public float TestTemperature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Test OK Voltage
|
||||
/// </summary>
|
||||
public float TestOkVoltage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Test OK Current
|
||||
/// </summary>
|
||||
public float TestOkCurrent { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ReceipeEtcher
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of Robot positions
|
||||
/// </summary>
|
||||
public UInt16 NumberRobotPos { get; set; }
|
||||
|
||||
public float Rpm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Roboter position and setting data
|
||||
/// </summary>
|
||||
public List<EtcherRobotStepData> RobotStepData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Radial position of water jet under the blank in mm
|
||||
/// </summary>
|
||||
public float RadialPosLowerWaterJet { get; set; }
|
||||
|
||||
public ReceipeEtcher()
|
||||
{
|
||||
RobotStepData = new List<EtcherRobotStepData>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class EtcherRobotStepData
|
||||
{
|
||||
public float PosX { get; set; }
|
||||
public float PosY { get; set; }
|
||||
public float PosZ { get; set; }
|
||||
public float AngleAlpha { get; set; }
|
||||
public float MoveSpeed { get; set; }
|
||||
public float Delay { get; set; }
|
||||
public UInt16 Medium { get; set; }
|
||||
public bool WaterFromBelow { get; set; }
|
||||
public bool WaterFromAbove { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class FlowReceipe
|
||||
{
|
||||
public int NodeCount { get; set; }
|
||||
public List<FlowReceipeNode> Nodes { get; set; }
|
||||
|
||||
public FlowReceipe()
|
||||
{
|
||||
Nodes = new List<FlowReceipeNode>();
|
||||
}
|
||||
}
|
||||
|
||||
public class FlowReceipeNode
|
||||
{
|
||||
public UInt16 Priority { get; set; }
|
||||
public Int32 StationType { get; set; }
|
||||
|
||||
public UInt16 MaxRetries { get; set; }
|
||||
public int NextNodeSuccess { get; set; }
|
||||
public int NextNodeRetry { get; set; }
|
||||
public int NextNodeFail { get; set; }
|
||||
}
|
||||
|
||||
public class TrayPosition
|
||||
{
|
||||
public int PosId { get; set; }
|
||||
public float PosX { get; set; }
|
||||
public float PosY { get; set; }
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
namespace UniperHMI;
|
||||
namespace InfineonHMI;
|
||||
|
||||
public record class NavigateMessage(string VariableName, Type type, string Header = "");
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI;
|
||||
|
||||
public sealed partial class ModuleControlButtonVM : SMUBaseVM, IDisposable
|
||||
{
|
||||
public ModuleControlButtonVM() : base() { }
|
||||
|
||||
public ModuleControlButtonVM(IAdsManager adsManager, string variableName) : base(adsManager, variableName) { }
|
||||
|
||||
[RelayCommand]
|
||||
private void Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName, typeof(ModuleOverviewPage)));
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
using Heisig.HMI.AdsManager;
|
||||
using TwinCAT.TypeSystem;
|
||||
|
||||
namespace UniperHMI;
|
||||
namespace InfineonHMI;
|
||||
|
||||
public enum E_COMPONENT_STATUS : short
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI;
|
||||
namespace InfineonHMI;
|
||||
|
||||
public sealed partial class StringControlButtonVM : SMUBaseVM, IDisposable
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI.OwnControls
|
||||
namespace InfineonHMI.OwnControls
|
||||
{
|
||||
public sealed partial class UnitControlButtonVM : SMUBaseVM
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using HMIToolkit;
|
||||
using TwinCAT.TypeSystem;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class UnitDetailsControlVM : ObservableObject, IDisposable
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<Button x:Class="UniperHMI.SMUControlButton"
|
||||
<Button x:Class="InfineonHMI.SMUControlButton"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
d:DataContext="{d:DesignInstance Type=local:StringControlButtonVM, IsDesignTimeCreatable=True}"
|
||||
mc:Ignorable="d"
|
||||
Style="{StaticResource MahApps.Styles.Button}"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für StringControlButton.xaml
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<UserControl xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="UniperHMI.UnitDetailsControl"
|
||||
<UserControl xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.UnitDetailsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:UnitDetailsControlVM, IsDesignTimeCreatable=True}"
|
||||
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Width="Auto" Height="Auto"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für UnitControl.xaml
|
||||
|
||||
@@ -6,58 +6,21 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using UniperHMI.Model;
|
||||
namespace UniperHMI
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class AlignmentStationPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private int _setpoint;
|
||||
|
||||
[Range(-40000, 40000)]
|
||||
public int Setpoint
|
||||
{
|
||||
get => this._setpoint;
|
||||
set => SetProperty(ref this._setpoint, value, true);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private int processValue;
|
||||
|
||||
[ObservableProperty]
|
||||
private HMIControlButtonVM? startButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private HMIControlButtonVM? stopButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
||||
[
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
||||
];
|
||||
|
||||
[ObservableProperty]
|
||||
private BMSControlModeEntry selectedControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeControlMode;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM vacuumValveControlVm;
|
||||
|
||||
public AlignmentStationPageVM()
|
||||
{
|
||||
StartButton = new HMIControlButtonVM();
|
||||
StopButton = new HMIControlButtonVM();
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
canChangeControlMode = true;
|
||||
VacuumValveControlVm = new BinaryValveControlVM();
|
||||
}
|
||||
|
||||
public AlignmentStationPageVM(IAdsManager adsManager, string variableName)
|
||||
@@ -65,25 +28,10 @@ namespace UniperHMI
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
||||
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
|
||||
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
|
||||
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
VacuumValveControlVm = new BinaryValveControlVM(_adsManager, _variableName + ".stVacuumValve");
|
||||
}
|
||||
|
||||
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Setpoint = (int)e.Value;
|
||||
}
|
||||
|
||||
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
CanChangeControlMode = (bool)e.Value;
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
using UniperHMI.Model;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
|
||||
|
||||
|
||||
public sealed partial class AutomaticModePageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private int _setpoint;
|
||||
|
||||
[Range(-40000, 40000)]
|
||||
public int Setpoint
|
||||
{
|
||||
get => this._setpoint;
|
||||
set => SetProperty(ref this._setpoint, value, true);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private int processValue;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? startButton;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? stopButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
||||
[
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
||||
];
|
||||
|
||||
[ObservableProperty]
|
||||
private BMSControlModeEntry selectedControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeControlMode;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public AutomaticModePageVM()
|
||||
{
|
||||
StartButton = new HMIControlButtonVM();
|
||||
StopButton = new HMIControlButtonVM();
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
canChangeControlMode = true;
|
||||
}
|
||||
|
||||
public AutomaticModePageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
||||
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
|
||||
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
|
||||
_adsManager.Register("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
|
||||
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Setpoint = (int)e.Value;
|
||||
}
|
||||
|
||||
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
CanChangeControlMode = (bool)e.Value;
|
||||
}
|
||||
|
||||
private void CurrentControlModeChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
BmsControlMode = (E_BMS_CONTROL_MODE)e.Value;
|
||||
SelectedControlMode.eMode = BmsControlMode;
|
||||
SelectedControlMode.Name = "Test";
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StartButton?.Dispose();
|
||||
StartButton = null;
|
||||
StopButton?.Dispose();
|
||||
StopButton = null;
|
||||
|
||||
_adsManager?.Deregister("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||
_adsManager?.Deregister("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StartAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", Setpoint);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StopAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", 0);
|
||||
Setpoint = 0;
|
||||
}
|
||||
|
||||
public static ValidationResult ValidatePower(int power, ValidationContext context)
|
||||
{
|
||||
if (power < -40000 || power > 40000)
|
||||
return new("Must be between -40.000 and +40.000");
|
||||
else
|
||||
return ValidationResult.Success!;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
public sealed partial class BatteryOverviewPageVM : ObservableObject, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private StringControlButtonVM? string1VM;
|
||||
|
||||
[ObservableProperty]
|
||||
private StringControlButtonVM? string2VM;
|
||||
|
||||
[ObservableProperty]
|
||||
private StringControlButtonVM? dummyStringVM;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public BatteryOverviewPageVM()
|
||||
{
|
||||
string1VM = new StringControlButtonVM();
|
||||
string2VM = new StringControlButtonVM();
|
||||
}
|
||||
|
||||
public BatteryOverviewPageVM(IAdsManager adsManager)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
string1VM = new StringControlButtonVM(adsManager, "GVL_SCADA.stHMIInterface[0]");
|
||||
string2VM = new StringControlButtonVM(adsManager, "GVL_SCADA.stHMIInterface[1]");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
String1VM?.Dispose();
|
||||
String1VM = null;
|
||||
|
||||
String2VM?.Dispose();
|
||||
String2VM = null;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void String1Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage("GVL_SCADA.stHMIInterface[0]", typeof(StringOverviewPage), "String 1"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void String2Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage("GVL_SCADA.stHMIInterface[1]", typeof(StringOverviewPage), "String 2"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using HMIToolkit;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Windows;
|
||||
using TwinCAT.TypeSystem;
|
||||
using UniperHMI.Model;
|
||||
namespace UniperHMI
|
||||
{
|
||||
public sealed partial class ChuckMagazinPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
private const string sChuckOnPlace1 = "_adsVariable_MagazinPlace1";
|
||||
private const string sChuckOnPlace2 = "_adsVariable_MagazinPlace2";
|
||||
private const string sChuckOnPlace3 = "_adsVariable_MagazinPlace3";
|
||||
private const string sChuckOnPlace4 = "_adsVariable_MagazinPlace4";
|
||||
private const string sChuckOnPlace5 = "_adsVariable_MagazinPlace5";
|
||||
private const string sChuckOnPlace6 = "_adsVariable_MagazinPlace6";
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace1;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace2;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace3;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace4;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace5;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace6;
|
||||
|
||||
public ChuckMagazinPageVM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ChuckMagazinPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
_adsManager.Register(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||
_adsManager.Register(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||
_adsManager.Register(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||
_adsManager.Register(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||
_adsManager.Register(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||
_adsManager.Register(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||
|
||||
}
|
||||
|
||||
private void ChuckOnPlace1Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace1 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace1 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace2Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace2 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace2 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace3Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace3 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace3 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace4Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace4 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace4 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace5Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace5 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace5 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace6Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace6 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace6 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_adsManager?.Deregister(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
|
||||
public sealed partial class EtchingStation1PageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM vacuumValveControlEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM doorValveControlEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveLeftEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveRightEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveFrontEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveBackEtching1Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckUnlockCmdButtonEtching1Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckLockCmdButtonEtching1Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckEjectCmdButtonEtching1Vm;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public EtchingStation1PageVM()
|
||||
{
|
||||
VacuumValveControlEtching1Vm = new BinaryValveControlVM();
|
||||
DoorValveControlEtching1Vm = new BinaryValveControlVM();
|
||||
ChuckUnlockValveLeftEtching1Vm = new BinaryValveControlVM();
|
||||
ChuckUnlockValveRightEtching1Vm = new BinaryValveControlVM();
|
||||
ChuckEjectValveFrontEtching1Vm = new BinaryValveControlVM();
|
||||
ChuckEjectValveBackEtching1Vm = new BinaryValveControlVM();
|
||||
|
||||
ChuckUnlockCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||
ChuckLockCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||
ChuckEjectCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||
|
||||
}
|
||||
|
||||
public EtchingStation1PageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
VacuumValveControlEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stVacuumValve");
|
||||
DoorValveControlEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stDoorValve");
|
||||
ChuckUnlockValveLeftEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockLeft");
|
||||
ChuckUnlockValveRightEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockRight");
|
||||
ChuckEjectValveFrontEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectFront");
|
||||
ChuckEjectValveBackEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectBack");
|
||||
|
||||
ChuckUnlockCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockCmd");
|
||||
ChuckLockCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckLockCmd");
|
||||
ChuckEjectCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectCmd");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
VacuumValveControlEtching1Vm.Dispose();
|
||||
DoorValveControlEtching1Vm.Dispose();
|
||||
ChuckUnlockValveLeftEtching1Vm.Dispose();
|
||||
ChuckUnlockValveRightEtching1Vm.Dispose();
|
||||
ChuckEjectValveFrontEtching1Vm.Dispose();
|
||||
ChuckEjectValveBackEtching1Vm.Dispose();
|
||||
ChuckUnlockCmdButtonEtching1Vm?.Dispose();
|
||||
ChuckUnlockCmdButtonEtching1Vm = null;
|
||||
ChuckLockCmdButtonEtching1Vm?.Dispose();
|
||||
ChuckLockCmdButtonEtching1Vm = null;
|
||||
ChuckLockCmdButtonEtching1Vm?.Dispose();
|
||||
ChuckEjectCmdButtonEtching1Vm = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
|
||||
public sealed partial class EtchingStation2PageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM vacuumValveControlEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM doorValveControlEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveLeftEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveRightEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveFrontEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveBackEtching2Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckUnlockCmdButtonEtching2Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckLockCmdButtonEtching2Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckEjectCmdButtonEtching2Vm;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public EtchingStation2PageVM()
|
||||
{
|
||||
|
||||
|
||||
VacuumValveControlEtching2Vm = new BinaryValveControlVM();
|
||||
DoorValveControlEtching2Vm = new BinaryValveControlVM();
|
||||
ChuckUnlockValveLeftEtching2Vm = new BinaryValveControlVM();
|
||||
ChuckUnlockValveRightEtching2Vm = new BinaryValveControlVM();
|
||||
ChuckEjectValveFrontEtching2Vm = new BinaryValveControlVM();
|
||||
ChuckEjectValveBackEtching2Vm = new BinaryValveControlVM();
|
||||
|
||||
ChuckUnlockCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||
ChuckLockCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||
ChuckEjectCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||
}
|
||||
|
||||
public EtchingStation2PageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
|
||||
VacuumValveControlEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stVacuumValve");
|
||||
DoorValveControlEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stDoorValve");
|
||||
ChuckUnlockValveLeftEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockLeft");
|
||||
ChuckUnlockValveRightEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockRight");
|
||||
ChuckEjectValveFrontEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectFront");
|
||||
ChuckEjectValveBackEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectBack");
|
||||
|
||||
ChuckUnlockCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockCmd");
|
||||
ChuckLockCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckLockCmd");
|
||||
ChuckEjectCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectCmd");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
VacuumValveControlEtching2Vm.Dispose();
|
||||
DoorValveControlEtching2Vm.Dispose();
|
||||
ChuckUnlockValveLeftEtching2Vm.Dispose();
|
||||
ChuckUnlockValveRightEtching2Vm.Dispose();
|
||||
ChuckEjectValveFrontEtching2Vm.Dispose();
|
||||
ChuckEjectValveBackEtching2Vm.Dispose();
|
||||
ChuckUnlockCmdButtonEtching2Vm?.Dispose();
|
||||
ChuckUnlockCmdButtonEtching2Vm = null;
|
||||
ChuckLockCmdButtonEtching2Vm?.Dispose();
|
||||
ChuckLockCmdButtonEtching2Vm = null;
|
||||
ChuckLockCmdButtonEtching2Vm?.Dispose();
|
||||
ChuckEjectCmdButtonEtching2Vm = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using UniperHMI.Model;
|
||||
namespace UniperHMI
|
||||
{
|
||||
|
||||
public sealed partial class EtchingStationPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private int _setpoint;
|
||||
|
||||
[Range(-40000, 40000)]
|
||||
public int Setpoint
|
||||
{
|
||||
get => this._setpoint;
|
||||
set => SetProperty(ref this._setpoint, value, true);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private int processValue;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? startButton;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? stopButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
||||
[
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
||||
];
|
||||
|
||||
[ObservableProperty]
|
||||
private BMSControlModeEntry selectedControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeControlMode;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public EtchingStationPageVM()
|
||||
{
|
||||
StartButton = new HMIControlButtonVM();
|
||||
StopButton = new HMIControlButtonVM();
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
canChangeControlMode = true;
|
||||
}
|
||||
|
||||
public EtchingStationPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
||||
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
|
||||
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
|
||||
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
|
||||
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Setpoint = (int)e.Value;
|
||||
}
|
||||
|
||||
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
CanChangeControlMode = (bool)e.Value;
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StartButton?.Dispose();
|
||||
StartButton = null;
|
||||
StopButton?.Dispose();
|
||||
StopButton = null;
|
||||
|
||||
_adsManager?.Deregister("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StartAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", Setpoint);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StopAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", 0);
|
||||
Setpoint = 0;
|
||||
}
|
||||
|
||||
public static ValidationResult ValidatePower(int power, ValidationContext context)
|
||||
{
|
||||
if (power < -40000 || power > 40000)
|
||||
return new("Must be between -40.000 and +40.000");
|
||||
else
|
||||
return ValidationResult.Success!;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
using TcEventLoggerAdsProxyLib;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public partial class EventData : ObservableObject
|
||||
{
|
||||
|
||||
@@ -6,116 +6,67 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using UniperHMI.Model;
|
||||
namespace UniperHMI
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class HighVoltageStationPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private int _setpoint;
|
||||
|
||||
[Range(-40000, 40000)]
|
||||
public int Setpoint
|
||||
{
|
||||
get => this._setpoint;
|
||||
set => SetProperty(ref this._setpoint, value, true);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private int processValue;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? startButton;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? stopButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
||||
[
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
||||
];
|
||||
|
||||
[ObservableProperty]
|
||||
private BMSControlModeEntry selectedControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeControlMode;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public HighVoltageStationPageVM()
|
||||
{
|
||||
StartButton = new HMIControlButtonVM();
|
||||
StopButton = new HMIControlButtonVM();
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
canChangeControlMode = true;
|
||||
}
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM doorValveHotControlVm;
|
||||
|
||||
public HighVoltageStationPageVM(IAdsManager adsManager, string variableName)
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM testChamberHotValveVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private AnalogValueVM tempSPHotVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM doorValveColdControlVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM testChamberColdValveVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private AnalogValueVM tempSPColdVm;
|
||||
|
||||
public HighVoltageStationPageVM()
|
||||
{
|
||||
DoorValveHotControlVm = new BinaryValveControlVM();
|
||||
TestChamberHotValveVm = new BinaryValveControlVM();
|
||||
TempSPHotVm = new AnalogValueVM();
|
||||
|
||||
DoorValveColdControlVm = new BinaryValveControlVM();
|
||||
TestChamberColdValveVm = new BinaryValveControlVM();
|
||||
TempSPColdVm = new AnalogValueVM();
|
||||
}
|
||||
|
||||
public HighVoltageStationPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
||||
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
|
||||
DoorValveHotControlVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stDoorValve");
|
||||
TestChamberHotValveVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stTestChamberValve");
|
||||
TempSPHotVm = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stTempSP", false);
|
||||
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
DoorValveColdControlVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stDoorValve");
|
||||
TestChamberColdValveVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stTestChamberValve");
|
||||
TempSPColdVm = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stTempSP", false);
|
||||
|
||||
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
|
||||
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Setpoint = (int)e.Value;
|
||||
}
|
||||
|
||||
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
CanChangeControlMode = (bool)e.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StartButton?.Dispose();
|
||||
StartButton = null;
|
||||
StopButton?.Dispose();
|
||||
StopButton = null;
|
||||
|
||||
_adsManager?.Deregister("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StartAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", Setpoint);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StopAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", 0);
|
||||
Setpoint = 0;
|
||||
}
|
||||
|
||||
public static ValidationResult ValidatePower(int power, ValidationContext context)
|
||||
{
|
||||
if (power < -40000 || power > 40000)
|
||||
return new("Must be between -40.000 and +40.000");
|
||||
else
|
||||
return ValidationResult.Success!;
|
||||
}
|
||||
DoorValveHotControlVm.Dispose();
|
||||
TestChamberHotValveVm.Dispose();
|
||||
TempSPHotVm.Dispose();
|
||||
DoorValveColdControlVm.Dispose();
|
||||
TestChamberColdValveVm.Dispose();
|
||||
TempSPColdVm.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,50 +6,56 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using UniperHMI.Model;
|
||||
using InfineonHMI.Model;
|
||||
using System.Windows;
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class HotCoolPlatePageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
private const string sPieceOnHotplate1 = "_adsVariable_hotPlatePiece1";
|
||||
private const string sPieceOnHotplate2 = "_adsVariable_hotPlatePiece2";
|
||||
private const string sPieceOnHotplate3 = "_adsVariable_hotPlatePiece3";
|
||||
private const string sPieceOnHotplate4 = "_adsVariable_hotPlatePiece4";
|
||||
private const string sPieceOnHotplate5 = "_adsVariable_hotPlatePiece5";
|
||||
private const string sPieceOnHotplate6 = "_adsVariable_hotPlatePiece6";
|
||||
private const string sPieceOnHotplate7 = "_adsVariable_hotPlatePiece7";
|
||||
private const string sPieceOnHotplate8 = "_adsVariable_hotPlatePiece8";
|
||||
private const string sPieceOnHotplate9 = "_adsVariable_hotPlatePiece9";
|
||||
private const string sHotplateTargetTemp = "_adsVariable_hotPlateTargetTemp";
|
||||
private const string sHotplateActualTemp = "_adsVariable_hotPlateActualTemp";
|
||||
private const string sPieceOnHotplate1 = ".stHotplate.stPiece1";
|
||||
private const string sPieceOnHotplate2 = ".stHotplate.stPiece2";
|
||||
private const string sPieceOnHotplate3 = ".stHotplate.stPiece3";
|
||||
private const string sPieceOnHotplate4 = ".stHotplate.stPiece4";
|
||||
private const string sPieceOnHotplate5 = ".stHotplate.stPiece5";
|
||||
private const string sPieceOnHotplate6 = ".stHotplate.stPiece6";
|
||||
private const string sPieceOnHotplate7 = ".stHotplate.stPiece7";
|
||||
private const string sPieceOnHotplate8 = ".stHotplate.stPiece8";
|
||||
private const string sPieceOnHotplate9 = ".stHotplate.stPiece9";
|
||||
|
||||
private const string sPieceOnCoolplate1 = "_adsVariable_CoolPlatePiece1";
|
||||
private const string sPieceOnCoolplate2 = "_adsVariable_CoolPlatePiece2";
|
||||
private const string sPieceOnCoolplate3 = "_adsVariable_CoolPlatePiece3";
|
||||
private const string sPieceOnCoolplate4 = "_adsVariable_CoolPlatePiece4";
|
||||
private const string sPieceOnCoolplate5 = "_adsVariable_CoolPlatePiece5";
|
||||
private const string sPieceOnCoolplate6 = "_adsVariable_CoolPlatePiece6";
|
||||
private const string sPieceOnCoolplate7 = "_adsVariable_CoolPlatePiece7";
|
||||
private const string sPieceOnCoolplate8 = "_adsVariable_CoolPlatePiece8";
|
||||
private const string sPieceOnCoolplate9 = "_adsVariable_CoolPlatePiece9";
|
||||
private const string sCoolplateTargetTemp = "_adsVariable_coolPlateTargetTemp";
|
||||
private const string sCoolplateActualTemp = "_adsVariable_coolPlateActualTemp";
|
||||
private const string sPieceOnCoolplate1 = ".stCoolplate.stPiece1";
|
||||
private const string sPieceOnCoolplate2 = ".stCoolplate.stPiece2";
|
||||
private const string sPieceOnCoolplate3 = ".stCoolplate.stPiece3";
|
||||
private const string sPieceOnCoolplate4 = ".stCoolplate.stPiece4";
|
||||
private const string sPieceOnCoolplate5 = ".stCoolplate.stPiece5";
|
||||
private const string sPieceOnCoolplate6 = ".stCoolplate.stPiece6";
|
||||
private const string sPieceOnCoolplate7 = ".stCoolplate.stPiece7";
|
||||
private const string sPieceOnCoolplate8 = ".stCoolplate.stPiece8";
|
||||
private const string sPieceOnCoolplate9 = ".stCoolplate.stPiece9";
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
[ObservableProperty]
|
||||
private double hotPlateTargetTemperature;
|
||||
private AnalogValueVM hotPlateTargetTemperature;
|
||||
|
||||
[ObservableProperty]
|
||||
private double hotPlateActualTemperature;
|
||||
private AnalogValueVM hotPlateActualTemperature;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? enableHotPlateButtonVm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? disableHotPlateButtonVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private double coolPlateTargetTemperature;
|
||||
private AnalogValueVM coolPlateTargetTemperature;
|
||||
|
||||
[ObservableProperty]
|
||||
private double coolPlateActualTemperature;
|
||||
private AnalogValueVM coolPlateActualTemperature;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? enableCoolPlateButtonVm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? disableCoolPlateButtonVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility hotPlateVisibility1;
|
||||
@@ -107,15 +113,36 @@ namespace UniperHMI
|
||||
|
||||
public HotCoolPlatePageVM()
|
||||
{
|
||||
EnableHotPlateButtonVm = new HMIControlButtonVM();
|
||||
DisableHotPlateButtonVm = new HMIControlButtonVM();
|
||||
|
||||
EnableCoolPlateButtonVm = new HMIControlButtonVM();
|
||||
DisableCoolPlateButtonVm = new HMIControlButtonVM();
|
||||
|
||||
HotPlateActualTemperature = new AnalogValueVM();
|
||||
HotPlateTargetTemperature = new AnalogValueVM();
|
||||
|
||||
CoolPlateActualTemperature = new AnalogValueVM();
|
||||
CoolPlateTargetTemperature = new AnalogValueVM();
|
||||
|
||||
|
||||
}
|
||||
public HotCoolPlatePageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
_adsManager.Register(sHotplateActualTemp, HotplateTempChanged);
|
||||
_adsManager.Register(sCoolplateActualTemp, CoolplateTempChanged);
|
||||
EnableHotPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stHotplate.stEnableBtn");
|
||||
DisableHotPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stHotplate.stDisableBtn");
|
||||
|
||||
EnableCoolPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stCoolplate.stEnableBtn");
|
||||
DisableCoolPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stCoolplate.stDisableBtn");
|
||||
|
||||
HotPlateActualTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHotplate.stPV", true);
|
||||
CoolPlateActualTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stCoolplate.stPV", true);
|
||||
|
||||
HotPlateTargetTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHotplate.stSetpoint", false);
|
||||
CoolPlateTargetTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stCoolplate.stSetpoint", false);
|
||||
|
||||
_adsManager.Register(sPieceOnHotplate1, HotplatePiece1Changed);
|
||||
_adsManager.Register(sPieceOnHotplate2, HotplatePiece2Changed);
|
||||
@@ -140,14 +167,6 @@ namespace UniperHMI
|
||||
|
||||
}
|
||||
|
||||
private void HotplateTempChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
HotPlateActualTemperature = (double)e.Value;
|
||||
}
|
||||
private void CoolplateTempChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
HotPlateActualTemperature = (double)e.Value;
|
||||
}
|
||||
private void HotplatePiece1Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
@@ -351,8 +370,19 @@ namespace UniperHMI
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_adsManager?.Deregister(sHotplateActualTemp, HotplateTempChanged);
|
||||
_adsManager?.Deregister(sCoolplateActualTemp, CoolplateTempChanged);
|
||||
HotPlateActualTemperature.Dispose();
|
||||
HotPlateTargetTemperature.Dispose();
|
||||
CoolPlateActualTemperature.Dispose();
|
||||
CoolPlateTargetTemperature.Dispose();
|
||||
|
||||
EnableCoolPlateButtonVm?.Dispose();
|
||||
EnableCoolPlateButtonVm = null;
|
||||
EnableHotPlateButtonVm?.Dispose();
|
||||
EnableHotPlateButtonVm = null;
|
||||
DisableCoolPlateButtonVm?.Dispose();
|
||||
DisableCoolPlateButtonVm = null;
|
||||
DisableHotPlateButtonVm?.Dispose();
|
||||
DisableHotPlateButtonVm = null;
|
||||
_adsManager?.Deregister(sPieceOnHotplate1, HotplatePiece1Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate2, HotplatePiece2Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate3, HotplatePiece3Changed);
|
||||
|
||||
@@ -6,10 +6,11 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Security.Policy;
|
||||
using UniperHMI.Model;
|
||||
using System.Printing;
|
||||
using System.Windows;
|
||||
using InfineonHMI.Model;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class KukaRobotPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
@@ -21,27 +22,27 @@ namespace UniperHMI
|
||||
private const string sResetState = "_adsVariable_kukaResetState";
|
||||
private const string sClearState = "_adsVariable_kukaClearState";
|
||||
private const string sAcknPLCJob = "_adsVariable_kukaAcknPLCJob";
|
||||
private const string sCoolplateIndex = "_adsVariable_kukaCoolplateIndex";
|
||||
private const string sHotplateIndex = "_adsVariable_kukaHotPlateIndex";
|
||||
private const string sCoolplateIndex = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byPlaceOnCoolPlate";
|
||||
private const string sHotplateIndex = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byPlaceOnHotPlate";
|
||||
private const string sPieceThickness = "_adsVariable_kukaPieceThickness";
|
||||
private const string sJobGrippSide = "_adsVariable_kukaJobGrippSide";
|
||||
private const string sJobGrippType = "_adsVariable_kukaJobGrippType";
|
||||
private const string sChuckMagazinPlace = "_adsVariable_kukaChuckMagazinPlace";
|
||||
private const string sSelectedRobotJob = "_adsVariable_kukaRobotJob";
|
||||
private const string sJobGrippSide = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byGripperNumber";
|
||||
private const string sJobGrippType = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byGripperNumber";
|
||||
private const string sChuckMagazinPlace = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byChuckNumber";
|
||||
private const string sSelectedRobotJob = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.eJob";
|
||||
private const string sActiveRobotJob = "_adsVariable_kukaActiveRobotJob";
|
||||
private const string sFinishedRobotJob = "_adsVariable_kukaFinishedRobotJob";
|
||||
private const string sSelectedPLCJob = "_adsVariable_kukaPLCJob";
|
||||
private const string sOffsetPick_X = "_adsVariable_kukaOffsetPick_X";
|
||||
private const string sOffsetPick_Y = "_adsVariable_kukaOffsetPick_Y";
|
||||
private const string sOffsetPlace_X = "_adsVariable_kukaOffsetPlace_X";
|
||||
private const string sOffsetPlace_Y = "_adsVariable_kukaOffsetPlace_Y";
|
||||
private const string sOffsetNIOPick_X = "_adsVariable_kukaOffsetNIOPick_X";
|
||||
private const string sOffsetNIOPick_Y = "_adsVariable_kukaOffsetNIOPick_Y";
|
||||
private const string sOffsetNIOPlace_X = "_adsVariable_kukaOffsetNIOPlace_X";
|
||||
private const string sOffsetNIOPlace_Y = "_adsVariable_kukaOffsetNIOPlace_Y";
|
||||
private const string sOffsetPick_X = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosX";
|
||||
private const string sOffsetPick_Y = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosY";
|
||||
private const string sOffsetPlace_X = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosX";
|
||||
private const string sOffsetPlace_Y = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosY";
|
||||
private const string sOffsetNIOPick_X = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosX";
|
||||
private const string sOffsetNIOPick_Y = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosY";
|
||||
private const string sOffsetNIOPlace_X = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosX";
|
||||
private const string sOffsetNIOPlace_Y = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosY";
|
||||
|
||||
|
||||
private BMSControlModeEntry currentControlMode;
|
||||
private BMSControlModeEntry currentControlMode;
|
||||
public BMSControlModeEntry CurrentControlMode
|
||||
{
|
||||
get { return currentControlMode; }
|
||||
@@ -74,6 +75,30 @@ namespace UniperHMI
|
||||
[ObservableProperty]
|
||||
private HMIControlButtonVM? abortButton;
|
||||
|
||||
private const string sChuckOnPlace1 = "_adsVariable_MagazinPlace1";
|
||||
private const string sChuckOnPlace2 = "_adsVariable_MagazinPlace2";
|
||||
private const string sChuckOnPlace3 = "_adsVariable_MagazinPlace3";
|
||||
private const string sChuckOnPlace4 = "_adsVariable_MagazinPlace4";
|
||||
private const string sChuckOnPlace5 = "_adsVariable_MagazinPlace5";
|
||||
private const string sChuckOnPlace6 = "_adsVariable_MagazinPlace6";
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace1;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace2;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace3;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace4;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace5;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace6;
|
||||
|
||||
private int jobGrippSide;
|
||||
public int JobGrippSide
|
||||
@@ -81,7 +106,7 @@ namespace UniperHMI
|
||||
get { return jobGrippSide; }
|
||||
set
|
||||
{
|
||||
jobGrippSide = value;
|
||||
SetProperty(ref jobGrippSide, value);
|
||||
_adsManager?.WriteValue(sJobGrippSide, value);
|
||||
}
|
||||
}
|
||||
@@ -96,7 +121,7 @@ namespace UniperHMI
|
||||
get { return jobGrippType; }
|
||||
set
|
||||
{
|
||||
jobGrippType = value;
|
||||
SetProperty(ref jobGrippType, value);
|
||||
_adsManager?.WriteValue(sJobGrippType, value);
|
||||
|
||||
}
|
||||
@@ -112,7 +137,7 @@ namespace UniperHMI
|
||||
get { return chuckMagazinPlace; }
|
||||
set
|
||||
{
|
||||
chuckMagazinPlace = value;
|
||||
SetProperty(ref chuckMagazinPlace, value);
|
||||
_adsManager?.WriteValue(sChuckMagazinPlace, value);
|
||||
}
|
||||
}
|
||||
@@ -127,7 +152,7 @@ namespace UniperHMI
|
||||
get { return pieceThickness; }
|
||||
set
|
||||
{
|
||||
pieceThickness = value;
|
||||
SetProperty(ref pieceThickness, value);
|
||||
_adsManager?.WriteValue(sPieceThickness, value);
|
||||
}
|
||||
}
|
||||
@@ -142,7 +167,7 @@ namespace UniperHMI
|
||||
get { return offsetPick_X; }
|
||||
set
|
||||
{
|
||||
offsetPick_X = value;
|
||||
SetProperty(ref offsetPick_X, value);
|
||||
_adsManager?.WriteValue(sOffsetPick_X, value);
|
||||
}
|
||||
}
|
||||
@@ -154,7 +179,7 @@ namespace UniperHMI
|
||||
get { return offsetPick_Y; }
|
||||
set
|
||||
{
|
||||
offsetPick_Y = value;
|
||||
SetProperty(ref offsetPick_Y, value);
|
||||
_adsManager?.WriteValue(sOffsetPick_Y, value);
|
||||
}
|
||||
}
|
||||
@@ -168,7 +193,7 @@ namespace UniperHMI
|
||||
get { return offsetPlace_X; }
|
||||
set
|
||||
{
|
||||
offsetPlace_X = value;
|
||||
SetProperty(ref offsetPlace_X, value);
|
||||
_adsManager?.WriteValue(sOffsetPlace_X, value);
|
||||
}
|
||||
}
|
||||
@@ -179,7 +204,7 @@ namespace UniperHMI
|
||||
get { return offsetPlace_Y; }
|
||||
set
|
||||
{
|
||||
offsetPlace_Y = value;
|
||||
SetProperty(ref offsetPlace_Y, value);
|
||||
_adsManager?.WriteValue(sOffsetPlace_Y, value);
|
||||
}
|
||||
}
|
||||
@@ -195,7 +220,7 @@ namespace UniperHMI
|
||||
get { return offsetNIOPick_X; }
|
||||
set
|
||||
{
|
||||
offsetNIOPick_X = value;
|
||||
SetProperty(ref offsetNIOPick_X, value);
|
||||
_adsManager?.WriteValue(sOffsetNIOPick_X, value);
|
||||
}
|
||||
}
|
||||
@@ -206,7 +231,7 @@ namespace UniperHMI
|
||||
get { return offsetNIOPick_Y; }
|
||||
set
|
||||
{
|
||||
offsetNIOPick_Y = value;
|
||||
SetProperty(ref offsetNIOPick_Y, value);
|
||||
_adsManager?.WriteValue(sOffsetNIOPick_Y, value);
|
||||
}
|
||||
}
|
||||
@@ -220,7 +245,7 @@ namespace UniperHMI
|
||||
get { return offsetNIOPlace_X; }
|
||||
set
|
||||
{
|
||||
offsetNIOPlace_X = value;
|
||||
SetProperty(ref offsetNIOPlace_X, value);
|
||||
_adsManager?.WriteValue(sOffsetNIOPlace_X, value);
|
||||
}
|
||||
}
|
||||
@@ -231,7 +256,7 @@ namespace UniperHMI
|
||||
get { return offsetNIOPlace_Y; }
|
||||
set
|
||||
{
|
||||
offsetNIOPlace_Y = value;
|
||||
SetProperty(ref offsetNIOPlace_Y, value);
|
||||
_adsManager?.WriteValue(sOffsetNIOPlace_Y, value);
|
||||
}
|
||||
}
|
||||
@@ -243,9 +268,9 @@ namespace UniperHMI
|
||||
public int HotplateIndex
|
||||
{
|
||||
get { return hotplateIndex; }
|
||||
set
|
||||
set
|
||||
{
|
||||
hotplateIndex = value;
|
||||
SetProperty(ref hotplateIndex, value);
|
||||
_adsManager?.WriteValue(sHotplateIndex, value);
|
||||
}
|
||||
|
||||
@@ -261,7 +286,7 @@ namespace UniperHMI
|
||||
get { return coolplateIndex; }
|
||||
set
|
||||
{
|
||||
coolplateIndex = value;
|
||||
SetProperty(ref coolplateIndex, value);
|
||||
_adsManager?.WriteValue(sCoolplateIndex, value);
|
||||
}
|
||||
}
|
||||
@@ -330,7 +355,7 @@ namespace UniperHMI
|
||||
get { return selectedRobotJob; }
|
||||
set
|
||||
{
|
||||
selectedRobotJob = value;
|
||||
SetProperty(ref selectedRobotJob, value);
|
||||
CanChangeChuckMagazinPlace = (value == RobotJobs.First(i => i.eJob == RobotJobenum.PICK_CHUCK_MAGAZIN))
|
||||
|| (value == RobotJobs.First(i => i.eJob == RobotJobenum.PUT_CHUCK_MAGAZIN));
|
||||
CanChangeJobGrippType = value == RobotJobs.First(i => i.eJob == RobotJobenum.PICK_GRIPPER);
|
||||
@@ -352,10 +377,9 @@ namespace UniperHMI
|
||||
selectedRobotJob = RobotJobs.First(i => i.eJob == RobotJobenum.WARMUP);
|
||||
robotJobActiveValue = RobotJobs.First(i => i.eJob == RobotJobenum.PUT_HVTEST_COLD);
|
||||
robotJobFinishedValue = RobotJobs.First(i => i.eJob == RobotJobenum.PICK_HOTPLATE);
|
||||
|
||||
canChangeRobotJob = true;
|
||||
selectedPLCJob = PLCJobs.First(i => i.eJob == PLCJobenum.NONE);
|
||||
currentControlMode = new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual");
|
||||
|
||||
canChangeRobotJob = true;currentControlMode = new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual");
|
||||
|
||||
}
|
||||
|
||||
@@ -369,6 +393,11 @@ namespace UniperHMI
|
||||
currentControlMode = new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual");
|
||||
CurrentControlMode = new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual");
|
||||
|
||||
selectedRobotJob = RobotJobs.First(i => i.eJob == RobotJobenum.NONE);
|
||||
robotJobActiveValue = RobotJobs.First(i => i.eJob == RobotJobenum.NONE);
|
||||
robotJobFinishedValue = RobotJobs.First(i => i.eJob == RobotJobenum.NONE);
|
||||
selectedPLCJob = PLCJobs.First(i => i.eJob == PLCJobenum.NONE);
|
||||
|
||||
_adsManager.Register(sJobGrippSide, OnJobGrippSideValueChanged);
|
||||
_adsManager.Register(sJobGrippType, OnJobGrippTypeValueChanged);
|
||||
_adsManager.Register(sChuckMagazinPlace, OnChuckMagazinPlaceValueChanged);
|
||||
@@ -377,8 +406,8 @@ namespace UniperHMI
|
||||
_adsManager.Register(sSelectedRobotJob, OnSelectedRobotJobValueChanged);
|
||||
_adsManager.Register(sActiveRobotJob, OnActiveRobotJobValueChanged);
|
||||
_adsManager.Register(sFinishedRobotJob, OnFinishedRobotJobValueChanged);
|
||||
_adsManager.Register(sOffsetPick_X, OnOffsetPickYValueChanged);
|
||||
_adsManager.Register(sOffsetPick_Y, OnOffsetPickXValueChanged);
|
||||
_adsManager.Register(sOffsetPick_X, OnOffsetPickXValueChanged);
|
||||
_adsManager.Register(sOffsetPick_Y, OnOffsetPickYValueChanged);
|
||||
_adsManager.Register(sCoolplateIndex, OnCoolPlateIndexValueChanged);
|
||||
_adsManager.Register(sHotplateIndex, OnHotPlateIndexValueChanged);
|
||||
_adsManager.Register(sOffsetNIOPlace_Y, OnOffsetNIOPlaceYValueChanged);
|
||||
@@ -386,9 +415,16 @@ namespace UniperHMI
|
||||
_adsManager.Register(sOffsetNIOPick_Y, OnOffsetNIOPickYValueChanged);
|
||||
_adsManager.Register(sOffsetNIOPick_X, OnOffsetNIOPickXValueChanged);
|
||||
_adsManager.Register(sOffsetPlace_Y, OnOffsetPlaceYValueChanged);
|
||||
_adsManager.Register(sOffsetPlace_X, OnOffsetNIOPlaceXValueChanged);
|
||||
_adsManager.Register(sOffsetPlace_X, OnOffsetPlaceXValueChanged);
|
||||
|
||||
canChangeRobotJob = true;
|
||||
_adsManager.Register(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||
_adsManager.Register(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||
_adsManager.Register(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||
_adsManager.Register(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||
_adsManager.Register(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||
_adsManager.Register(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||
|
||||
canChangeRobotJob = true;
|
||||
canChangeJobGrippType = false;
|
||||
|
||||
canChangeChuckMagazinPlace = false;
|
||||
@@ -400,75 +436,142 @@ namespace UniperHMI
|
||||
|
||||
private void OnJobGrippSideValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
jobGrippSide = (int)e.Value;
|
||||
JobGrippSide = (byte)e.Value;
|
||||
}
|
||||
private void OnJobGrippTypeValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
jobGrippType = (int)e.Value;
|
||||
JobGrippType = (byte)e.Value;
|
||||
}
|
||||
private void OnChuckMagazinPlaceValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
chuckMagazinPlace = (int)e.Value;
|
||||
ChuckMagazinPlace = (byte)e.Value;
|
||||
}
|
||||
private void OnPieceThicknessValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
pieceThickness = (int)e.Value;
|
||||
PieceThickness = (int)e.Value;
|
||||
}
|
||||
private void OnSelectedPLCJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
selectedPLCJob = PLCJobs.First(i => (int)i.eJob == (int)e.Value);
|
||||
SelectedPLCJob = PLCJobs.First(i => (ushort)i.eJob == (ushort)e.Value);
|
||||
}
|
||||
private void OnSelectedRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
selectedRobotJob = RobotJobs.First(i => (int)i.eJob == (int)e.Value);
|
||||
SelectedRobotJob = RobotJobs.First(i => (ushort)i.eJob == (ushort)e.Value);
|
||||
}
|
||||
private void OnActiveRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
robotJobActiveValue = RobotJobs.First(i => (int)i.eJob == (int)e.Value);
|
||||
RobotJobActiveValue = RobotJobs.First(i => (ushort)i.eJob == (ushort)e.Value);
|
||||
}
|
||||
private void OnFinishedRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
robotJobFinishedValue = RobotJobs.First(i => (int)i.eJob == (int)e.Value);
|
||||
RobotJobFinishedValue = RobotJobs.First(i => (ushort)i.eJob == (ushort)e.Value);
|
||||
}
|
||||
private void OnHotPlateIndexValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
hotplateIndex = (int)e.Value;
|
||||
HotplateIndex = (byte)e.Value;
|
||||
}
|
||||
private void OnCoolPlateIndexValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
coolplateIndex = (int)e.Value;
|
||||
CoolplateIndex = (byte)e.Value;
|
||||
}
|
||||
private void OnOffsetPickXValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
offsetPick_X = (double)e.Value;
|
||||
OffsetPick_X = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetPickYValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
offsetPick_Y = (double)e.Value;
|
||||
OffsetPick_Y = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetPlaceXValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
offsetPlace_X = (double)e.Value;
|
||||
OffsetPlace_X = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetPlaceYValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
offsetPlace_X = (double)e.Value;
|
||||
OffsetPlace_Y = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetNIOPickXValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
offsetNIOPick_X = (double)e.Value;
|
||||
OffsetNIOPick_X = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetNIOPickYValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
offsetNIOPick_Y = (double)e.Value;
|
||||
OffsetNIOPick_Y = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetNIOPlaceXValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
offsetNIOPlace_X = (double)e.Value;
|
||||
OffsetNIOPlace_X = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetNIOPlaceYValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetNIOPlace_Y = (double)e.Value;
|
||||
OffsetNIOPlace_Y = (float)e.Value;
|
||||
}
|
||||
|
||||
private void ChuckOnPlace1Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace1 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace1 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace2Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace2 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace2 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace3Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace3 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace3 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace4Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace4 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace4 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace5Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace5 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace5 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace6Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace6 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace6 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -486,8 +589,8 @@ namespace UniperHMI
|
||||
_adsManager?.Deregister(sSelectedRobotJob, OnSelectedRobotJobValueChanged);
|
||||
_adsManager?.Deregister(sActiveRobotJob, OnActiveRobotJobValueChanged);
|
||||
_adsManager?.Deregister(sFinishedRobotJob, OnFinishedRobotJobValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPick_X, OnOffsetPickYValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPick_Y, OnOffsetPickXValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPick_X, OnOffsetPickXValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPick_Y, OnOffsetPickYValueChanged);
|
||||
_adsManager?.Deregister(sCoolplateIndex, OnCoolPlateIndexValueChanged);
|
||||
_adsManager?.Deregister(sHotplateIndex, OnHotPlateIndexValueChanged);
|
||||
_adsManager?.Deregister(sOffsetNIOPlace_Y, OnOffsetNIOPlaceYValueChanged);
|
||||
@@ -495,7 +598,14 @@ namespace UniperHMI
|
||||
_adsManager?.Deregister(sOffsetNIOPick_Y, OnOffsetNIOPickYValueChanged);
|
||||
_adsManager?.Deregister(sOffsetNIOPick_X, OnOffsetNIOPickXValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPlace_Y, OnOffsetPlaceYValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPlace_X, OnOffsetNIOPlaceXValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPlace_X, OnOffsetPlaceXValueChanged);
|
||||
|
||||
_adsManager?.Deregister(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||
|
||||
_adsManager?.Deregister("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||
|
||||
|
||||
300
uniper_hmi/UniperHMI/Pages/ViewModels/MachineOverviewPageVM.cs
Normal file
300
uniper_hmi/UniperHMI/Pages/ViewModels/MachineOverviewPageVM.cs
Normal file
@@ -0,0 +1,300 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using TcEventLoggerAdsProxyLib;
|
||||
|
||||
namespace InfineonHMI;
|
||||
|
||||
public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty] private StringControlButtonVM dummyStringVM;
|
||||
|
||||
[ObservableProperty] private Page currentDetailPage;
|
||||
|
||||
|
||||
|
||||
private readonly IAdsManager _adsManager;
|
||||
private readonly IConfiguration _config;
|
||||
|
||||
|
||||
// Last active event
|
||||
[ObservableProperty] private string currentActiveEvent = "";
|
||||
|
||||
// Empty page
|
||||
private readonly Page _emptyPage;
|
||||
|
||||
// Last navigate message
|
||||
private readonly Stack<NavigateMessage> _messageStack = new();
|
||||
NavigateMessage? _currentMessage;
|
||||
|
||||
// Hot Coolplate page view model
|
||||
HotCoolPlatePageVM? _hotCoolplatePageVM;
|
||||
|
||||
AlignmentStationPageVM? _alignmentStationPageVM;
|
||||
|
||||
EtchingStation1PageVM? _etchingStation1PageVm;
|
||||
|
||||
EtchingStation2PageVM? _etchingStation2PageVm;
|
||||
|
||||
HighVoltageStationPageVM? _highVoltageStationPageVm;
|
||||
|
||||
MediaCabinetPageVM? _mediaCabinetPageVM;
|
||||
|
||||
NIOStationPageVM? _nioStationPageVm;
|
||||
|
||||
TrayFeederPageVM? _trayFeederPageVm;
|
||||
|
||||
private ProductionOverviewPageVM? _prodVM;
|
||||
|
||||
private MainWindowVM _mainVm;
|
||||
|
||||
// Kuka Robot page view model
|
||||
KukaRobotPageVM? _kukaRobotPageVM;
|
||||
|
||||
public MachineOverviewPageVM()
|
||||
{
|
||||
// default ctor
|
||||
}
|
||||
public MachineOverviewPageVM(IAdsManager adsManager, IConfiguration config,MainWindowVM mainVm, ProductionOverviewPageVM prodVm, TcEventLogger eventLogger)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_config = config;
|
||||
_prodVM = prodVm;
|
||||
_mainVm = mainVm;
|
||||
// Create dummy string
|
||||
DummyStringVM = new StringControlButtonVM();
|
||||
|
||||
// Create empty page
|
||||
_emptyPage = new();
|
||||
|
||||
CurrentDetailPage = _emptyPage;
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public void TrayfeederPageClicked()
|
||||
{
|
||||
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(TrayFeederPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void AlignerPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(AlignmentStationPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Etching1PageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(EtchingStation1Page));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Etching2PageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(EtchingStation2Page));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void HVTestPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(HighVoltageStationPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void HotCoolplatePageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(HotCoolPlatePage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void NIOStationPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(NIOStationPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public void KukaPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(KukaRobotPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void MediaCabinetPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(MediaCabinetPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
// Only use for forward traversal!
|
||||
public void Receive(NavigateMessage message)
|
||||
{
|
||||
// Only change page if its a new page type
|
||||
if (CurrentDetailPage.GetType() == message.type)
|
||||
return;
|
||||
|
||||
// Push current message
|
||||
if (_currentMessage != null)
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
// Save current message for later push
|
||||
_currentMessage = message;
|
||||
|
||||
// Set can navigate back
|
||||
|
||||
Navigate(message);
|
||||
}
|
||||
|
||||
private void Navigate(NavigateMessage message)
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentDetailPage.DataContext is IDisposable viewModel)
|
||||
{
|
||||
CurrentDetailPage.DataContext = null;
|
||||
viewModel.Dispose();
|
||||
}
|
||||
|
||||
|
||||
// Create new page
|
||||
switch (message.type.Name)
|
||||
{
|
||||
case nameof(TrayFeederPage):
|
||||
if (_trayFeederPageVm == null)
|
||||
_trayFeederPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
||||
|
||||
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
|
||||
CurrentDetailPage = trayFeederPage;
|
||||
break;
|
||||
|
||||
case nameof(AlignmentStationPage):
|
||||
// Create seetings page view model only once
|
||||
if (_alignmentStationPageVM == null)
|
||||
_alignmentStationPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stAligner");
|
||||
|
||||
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
|
||||
CurrentDetailPage = settingsPage;
|
||||
break;
|
||||
|
||||
case nameof(EtchingStation1Page):
|
||||
if (_etchingStation1PageVm == null)
|
||||
_etchingStation1PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher1");
|
||||
|
||||
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
|
||||
CurrentDetailPage = etchingStation1Page;
|
||||
break;
|
||||
|
||||
case nameof(EtchingStation2Page):
|
||||
if (_etchingStation2PageVm == null)
|
||||
_etchingStation2PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher2");
|
||||
|
||||
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
|
||||
CurrentDetailPage = etchingStation2Page;
|
||||
break;
|
||||
|
||||
case nameof(HighVoltageStationPage):
|
||||
if (_highVoltageStationPageVm == null)
|
||||
_highVoltageStationPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
||||
|
||||
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
|
||||
CurrentDetailPage = highVoltageStationPage;
|
||||
break;
|
||||
|
||||
case nameof(HotCoolPlatePage):
|
||||
if (_hotCoolplatePageVM == null)
|
||||
_hotCoolplatePageVM = new(_adsManager, "GVL_Config.stMachine");
|
||||
|
||||
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
||||
CurrentDetailPage = hotCoolPlatePage;
|
||||
break;
|
||||
|
||||
case nameof(NIOStationPage):
|
||||
if (_nioStationPageVm == null)
|
||||
_nioStationPageVm = new(_adsManager, "GVL_Config.stMachine.stNOK");
|
||||
|
||||
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
|
||||
CurrentDetailPage = nIOStationPage;
|
||||
break;
|
||||
|
||||
case nameof(KukaRobotPage):
|
||||
// Create page view model only once
|
||||
if (_kukaRobotPageVM == null)
|
||||
_kukaRobotPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stKukaRobot");
|
||||
|
||||
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
||||
CurrentDetailPage = kukaRobotPage;
|
||||
break;
|
||||
|
||||
case nameof(MediaCabinetPage):
|
||||
if (_mediaCabinetPageVM == null)
|
||||
_mediaCabinetPageVM = new(_adsManager, "GVL_Config.stMachine");
|
||||
|
||||
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
|
||||
CurrentDetailPage = mediaCabinetPage;
|
||||
break;
|
||||
|
||||
default:
|
||||
CurrentDetailPage = new Page();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void AckAlarms()
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stConfirmAlarmsBtn.xRequest", true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentDetailPage.DataContext is IDisposable viewModel)
|
||||
{
|
||||
CurrentDetailPage.DataContext = null;
|
||||
viewModel.Dispose();
|
||||
}
|
||||
|
||||
DummyStringVM.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -5,117 +5,104 @@ using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
using Common;
|
||||
using InfineonHMI.Model;
|
||||
|
||||
using UniperHMI.Model;
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class MediaCabinetPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private int _setpoint;
|
||||
|
||||
[Range(-40000, 40000)]
|
||||
public int Setpoint
|
||||
{
|
||||
get => this._setpoint;
|
||||
set => SetProperty(ref this._setpoint, value, true);
|
||||
}
|
||||
private IAdsManager _adsManager;
|
||||
private string? _variableName;
|
||||
|
||||
[ObservableProperty]
|
||||
private int processValue;
|
||||
[ObservableProperty] private MediaContainerVm container1Vm;
|
||||
[ObservableProperty] private MediaContainerVm container2Vm;
|
||||
[ObservableProperty] private MediaContainerVm container3Vm;
|
||||
[ObservableProperty] private MediaContainerVm container4Vm;
|
||||
[ObservableProperty] private MediaContainerVm container5Vm;
|
||||
[ObservableProperty] private MediaContainerVm container6Vm;
|
||||
[ObservableProperty] private MediaContainerVm container7Vm;
|
||||
[ObservableProperty] private MediaContainerVm container8Vm;
|
||||
[ObservableProperty] private MediaContainerVm container9Vm;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? startButton;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? stopButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
||||
[
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
||||
];
|
||||
|
||||
[ObservableProperty]
|
||||
private BMSControlModeEntry selectedControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeControlMode;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public MediaCabinetPageVM()
|
||||
{
|
||||
StartButton = new HMIControlButtonVM();
|
||||
StopButton = new HMIControlButtonVM();
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
canChangeControlMode = true;
|
||||
}
|
||||
|
||||
public MediaCabinetPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
public MediaCabinetPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
||||
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
|
||||
Container1Vm = new MediaContainerVm(adsManager, variableName + ".stContainer1");
|
||||
Container2Vm = new MediaContainerVm(adsManager, variableName + ".stContainer2");
|
||||
Container3Vm = new MediaContainerVm(adsManager, variableName + ".stContainer3");
|
||||
Container4Vm = new MediaContainerVm(adsManager, variableName + ".stContainer4");
|
||||
Container5Vm = new MediaContainerVm(adsManager, variableName + ".stContainer5");
|
||||
Container6Vm = new MediaContainerVm(adsManager, variableName + ".stContainer6");
|
||||
Container7Vm = new MediaContainerVm(adsManager, variableName + ".stContainer7");
|
||||
Container8Vm = new MediaContainerVm(adsManager, variableName + ".stContainer8");
|
||||
Container9Vm = new MediaContainerVm(adsManager, variableName + ".stContainer9");
|
||||
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
Container1Vm.SName = "Container1";
|
||||
Container2Vm.SName = "Container2";
|
||||
Container3Vm.SName = "Container3";
|
||||
Container4Vm.SName = "Container4";
|
||||
Container5Vm.SName = "Container5";
|
||||
Container6Vm.SName = "Container6";
|
||||
Container7Vm.SName = "Container7";
|
||||
Container8Vm.SName = "Container8";
|
||||
Container9Vm.SName = "Container9";
|
||||
|
||||
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
}
|
||||
|
||||
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
public MediaCabinetPageVM()
|
||||
{
|
||||
Container1Vm = new MediaContainerVm();
|
||||
Container2Vm = new MediaContainerVm();
|
||||
Container3Vm = new MediaContainerVm();
|
||||
Container4Vm = new MediaContainerVm();
|
||||
Container5Vm = new MediaContainerVm();
|
||||
Container6Vm = new MediaContainerVm();
|
||||
Container7Vm = new MediaContainerVm();
|
||||
Container8Vm = new MediaContainerVm();
|
||||
Container9Vm = new MediaContainerVm();
|
||||
|
||||
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Setpoint = (int)e.Value;
|
||||
}
|
||||
|
||||
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
CanChangeControlMode = (bool)e.Value;
|
||||
}
|
||||
Container1Vm.SName = "Container1";
|
||||
Container2Vm.SName = "Container2";
|
||||
Container3Vm.SName = "Container3";
|
||||
Container4Vm.SName = "Container4";
|
||||
Container5Vm.SName = "Container5";
|
||||
Container6Vm.SName = "Container6";
|
||||
Container7Vm.SName = "Container7";
|
||||
Container8Vm.SName = "Container8";
|
||||
Container9Vm.SName = "Container9";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StartButton?.Dispose();
|
||||
StartButton = null;
|
||||
StopButton?.Dispose();
|
||||
StopButton = null;
|
||||
|
||||
_adsManager?.Deregister("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
Container1Vm.Dispose();
|
||||
Container2Vm.Dispose();
|
||||
Container3Vm.Dispose();
|
||||
Container4Vm.Dispose();
|
||||
Container5Vm.Dispose();
|
||||
Container6Vm.Dispose();
|
||||
Container7Vm.Dispose();
|
||||
Container8Vm.Dispose();
|
||||
Container9Vm.Dispose();
|
||||
|
||||
_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StartAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", Setpoint);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StopAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", 0);
|
||||
Setpoint = 0;
|
||||
}
|
||||
|
||||
public static ValidationResult ValidatePower(int power, ValidationContext context)
|
||||
{
|
||||
if (power < -40000 || power > 40000)
|
||||
return new("Must be between -40.000 and +40.000");
|
||||
else
|
||||
return ValidationResult.Success!;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using UniperHMI.OwnControls;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
public sealed partial class ModuleOverviewPageVM : ObservableObject, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private UnitControlButtonVM unit1;
|
||||
|
||||
[ObservableProperty]
|
||||
private UnitControlButtonVM unit2;
|
||||
|
||||
[ObservableProperty]
|
||||
private UnitControlButtonVM unit3;
|
||||
|
||||
[ObservableProperty]
|
||||
private UnitControlButtonVM unit4;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
private readonly string? _variableName;
|
||||
|
||||
public ModuleOverviewPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
unit1 = new(_adsManager, _variableName + ".stHMIInterfaceUnit1");
|
||||
unit2 = new(_adsManager, _variableName + ".stHMIInterfaceUnit2");
|
||||
unit3 = new(_adsManager, _variableName + ".stHMIInterfaceUnit3");
|
||||
unit4 = new(_adsManager, _variableName + ".stHMIInterfaceUnit4");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Unit1?.Dispose();
|
||||
Unit2?.Dispose();
|
||||
Unit3?.Dispose();
|
||||
Unit4?.Dispose();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Unit1Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit1", typeof(UnitOverviewPage), "Unit 1"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Unit2Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit2", typeof(UnitOverviewPage), "Unit 2"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Unit3Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit3", typeof(UnitOverviewPage), "Unit 3"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Unit4Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit4", typeof(UnitOverviewPage), "Unit 4"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using UniperHMI.Model;
|
||||
namespace UniperHMI
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class NIOStationPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
@@ -17,12 +17,20 @@ namespace UniperHMI
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM cylinderNIOPlateVM;
|
||||
[ObservableProperty] private BinaryValveControlVM clampDiagValveVm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM clampAcrossValveVm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM clampCmdButtonVm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM unclampCmdButtonVm;
|
||||
|
||||
public NIOStationPageVM()
|
||||
{
|
||||
cylinderNIOPlateVM = new BinaryValveControlVM();
|
||||
ClampDiagValveVm = new BinaryValveControlVM();
|
||||
ClampAcrossValveVm = new BinaryValveControlVM();
|
||||
ClampCmdButtonVm = new HMIControlButtonVM();
|
||||
UnclampCmdButtonVm = new HMIControlButtonVM();
|
||||
}
|
||||
|
||||
public NIOStationPageVM(IAdsManager adsManager, string variableName)
|
||||
@@ -30,14 +38,20 @@ namespace UniperHMI
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
cylinderNIOPlateVM = new BinaryValveControlVM(_adsManager, _variableName);
|
||||
ClampDiagValveVm = new BinaryValveControlVM(_adsManager, _variableName + ".stClampDiagValve");
|
||||
ClampAcrossValveVm = new BinaryValveControlVM(_adsManager, _variableName + ".stClampAcrossValve");
|
||||
ClampCmdButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stClampCmd");
|
||||
UnclampCmdButtonVm = new HMIControlButtonVM(_adsManager, _variableName + "stUnclampCmd");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
CylinderNIOPlateVM?.Dispose();
|
||||
ClampDiagValveVm.Dispose();
|
||||
ClampAcrossValveVm.Dispose();
|
||||
ClampCmdButtonVm.Dispose();
|
||||
UnclampCmdButtonVm.Dispose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using TcEventLoggerAdsProxyLib;
|
||||
|
||||
namespace InfineonHMI;
|
||||
|
||||
public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty] private StringControlButtonVM dummyStringVM;
|
||||
|
||||
[ObservableProperty] private Page currentDetailPage;
|
||||
|
||||
[ObservableProperty] private bool canNavigateBack;
|
||||
|
||||
private readonly IAdsManager _adsManager;
|
||||
private readonly IConfiguration _config;
|
||||
private readonly TcEventLogger _eventlogger;
|
||||
|
||||
|
||||
// Last active event
|
||||
[ObservableProperty] private string currentActiveEvent = "";
|
||||
|
||||
private readonly object _lock = new();
|
||||
|
||||
// Empty page
|
||||
private readonly Page _emptyPage;
|
||||
|
||||
// Last navigate message
|
||||
private readonly Stack<NavigateMessage> _messageStack = new();
|
||||
NavigateMessage? _currentMessage;
|
||||
|
||||
// Hot Coolplate page view model
|
||||
HotCoolPlatePageVM? _hotCoolplatePageVM;
|
||||
|
||||
AlignmentStationPageVM? _alignmentStationPageVM;
|
||||
|
||||
EtchingStation1PageVM? _etchingStation1PageVm;
|
||||
|
||||
EtchingStation2PageVM? _etchingStation2PageVm;
|
||||
|
||||
HighVoltageStationPageVM? _highVoltageStationPageVm;
|
||||
|
||||
MediaCabinetPageVM? _mediaCabinetPageVM;
|
||||
|
||||
NIOStationPageVM? _nioStationPageVm;
|
||||
|
||||
TrayFeederPageVM? _trayFeederPageVm;
|
||||
|
||||
|
||||
// Kuka Robot page view model
|
||||
KukaRobotPageVM? _kukaRobotPageVM;
|
||||
|
||||
public ProductionOverviewPageVM()
|
||||
{
|
||||
// default ctor
|
||||
}
|
||||
public ProductionOverviewPageVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger, NavigateMessage? message = null)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_config = config;
|
||||
// Create dummy string
|
||||
DummyStringVM = new StringControlButtonVM();
|
||||
|
||||
// Create empty page
|
||||
_emptyPage = new();
|
||||
|
||||
CurrentDetailPage = _emptyPage;
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
if (message != null)
|
||||
{
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void TrayfeederPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["TrayFeederVarName"]!, typeof(TrayFeederPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void AlignerPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["AlignerVarName"]!, typeof(AlignmentStationPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Etching1PageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["Etching1VarName"]!, typeof(EtchingStation1Page));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Etching2PageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["Etching2VarName"]!, typeof(EtchingStation2Page));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void HVTestPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["HVTestVarName"]!, typeof(HighVoltageStationPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void HotCoolplatePageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["HotCoolplateVarName"]!, typeof(HotCoolPlatePage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void NIOStationPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["NIOStationVarName"]!, typeof(NIOStationPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public void KukaPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["KukaRobotVarName"]!, typeof(KukaRobotPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void MediaCabinetPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["MediaCabinetVarName"]!, typeof(MediaCabinetPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
// Only use for forward traversal!
|
||||
public void Receive(NavigateMessage message)
|
||||
{
|
||||
// Only change page if its a new page type
|
||||
if (CurrentDetailPage.GetType() == message.type)
|
||||
return;
|
||||
|
||||
// Push current message
|
||||
if (_currentMessage != null)
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
// Save current message for later push
|
||||
_currentMessage = message;
|
||||
|
||||
// Set can navigate back
|
||||
CanNavigateBack = true;
|
||||
|
||||
Navigate(message);
|
||||
}
|
||||
|
||||
public void NavigateFromOuterPage(NavigateMessage message)
|
||||
{
|
||||
_currentMessage = message;
|
||||
|
||||
CanNavigateBack = true;
|
||||
Navigate(message);
|
||||
}
|
||||
|
||||
private void Navigate(NavigateMessage message)
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentDetailPage.DataContext is IDisposable viewModel)
|
||||
{
|
||||
CurrentDetailPage.DataContext = null;
|
||||
viewModel.Dispose();
|
||||
}
|
||||
|
||||
// Create new page
|
||||
switch (message.type.Name)
|
||||
{
|
||||
case nameof(TrayFeederPage):
|
||||
if (_trayFeederPageVm == null)
|
||||
_trayFeederPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
||||
|
||||
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
|
||||
CurrentDetailPage = trayFeederPage;
|
||||
break;
|
||||
|
||||
case nameof(AlignmentStationPage):
|
||||
// Create seetings page view model only once
|
||||
if (_alignmentStationPageVM == null)
|
||||
_alignmentStationPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stAligner");
|
||||
|
||||
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
|
||||
CurrentDetailPage = settingsPage;
|
||||
break;
|
||||
|
||||
case nameof(EtchingStation1Page):
|
||||
if (_etchingStation1PageVm == null)
|
||||
_etchingStation1PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher1");
|
||||
|
||||
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
|
||||
CurrentDetailPage = etchingStation1Page;
|
||||
break;
|
||||
|
||||
case nameof(EtchingStation2Page):
|
||||
if (_etchingStation2PageVm == null)
|
||||
_etchingStation2PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher2");
|
||||
|
||||
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
|
||||
CurrentDetailPage = etchingStation2Page;
|
||||
break;
|
||||
|
||||
case nameof(HighVoltageStationPage):
|
||||
if (_highVoltageStationPageVm == null)
|
||||
_highVoltageStationPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
||||
|
||||
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
|
||||
CurrentDetailPage = highVoltageStationPage;
|
||||
break;
|
||||
|
||||
case nameof(HotCoolPlatePage):
|
||||
if (_hotCoolplatePageVM == null)
|
||||
_hotCoolplatePageVM = new(_adsManager, "GVL_Config.stMachine");
|
||||
|
||||
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
||||
CurrentDetailPage = hotCoolPlatePage;
|
||||
break;
|
||||
|
||||
case nameof(NIOStationPage):
|
||||
if (_nioStationPageVm == null)
|
||||
_nioStationPageVm = new(_adsManager, "GVL_Config.stMachine.stNOK");
|
||||
|
||||
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
|
||||
CurrentDetailPage = nIOStationPage;
|
||||
break;
|
||||
|
||||
case nameof(KukaRobotPage):
|
||||
// Create page view model only once
|
||||
if (_kukaRobotPageVM == null)
|
||||
_kukaRobotPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stKukaRobot");
|
||||
|
||||
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
||||
CurrentDetailPage = kukaRobotPage;
|
||||
break;
|
||||
|
||||
case nameof(MediaCabinetPage):
|
||||
if (_mediaCabinetPageVM == null)
|
||||
_mediaCabinetPageVM = new(_adsManager, "GVL_Config.stMachine");
|
||||
|
||||
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
|
||||
CurrentDetailPage = mediaCabinetPage;
|
||||
break;
|
||||
|
||||
default:
|
||||
CurrentDetailPage = new Page();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void AckAlarms()
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stConfirmAlarmsBtn.xRequest", true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentDetailPage.DataContext is IDisposable viewModel)
|
||||
{
|
||||
CurrentDetailPage.DataContext = null;
|
||||
viewModel.Dispose();
|
||||
}
|
||||
|
||||
DummyStringVM.Dispose();
|
||||
}
|
||||
}
|
||||
746
uniper_hmi/UniperHMI/Pages/ViewModels/ReceipePageVM.cs
Normal file
746
uniper_hmi/UniperHMI/Pages/ViewModels/ReceipePageVM.cs
Normal file
@@ -0,0 +1,746 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Printing;
|
||||
using System.Runtime.InteropServices.JavaScript;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Input;
|
||||
using Common;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using InfineonHMI.Model;
|
||||
using Microsoft.Win32;
|
||||
using InfineonHMI.Common;
|
||||
using TwinCAT.PlcOpen;
|
||||
|
||||
namespace InfineonHMI;
|
||||
|
||||
public sealed partial class ReceipePageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
#region Properties
|
||||
private AdsManager _adsManager;
|
||||
|
||||
private int maxFlowNodes = 10;
|
||||
private int maxTrayPositions = 20;
|
||||
private int maxEtcherRobotPositions = 20;
|
||||
|
||||
[ObservableProperty] private ObservableCollection<TrayPosition> trayPositions;
|
||||
[ObservableProperty] private ParamControlIntVm cameraProgramsVm = new ();
|
||||
[ObservableProperty] private ParamControlIntVm chucksVm = new ();
|
||||
[ObservableProperty] private ParamControlIntVm gripperVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm permissibleBeamParamDeviationsVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlFloatVm diameterVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm thicknessVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm timeIntervallBeamCheckVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlFloatVm restingTimeHotplateVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm targetTemperatureHotplateVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm restingTimeCoolplateVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm targetTemperatureCoolplateVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlFloatVm hvtestVoltageVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvmaxTestCurrentVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvrampTimeVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvtestFrequencyVm = new ();
|
||||
[ObservableProperty] private ParamControlIntVm hvpolarityVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvtestPressureN2Vm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvn2PrePurgeTimeVm = new ();
|
||||
[ObservableProperty] private ParamControlIntVm hvnumRetriesVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvtestTemperatureVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvTestOkVoltageVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvTestOkCurrentVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlIntVm numberRobotPositionsVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm chuckRpmVm = new ();
|
||||
[ObservableProperty] private ObservableCollection<EtcherRobotStepData> etcherRobotSteps;
|
||||
[ObservableProperty] private ParamControlFloatVm radialPosLowerWaterJetVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlIntVm flowNodeCountVm = new ();
|
||||
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region FlowReceipe
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<StationEntry> flowStationsVm =
|
||||
[
|
||||
new StationEntry(Stationenum.EINGABE, "Eingabetray"),
|
||||
new StationEntry(Stationenum.QRCODE, "QR Code Scan"),
|
||||
new StationEntry(Stationenum.AUSRICHTEN, "Ausrichten"),
|
||||
new StationEntry(Stationenum.AETZEN, "Ätzstation 1/2"),
|
||||
new StationEntry(Stationenum.HEIZPLATTE, "Heizplatte"),
|
||||
new StationEntry(Stationenum.KUEHLPLATTE, "Kühlplatte"),
|
||||
new StationEntry(Stationenum.HOCHVOLTHEISS, "Hochvolt Heiss"),
|
||||
new StationEntry(Stationenum.HOCHVOLTKALT, "Hochvolt Kalt"),
|
||||
new StationEntry(Stationenum.AUSGABE, "Ausgabetray"),
|
||||
new StationEntry(Stationenum.NIOSTATION, "NIO Station")
|
||||
|
||||
];
|
||||
|
||||
[ObservableProperty] private ObservableCollection<FlowReceipeEntry> flowReceipeEntries;
|
||||
|
||||
[RelayCommand]
|
||||
public void AddFlowReceipeEntry()
|
||||
{
|
||||
var nodeid = FlowReceipeEntries.Count;
|
||||
FlowReceipeEntries.Add(new FlowReceipeEntry
|
||||
{
|
||||
NodeId = nodeid,
|
||||
MaxRetries = 0,
|
||||
NextNodeFail = -1,
|
||||
NextNodeSuccess = -1,
|
||||
NextNodeRetry = -1,
|
||||
Priority = 100,
|
||||
Station = FlowStationsVm[0]
|
||||
});
|
||||
if (FlowReceipeEntries.Count >= maxFlowNodes)
|
||||
{
|
||||
CanAddFlowReceipeEntry = false;
|
||||
}
|
||||
|
||||
if (FlowReceipeEntries.Count > 0)
|
||||
{
|
||||
CanRemoveFlowReceipeEntry = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void addFlowReceipeEntry(FlowReceipeEntry fre)
|
||||
{
|
||||
var nodeid = FlowReceipeEntries.Count;
|
||||
FlowReceipeEntries.Add(new FlowReceipeEntry
|
||||
{
|
||||
NodeId = nodeid,
|
||||
MaxRetries = fre.MaxRetries,
|
||||
NextNodeFail = fre.NextNodeFail,
|
||||
NextNodeSuccess = fre.NextNodeSuccess,
|
||||
NextNodeRetry = fre.NextNodeRetry,
|
||||
Priority = fre.Priority,
|
||||
Station = new StationEntry(fre.Station.eStation, fre.Station.sName)
|
||||
});
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void RemoveFlowReceipeEntry()
|
||||
{
|
||||
FlowReceipeEntries.Remove(SelectedFlowReceipeEntry);
|
||||
var receipes = new ObservableCollection<FlowReceipeEntry>(FlowReceipeEntries);
|
||||
|
||||
FlowReceipeEntries.Clear();
|
||||
|
||||
foreach (var receipe in receipes)
|
||||
addFlowReceipeEntry(receipe);
|
||||
|
||||
|
||||
if (FlowReceipeEntries.Count < maxFlowNodes)
|
||||
{
|
||||
CanAddFlowReceipeEntry = true;
|
||||
}
|
||||
|
||||
if (FlowReceipeEntries.Count > 0)
|
||||
{
|
||||
CanRemoveFlowReceipeEntry = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CanRemoveFlowReceipeEntry = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void FlowReceipeEntryUp()
|
||||
{
|
||||
var selectedIndex = FlowReceipeEntries.IndexOf(SelectedFlowReceipeEntry);
|
||||
if (selectedIndex == 0)
|
||||
return;
|
||||
FlowReceipeEntries.Move(selectedIndex, selectedIndex - 1);
|
||||
|
||||
var receipes = new ObservableCollection<FlowReceipeEntry>(FlowReceipeEntries);
|
||||
FlowReceipeEntries.Clear();
|
||||
|
||||
foreach (var receipe in receipes)
|
||||
addFlowReceipeEntry(receipe);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void FlowReceipeEntryDown()
|
||||
{
|
||||
var selectedIndex = FlowReceipeEntries.IndexOf(SelectedFlowReceipeEntry);
|
||||
if (selectedIndex >= FlowReceipeEntries.Count)
|
||||
return;
|
||||
FlowReceipeEntries.Move(selectedIndex, selectedIndex + 1);
|
||||
|
||||
var receipes = new ObservableCollection<FlowReceipeEntry>(FlowReceipeEntries);
|
||||
FlowReceipeEntries.Clear();
|
||||
|
||||
foreach (var receipe in receipes)
|
||||
addFlowReceipeEntry(receipe);
|
||||
|
||||
}
|
||||
|
||||
[ObservableProperty] private bool canAddFlowReceipeEntry;
|
||||
[ObservableProperty] private bool canRemoveFlowReceipeEntry;
|
||||
|
||||
[ObservableProperty] private FlowReceipeEntry selectedFlowReceipeEntry;
|
||||
|
||||
#endregion Flowreceipe
|
||||
|
||||
#region Traypositions
|
||||
[ObservableProperty] private TrayPosition selectedTrayPosition;
|
||||
|
||||
|
||||
[ObservableProperty] private bool canAddTrayPosition;
|
||||
[ObservableProperty] private bool canRemoveTrayPosition;
|
||||
|
||||
[RelayCommand]
|
||||
public void AddTrayPosition()
|
||||
{
|
||||
var posId = TrayPositions.Count;
|
||||
TrayPositions.Add(new TrayPosition
|
||||
{
|
||||
PosId = posId,
|
||||
PosX = 0.0f,
|
||||
PosY = 0.0f,
|
||||
|
||||
});
|
||||
if (TrayPositions.Count >= maxTrayPositions)
|
||||
{
|
||||
CanAddTrayPosition = false;
|
||||
}
|
||||
|
||||
if (TrayPositions.Count > 0)
|
||||
{
|
||||
CanRemoveTrayPosition = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void addTrayPosition(TrayPosition trayPos)
|
||||
{
|
||||
var posId = TrayPositions.Count;
|
||||
TrayPositions.Add(new TrayPosition
|
||||
{
|
||||
PosId = posId,
|
||||
PosX = trayPos.PosX,
|
||||
PosY = trayPos.PosY
|
||||
});
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void RemoveTrayPosition()
|
||||
{
|
||||
TrayPositions.Remove(SelectedTrayPosition);
|
||||
var positions = new ObservableCollection<TrayPosition>(TrayPositions);
|
||||
|
||||
TrayPositions.Clear();
|
||||
|
||||
foreach (var position in positions)
|
||||
addTrayPosition(position);
|
||||
|
||||
|
||||
if (TrayPositions.Count < maxTrayPositions)
|
||||
{
|
||||
CanAddTrayPosition = true;
|
||||
}
|
||||
|
||||
if (TrayPositions.Count > 0)
|
||||
{
|
||||
CanRemoveTrayPosition = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CanRemoveTrayPosition = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void TrayPositionUp()
|
||||
{
|
||||
var selectedIndex = TrayPositions.IndexOf(SelectedTrayPosition);
|
||||
if (selectedIndex == 0)
|
||||
return;
|
||||
TrayPositions.Move(selectedIndex, selectedIndex - 1);
|
||||
|
||||
var positions = new ObservableCollection<TrayPosition>(TrayPositions);
|
||||
TrayPositions.Clear();
|
||||
|
||||
foreach (var pos in positions)
|
||||
addTrayPosition(pos);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void TrayPositionDown()
|
||||
{
|
||||
var selectedIndex = TrayPositions.IndexOf(SelectedTrayPosition);
|
||||
if (selectedIndex >= TrayPositions.Count)
|
||||
return;
|
||||
TrayPositions.Move(selectedIndex, selectedIndex + 1);
|
||||
|
||||
var positions = new ObservableCollection<TrayPosition>(TrayPositions);
|
||||
TrayPositions.Clear();
|
||||
|
||||
foreach (var pos in positions)
|
||||
addTrayPosition(pos);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion Traypositions
|
||||
|
||||
#region EtcherRobotPositions
|
||||
|
||||
[ObservableProperty] private EtcherRobotStepData selectedEtchRobotStep;
|
||||
|
||||
|
||||
[ObservableProperty] private bool canAddEtchRobotStep;
|
||||
[ObservableProperty] private bool canRemoveEtchRobotStep;
|
||||
|
||||
[RelayCommand]
|
||||
public void AddEtchRobotStep()
|
||||
{
|
||||
EtcherRobotSteps.Add(new EtcherRobotStepData()
|
||||
{
|
||||
PosX = 0.0f,
|
||||
PosY = 0.0f,
|
||||
PosZ = 0.0f,
|
||||
MoveSpeed = 0.0f,
|
||||
AngleAlpha = 0.0f,
|
||||
WaterFromAbove = false,
|
||||
WaterFromBelow = false,
|
||||
Medium = 0,
|
||||
Delay = 0.0f
|
||||
});
|
||||
if (EtcherRobotSteps.Count >= maxEtcherRobotPositions)
|
||||
{
|
||||
CanAddEtchRobotStep = false;
|
||||
}
|
||||
|
||||
if (EtcherRobotSteps.Count > 0)
|
||||
{
|
||||
CanRemoveEtchRobotStep = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void addEtchRobotStep(EtcherRobotStepData etchStep)
|
||||
{
|
||||
var posId = EtcherRobotSteps.Count;
|
||||
EtcherRobotSteps.Add(new EtcherRobotStepData()
|
||||
{
|
||||
PosX = etchStep.PosX,
|
||||
PosY = etchStep.PosY,
|
||||
PosZ = etchStep.PosZ,
|
||||
MoveSpeed = etchStep.MoveSpeed,
|
||||
AngleAlpha = etchStep.AngleAlpha,
|
||||
WaterFromAbove = etchStep.WaterFromAbove,
|
||||
WaterFromBelow = etchStep.WaterFromBelow,
|
||||
Medium = etchStep.Medium,
|
||||
Delay = etchStep.Delay
|
||||
});
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void RemoveEtchRobotStep()
|
||||
{
|
||||
EtcherRobotSteps.Remove(SelectedEtchRobotStep);
|
||||
var steps = new ObservableCollection<EtcherRobotStepData>(EtcherRobotSteps);
|
||||
|
||||
EtcherRobotSteps.Clear();
|
||||
|
||||
foreach (var step in steps)
|
||||
addEtchRobotStep(step);
|
||||
|
||||
|
||||
if (EtcherRobotSteps.Count < maxEtcherRobotPositions)
|
||||
{
|
||||
CanAddEtchRobotStep = true;
|
||||
}
|
||||
|
||||
if (EtcherRobotSteps.Count > 0)
|
||||
{
|
||||
CanRemoveEtchRobotStep = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CanRemoveEtchRobotStep = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void EtchRobotStepUp()
|
||||
{
|
||||
var selectedIndex = EtcherRobotSteps.IndexOf(SelectedEtchRobotStep);
|
||||
if (selectedIndex == 0)
|
||||
return;
|
||||
EtcherRobotSteps.Move(selectedIndex, selectedIndex - 1);
|
||||
|
||||
var steps = new ObservableCollection<EtcherRobotStepData>(EtcherRobotSteps);
|
||||
EtcherRobotSteps.Clear();
|
||||
|
||||
foreach (var step in steps)
|
||||
addEtchRobotStep(step);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void EtchRobotStepDown()
|
||||
{
|
||||
var selectedIndex = EtcherRobotSteps.IndexOf(SelectedEtchRobotStep);
|
||||
if (selectedIndex >= EtcherRobotSteps.Count)
|
||||
return;
|
||||
EtcherRobotSteps.Move(selectedIndex, selectedIndex + 1);
|
||||
|
||||
var steps = new ObservableCollection<EtcherRobotStepData>(EtcherRobotSteps);
|
||||
EtcherRobotSteps.Clear();
|
||||
|
||||
foreach (var step in steps)
|
||||
addEtchRobotStep(step);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Commands
|
||||
|
||||
[RelayCommand]
|
||||
public void WriteToPlc()
|
||||
{
|
||||
SendDataToPLC();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void ReadReceipeFile()
|
||||
{
|
||||
var dlg = new OpenFileDialog();
|
||||
if (dlg.ShowDialog() != true)
|
||||
return ;
|
||||
|
||||
var dto = new ReceipeDto();
|
||||
dto.Read(dlg.FileName);
|
||||
GetDto(dto);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void WriteReceipeFile()
|
||||
{
|
||||
var dlg = new SaveFileDialog();
|
||||
if (dlg.ShowDialog() != true)
|
||||
return;
|
||||
|
||||
var dto = SetDto();
|
||||
dto.Write(dlg.FileName);
|
||||
}
|
||||
|
||||
|
||||
#endregion Commands
|
||||
|
||||
|
||||
#region ctor
|
||||
|
||||
public ReceipePageVM()
|
||||
{
|
||||
|
||||
|
||||
maxFlowNodes = 10;
|
||||
maxEtcherRobotPositions = 10;
|
||||
maxTrayPositions = 10;
|
||||
|
||||
TrayPositions = new ();
|
||||
EtcherRobotSteps = new ();
|
||||
FlowReceipeEntries = new ();
|
||||
|
||||
CameraProgramsVm.SName = "Kameraprogramme: ";
|
||||
ChucksVm.SName = "Drehteller: ";
|
||||
GripperVm.SName = "Greifertyp: ";
|
||||
PermissibleBeamParamDeviationsVm.SName = "Max. Strahlabweichung: ";
|
||||
DiameterVm.SName = "Teiledurchmesser: ";
|
||||
ThicknessVm.SName = "Teiledicke: ";
|
||||
TimeIntervallBeamCheckVm.SName = "Intervall Strahlvermessung: ";
|
||||
RestingTimeHotplateVm.SName = "Verweilzeit Heizplatte: ";
|
||||
TargetTemperatureHotplateVm.SName = "Zieltemperatur Heizplatte: ";
|
||||
RestingTimeCoolplateVm.SName = "Verweilzeit Kühlplatte: ";
|
||||
TargetTemperatureCoolplateVm.SName = "Zieltemperatur Kühlplatte";
|
||||
|
||||
RadialPosLowerWaterJetVm.SName = "Radial Position Unterwasserstrahl: ";
|
||||
ChuckRpmVm.SName = "Drehzahl: ";
|
||||
HvmaxTestCurrentVm.SName = "HV: Max. Teststrom: ";
|
||||
Hvn2PrePurgeTimeVm.SName = "HV: Vorreinigungszeit: ";
|
||||
HvnumRetriesVm.SName = "HV: Anzahl Wiederholversuche: ";
|
||||
HvpolarityVm.SName = "HV: Polarität (1=Pos, 2=Neg): ";
|
||||
HvrampTimeVm.SName = "HV: Rampenzeit: ";
|
||||
HvtestFrequencyVm.SName = "HV: Testfrequenz: ";
|
||||
HvTestOkCurrentVm.SName = "HV: Teststrom Teil OK";
|
||||
HvTestOkVoltageVm.SName = "HV: Testspannung Teil OK";
|
||||
HvtestTemperatureVm.SName = "HV: Testtemperatur: ";
|
||||
HvtestVoltageVm.SName = "HV: Testspannung: ";
|
||||
HvtestPressureN2Vm.SName = "HV: DruckN2: ";
|
||||
|
||||
FlowReceipeEntries = new();
|
||||
|
||||
FlowReceipeEntries.Add(new FlowReceipeEntry
|
||||
{
|
||||
Priority = 100,
|
||||
Station = FlowStationsVm[0],
|
||||
MaxRetries = 0,
|
||||
NextNodeSuccess = 1,
|
||||
NextNodeRetry = -1,
|
||||
NextNodeFail = -1
|
||||
});
|
||||
|
||||
|
||||
CanAddTrayPosition = true;
|
||||
CanRemoveTrayPosition = false;
|
||||
CanAddFlowReceipeEntry = true;
|
||||
CanRemoveFlowReceipeEntry = false;
|
||||
CanAddEtchRobotStep = true;
|
||||
CanRemoveEtchRobotStep = false;
|
||||
|
||||
}
|
||||
|
||||
public ReceipePageVM(AdsManager adsManager)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
|
||||
var val = _adsManager.ReadValue("GVL_Scheduler.MAX_RECIPE_NODES");
|
||||
maxFlowNodes = (val == null) ? 10 : (int)val; ;
|
||||
val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
maxEtcherRobotPositions = (val == null) ? 10 : (int)val;
|
||||
val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
maxTrayPositions = (val == null) ? 10 : (int)val;
|
||||
|
||||
|
||||
|
||||
TrayPositions = new ();
|
||||
EtcherRobotSteps = new ();
|
||||
FlowReceipeEntries = new ();
|
||||
|
||||
CameraProgramsVm.SName = "Kameraprogramme: ";
|
||||
ChucksVm.SName = "Drehteller: ";
|
||||
GripperVm.SName = "Greifertyp: ";
|
||||
PermissibleBeamParamDeviationsVm.SName = "Max. Strahlabweichung: ";
|
||||
DiameterVm.SName = "Teiledurchmesser: ";
|
||||
ThicknessVm.SName = "Teiledicke: ";
|
||||
TimeIntervallBeamCheckVm.SName = "Intervall Strahlvermessung: ";
|
||||
RestingTimeHotplateVm.SName = "Verweilzeit Heizplatte: ";
|
||||
TargetTemperatureHotplateVm.SName = "Zieltemperatur Heizplatte: ";
|
||||
RestingTimeCoolplateVm.SName = "Verweilzeit Kühlplatte: ";
|
||||
TargetTemperatureCoolplateVm.SName = "Zieltemperatur Kühlplatte";
|
||||
|
||||
RadialPosLowerWaterJetVm.SName = "Radial Position Unterwasserstrahl: ";
|
||||
ChuckRpmVm.SName = "Drehzahl: ";
|
||||
HvmaxTestCurrentVm.SName = "HV: Max. Teststrom: ";
|
||||
Hvn2PrePurgeTimeVm.SName = "HV: Vorreinigungszeit: ";
|
||||
HvnumRetriesVm.SName = "HV: Anzahl Wiederholversuche: ";
|
||||
HvpolarityVm.SName = "HV: Polarität (1=Pos, 2=Neg): ";
|
||||
HvrampTimeVm.SName = "HV: Rampenzeit: ";
|
||||
HvtestFrequencyVm.SName = "HV: Testfrequenz: ";
|
||||
HvTestOkCurrentVm.SName = "HV: Teststrom Teil OK";
|
||||
HvTestOkVoltageVm.SName = "HV: Testspannung Teil OK";
|
||||
HvtestTemperatureVm.SName = "HV: Testtemperatur: ";
|
||||
HvtestVoltageVm.SName = "HV: Testspannung: ";
|
||||
HvtestPressureN2Vm.SName = "HV: DruckN2: ";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion ctor
|
||||
|
||||
|
||||
|
||||
private ReceipeDto SetDto()
|
||||
{
|
||||
var receipe = new ReceipeDto();
|
||||
|
||||
receipe.ReceipeObject.MachineParameters.TrayPositions = new List<TrayPosition>(TrayPositions);
|
||||
receipe.ReceipeObject.MachineParameters.CameraPrograms = CameraProgramsVm.Value;
|
||||
receipe.ReceipeObject.MachineParameters.Chucks = ChucksVm.Value;
|
||||
receipe.ReceipeObject.MachineParameters.Gripper = GripperVm.Value;
|
||||
receipe.ReceipeObject.MachineParameters.PermissibleBeamParameterDeviations = PermissibleBeamParamDeviationsVm.Value;
|
||||
|
||||
receipe.ReceipeObject.ProductParameters.Diameter = DiameterVm.Value;
|
||||
receipe.ReceipeObject.ProductParameters.Thickness = ThicknessVm.Value;
|
||||
receipe.ReceipeObject.ProductParameters.TimeIntervallBeamCheck = TimeIntervallBeamCheckVm.Value;
|
||||
|
||||
receipe.ReceipeObject.ReceipeHotplate.RestingTime = RestingTimeHotplateVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHotplate.TargetTemperature = TargetTemperatureHotplateVm.Value;
|
||||
|
||||
receipe.ReceipeObject.ReceipeCoolplate.RestingTime = RestingTimeCoolplateVm.Value;
|
||||
receipe.ReceipeObject.ReceipeCoolplate.TargetTemperature = TargetTemperatureCoolplateVm.Value;
|
||||
|
||||
receipe.ReceipeObject.ReceipeEtcher.NumberRobotPos = (ushort)NumberRobotPositionsVm.Value;
|
||||
receipe.ReceipeObject.ReceipeEtcher.RadialPosLowerWaterJet = RadialPosLowerWaterJetVm.Value;
|
||||
receipe.ReceipeObject.ReceipeEtcher.Rpm = ChuckRpmVm.Value;
|
||||
receipe.ReceipeObject.ReceipeEtcher.RobotStepData = new List<EtcherRobotStepData>(EtcherRobotSteps);
|
||||
|
||||
receipe.ReceipeObject.ReceipeHvTester.MaximumTestCurrent = HvmaxTestCurrentVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.N2PrePurgetime = Hvn2PrePurgeTimeVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.NumRetries = (ushort)HvnumRetriesVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.Polarity = (ushort)HvpolarityVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.RampTime = HvrampTimeVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestFrequency = HvtestFrequencyVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestOkCurrent = HvTestOkCurrentVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestOkVoltage = HvTestOkVoltageVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestTemperature = HvtestTemperatureVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestVoltage = HvtestVoltageVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestpressureN2 = HvtestPressureN2Vm.Value;
|
||||
|
||||
receipe.ReceipeObject.Flowreceipe.Nodes = new List<FlowReceipeNode>();
|
||||
foreach (var entry in FlowReceipeEntries)
|
||||
{
|
||||
var node = new FlowReceipeNode();
|
||||
node.StationType = (ushort)entry.Station.eStation;
|
||||
node.Priority = entry.Priority;
|
||||
node.NextNodeSuccess = entry.NextNodeSuccess;
|
||||
node.NextNodeRetry = entry.NextNodeRetry;
|
||||
node.NextNodeFail = entry.NextNodeFail;
|
||||
node.MaxRetries = entry.MaxRetries;
|
||||
|
||||
receipe.ReceipeObject.Flowreceipe.Nodes.Add(node);
|
||||
}
|
||||
|
||||
receipe.ReceipeObject.Flowreceipe.NodeCount = receipe.ReceipeObject.Flowreceipe.Nodes.Count;
|
||||
|
||||
|
||||
return receipe;
|
||||
}
|
||||
|
||||
private void GetDto(ReceipeDto receipe)
|
||||
{
|
||||
TrayPositions = new (receipe.ReceipeObject.MachineParameters.TrayPositions);
|
||||
CameraProgramsVm.Value = receipe.ReceipeObject.MachineParameters.CameraPrograms;
|
||||
ChucksVm.Value = receipe.ReceipeObject.MachineParameters.Chucks;
|
||||
GripperVm.Value = receipe.ReceipeObject.MachineParameters.Gripper;
|
||||
PermissibleBeamParamDeviationsVm.Value = receipe.ReceipeObject.MachineParameters.PermissibleBeamParameterDeviations;
|
||||
|
||||
DiameterVm.Value = receipe.ReceipeObject.ProductParameters.Diameter;
|
||||
ThicknessVm.Value = receipe.ReceipeObject.ProductParameters.Thickness;
|
||||
TimeIntervallBeamCheckVm.Value = receipe.ReceipeObject.ProductParameters.TimeIntervallBeamCheck;
|
||||
|
||||
RestingTimeHotplateVm.Value = receipe.ReceipeObject.ReceipeHotplate.RestingTime;
|
||||
TargetTemperatureHotplateVm.Value = receipe.ReceipeObject.ReceipeHotplate.TargetTemperature;
|
||||
|
||||
RestingTimeCoolplateVm.Value = receipe.ReceipeObject.ReceipeCoolplate.RestingTime;
|
||||
TargetTemperatureCoolplateVm.Value = receipe.ReceipeObject.ReceipeCoolplate.TargetTemperature;
|
||||
|
||||
NumberRobotPositionsVm.Value = receipe.ReceipeObject.ReceipeEtcher.NumberRobotPos;
|
||||
RadialPosLowerWaterJetVm.Value = receipe.ReceipeObject.ReceipeEtcher.RadialPosLowerWaterJet;
|
||||
ChuckRpmVm.Value = receipe.ReceipeObject.ReceipeEtcher.Rpm;
|
||||
EtcherRobotSteps = new (receipe.ReceipeObject.ReceipeEtcher.RobotStepData);
|
||||
|
||||
HvmaxTestCurrentVm.Value = receipe.ReceipeObject.ReceipeHvTester.MaximumTestCurrent;
|
||||
Hvn2PrePurgeTimeVm.Value = receipe.ReceipeObject.ReceipeHvTester.N2PrePurgetime;
|
||||
HvnumRetriesVm.Value = receipe.ReceipeObject.ReceipeHvTester.NumRetries;
|
||||
HvpolarityVm.Value = receipe.ReceipeObject.ReceipeHvTester.Polarity;
|
||||
HvrampTimeVm.Value = receipe.ReceipeObject.ReceipeHvTester.RampTime;
|
||||
HvtestFrequencyVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestFrequency;
|
||||
HvTestOkCurrentVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestOkCurrent;
|
||||
HvTestOkVoltageVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestOkVoltage;
|
||||
HvtestTemperatureVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestTemperature;
|
||||
HvtestVoltageVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestVoltage;
|
||||
HvtestPressureN2Vm.Value = receipe.ReceipeObject.ReceipeHvTester.TestpressureN2;
|
||||
|
||||
FlowReceipeEntries.Clear();
|
||||
foreach (var node in receipe.ReceipeObject.Flowreceipe.Nodes)
|
||||
{
|
||||
var station = FlowStationsVm.First(i => (uint)i.eStation == (uint)node.StationType);
|
||||
|
||||
AddFlowReceipeEntry();
|
||||
FlowReceipeEntries.Last().MaxRetries = node.MaxRetries;
|
||||
FlowReceipeEntries.Last().NextNodeRetry = node.NextNodeRetry;
|
||||
FlowReceipeEntries.Last().NextNodeFail = node.NextNodeFail;
|
||||
FlowReceipeEntries.Last().NextNodeSuccess = node.NextNodeSuccess;
|
||||
FlowReceipeEntries.Last().Priority = node.Priority;
|
||||
FlowReceipeEntries.Last().Station = station;
|
||||
}
|
||||
|
||||
FlowNodeCountVm.Value = receipe.ReceipeObject.Flowreceipe.NodeCount;
|
||||
}
|
||||
|
||||
private void SendDataToPLC()
|
||||
{
|
||||
var val = _adsManager.ReadValue("GVL_Scheduler.MAX_RECIPE_NODES");
|
||||
maxFlowNodes = (val == null) ? 10 : (int)val; ;
|
||||
val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
maxEtcherRobotPositions = (val == null) ? 10:(int)val;
|
||||
val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
maxTrayPositions = (val == null) ? 20 : (int)val;
|
||||
|
||||
for (var i = 0; i < maxTrayPositions && i < TrayPositions.Count; i++)
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stTray.arPosX[" + i + "]", TrayPositions[i].PosX);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stTray.arPosY[" + i + "]", TrayPositions[i].PosY);
|
||||
}
|
||||
|
||||
var trayPosCountToPlc = TrayPositions.Count < maxTrayPositions ? TrayPositions.Count : maxTrayPositions;
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stTray.iPosCnt", trayPosCountToPlc);
|
||||
|
||||
for (var i = 0; i < maxEtcherRobotPositions && i < EtcherRobotSteps.Count; i++)
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosX", EtcherRobotSteps[i].PosX);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosY", EtcherRobotSteps[i].PosY);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosZ", EtcherRobotSteps[i].PosZ);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rAngleAlpha", EtcherRobotSteps[i].AngleAlpha);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rMoveSpeed", EtcherRobotSteps[i].MoveSpeed);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rDelay", EtcherRobotSteps[i].Delay);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].uiMedium", EtcherRobotSteps[i].Medium);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromBelow", EtcherRobotSteps[i].WaterFromBelow);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromAbove", EtcherRobotSteps[i].WaterFromAbove);
|
||||
}
|
||||
|
||||
|
||||
for (var i = 0; (i < maxFlowNodes && i < FlowReceipeEntries.Count); i++)
|
||||
{
|
||||
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].Priority);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].Station.eStation);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].MaxRetries);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeSuccess);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeRetry);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeFail);
|
||||
|
||||
}
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.uiNodeCnt", FlowNodeCountVm.Value);
|
||||
|
||||
|
||||
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", CameraProgramsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", ChucksVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", GripperVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", PermissibleBeamParamDeviationsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", DiameterVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", ThicknessVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", TimeIntervallBeamCheckVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rRestingTime", RestingTimeHotplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rTemp", TargetTemperatureHotplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rRestingTime", RestingTimeCoolplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rTemp", TargetTemperatureCoolplateVm.Value);
|
||||
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.uiNumRobotPos", NumberRobotPositionsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.rRadialPosLowerWaterJet", RadialPosLowerWaterJetVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.rChuckRPM", ChuckRpmVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestVoltage", HvtestVoltageVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rMaxTestCurrent", HvmaxTestCurrentVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rRampTime", HvrampTimeVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestFrequency", HvtestFrequencyVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.uiPolarity", HvpolarityVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestPresN2", HvtestPressureN2Vm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rN2PrePurgeTime", Hvn2PrePurgeTimeVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.uiNumRetries", HvnumRetriesVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestTemp", HvtestTemperatureVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestOkVoltage", HvTestOkVoltageVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestOkCurrent", HvTestOkCurrentVm.Value);
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI;
|
||||
|
||||
public sealed partial class StringOverviewPageVM : ObservableObject, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private ModuleControlButtonVM module1;
|
||||
|
||||
[ObservableProperty]
|
||||
private ModuleControlButtonVM module2;
|
||||
|
||||
[ObservableProperty]
|
||||
private ModuleControlButtonVM module3;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
private readonly string? _variableName;
|
||||
|
||||
public StringOverviewPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
module1 = new(_adsManager, _variableName + ".stHMIInterfaceModule1");
|
||||
module2 = new(_adsManager, _variableName + ".stHMIInterfaceModule2");
|
||||
module3 = new(_adsManager, _variableName + ".stHMIInterfaceModule3");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Module1?.Dispose();
|
||||
Module2?.Dispose();
|
||||
Module3?.Dispose();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void Module1Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule1", typeof(ModuleOverviewPage), "Module 1"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void Module2Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule2", typeof(ModuleOverviewPage), "Module 2"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void Module3Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule3", typeof(ModuleOverviewPage), "Module 3"));
|
||||
}
|
||||
}
|
||||
@@ -6,58 +6,18 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using UniperHMI.Model;
|
||||
namespace UniperHMI
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class TrayFeederPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private int _setpoint;
|
||||
|
||||
[Range(-40000, 40000)]
|
||||
public int Setpoint
|
||||
{
|
||||
get => this._setpoint;
|
||||
set => SetProperty(ref this._setpoint, value, true);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private int processValue;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? startButton;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? stopButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
||||
[
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
||||
];
|
||||
|
||||
[ObservableProperty]
|
||||
private BMSControlModeEntry selectedControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeControlMode;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public TrayFeederPageVM()
|
||||
{
|
||||
StartButton = new HMIControlButtonVM();
|
||||
StopButton = new HMIControlButtonVM();
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
canChangeControlMode = true;
|
||||
|
||||
}
|
||||
|
||||
public TrayFeederPageVM(IAdsManager adsManager, string variableName)
|
||||
@@ -65,57 +25,18 @@ namespace UniperHMI
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
||||
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
|
||||
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
|
||||
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
|
||||
}
|
||||
|
||||
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Setpoint = (int)e.Value;
|
||||
}
|
||||
|
||||
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
CanChangeControlMode = (bool)e.Value;
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StartButton?.Dispose();
|
||||
StartButton = null;
|
||||
StopButton?.Dispose();
|
||||
StopButton = null;
|
||||
|
||||
_adsManager?.Deregister("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StartAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", Setpoint);
|
||||
}
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
private void StopAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", 0);
|
||||
Setpoint = 0;
|
||||
}
|
||||
|
||||
public static ValidationResult ValidatePower(int power, ValidationContext context)
|
||||
{
|
||||
if (power < -40000 || power > 40000)
|
||||
return new("Must be between -40.000 and +40.000");
|
||||
else
|
||||
return ValidationResult.Success!;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI;
|
||||
|
||||
public sealed partial class UnitOverviewPageVM : ObservableObject, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string unitName;
|
||||
|
||||
[ObservableProperty]
|
||||
private UnitDetailsControlVM unitControlVM;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
private readonly string? _variableName;
|
||||
|
||||
public UnitOverviewPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
unitControlVM = new(_adsManager, _variableName);
|
||||
|
||||
unitName = "Unit X";
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UnitControlVM?.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,36 @@
|
||||
<Page x:Class="UniperHMI.AlignmentStationPage"
|
||||
<Page
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.AlignmentStationPage"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:AlignmentStationPageVM}}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Blablubb">
|
||||
Title="AlignmentStationPage" FontSize="40">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Alignment Station" VerticalAlignment="Top" HorizontalAlignment="Left" />
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
<HMIToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="center" VerticalAlignment="Center" DataContext="{Binding Path=VacuumValveControlVm}"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
|
||||
|
||||
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
|
||||
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
<Page x:Class="UniperHMI.AutomaticModePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="AutomaticModePage">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
|
||||
|
||||
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
|
||||
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,39 +0,0 @@
|
||||
<Page x:Class="UniperHMI.BatteryOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||
mc:Ignorable="d"
|
||||
x:Name="root"
|
||||
d:DataContext="{d:DesignInstance Type=local:BatteryOverviewPageVM, IsDesignTimeCreatable=False}"
|
||||
Title="ManualModePage" Height="Auto" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
|
||||
<Grid Margin="10" Width="Auto" Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="0" DataContext="{Binding String1VM}" Command="{Binding ElementName=root, Path=DataContext.String1ClickedCommand}" SMUName="String 1" Margin="0,0,5,0" />
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="1" DataContext="{Binding String2VM}" Command="{Binding ElementName=root, Path=DataContext.String2ClickedCommand}" SMUName="String 2" Margin="0,0,5,0" />
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="2" DataContext="{Binding DummyStringVM}" SMUName="String 3" Margin="0,0,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="3" DataContext="{Binding DummyStringVM}" SMUName="String 4" Margin="0,0,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="4" DataContext="{Binding DummyStringVM}" SMUName="String 5" Margin="0,0,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="5" DataContext="{Binding DummyStringVM}" SMUName="String 6" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="0" DataContext="{Binding DummyStringVM}" SMUName="String 7" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="1" DataContext="{Binding DummyStringVM}" SMUName="String 8" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="2" DataContext="{Binding DummyStringVM}" SMUName="String 9" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="3" DataContext="{Binding DummyStringVM}" SMUName="String 10" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="4" DataContext="{Binding DummyStringVM}" SMUName="String 11" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="5" DataContext="{Binding DummyStringVM}" SMUName="String 12" Margin="0,5,0,0" IsEnabled="False"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,64 +0,0 @@
|
||||
<Page x:Class="UniperHMI.ChuckMagazinPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Blablubb">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Magazinbelegung: " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Content="Tellerplatz 1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" Content="Tellerplatz 2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="1" Grid.Column="7" Grid.ColumnSpan="2" Content="Tellerplatz 3" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Content="Tellerplatz 4" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2" Content="Tellerplatz 5" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="5" Grid.Column="7" Grid.ColumnSpan="2" Content="Tellerplatz 6" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
|
||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace1}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace2}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace3}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace4}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace5}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace6}" VerticalAlignment="Center" Width="210"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
49
uniper_hmi/UniperHMI/Pages/Views/EtchingStation1Page.xaml
Normal file
49
uniper_hmi/UniperHMI/Pages/Views/EtchingStation1Page.xaml
Normal file
@@ -0,0 +1,49 @@
|
||||
<Page x:Class="InfineonHMI.EtchingStation1Page"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:EtchingStation1PageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="EtchingStationPage">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Etching Station 1" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="35" />
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding VacuumValveControlEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveControlEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveLeftEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveRightEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveFrontEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveBackEtching1Vm}"/>
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="3" Content="Teller Entriegeln" DataContext="{Binding ChuckUnlockCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30" />
|
||||
<Button Grid.Row="2" Grid.Column="3" Content="Teller Verriegeln" DataContext="{Binding ChuckLockCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
<Button Grid.Row="3" Grid.Column="3" Content="Teller Auswerfen" DataContext="{Binding ChuckEjectCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,13 +1,13 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class EtchingStationPage : Page
|
||||
public partial class EtchingStation1Page : Page
|
||||
{
|
||||
public EtchingStationPage()
|
||||
public EtchingStation1Page()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
48
uniper_hmi/UniperHMI/Pages/Views/EtchingStation2Page.xaml
Normal file
48
uniper_hmi/UniperHMI/Pages/Views/EtchingStation2Page.xaml
Normal file
@@ -0,0 +1,48 @@
|
||||
<Page x:Class="InfineonHMI.EtchingStation2Page"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:EtchingStation2PageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="EtchingStationPage">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Etching Station 2" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="35" />
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding VacuumValveControlEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveControlEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveLeftEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveRightEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveFrontEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveBackEtching2Vm}"/>
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="3" Content="Teller Entriegeln" DataContext="{Binding ChuckUnlockCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
<Button Grid.Row="2" Grid.Column="3" Content="Teller Verriegeln" DataContext="{Binding ChuckLockCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
<Button Grid.Row="3" Grid.Column="3" Content="Teller Auswerfen" DataContext="{Binding ChuckEjectCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,13 +1,13 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class ChuckMagazinPage : Page
|
||||
public partial class EtchingStation2Page : Page
|
||||
{
|
||||
public ChuckMagazinPage()
|
||||
public EtchingStation2Page()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
@@ -1,49 +0,0 @@
|
||||
<Page x:Class="UniperHMI.EtchingStationPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Blablubb">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
|
||||
|
||||
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
|
||||
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,9 +1,9 @@
|
||||
<Page x:Class="UniperHMI.EventsPage"
|
||||
<Page x:Class="InfineonHMI.EventsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:EventsPageVM, IsDesignTimeCreatable=False}"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI;
|
||||
namespace InfineonHMI;
|
||||
|
||||
/// <summary>
|
||||
/// Interaktionslogik für EventsPage.xaml
|
||||
|
||||
@@ -1,49 +1,52 @@
|
||||
<Page x:Class="UniperHMI.HighVoltageStationPage"
|
||||
<Page x:Class="InfineonHMI.HighVoltageStationPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DataContext="{d:DesignInstance Type=local:HighVoltageStationPageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Blablubb">
|
||||
Title="High Voltage Test Station">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Hochvolt Test Station Heiß" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="35"/>
|
||||
<Label Grid.Row="0" Grid.Column="3" Content="Hochvolt Test Station Kalt" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="35"/>
|
||||
<Border Grid.Row="0" Grid.Column="2" Grid.RowSpan="9" BorderBrush="White" BorderThickness="0,0,1,0"></Border>
|
||||
<Border Grid.Row="0" Grid.Column="3" Grid.RowSpan="9" BorderBrush="White" BorderThickness="1,0,0,0"></Border>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveHotControlVm }"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="3" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveColdControlVm }"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding TestChamberHotValveVm }"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="4" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding TestChamberColdValveVm }"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
|
||||
<Label Grid.Column="2" Grid.Row="1" FontSize="40" Content="Solltemperatur" HorizontalAlignment="left" Margin="5"/>
|
||||
<hmiToolkit:AnalogValue Grid.Column="2" Grid.Row="1" Height="60" Width="260" HorizontalAlignment="Left" Margin="60" VerticalAlignment="Center" DataContext="{Binding TempSPHotVm}"/>
|
||||
<Label Grid.Column="5" Grid.Row="1" FontSize="40" Content="Solltemperatur" Margin="5"/>
|
||||
<hmiToolkit:AnalogValue Grid.Column="5" Grid.Row="1" Height="60" Width="260" Margin="60" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TempSPColdVm}"/>
|
||||
|
||||
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
|
||||
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Page xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="UniperHMI.HotCoolPlatePage"
|
||||
<Page xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.HotCoolPlatePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DataContext="{d:DesignInstance Type=local:HotCoolPlatePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="HotCoolPlatePage">
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
@@ -33,60 +31,68 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Grid.RowSpan="9" Grid.Column="5" BorderBrush="WhiteSmoke" BorderThickness="2,0,0,0" />
|
||||
<Border Grid.Row="0" Grid.RowSpan="9" Grid.Column="4" BorderBrush="WhiteSmoke" BorderThickness="0,0,2,0" />
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" Content="Heizplatte" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
<Label Grid.Row="0" Grid.Column="5" Grid.ColumnSpan="5" Content="Kühlplatte" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
<Border Grid.Row="0" Grid.RowSpan="9" Grid.Column="4" BorderBrush="WhiteSmoke" BorderThickness="2,0,0,0" />
|
||||
<Border Grid.Row="0" Grid.RowSpan="9" Grid.Column="3" BorderBrush="WhiteSmoke" BorderThickness="0,0,2,0" />
|
||||
<Label Grid.Row="0" Grid.Column="0" FontSize="35" Content="Heizplatte" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
|
||||
<Label Grid.Row="0" Grid.Column="4" FontSize="35" Content="Kühlplatte" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
<Label Grid.Row="2" Grid.Column="5" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Temperatur Soll" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Margin="10" Text="{Binding HotPlateTargetTemperature}"/>
|
||||
<Label Grid.Row="1" Grid.Column="2" Content="Temperatur Ist" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
<TextBox Grid.Row="1" Grid.Column="3" Margin="10" Text="{Binding HotPlateActualTemperature}" IsEnabled="False"/>
|
||||
<Label Grid.Row="1" Grid.Column="5" Content="Temperatur Soll" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
<TextBox Grid.Row="1" Grid.Column="6" Margin="10" Text="{Binding CoolPlateTargetTemperature}"/>
|
||||
<Label Grid.Row="1" Grid.Column="7" Content="Temperatur Ist" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
<TextBox Grid.Row="1" Grid.Column="8" Margin="10" Text="{Binding CoolPlateActualTemperature}" IsEnabled="False"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility1}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility2}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility3}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility4}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility5}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility6}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility7}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotplateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
||||
|
||||
<Ellipse Grid.Column="6" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="8" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="8" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="8" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility1}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility2}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="8" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility3}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility4}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility5}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="8" Grid.Row="5" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility6}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility7}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="8" Grid.Row="7" Grid.RowSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolplateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
||||
<Button Grid.Row="0" Grid.Column="1" Content="Einschalten" DataContext="{Binding EnableHotPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||
<Button Grid.Row="0" Grid.Column="2" Content="Ausschalten" DataContext="{Binding DisableHotPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="5" Content="Einschalten" DataContext="{Binding EnableCoolPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||
<Button Grid.Row="0" Grid.Column="6" Content="Ausschalten" DataContext="{Binding DisableCoolPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||
|
||||
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" FontSize="35" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
<Label Grid.Row="2" Grid.Column="4" FontSize="35" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="1" FontSize="40" Content="Temperatur Soll" VerticalAlignment="Top" HorizontalAlignment="Center"/>
|
||||
<HMIToolkit:AnalogValue Grid.Column="1" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding HotPlateTargetTemperature}"/>
|
||||
<Label Grid.Row="1" Grid.Column="2" Content="Temperatur Ist" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40" />
|
||||
<HMIToolkit:AnalogValue Grid.Column="2" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding HotPlateActualTemperature}"/>
|
||||
<Label Grid.Row="1" Grid.Column="5" Content="Temperatur Soll" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40"/>
|
||||
<HMIToolkit:AnalogValue Grid.Column="5" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding CoolPlateTargetTemperature}"/>
|
||||
<Label Grid.Row="1" Grid.Column="6" Content="Temperatur Ist" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40"/>
|
||||
<HMIToolkit:AnalogValue Grid.Column="6" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding CoolPlateActualTemperature}"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility1}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility2}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility3}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility4}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility5}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility6}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility7}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
||||
|
||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility1}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility2}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility3}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility4}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility5}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility6}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility7}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Page x:Class="UniperHMI.KukaRobotPage"
|
||||
<Page x:Class="InfineonHMI.KukaRobotPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DataContext="{d:DesignInstance Type=local:KukaRobotPageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="KukaRobotPage">
|
||||
|
||||
@@ -79,33 +79,32 @@
|
||||
<Button Grid.Row="5" Grid.Column="0" Command="{Binding ClearStateCommand}" Content="Clear" Margin="15,15,10,15" />
|
||||
<Button Grid.Row="5" Grid.Column="1" Command="{Binding ResetStateCommand}" Content="Reset" Margin="10,15,15,15" />
|
||||
|
||||
<Border Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,1,1" Margin="5,5,0,0"/>
|
||||
<Border Grid.Row="3" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,4,1" Margin="0,5,5,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="Offset Abholen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="4" Content="Offset Abholen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_X}" MaxLines="1" Margin="10,15,10,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="3" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_Y}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
||||
<Border Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,1,1" Margin="5,5,0,0"/>
|
||||
<Border Grid.Row="2" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,4,1" Margin="0,5,5,0"/>
|
||||
<Label Grid.Row="2" Grid.Column="2" Content="Offset Abholen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="2" Grid.Column="4" Content="Offset Abholen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_Y}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="2" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_X}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
||||
<Border Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,1" Margin="5,0,0,0"/>
|
||||
<Border Grid.Row="3" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,1" Margin="0,0,5,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="Offset Ablegen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="4" Content="Offset Ablegen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_Y}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="3" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_X}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
|
||||
<Border Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,1" Margin="5,0,0,0"/>
|
||||
<Border Grid.Row="4" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,1" Margin="0,0,5,0"/>
|
||||
<Label Grid.Row="4" Grid.Column="2" Content="Offset Ablegen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="4" Grid.Column="4" Content="Offset Ablegen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_X}" MaxLines="1" Margin="10,10,10,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="4" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_Y}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
|
||||
<Border Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,1" Margin="5,0,0,0"/>
|
||||
<Border Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,1" Margin="0,0,5,0"/>
|
||||
<Label Grid.Row="5" Grid.Column="2" Content="Offset NIO Abholen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="5" Grid.Column="4" Content="Offset NIO Abholen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="5" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_X}" MaxLines="1" Margin="10,10,10,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="5" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_Y}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
<Label Grid.Row="4" Grid.Column="2" Content="Offset NIO Abholen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="4" Grid.Column="4" Content="Offset NIO Abholen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_Y}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="4" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_X}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
|
||||
<Border Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,4" Margin="5,0,0,5"/>
|
||||
<Border Grid.Row="6" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,4" Margin="0,0,5,5"/>
|
||||
<Label Grid.Row="6" Grid.Column="2" Content="Offset NIO Ablegen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="6" Grid.Column="4" Content="Offset NIO Ablegen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="6" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_Y}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="6" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_X}" MaxLines="1" Margin="10,10,10,15" TextAlignment="Right" />
|
||||
<Border Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,4" Margin="5,0,0,5"/>
|
||||
<Border Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,4" Margin="0,0,5,5"/>
|
||||
<Label Grid.Row="5" Grid.Column="2" Content="Offset NIO Ablegen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="5" Grid.Column="4" Content="Offset NIO Ablegen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="5" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_Y}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="5" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_X}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
||||
|
||||
|
||||
|
||||
@@ -116,8 +115,55 @@
|
||||
<TextBox Grid.Row="6" Grid.Column="1" IsEnabled="{Binding CanChangeHotPlateIndex}" Text="{Binding HotplateIndex}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="7" Grid.Column="1" IsEnabled="{Binding CanChangeCoolPlateIndex}" Text="{Binding CoolplateIndex}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
||||
|
||||
|
||||
|
||||
<Label Grid.Row="6" Grid.Column="3" Content="Magazinbelegung: " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column ="4" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Tellerplatz 1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2" Content="Tellerplatz 2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" Content="Tellerplatz 3" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="Tellerplatz 4" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="2" Content="Tellerplatz 5" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="3" Grid.Column="6" Grid.ColumnSpan="2" Content="Tellerplatz 6" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
|
||||
<Ellipse Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace1}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace2}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace3}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace4}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace5}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace6}" VerticalAlignment="Center" Width="80"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
|
||||
163
uniper_hmi/UniperHMI/Pages/Views/MachineOverviewPage.xaml
Normal file
163
uniper_hmi/UniperHMI/Pages/Views/MachineOverviewPage.xaml
Normal file
@@ -0,0 +1,163 @@
|
||||
<Page x:Class="InfineonHMI.MachineOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=uniperHmi:MachineOverviewPageVM, IsDesignTimeCreatable=True}"
|
||||
Title="Production Overview">
|
||||
|
||||
<Viewbox Stretch="none">
|
||||
<Grid Width="3840" Height="1650">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.12*"/>
|
||||
<ColumnDefinition Width="0.93*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" Margin="25 0 0 0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
FontFamily="Arial"
|
||||
Content="Trayfeeder
Ein-/Ausgabe"
|
||||
Command="{Binding TrayfeederPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Margin="5"
|
||||
FontSize="39"
|
||||
Content="Ausrichtstation"
|
||||
Command="{Binding AlignerPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="2"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Ätzer 1"
|
||||
Command="{Binding Etching1PageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="3"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Ätzer 2"
|
||||
Command="{Binding Etching2PageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="4"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="HV Test"
|
||||
Command="{Binding HVTestPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="5"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Heiz-
/Kühlplatte"
|
||||
Command="{Binding HotCoolplatePageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="6"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="NOK Station"
|
||||
Command="{Binding NIOStationPageClickedCommand}"/>
|
||||
|
||||
<Border Grid.Row="7"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0,5,0,0"/>
|
||||
|
||||
<Button Grid.Row="7"
|
||||
Margin="5,15,5,5"
|
||||
FontSize="36" Content="Kuka Roboter"
|
||||
Command="{Binding KukaPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="8"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
FontFamily="Arial"
|
||||
Content="Medienschrank"
|
||||
Command="{Binding MediaCabinetPageClickedCommand}"/>
|
||||
|
||||
</Grid>
|
||||
<!-- DETAIL PAGE -->
|
||||
|
||||
|
||||
<Frame x:Name="DetailFrame"
|
||||
Grid.Column="1"
|
||||
NavigationUIVisibility="Hidden"
|
||||
Content="{Binding CurrentDetailPage}"/>
|
||||
|
||||
<Image Grid.Column="1" Source="/Anlagenuebersicht.png" Stretch="Fill" Height="1504" Width="1936"/>
|
||||
<Button Command="{Binding TrayfeederPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2203,572,820,780"/>
|
||||
<Button Command="{Binding KukaPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1822,610,1380,780"/>
|
||||
<Button Command="{Binding Etching1PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1480,819,1749,644" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="-23.091"/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding Etching2PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1431,473,1770,971" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="24.991"/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding HVTestPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1706,183,1472,1202" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="-105.32"/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding HotCoolplatePageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2039,316,1175,1106" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="-56.721"/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding MediaCabinetPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="878,565,2350,641"/>
|
||||
|
||||
<Button Command="{Binding AlignerPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1633,1048,1594,474" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="27.441"/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding NIOStationPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1707,932,1543,601" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="27.441"/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</Page>
|
||||
@@ -1,13 +1,13 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class AutomaticModePage : Page
|
||||
public partial class MachineOverviewPage : Page
|
||||
{
|
||||
public AutomaticModePage()
|
||||
public MachineOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
@@ -1,49 +1,45 @@
|
||||
<Page x:Class="UniperHMI.MediaCabinetPage"
|
||||
<Page x:Class="InfineonHMI.MediaCabinetPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:common="clr-namespace:Common"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Blablubb">
|
||||
d:DataContext="{d:DesignInstance Type=local:MediaCabinetPageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="1600" d:DesignWidth="3800"
|
||||
Title="Media Cabinet">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="33*" />
|
||||
<RowDefinition Height="33*" />
|
||||
<RowDefinition Height="33*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Mediacabinet Page" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
<common:MediaContainer Grid.Row="1" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container1Vm}"/>
|
||||
<common:MediaContainer Grid.Row="2" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container2Vm}"/>
|
||||
<common:MediaContainer Grid.Row="3" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container3Vm}"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
|
||||
<common:MediaContainer Grid.Row="1" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container4Vm}"/>
|
||||
<common:MediaContainer Grid.Row="2" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container5Vm}"/>
|
||||
<common:MediaContainer Grid.Row="3" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container6Vm}"/>
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
|
||||
|
||||
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
|
||||
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
|
||||
<common:MediaContainer Grid.Row="1" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container7Vm}"/>
|
||||
<common:MediaContainer Grid.Row="2" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container8Vm}"/>
|
||||
<common:MediaContainer Grid.Row="3" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container9Vm}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<Page x:Class="UniperHMI.ModuleOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
d:DataContext="{d:DesignInstance Type=local:ModuleOverviewPageVM, IsDesignTimeCreatable=False}"
|
||||
mc:Ignorable="d"
|
||||
Width="Auto" Height="Auto" x:Name="root" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
|
||||
<Grid Margin="10" ShowGridLines="False" Width="Auto" Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<local:SMUControlButton SMUName="Unit 1" DataContext="{Binding Unit1}" Command="{Binding ElementName=root, Path=DataContext.Unit1ClickedCommand}" Grid.Row="0" Grid.Column="0" Margin="0,0,5,0" />
|
||||
<local:SMUControlButton SMUName="Unit 2" DataContext="{Binding Unit2}" Command="{Binding ElementName=root, Path=DataContext.Unit2ClickedCommand}" Grid.Row="0" Grid.Column="1" />
|
||||
<local:SMUControlButton SMUName="Unit 3" DataContext="{Binding Unit3}" Command="{Binding ElementName=root, Path=DataContext.Unit3ClickedCommand}" Grid.Row="1" Grid.Column="0" Margin="0,5,5,0" />
|
||||
<local:SMUControlButton SMUName="Unit 4" DataContext="{Binding Unit4}" Command="{Binding ElementName=root, Path=DataContext.Unit4ClickedCommand}" Grid.Row="1" Grid.Column="1" Margin="0,5,0,0"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,28 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ModuleOverviewPage.xaml
|
||||
/// </summary>
|
||||
public partial class ModuleOverviewPage : Page
|
||||
{
|
||||
public ModuleOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,12 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="UniperHMI.NIOStationPage"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.NIOStationPage"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:AutomaticModePageVM}}"
|
||||
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:NIOStationPageVM}}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Blablubb">
|
||||
Title="NIOStationPage">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -20,8 +20,6 @@
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
@@ -35,9 +33,14 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Spannzylinder: " HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<HMIToolkit:BinaryValveControl DataContext="{Binding CylinderNIOPlateVM}" Grid.Column="0" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="NIO Station" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<HMIToolkit:BinaryValveControl DataContext="{Binding ClampDiagValveVm}" Grid.Column="0" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
||||
<HMIToolkit:BinaryValveControl DataContext="{Binding ClampAcrossValveVm}" Grid.Column="1" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="2" Content="Tray Fixieren" DataContext="{Binding ClampCmdButtonVm}" HorizontalAlignment="Center" Width="180" Height="60" />
|
||||
<Button Grid.Row="2" Grid.Column="2" Content="Tray Lösen" DataContext="{Binding UnclampCmdButtonVm}" HorizontalAlignment="Center" Width="180" Height="60" />
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
|
||||
100
uniper_hmi/UniperHMI/Pages/Views/ProductionOverviewPage.xaml
Normal file
100
uniper_hmi/UniperHMI/Pages/Views/ProductionOverviewPage.xaml
Normal file
@@ -0,0 +1,100 @@
|
||||
<Page x:Class="InfineonHMI.ProductionOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=uniperHmi:ProductionOverviewPageVM, IsDesignTimeCreatable=True}"
|
||||
Title="Production Overview">
|
||||
|
||||
<Viewbox Stretch="none">
|
||||
<Grid Width="3840" Height="1650">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.12*"/>
|
||||
<ColumnDefinition Width="0.93*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" Margin="25 0 0 0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
FontFamily="Arial"
|
||||
Content="Trayfeeder
Ein-/Ausgabe"
|
||||
Command="{Binding TrayfeederPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Margin="5"
|
||||
FontSize="39"
|
||||
Content="Ausrichtstation"
|
||||
Command="{Binding AlignerPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="2"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Ätzer 1"
|
||||
Command="{Binding Etching1PageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="3"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Ätzer 2"
|
||||
Command="{Binding Etching2PageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="4"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="HV Test"
|
||||
Command="{Binding HVTestPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="5"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Heiz-
/Kühlplatte"
|
||||
Command="{Binding HotCoolplatePageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="6"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="NOK Station"
|
||||
Command="{Binding NIOStationPageClickedCommand}"/>
|
||||
|
||||
<Border Grid.Row="7"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0,5,0,0"/>
|
||||
|
||||
<Button Grid.Row="7"
|
||||
Margin="5,15,5,5"
|
||||
FontSize="36" Content="Kuka Roboter"
|
||||
Command="{Binding KukaPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="8"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
FontFamily="Arial"
|
||||
Content="Medienschrank"
|
||||
Command="{Binding MediaCabinetPageClickedCommand}"/>
|
||||
|
||||
</Grid>
|
||||
<!-- DETAIL PAGE -->
|
||||
<Frame x:Name="DetailFrame"
|
||||
Grid.Column="1"
|
||||
NavigationUIVisibility="Hidden"
|
||||
Content="{Binding CurrentDetailPage}"/>
|
||||
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</Page>
|
||||
@@ -1,16 +1,16 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ManualModePage.xaml
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class BatteryOverviewPage : Page
|
||||
public partial class ProductionOverviewPage : Page
|
||||
{
|
||||
public BatteryOverviewPage()
|
||||
public ProductionOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
//Unloaded += OnUnloaded;
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
192
uniper_hmi/UniperHMI/Pages/Views/ReceipePage.xaml
Normal file
192
uniper_hmi/UniperHMI/Pages/Views/ReceipePage.xaml
Normal file
@@ -0,0 +1,192 @@
|
||||
<Page x:Class="InfineonHMI.Pages.Views.ReceipePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
||||
xmlns:common="clr-namespace:Common"
|
||||
d:DataContext="{d:DesignInstance Type=uniperHmi:ReceipePageVM, IsDesignTimeCreatable=True}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1900" d:DesignWidth="3800">
|
||||
|
||||
<Page.Resources>
|
||||
<CollectionViewSource x:Key="FlowStations" Source="{Binding FlowStationsVm}"></CollectionViewSource>
|
||||
</Page.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="33*"/>
|
||||
<ColumnDefinition Width="33*"/>
|
||||
<ColumnDefinition Width="17*"/>
|
||||
<ColumnDefinition Width="17*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Grid.Row="0" x:Name="BtnReadReceipeFile"
|
||||
Content="Rezept aus Datei Laden"
|
||||
Width="120"
|
||||
Command="{Binding ReadReceipeFileCommand}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10"/>
|
||||
|
||||
<Button Grid.Row="0" x:Name="BtnWriteReceipeFile"
|
||||
Content="Rezept speichern"
|
||||
Width="120"
|
||||
Command="{Binding WriteReceipeFileCommand}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10"/>
|
||||
<Button Grid.Row="0" x:Name="BtnWriteToPlc"
|
||||
Content="Sende Daten an SPS"
|
||||
Width="120"
|
||||
Command="{Binding WriteToPlcCommand}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10"/>
|
||||
</StackPanel>
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Allgemein: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding CameraProgramsVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChucksVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding GripperVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding DiameterVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ThicknessVm}"/>
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="9" Content="Heiz-/ Kühlplatte: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RestingTimeHotplateVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TargetTemperatureHotplateVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RestingTimeCoolplateVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="13" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TargetTemperatureCoolplateVm}"/>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="15" Content="Ätzerparameter: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="16" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding PermissibleBeamParamDeviationsVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="17" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TimeIntervallBeamCheckVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="18" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RadialPosLowerWaterJetVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="19" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChuckRpmVm}"/>
|
||||
|
||||
<Label Grid.Column="1" Grid.Row="1" Content="Hochvolt Parameter: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvmaxTestCurrentVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding Hvn2PrePurgeTimeVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvnumRetriesVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="5" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvpolarityVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvrampTimeVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestFrequencyVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="8" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkCurrentVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="9" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkVoltageVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestTemperatureVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestVoltageVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestPressureN2Vm}"/>
|
||||
|
||||
<Label Grid.Column="1" Grid.Row="14" Content="Durchlaufrezept Tabelle"></Label>
|
||||
<Grid Grid.Column="1" Grid.Row="15" Grid.RowSpan="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="90*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid Grid.Column="0" ItemsSource="{Binding FlowReceipeEntries}"
|
||||
SelectedItem="{Binding SelectedFlowReceipeEntry, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="NodeID" Binding="{Binding NodeId}"/>
|
||||
<DataGridTextColumn Header="Priorität" Binding="{Binding Priority}"/>
|
||||
<DataGridComboBoxColumn Header="Station"
|
||||
ItemsSource="{Binding Source={StaticResource FlowStations}}"
|
||||
SelectedValueBinding="{Binding Station, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True}"/>
|
||||
<DataGridTextColumn Header="Max. Wdh." Binding="{Binding MaxRetries}"/>
|
||||
<DataGridTextColumn Header="Nächste Node" Binding="{Binding NextNodeSuccess}"/>
|
||||
<DataGridTextColumn Header="Nächste Node bei Wdh." Binding="{Binding NextNodeRetry}"/>
|
||||
<DataGridTextColumn Header="Nächste Node bei Fail" Binding="{Binding NextNodeFail}"></DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical">
|
||||
<Button Content="+" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding AddFlowReceipeEntryCommand}" IsEnabled="{Binding CanAddFlowReceipeEntry}"></Button>
|
||||
<Button Content="-" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding RemoveFlowReceipeEntryCommand}" IsEnabled="{Binding CanRemoveFlowReceipeEntry}"></Button>
|
||||
<Button Content="↑" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding FlowReceipeEntryUpCommand}"></Button>
|
||||
<Button Content="↓" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding FlowReceipeEntryDownCommand}"></Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="1" Content="Traypositionen" FontSize="24"></Label>
|
||||
<Grid Grid.Column="2" Grid.Row="1" Grid.RowSpan="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80*"/>
|
||||
<ColumnDefinition Width="20*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid Grid.Column="0" ItemsSource="{Binding TrayPositions}"
|
||||
SelectedItem="{Binding SelectedTrayPosition}"
|
||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Pos Nr." Binding="{Binding PosId}"/>
|
||||
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}"/>
|
||||
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}"></DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical">
|
||||
<Button Content="+" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding AddTrayPositionCommand}" IsEnabled="{Binding CanAddTrayPosition}"></Button>
|
||||
<Button Content="-" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding RemoveTrayPositionCommand}" IsEnabled="{Binding CanRemoveTrayPosition}"></Button>
|
||||
<Button Content="↑" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding TrayPositionUpCommand}"></Button>
|
||||
<Button Content="↓" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding TrayPositionDownCommand}"></Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="9" Content="Ätzschritte Mecademic Roboter"></Label>
|
||||
<Grid Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="10" Grid.RowSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="90*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid Grid.Column="0" ItemsSource="{Binding EtcherRobotSteps}"
|
||||
SelectedItem="{Binding SelectedEtchRobotStep, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}"/>
|
||||
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}"/>
|
||||
<DataGridTextColumn Header="Pos Z" Binding="{Binding PosZ}"/>
|
||||
<DataGridTextColumn Header="Winkel Alpha" Binding="{Binding AngleAlpha}"/>
|
||||
<DataGridTextColumn Header="Geschw." Binding="{Binding MoveSpeed}"/>
|
||||
<DataGridTextColumn Header="Wartezeit" Binding="{Binding Delay}"/>
|
||||
<DataGridTextColumn Header="Medium" Binding="{Binding Medium}"/>
|
||||
<DataGridCheckBoxColumn Header="Oberwasseer" Binding="{Binding WaterFromAbove}"/>
|
||||
<DataGridCheckBoxColumn Header="Unterwasser" Binding="{Binding WaterFromBelow}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical">
|
||||
<Button Content="+" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding AddEtchRobotStepCommand}" IsEnabled="{Binding CanAddEtchRobotStep}"></Button>
|
||||
<Button Content="-" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding RemoveEtchRobotStepCommand}" IsEnabled="{Binding CanRemoveEtchRobotStep}"></Button>
|
||||
<Button Content="↑" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding EtchRobotStepUpCommand}"></Button>
|
||||
<Button Content="↓" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding EtchRobotStepDownCommand}"></Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
15
uniper_hmi/UniperHMI/Pages/Views/ReceipePage.xaml.cs
Normal file
15
uniper_hmi/UniperHMI/Pages/Views/ReceipePage.xaml.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI.Pages.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Receipes Overview Page
|
||||
/// </summary>
|
||||
public partial class ReceipePage : Page
|
||||
{
|
||||
public ReceipePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<Page x:Class="UniperHMI.StringOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:StringOverviewPageVM, IsDesignTimeCreatable=False}"
|
||||
Title="StringOverviewPage"
|
||||
Width="Auto" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
x:Name="root">
|
||||
|
||||
<Grid Margin="10" Width="Auto" Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:SMUControlButton SMUName="Modul 1" DataContext="{Binding Module1}" Command="{Binding ElementName=root, Path=DataContext.Module1ClickedCommand}" Grid.Column="0" Margin="0,0,5,0"/>
|
||||
<local:SMUControlButton SMUName="Modul 2" DataContext="{Binding Module2}" Command="{Binding ElementName=root, Path=DataContext.Module2ClickedCommand}" Grid.Column="1" Margin="0,0,5,0"/>
|
||||
<local:SMUControlButton SMUName="Modul 3" DataContext="{Binding Module3}" Command="{Binding ElementName=root, Path=DataContext.Module3ClickedCommand}" Grid.Column="2"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,15 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für StringOverviewPage.xaml
|
||||
/// </summary>
|
||||
public partial class StringOverviewPage : Page
|
||||
{
|
||||
public StringOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,33 @@
|
||||
<Page x:Class="UniperHMI.TrayFeederPage"
|
||||
<Page x:Class="InfineonHMI.TrayFeederPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DataContext="{d:DesignInstance Type=local:TrayFeederPageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Blablubb">
|
||||
Title="Trayfeeder">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="TrayFeederPage" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
|
||||
|
||||
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
|
||||
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class TrayFeederPage : Page
|
||||
{
|
||||
public TrayFeederPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
public TrayFeederPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<Page x:Class="UniperHMI.UnitOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:UnitOverviewPageVM, IsDesignTimeCreatable=False}"
|
||||
Width="Auto" Height="Auto"
|
||||
Title="UnitOverviewPage"
|
||||
x:Name="root">
|
||||
|
||||
<Grid>
|
||||
<local:UnitDetailsControl UnitName="{Binding ElementName=root, Path=DataContext.UnitName}" DataContext="{Binding UnitControlVM}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,14 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI;
|
||||
|
||||
/// <summary>
|
||||
/// Interaktionslogik für UnitOverviewPage.xaml
|
||||
/// </summary>
|
||||
public partial class UnitOverviewPage : Page
|
||||
{
|
||||
public UnitOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,34 @@
|
||||
<Page x:Class="UniperHMI.SettingsPage"
|
||||
<Page x:Class="InfineonHMI.SettingsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance Type=local:SettingsPageVM}"
|
||||
Title="SettingsPageView">
|
||||
|
||||
<Grid>
|
||||
<!-- {d:SampleData ItemCount=5} -->
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button x:Name="BtnReadIni"
|
||||
Content="Ini Datei einlesen"
|
||||
Width="120"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10"/>
|
||||
|
||||
<!-- {d:SampleData ItemCount=5} -->
|
||||
<!--<DataGrid d:ItemsSource="{Binding CollectionView.View}"/>-->
|
||||
|
||||
|
||||
|
||||
<TreeView x:Name="treeview" ItemsSource="{Binding RootItem}" SelectedValuePath="Value" MinWidth="200" >
|
||||
<TreeView.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding SubEntries}">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für SettingsPageView.xaml
|
||||
|
||||
@@ -7,7 +7,7 @@ using TwinCAT.Ads.TypeSystem;
|
||||
using TwinCAT.TypeSystem;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public partial class SettingsEntry : ObservableObject
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"AutomaticModeVarName": "GVL_SCADA.stAutomaticModeHMI",
|
||||
"String1VarName": "GVL_SCADA.stHMIInterface",
|
||||
|
||||
"KukaRobotVarName": "GVL_SCADA.stMachine.stKukaRobot",
|
||||
"Module1VarName": ".stHMIInterfaceModule1",
|
||||
"Module2VarName": ".stHMIInterfaceModule2",
|
||||
"Module3VarName": ".stHMIInterfaceModule3"
|
||||
|
||||
Reference in New Issue
Block a user