Impl Kuka Page and Hot/Coolplate Page

Add all other Pages
This commit is contained in:
2026-02-13 09:13:36 +01:00
parent 627050501d
commit f8174d752c
38 changed files with 2641 additions and 52 deletions

View File

@@ -4,15 +4,16 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<Title>Ads Manager</Title>
<Authors>M.Heisig</Authors>
<Company>Heisig GmbH</Company>
<Description>Wrapper für den Ads Client von Beckhoff um automatische reconnects und onlinechanges zu behandeln.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageOutputPath>C:\Users\matthias.heisig\Documents\nuget_packages</PackageOutputPath>
<PackageOutputPath>C:\Users\C.Bliestle\Documents\0010_Obducat\WPF_HMI_Infineon\packages</PackageOutputPath>
<PackageProjectUrl>https://gitlab.cmblu.de/matthias.heisig/ads-wrapper</PackageProjectUrl>
<Version>1.0.0.7</Version>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,20 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34525.116
# Visual Studio Version 18
VisualStudioVersion = 18.2.11415.280 d18.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdsManager", "AdsManager.csproj", "{4B80F068-4E6D-4D2D-831B-8150970600C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4B80F068-4E6D-4D2D-831B-8150970600C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B80F068-4E6D-4D2D-831B-8150970600C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B80F068-4E6D-4D2D-831B-8150970600C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B80F068-4E6D-4D2D-831B-8150970600C7}.Release|Any CPU.Build.0 = Release|Any CPU
{4B80F068-4E6D-4D2D-831B-8150970600C7}.Debug|x64.ActiveCfg = Debug|x64
{4B80F068-4E6D-4D2D-831B-8150970600C7}.Debug|x64.Build.0 = Debug|x64
{4B80F068-4E6D-4D2D-831B-8150970600C7}.Release|x64.ActiveCfg = Release|x64
{4B80F068-4E6D-4D2D-831B-8150970600C7}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -1,20 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34408.163
# Visual Studio Version 18
VisualStudioVersion = 18.2.11415.280 d18.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UniperHMI", "UniperHMI\UniperHMI.csproj", "{8D725B27-1242-4C66-ACD8-45F02098C7D3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Release|Any CPU.Build.0 = Release|Any CPU
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Debug|x64.ActiveCfg = Debug|x64
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Debug|x64.Build.0 = Debug|x64
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Release|x64.ActiveCfg = Release|x64
{8D725B27-1242-4C66-ACD8-45F02098C7D3}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Binary file not shown.

View File

@@ -9,7 +9,7 @@
x:Name="MainControlWindow"
d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}"
WindowStartupLocation="CenterScreen"
Title="Uniper HMI" Height="800" Width="1024" ResizeMode="NoResize">
Title="Uniper HMI" Height="1030" Width="1900" ResizeMode="NoResize">
<Grid HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
@@ -45,41 +45,53 @@
<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="Automatic" Command="{Binding AutomaticModeClickedCommand}"/>
<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="Manual" Command="{Binding ManualModeClickedCommand}" />
<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="Settings" Command="{Binding SettingsWindowCommand}" />
<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="Events" Command="{Binding EventsListClickedCommand}"/>
<Button Grid.Column="3" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Trayfeeder &#xD;&#xA;Ein- /Ausgabe" Command="{Binding EventsListClickedCommand}"/>
<!-- Softkey 5 -->
<Button Grid.Column="4" MinWidth="80" MinHeight="80" Margin="0,0,2,0" />
<Button Grid.Column="4" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Heiz-/Kühlplatte" />
<!-- Softkey 6 -->
<Button Grid.Column="5" MinWidth="80" MinHeight="80" Margin="0,0,2,0" />
<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" />
<Button Grid.Column="6" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Ätzstationen"/>
<!-- Softkey 8 -->
<Button Grid.Column="7" Content="Ack Alarms" Command="{Binding AckAlarmsCommand}" MinWidth="80" MinHeight="80" Margin="0,0,2,0" />
<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" />
<Button Grid.Column="8" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="NIO"/>
<!-- Softkey 10 -->
<Button Grid.Column="9" Content="Back" Command="{Binding NavigateBackCommand}" IsEnabled="{Binding CanNavigateBack}" MinWidth="80" MinHeight="80" Margin="0,0,2,0" />
<Button Grid.Column="9" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Tellermagazin"/>
<!-- 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>
</Window>

View File

@@ -53,6 +53,9 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
// Settings page viem model
SettingsPageVM? _settingsPageVM;
// Kuka Robot page view model
KukaRobotPageVM? _kukaRobotPageVM;
public MainWindowVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger)
{
_adsManager = adsManager;
@@ -115,6 +118,15 @@ 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 NavigateBack()
@@ -239,6 +251,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");
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
CurrentPage = kukaRobotPage;
Breadcrumb = " > Kuka Roboter";
break;
default:
CurrentPage = new Page();
break;

View File

@@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UniperHMI.Model
{
public enum E_BMS_CONTROL_MODE : short
{
AUTO_REMOTE = 1,
AUTO_LOCAL = 2,
SAFETY_CHECK = 3,
CAPACITY_TEST = 4,
MANUAL = 5
}
public class BMSControlModeEntry(E_BMS_CONTROL_MODE mode, string name)
{
public E_BMS_CONTROL_MODE eMode = mode;
public string Name = name;
public override string ToString()
{
return Name;
}
}
public enum PLCJobenum : short
{
NONE = 0,
SCAN_QR_CODE = 10,
VACUUM_ON_ALIGNER = 15,
VACUUM_OFF_ALIGNER = 16,
VACUUM_ON_ETCHER_1 = 20,
VACUUM_ON_ETCHER_2 = 21,
VACUUM_OFF_ETCHER_1 = 22,
VACUUM_OFF_ETCHER_2 = 23,
CHUCK_OPEN_ETCHER_1 = 60,
CHUCK_OPEN_ETCHER_2 = 61,
CHUCK_CLOSE_ETCHER_1 = 62,
CHUCK_CLOSE_ETCHER_2 = 63,
}
public enum RobotJobenum : short
{
NONE = 0,
PICK_TRAYFEEDER = 10,
PLACE_TRAYFEEDER = 11,
PUT_ALIGNMENT = 15,
PICK_ALIGNMENT = 16,
PUT_ETCHER_1 = 20,
PUT_ETCHER_2 = 21,
PICK_ETCHER_1 = 22,
PICK_ETCHER_2 = 23,
SWITCH_ETCHER_1 = 24,
SWITCH_ETCHER_2 = 25,
PUT_HVTEST_HOT = 30,
PUT_HVTEST_COLD = 31,
PICK_HVTEST_HOT = 32,
PICK_HVTEST_COLD = 33,
PUT_HOTPLATE = 40,
PICK_HOTPLATE = 41,
PUT_COOLPLATE = 42,
PICK_COOLPLATE = 43,
PICK_GRIPPER = 50,
PICK_CHUCK_ETCHER_1 = 60,
PICK_CHUCK_ETCHER_2 = 61,
PUT_CHUCK_ETCHER_1 = 62,
PUT_CHUCK_ETCHER_2 = 63,
PUT_CHUCK_MAGAZIN = 64,
PICK_CHUCK_MAGAZIN = 65,
PUT_NIO_STATION = 70,
PICK_NIO_STATION = 71,
WARMUP = 80
}
public class PLCJobentry(PLCJobenum job, string name)
{
public PLCJobenum eJob = job;
public string Name = name;
public override string ToString()
{
return Name;
}
}
public class RobotJobentry(RobotJobenum job, string name)
{
public RobotJobenum eJob = job;
public string Name = name;
public override string ToString()
{
return Name;
}
}
}

View File

@@ -0,0 +1,121 @@
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 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]
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 AlignmentStationPageVM()
{
StartButton = new HMIControlButtonVM();
StopButton = new HMIControlButtonVM();
SelectedControlMode = ReqBMSControlModes[1];
canChangeControlMode = true;
}
public AlignmentStationPageVM(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!;
}
}
}

View File

@@ -5,29 +5,12 @@ using Heisig.HMI.AdsManager;
using CommunityToolkit.Mvvm.Input;
using TwinCAT.TypeSystem;
using System.Collections.ObjectModel;
using UniperHMI.Model;
namespace UniperHMI
{
public enum E_BMS_CONTROL_MODE : short
{
AUTO_REMOTE = 1,
AUTO_LOCAL = 2,
SAFETY_CHECK = 3,
CAPACITY_TEST = 4,
MANUAL = 5
}
public class BMSControlModeEntry(E_BMS_CONTROL_MODE mode, string name)
{
public E_BMS_CONTROL_MODE eMode = mode;
public string Name = name;
public override string ToString()
{
return Name;
}
}
public sealed partial class AutomaticModePageVM : ObservableValidator, IDisposable
{
@@ -85,7 +68,7 @@ namespace UniperHMI
_adsManager = adsManager;
_variableName = variableName;
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
SelectedControlMode = ReqBMSControlModes[1];

View File

@@ -0,0 +1,120 @@
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 ChuckMagazinPageVM : 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 ChuckMagazinPageVM()
{
StartButton = new HMIControlButtonVM();
StopButton = new HMIControlButtonVM();
SelectedControlMode = ReqBMSControlModes[1];
canChangeControlMode = true;
}
public ChuckMagazinPageVM(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!;
}
}
}

View File

@@ -0,0 +1,123 @@
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!;
}
}
}

View File

@@ -45,7 +45,12 @@ namespace UniperHMI
_logger.AlarmCleared += SimpleAlarmClearedEvent;
_logger.AlarmConfirmed += SimpleConfirmedAlarmEvent;
#if DEBUG
#else
_logger.Connect("10.103.32.50.1.1");
#endif
GetAllActiveEvents();
}

View File

@@ -0,0 +1,121 @@
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 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;
}
public HighVoltageStationPageVM(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!;
}
}
}

View File

@@ -0,0 +1,374 @@
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;
using System.Windows;
namespace UniperHMI
{
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 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 readonly IAdsManager? _adsManager;
[ObservableProperty]
private double hotPlateTargetTemperature;
[ObservableProperty]
private double hotPlateActualTemperature;
[ObservableProperty]
private double coolPlateTargetTemperature;
[ObservableProperty]
private double coolPlateActualTemperature;
[ObservableProperty]
private Visibility hotPlateVisibility1;
[ObservableProperty]
private Visibility hotPlateVisibility2;
[ObservableProperty]
private Visibility hotPlateVisibility3;
[ObservableProperty]
private Visibility hotPlateVisibility4;
[ObservableProperty]
private Visibility hotPlateVisibility5;
[ObservableProperty]
private Visibility hotPlateVisibility6;
[ObservableProperty]
private Visibility hotPlateVisibility7;
[ObservableProperty]
private Visibility hotPlateVisibility8;
[ObservableProperty]
private Visibility hotPlateVisibility9;
[ObservableProperty]
private Visibility coolPlateVisibility1;
[ObservableProperty]
private Visibility coolPlateVisibility2;
[ObservableProperty]
private Visibility coolPlateVisibility3;
[ObservableProperty]
private Visibility coolPlateVisibility4;
[ObservableProperty]
private Visibility coolPlateVisibility5;
[ObservableProperty]
private Visibility coolPlateVisibility6;
[ObservableProperty]
private Visibility coolPlateVisibility7;
[ObservableProperty]
private Visibility coolPlateVisibility8;
[ObservableProperty]
private Visibility coolPlateVisibility9;
public HotCoolPlatePageVM(IAdsManager adsManager, string variableName)
{
_adsManager = adsManager;
_adsManager.Register(sHotplateActualTemp, HotplateTempChanged);
_adsManager.Register(sCoolplateActualTemp, CoolplateTempChanged);
_adsManager.Register(sPieceOnHotplate1, HotplatePiece1Changed);
_adsManager.Register(sPieceOnHotplate2, HotplatePiece2Changed);
_adsManager.Register(sPieceOnHotplate3, HotplatePiece3Changed);
_adsManager.Register(sPieceOnHotplate4, HotplatePiece4Changed);
_adsManager.Register(sPieceOnHotplate5, HotplatePiece5Changed);
_adsManager.Register(sPieceOnHotplate6, HotplatePiece6Changed);
_adsManager.Register(sPieceOnHotplate7, HotplatePiece7Changed);
_adsManager.Register(sPieceOnHotplate8, HotplatePiece8Changed);
_adsManager.Register(sPieceOnHotplate9, HotplatePiece9Changed);
_adsManager.Register(sPieceOnCoolplate1, CoolplatePiece1Changed);
_adsManager.Register(sPieceOnCoolplate2, CoolplatePiece2Changed);
_adsManager.Register(sPieceOnCoolplate3, CoolplatePiece3Changed);
_adsManager.Register(sPieceOnCoolplate4, CoolplatePiece4Changed);
_adsManager.Register(sPieceOnCoolplate5, CoolplatePiece5Changed);
_adsManager.Register(sPieceOnCoolplate6, CoolplatePiece6Changed);
_adsManager.Register(sPieceOnCoolplate7, CoolplatePiece7Changed);
_adsManager.Register(sPieceOnCoolplate8, CoolplatePiece8Changed);
_adsManager.Register(sPieceOnCoolplate9, CoolplatePiece9Changed);
}
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)
{
HotPlateVisibility1 = Visibility.Visible;
}
else
{
HotPlateVisibility1 = Visibility.Hidden;
}
}
private void HotplatePiece2Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
HotPlateVisibility2 = Visibility.Visible;
}
else
{
HotPlateVisibility2 = Visibility.Hidden;
}
}
private void HotplatePiece3Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
HotPlateVisibility3 = Visibility.Visible;
}
else
{
HotPlateVisibility3 = Visibility.Hidden;
}
}
private void HotplatePiece4Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
HotPlateVisibility4 = Visibility.Visible;
}
else
{
HotPlateVisibility4 = Visibility.Hidden;
}
}
private void HotplatePiece5Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
HotPlateVisibility5 = Visibility.Visible;
}
else
{
HotPlateVisibility5 = Visibility.Hidden;
}
}
private void HotplatePiece6Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
HotPlateVisibility6 = Visibility.Visible;
}
else
{
HotPlateVisibility6 = Visibility.Hidden;
}
}
private void HotplatePiece7Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
HotPlateVisibility7 = Visibility.Visible;
}
else
{
HotPlateVisibility7 = Visibility.Hidden;
}
}
private void HotplatePiece8Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
HotPlateVisibility8 = Visibility.Visible;
}
else
{
HotPlateVisibility8 = Visibility.Hidden;
}
}
private void HotplatePiece9Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
HotPlateVisibility9 = Visibility.Visible;
}
else
{
HotPlateVisibility9 = Visibility.Hidden;
}
}
private void CoolplatePiece1Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility1 = Visibility.Visible;
}
else
{
CoolPlateVisibility1 = Visibility.Hidden;
}
}
private void CoolplatePiece2Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility2 = Visibility.Visible;
}
else
{
CoolPlateVisibility2 = Visibility.Hidden;
}
}
private void CoolplatePiece3Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility3 = Visibility.Visible;
}
else
{
CoolPlateVisibility3 = Visibility.Hidden;
}
}
private void CoolplatePiece4Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility4 = Visibility.Visible;
}
else
{
CoolPlateVisibility4 = Visibility.Hidden;
}
}
private void CoolplatePiece5Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility5 = Visibility.Visible;
}
else
{
CoolPlateVisibility5 = Visibility.Hidden;
}
}
private void CoolplatePiece6Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility6 = Visibility.Visible;
}
else
{
CoolPlateVisibility6 = Visibility.Hidden;
}
}
private void CoolplatePiece7Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility7 = Visibility.Visible;
}
else
{
CoolPlateVisibility7 = Visibility.Hidden;
}
}
private void CoolplatePiece8Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility8 = Visibility.Visible;
}
else
{
CoolPlateVisibility8 = Visibility.Hidden;
}
}
private void CoolplatePiece9Changed(object? sender, ValueChangedEventArgs e)
{
if ((bool)e.Value)
{
CoolPlateVisibility9 = Visibility.Visible;
}
else
{
CoolPlateVisibility9 = Visibility.Hidden;
}
}
public void Dispose()
{
_adsManager?.Register(sHotplateActualTemp, HotplateTempChanged);
_adsManager?.Register(sCoolplateActualTemp, CoolplateTempChanged);
_adsManager?.Register(sPieceOnHotplate1, HotplatePiece1Changed);
_adsManager?.Register(sPieceOnHotplate2, HotplatePiece2Changed);
_adsManager?.Register(sPieceOnHotplate3, HotplatePiece3Changed);
_adsManager?.Register(sPieceOnHotplate4, HotplatePiece4Changed);
_adsManager?.Register(sPieceOnHotplate5, HotplatePiece5Changed);
_adsManager?.Register(sPieceOnHotplate6, HotplatePiece6Changed);
_adsManager?.Register(sPieceOnHotplate7, HotplatePiece7Changed);
_adsManager?.Register(sPieceOnHotplate8, HotplatePiece8Changed);
_adsManager?.Register(sPieceOnHotplate9, HotplatePiece9Changed);
_adsManager?.Register(sPieceOnCoolplate1, CoolplatePiece1Changed);
_adsManager?.Register(sPieceOnCoolplate2, CoolplatePiece2Changed);
_adsManager?.Register(sPieceOnCoolplate3, CoolplatePiece3Changed);
_adsManager?.Register(sPieceOnCoolplate4, CoolplatePiece4Changed);
_adsManager?.Register(sPieceOnCoolplate5, CoolplatePiece5Changed);
_adsManager?.Register(sPieceOnCoolplate6, CoolplatePiece6Changed);
_adsManager?.Register(sPieceOnCoolplate7, CoolplatePiece7Changed);
_adsManager?.Register(sPieceOnCoolplate8, CoolplatePiece8Changed);
_adsManager?.Register(sPieceOnCoolplate9, CoolplatePiece9Changed);
}
}
}

View File

@@ -0,0 +1,482 @@
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 System.Security.Policy;
using UniperHMI.Model;
using System.Printing;
namespace UniperHMI
{
public sealed partial class KukaRobotPageVM : ObservableValidator, IDisposable
{
private readonly string? _variableName = "_adsVariable_";
private const string sStartRobotJob = "_adsVariable_kukaStartRobotJob";
private const string sAbortRobotJob = "_adsVariable_kukaAbortRobotJob";
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 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 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 BMSControlModeEntry currentControlMode;
public BMSControlModeEntry CurrentControlMode
{
get { return currentControlMode; }
set
{
currentControlMode = value;
ccmChanged();
}
}
private E_BMS_CONTROL_MODE bmsControlMode;
[ObservableProperty]
public bool canChangeRobotJob;
[ObservableProperty]
public RobotJobentry robotJobActiveValue;
[ObservableProperty]
public RobotJobentry robotJobFinishedValue;
[ObservableProperty]
public bool canStartRobotJob;
[ObservableProperty]
public HMIControlButtonVM? startButton;
[ObservableProperty]
public bool canAbortRobotJob;
[ObservableProperty]
public HMIControlButtonVM? abortButton;
private int jobGrippSide;
public int JobGrippSide
{
get { return jobGrippSide; }
set
{
jobGrippSide = value;
_adsManager?.WriteValue(sJobGrippSide, value);
}
}
[ObservableProperty]
public bool canChangeJobGrippSide;
private int jobGrippType;
public int JobGrippType
{
get { return jobGrippType; }
set
{
jobGrippType = value;
_adsManager?.WriteValue(sJobGrippType, value);
}
}
[ObservableProperty]
public bool canChangeJobGrippType;
private int chuckMagazinPlace;
public int ChuckMagazinPlace
{
get { return chuckMagazinPlace; }
set
{
chuckMagazinPlace = value;
_adsManager?.WriteValue(sChuckMagazinPlace, value);
}
}
[ObservableProperty]
public bool canChangeChuckMagazinPlace;
private double pieceThickness;
public double PieceThickness
{
get { return pieceThickness; }
set
{
pieceThickness = value;
_adsManager?.WriteValue(sPieceThickness, value);
}
}
[ObservableProperty]
public bool canChangePieceThickness;
private double offsetPick_X;
public double OffsetPick_X
{
get { return offsetPick_X; }
set
{
offsetPick_X = value;
_adsManager?.WriteValue(sOffsetPick_X, value);
}
}
private double offsetPick_Y;
public double OffsetPick_Y
{
get { return offsetPick_Y; }
set
{
offsetPick_Y = value;
_adsManager?.WriteValue(sOffsetPick_Y, value);
}
}
[ObservableProperty]
public bool canChangeOffsetPick;
private double offsetPlace_X;
public double OffsetPlace_X
{
get { return offsetPlace_X; }
set
{
offsetPlace_X = value;
_adsManager?.WriteValue(sOffsetPlace_X, value);
}
}
private double offsetPlace_Y;
public double OffsetPlace_Y
{
get { return offsetPlace_Y; }
set
{
offsetPlace_Y = value;
_adsManager?.WriteValue(sOffsetPlace_Y, value);
}
}
[ObservableProperty]
public bool canChangeOffsetPlace;
private double offsetNIOPick_X;
public double OffsetNIOPick_X
{
get { return offsetNIOPick_X; }
set
{
offsetNIOPick_X = value;
_adsManager?.WriteValue(sOffsetNIOPick_X, value);
}
}
private double offsetNIOPick_Y;
public double OffsetNIOPick_Y
{
get { return offsetNIOPick_Y; }
set
{
offsetNIOPick_Y = value;
_adsManager?.WriteValue(sOffsetNIOPick_Y, value);
}
}
[ObservableProperty]
public bool canChangeOffsetNIOPick;
private double offsetNIOPlace_X;
public double OffsetNIOPlace_X
{
get { return offsetNIOPlace_X; }
set
{
offsetNIOPlace_X = value;
_adsManager?.WriteValue(sOffsetNIOPlace_X, value);
}
}
private double offsetNIOPlace_Y;
public double OffsetNIOPlace_Y
{
get { return offsetNIOPlace_Y; }
set
{
offsetNIOPlace_Y = value;
_adsManager?.WriteValue(sOffsetNIOPlace_Y, value);
}
}
[ObservableProperty]
public bool canChangeOffsetNIOPlace;
private int hotplateIndex;
public int HotplateIndex
{
get { return hotplateIndex; }
set
{
hotplateIndex = value;
_adsManager?.WriteValue(sHotplateIndex, value);
}
}
[ObservableProperty]
public bool canChangeHotPlateIndex;
private int coolplateIndex;
public int CoolplateIndex
{
get { return coolplateIndex; }
set
{
coolplateIndex = value;
_adsManager?.WriteValue(sCoolplateIndex, value);
}
}
[ObservableProperty]
public bool canChangeCoolPlateIndex;
[ObservableProperty]
private RobotJobenum robotJob;
[ObservableProperty]
public ObservableCollection<RobotJobentry> robotJobs =
[
new RobotJobentry(RobotJobenum.NONE, " ------- "),
new RobotJobentry(RobotJobenum.PICK_TRAYFEEDER, "10 - Hole Teil von Trayfeeder 'Eingabe' "),
new RobotJobentry(RobotJobenum.PLACE_TRAYFEEDER, "11 - Lege Teil in Trayfeeder 'Ausgabe' "),
new RobotJobentry(RobotJobenum.PUT_ALIGNMENT, "15 - Lege Teil auf Ausrichtstation"),
new RobotJobentry(RobotJobenum.PICK_ALIGNMENT, "16 - Hole Teil von Ausrichtstation"),
new RobotJobentry(RobotJobenum.PUT_ETCHER_1, "20 - Lege Teil in Ätzer 1"),
new RobotJobentry(RobotJobenum.PUT_ETCHER_2, "21 - Lege Teil in Ätzer 2"),
new RobotJobentry(RobotJobenum.PICK_ETCHER_1, "22 - Hole Teil aus Ätzer 1"),
new RobotJobentry(RobotJobenum.PICK_ETCHER_2, "23 - Hole Teil aus Ätzer 2"),
new RobotJobentry(RobotJobenum.SWITCH_ETCHER_1, "24 - Tausche Teile in Ätzer 1"),
new RobotJobentry(RobotJobenum.SWITCH_ETCHER_2, "25 - Tausche Teile in Ätzer 2"),
new RobotJobentry(RobotJobenum.PUT_HVTEST_HOT, "30 - Lege Teil in HV-Teststation Warm"),
new RobotJobentry(RobotJobenum.PUT_HVTEST_COLD, "31 - Lege Teil in HV-Teststation Kalt"),
new RobotJobentry(RobotJobenum.PICK_HVTEST_HOT, "32 - Hole Teil aus HV-Teststation Warm"),
new RobotJobentry(RobotJobenum.PICK_HVTEST_COLD, "33 - Hole Teil aus HV-Teststation Kalt"),
new RobotJobentry(RobotJobenum.PUT_HOTPLATE, "40 - Lege Teil auf Heizplatte"),
new RobotJobentry(RobotJobenum.PICK_HOTPLATE, "41 - Hole Teil von Heizplatte"),
new RobotJobentry(RobotJobenum.PUT_COOLPLATE, "42 - Lege Teil auf Kühlplatte"),
new RobotJobentry(RobotJobenum.PICK_COOLPLATE, "43 - Hole Teil von Kühlplatte"),
new RobotJobentry(RobotJobenum.PICK_GRIPPER, "50 - Hole anderen Greifertyp"),
new RobotJobentry(RobotJobenum.PICK_CHUCK_ETCHER_1, "60 - Hole Drehteller aus Ätzer 1"),
new RobotJobentry(RobotJobenum.PICK_CHUCK_ETCHER_2, "61 - Hole Drehteller aus Ätzer 2"),
new RobotJobentry(RobotJobenum.PUT_CHUCK_ETCHER_1, "62 - Lege Drehteller in Ätzer 1"),
new RobotJobentry(RobotJobenum.PUT_CHUCK_ETCHER_2, "63 - Lege Drehteller in Ätzer 2"),
new RobotJobentry(RobotJobenum.PUT_CHUCK_MAGAZIN, "64 - Lege Drehteller in Magazin"),
new RobotJobentry(RobotJobenum.PICK_CHUCK_MAGAZIN, "65 - Hole Drehteller von Magazin"),
new RobotJobentry(RobotJobenum.PUT_NIO_STATION, "70 - Lege Teil auf NIO-TRAY"),
new RobotJobentry(RobotJobenum.PICK_NIO_STATION, "71 - Hole Teil von NIO-TRAY"),
new RobotJobentry(RobotJobenum.WARMUP, "80 - Aufwärmprogramm")
];
[ObservableProperty]
public ObservableCollection<PLCJobentry> pLCJobs =
[
new PLCJobentry(PLCJobenum.NONE, " ------- "),
new PLCJobentry(PLCJobenum.SCAN_QR_CODE, "10 - QR Code Scannen"),
new PLCJobentry(PLCJobenum.VACUUM_ON_ALIGNER, "15 - Vakuum Ausrichtstation einschalten"),
new PLCJobentry(PLCJobenum.VACUUM_OFF_ALIGNER, "16 - Vakuum Ausrichtstation ausschalten"),
new PLCJobentry(PLCJobenum.VACUUM_ON_ETCHER_1, "20 - Vakuum Ätzer 1 einschalten"),
new PLCJobentry(PLCJobenum.VACUUM_ON_ETCHER_2, "21 - Vakuum Ätzer 2 einschalten"),
new PLCJobentry(PLCJobenum.VACUUM_OFF_ETCHER_1, "22 - Vakuum Ätzer 1 ausschalten"),
new PLCJobentry(PLCJobenum.VACUUM_OFF_ETCHER_2, "23 - Vakuum Ätzer 2 ausschalten"),
new PLCJobentry(PLCJobenum.CHUCK_OPEN_ETCHER_1, "60 - Drehteller Ätzer 1 entriegeln"),
new PLCJobentry(PLCJobenum.CHUCK_OPEN_ETCHER_2, "61 - Drehteller Ätzer 2 entriegeln"),
new PLCJobentry(PLCJobenum.CHUCK_CLOSE_ETCHER_1, "62 - Drehteller Ätzer 1 verriegeln"),
new PLCJobentry(PLCJobenum.CHUCK_CLOSE_ETCHER_2, "63 - Drehteller Ätzer 2 verriegeln"),
];
private RobotJobentry selectedRobotJob;
public RobotJobentry SelectedRobotJob
{
get { return selectedRobotJob; }
set
{
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);
_adsManager?.WriteValue(sSelectedRobotJob, SelectedRobotJob.eJob);
}
}
[ObservableProperty]
private PLCJobentry selectedPLCJob;
private readonly IAdsManager? _adsManager;
public KukaRobotPageVM()
{
StartButton = new HMIControlButtonVM();
AbortButton = new HMIControlButtonVM();
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");
}
public KukaRobotPageVM(IAdsManager adsManager, string variableName)
{
_adsManager = adsManager;
_variableName = variableName;
StartButton = new HMIControlButtonVM(_adsManager, sStartRobotJob);
AbortButton = new HMIControlButtonVM(_adsManager, sAbortRobotJob);
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.WARMUP);
canChangeRobotJob = true;
selectedPLCJob = PLCJobs.First(i => i.eJob == PLCJobenum.NONE);
jobGrippSide = 1;
jobGrippType = 2;
canChangeJobGrippType = false;
robotJobActiveValue = RobotJobs.First(i => i.eJob == RobotJobenum.PUT_HVTEST_COLD);
robotJobFinishedValue = RobotJobs.First(i => i.eJob == RobotJobenum.PICK_HOTPLATE);
chuckMagazinPlace = 2;
canChangeChuckMagazinPlace = false;
canChangeJobGrippType = false;
pieceThickness = 2.7;
offsetPlace_X = 88;
offsetPlace_Y = 79;
offsetPick_X = 89;
offsetPick_Y = 81;
offsetNIOPick_X = 176;
offsetNIOPick_Y = 90;
offsetNIOPlace_X = 123;
offsetNIOPlace_Y = 313;
hotplateIndex = 3;
coolplateIndex = 5;
//_adsManager.Register("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
//_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
}
public void Dispose()
{
StartButton?.Dispose();
StartButton = null;
AbortButton?.Dispose();
AbortButton = null;
_adsManager?.Deregister("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
//_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
}
private void CurrentControlModeChanged(object? sender, ValueChangedEventArgs e)
{
bmsControlMode = (E_BMS_CONTROL_MODE)e.Value;
currentControlMode.eMode = bmsControlMode;
currentControlMode.Name = "Test";
ccmChanged();
}
private void ccmChanged()
{
if (currentControlMode.eMode == E_BMS_CONTROL_MODE.MANUAL)
{
CanChangeCoolPlateIndex = true;
CanChangeHotPlateIndex = true;
CanChangeOffsetNIOPick = true;
CanChangeOffsetNIOPlace = true;
CanChangeOffsetPick = true;
CanChangeOffsetPlace = true;
CanChangePieceThickness = true;
CanChangeRobotJob = true;
CanChangeJobGrippSide = true;
}
else
{
CanChangeCoolPlateIndex = false;
CanChangeHotPlateIndex = false;
CanChangeOffsetNIOPick = false;
CanChangeOffsetNIOPlace = false;
CanChangeOffsetPick = false;
CanChangeOffsetPlace = false;
CanChangePieceThickness = false;
CanChangeRobotJob = false;
CanChangeJobGrippSide = false;
}
}
[RelayCommand]
private void ClearState()
{
_adsManager?.WriteValue(sClearState, true);
}
[RelayCommand]
private void ResetState()
{
_adsManager?.WriteValue(sResetState, true);
}
[RelayCommand]
private void StartRobotJob()
{
_adsManager?.WriteValue(sStartRobotJob, true);
}
[RelayCommand]
private void AbortRobotJob()
{
_adsManager?.WriteValue(sAbortRobotJob, true);
}
}
}

View File

@@ -0,0 +1,121 @@
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 MediaCabinetPageVM : 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 MediaCabinetPageVM()
{
StartButton = new HMIControlButtonVM();
StopButton = new HMIControlButtonVM();
SelectedControlMode = ReqBMSControlModes[1];
canChangeControlMode = true;
}
public MediaCabinetPageVM(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!;
}
}
}

View File

@@ -0,0 +1,121 @@
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 NIOStationPageVM : 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 NIOStationPageVM()
{
StartButton = new HMIControlButtonVM();
StopButton = new HMIControlButtonVM();
SelectedControlMode = ReqBMSControlModes[1];
canChangeControlMode = true;
}
public NIOStationPageVM(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!;
}
}
}

View File

@@ -0,0 +1,121 @@
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 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)
{
_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!;
}
}
}

View File

@@ -0,0 +1,49 @@
<Page x:Class="UniperHMI.AlignmentStationPage"
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>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class AlignmentStationPage : Page
{
public AlignmentStationPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:UniperHMI"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
d:DesignHeight="450" d:DesignWidth="800"
d:DesignHeight="800" d:DesignWidth="1850"
Title="AutomaticModePage">
<Grid>

View File

@@ -0,0 +1,49 @@
<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 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>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class ChuckMagazinPage : Page
{
public ChuckMagazinPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -0,0 +1,49 @@
<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>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class EtchingStationPage : Page
{
public EtchingStationPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -0,0 +1,49 @@
<Page x:Class="UniperHMI.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"
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>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class HighVoltageStationPage : Page
{
public HighVoltageStationPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -0,0 +1,94 @@
<Page xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="UniperHMI.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"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
d:DesignHeight="800" d:DesignWidth="1850"
Title="HotCoolPlatePage">
<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 />
</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" />
<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}"/>
<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}"/>
<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"/>
</Grid>
</Page>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class HotCoolPlatePage : Page
{
public HotCoolPlatePage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -0,0 +1,123 @@
<Page x:Class="UniperHMI.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"
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 />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,1,4" Margin="5,5,0,5"/>
<Border Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,1,4" Margin="0,5,0,5"/>
<Border Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,1,4" Margin="0,5,0,5"/>
<Border Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,4,4" Margin="0,5,5,5"/>
<Label Grid.Row="0" Grid.Column="0" Content="Roboter Jobnummer" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" />
<ComboBox Grid.Row="0" Grid.Column="1" Margin="10,15" IsEnabled="{Binding CanChangeRobotJob}" ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding SelectedRobotJob}"/>
<Label Grid.Row="0" Grid.Column="2" Content="Roboter aktiver Job " VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" />
<ComboBox Grid.Row="0" Grid.Column="3" Margin="10,15" ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding RobotJobActiveValue}" IsReadOnly="True" IsEnabled="False" />
<ComboBox Grid.Row="0" Grid.Column="5" Margin="10,15" ItemsSource="{Binding RobotJobs}" SelectedItem="{Binding RobotJobFinishedValue}" IsReadOnly="True" IsEnabled="False"/>
<Label Grid.Row="0" Grid.Column="4" Content="Roboter Job fertig " VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" />
<Button Grid.Row="0" Grid.Column="6" Command="{Binding StartRobotJobCommand}" Content="Start" Margin="10,15,10,15" />
<Button Grid.Row="0" Grid.Column="7" Command="{Binding AbortRobotJobCommand}" Content="Abbruch" Margin="10,15,15,15" />
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4" Margin="5" />
<Label Grid.Row="1" Grid.Column="0" Content="Greiferseite für Job:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
<TextBox Grid.Row="1" Grid.Column="1" IsEnabled="{Binding CanChangeJobGrippSide}" Text="{Binding JobGrippSide}" MaxLines="1" Margin="10,15,15,15" TextAlignment="Right"/>
<Border Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4" Margin="5" />
<Label Grid.Row="1" Grid.Column="2" Content="Greifertyp:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
<TextBox Grid.Row="1" Grid.Column="3" IsEnabled="{Binding CanChangeJobGrippType}" Text="{Binding JobGrippType}" MaxLines="1" Margin="10,15,15,15" TextAlignment="Right"/>
<Border Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4" Margin="5" />
<Label Grid.Row="1" Grid.Column="4" Content="Drehteller Magazinplatz:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
<TextBox Grid.Row="1" Grid.Column="5" IsEnabled="{Binding CanChangeChuckMagazinPlace}" Text="{Binding ChuckMagazinPlace}" MaxLines="1" Margin="10,15,15,15" TextAlignment="Right"/>
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,4,4" Margin="5,5,5,5"/>
<Label Grid.Row="2" Grid.Column="0" Content="Teiledicke in mm: " VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
<TextBox Grid.Row="2" Grid.Column="1" IsEnabled="{Binding CanChangePieceThickness}" Text="{Binding PieceThickness}" MaxLines="1" Margin="10,15,15,15" TextAlignment="Right"/>
<Border Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,4,4" Margin="5,5,5,5"/>
<Label Grid.Row="3" Grid.Column="0" Content="Angefragter Sps Job :" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" />
<ComboBox Grid.Row="3" Grid.Column="1" Margin="10,15,15,15" ItemsSource="{Binding PLCJobs}" SelectedItem="{Binding SelectedPLCJob}" IsReadOnly="True" IsEnabled="False"/>
<Border Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,4,4" Margin="5,5,5,5"/>
<Label Grid.Row="4" Grid.Column="0" Content="Aktueller Status der Statemachine" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" />
<ComboBox Grid.Row="4" Grid.Column="1" Margin="10,15,15,10" ItemsSource="{Binding StatemachineStates}" SelectedItem="{Binding ActiveState}" IsReadOnly="True" />
<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="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" />
<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="6" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,4,1" Margin="5,5,5,0"/>
<Border Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,4,4" Margin="5,0,5,5"/>
<Label Grid.Row="6" Grid.Column="0" Content="Platz Heizplatte (1-9)" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,5,0,0" />
<Label Grid.Row="7" Grid.Column="0" Content="Platz Kühlplatte (1-9)" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,5"/>
<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" />
</Grid>
</Page>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class KukaRobotPage : Page
{
public KukaRobotPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -0,0 +1,49 @@
<Page x:Class="UniperHMI.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"
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>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class MediaCabinetPage : Page
{
public MediaCabinetPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -0,0 +1,49 @@
<Page x:Class="UniperHMI.NIOStationPage"
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>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class NIOStationPage : Page
{
public NIOStationPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -0,0 +1,49 @@
<Page x:Class="UniperHMI.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"
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>

View File

@@ -0,0 +1,22 @@
using System.Windows.Controls;
namespace UniperHMI
{
/// <summary>
/// Interaktionslogik für AutomaticModePage.xaml
/// </summary>
public partial class TrayFeederPage : Page
{
public TrayFeederPage()
{
InitializeComponent();
// Unloaded += OnUnloaded;
}
private void OnUnloaded(object? sender, EventArgs e)
{
var disposable = DataContext as IDisposable;
disposable?.Dispose();
}
}
}

View File

@@ -2,16 +2,17 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net8.0-windows8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
<AssemblyVersion>0.1.0</AssemblyVersion>
<FileVersion>0.1</FileVersion>
<Platforms>AnyCPU;x64</Platforms>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AdsManager" Version="1.0.0.6" />
<PackageReference Include="Beckhoff.TwinCAT.Ads" Version="6.1.197" />
<PackageReference Include="Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net" Version="2.7.11" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
@@ -20,6 +21,12 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="AdsManager">
<HintPath>bin\x64\Debug\net8.0-windows8.0\AdsManager.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Update="HMIToolkit\HMIObjects\AnalogMotorControl\AnalogMotorControl.xaml.cs">
<SubType>Code</SubType>