Push Alpha Version
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class AlignmentStationPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM vacuumValveControlVm;
|
||||
|
||||
public AlignmentStationPageVM()
|
||||
{
|
||||
VacuumValveControlVm = new BinaryValveControlVM();
|
||||
}
|
||||
|
||||
public AlignmentStationPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
VacuumValveControlVm = new BinaryValveControlVM(_adsManager, _variableName + ".stVacuumValve");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
134
uniper_hmi_old/UniperHMI/Pages/ViewModels/AutomaticModePageVM.cs
Normal file
134
uniper_hmi_old/UniperHMI/Pages/ViewModels/AutomaticModePageVM.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
using UniperHMI.Model;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
|
||||
|
||||
|
||||
public sealed partial class AutomaticModePageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private int _setpoint;
|
||||
|
||||
[Range(-40000, 40000)]
|
||||
public int Setpoint
|
||||
{
|
||||
get => this._setpoint;
|
||||
set => SetProperty(ref this._setpoint, value, true);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private int processValue;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? startButton;
|
||||
|
||||
[ObservableProperty]
|
||||
public HMIControlButtonVM? stopButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
||||
[
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
||||
];
|
||||
|
||||
[ObservableProperty]
|
||||
private BMSControlModeEntry selectedControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeControlMode;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public AutomaticModePageVM()
|
||||
{
|
||||
StartButton = new HMIControlButtonVM();
|
||||
StopButton = new HMIControlButtonVM();
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
canChangeControlMode = true;
|
||||
}
|
||||
|
||||
public AutomaticModePageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
||||
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
|
||||
|
||||
SelectedControlMode = ReqBMSControlModes[1];
|
||||
|
||||
_adsManager.Register("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
|
||||
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
Setpoint = (int)e.Value;
|
||||
}
|
||||
|
||||
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
CanChangeControlMode = (bool)e.Value;
|
||||
}
|
||||
|
||||
private void CurrentControlModeChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
BmsControlMode = (E_BMS_CONTROL_MODE)e.Value;
|
||||
SelectedControlMode.eMode = BmsControlMode;
|
||||
SelectedControlMode.Name = "Test";
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StartButton?.Dispose();
|
||||
StartButton = null;
|
||||
StopButton?.Dispose();
|
||||
StopButton = null;
|
||||
|
||||
_adsManager?.Deregister("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||
_adsManager?.Deregister("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
||||
|
||||
_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StartAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", Setpoint);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void StopAutomatic()
|
||||
{
|
||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", 0);
|
||||
Setpoint = 0;
|
||||
}
|
||||
|
||||
public static ValidationResult ValidatePower(int power, ValidationContext context)
|
||||
{
|
||||
if (power < -40000 || power > 40000)
|
||||
return new("Must be between -40.000 and +40.000");
|
||||
else
|
||||
return ValidationResult.Success!;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
public sealed partial class BatteryOverviewPageVM : ObservableObject, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private StringControlButtonVM? string1VM;
|
||||
|
||||
[ObservableProperty]
|
||||
private StringControlButtonVM? string2VM;
|
||||
|
||||
[ObservableProperty]
|
||||
private StringControlButtonVM? dummyStringVM;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public BatteryOverviewPageVM()
|
||||
{
|
||||
string1VM = new StringControlButtonVM();
|
||||
string2VM = new StringControlButtonVM();
|
||||
}
|
||||
|
||||
public BatteryOverviewPageVM(IAdsManager adsManager)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
string1VM = new StringControlButtonVM(adsManager, "GVL_SCADA.stHMIInterface[0]");
|
||||
string2VM = new StringControlButtonVM(adsManager, "GVL_SCADA.stHMIInterface[1]");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
String1VM?.Dispose();
|
||||
String1VM = null;
|
||||
|
||||
String2VM?.Dispose();
|
||||
String2VM = null;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void String1Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage("GVL_SCADA.stHMIInterface[0]", typeof(StringOverviewPage), "String 1"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void String2Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage("GVL_SCADA.stHMIInterface[1]", typeof(StringOverviewPage), "String 2"));
|
||||
}
|
||||
}
|
||||
}
|
||||
140
uniper_hmi_old/UniperHMI/Pages/ViewModels/ChuckMagazinPageVM.cs
Normal file
140
uniper_hmi_old/UniperHMI/Pages/ViewModels/ChuckMagazinPageVM.cs
Normal file
@@ -0,0 +1,140 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using HMIToolkit;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Windows;
|
||||
using TwinCAT.TypeSystem;
|
||||
using UniperHMI.Model;
|
||||
namespace UniperHMI
|
||||
{
|
||||
public sealed partial class ChuckMagazinPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
private const string sChuckOnPlace1 = "_adsVariable_MagazinPlace1";
|
||||
private const string sChuckOnPlace2 = "_adsVariable_MagazinPlace2";
|
||||
private const string sChuckOnPlace3 = "_adsVariable_MagazinPlace3";
|
||||
private const string sChuckOnPlace4 = "_adsVariable_MagazinPlace4";
|
||||
private const string sChuckOnPlace5 = "_adsVariable_MagazinPlace5";
|
||||
private const string sChuckOnPlace6 = "_adsVariable_MagazinPlace6";
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace1;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace2;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace3;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace4;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace5;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace6;
|
||||
|
||||
public ChuckMagazinPageVM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ChuckMagazinPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
_adsManager.Register(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||
_adsManager.Register(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||
_adsManager.Register(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||
_adsManager.Register(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||
_adsManager.Register(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||
_adsManager.Register(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||
|
||||
}
|
||||
|
||||
private void ChuckOnPlace1Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace1 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace1 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace2Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace2 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace2 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace3Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace3 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace3 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace4Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace4 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace4 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace5Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace5 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace5 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace6Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace6 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace6 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_adsManager?.Deregister(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
|
||||
public sealed partial class EtchingStation1PageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM vacuumValveControlEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM doorValveControlEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveLeftEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveRightEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveFrontEtching1Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveBackEtching1Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckUnlockCmdButtonEtching1Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckLockCmdButtonEtching1Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckEjectCmdButtonEtching1Vm;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public EtchingStation1PageVM()
|
||||
{
|
||||
VacuumValveControlEtching1Vm = new BinaryValveControlVM();
|
||||
DoorValveControlEtching1Vm = new BinaryValveControlVM();
|
||||
ChuckUnlockValveLeftEtching1Vm = new BinaryValveControlVM();
|
||||
ChuckUnlockValveRightEtching1Vm = new BinaryValveControlVM();
|
||||
ChuckEjectValveFrontEtching1Vm = new BinaryValveControlVM();
|
||||
ChuckEjectValveBackEtching1Vm = new BinaryValveControlVM();
|
||||
|
||||
ChuckUnlockCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||
ChuckLockCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||
ChuckEjectCmdButtonEtching1Vm = new HMIControlButtonVM();
|
||||
|
||||
}
|
||||
|
||||
public EtchingStation1PageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
VacuumValveControlEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stVacuumValve");
|
||||
DoorValveControlEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stDoorValve");
|
||||
ChuckUnlockValveLeftEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockLeft");
|
||||
ChuckUnlockValveRightEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockRight");
|
||||
ChuckEjectValveFrontEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectFront");
|
||||
ChuckEjectValveBackEtching1Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectBack");
|
||||
|
||||
ChuckUnlockCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckUnlockCmd");
|
||||
ChuckLockCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckLockCmd");
|
||||
ChuckEjectCmdButtonEtching1Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher1.stChuckEjectCmd");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
VacuumValveControlEtching1Vm.Dispose();
|
||||
DoorValveControlEtching1Vm.Dispose();
|
||||
ChuckUnlockValveLeftEtching1Vm.Dispose();
|
||||
ChuckUnlockValveRightEtching1Vm.Dispose();
|
||||
ChuckEjectValveFrontEtching1Vm.Dispose();
|
||||
ChuckEjectValveBackEtching1Vm.Dispose();
|
||||
ChuckUnlockCmdButtonEtching1Vm?.Dispose();
|
||||
ChuckUnlockCmdButtonEtching1Vm = null;
|
||||
ChuckLockCmdButtonEtching1Vm?.Dispose();
|
||||
ChuckLockCmdButtonEtching1Vm = null;
|
||||
ChuckLockCmdButtonEtching1Vm?.Dispose();
|
||||
ChuckEjectCmdButtonEtching1Vm = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
|
||||
public sealed partial class EtchingStation2PageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM vacuumValveControlEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM doorValveControlEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveLeftEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckUnlockValveRightEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveFrontEtching2Vm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM chuckEjectValveBackEtching2Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckUnlockCmdButtonEtching2Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckLockCmdButtonEtching2Vm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? chuckEjectCmdButtonEtching2Vm;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public EtchingStation2PageVM()
|
||||
{
|
||||
|
||||
|
||||
VacuumValveControlEtching2Vm = new BinaryValveControlVM();
|
||||
DoorValveControlEtching2Vm = new BinaryValveControlVM();
|
||||
ChuckUnlockValveLeftEtching2Vm = new BinaryValveControlVM();
|
||||
ChuckUnlockValveRightEtching2Vm = new BinaryValveControlVM();
|
||||
ChuckEjectValveFrontEtching2Vm = new BinaryValveControlVM();
|
||||
ChuckEjectValveBackEtching2Vm = new BinaryValveControlVM();
|
||||
|
||||
ChuckUnlockCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||
ChuckLockCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||
ChuckEjectCmdButtonEtching2Vm = new HMIControlButtonVM();
|
||||
}
|
||||
|
||||
public EtchingStation2PageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
|
||||
VacuumValveControlEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stVacuumValve");
|
||||
DoorValveControlEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stDoorValve");
|
||||
ChuckUnlockValveLeftEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockLeft");
|
||||
ChuckUnlockValveRightEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockRight");
|
||||
ChuckEjectValveFrontEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectFront");
|
||||
ChuckEjectValveBackEtching2Vm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectBack");
|
||||
|
||||
ChuckUnlockCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckUnlockCmd");
|
||||
ChuckLockCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckLockCmd");
|
||||
ChuckEjectCmdButtonEtching2Vm = new HMIControlButtonVM(_adsManager, "GVL_SCADA.stMachine.stEtcher2.stChuckEjectCmd");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
VacuumValveControlEtching2Vm.Dispose();
|
||||
DoorValveControlEtching2Vm.Dispose();
|
||||
ChuckUnlockValveLeftEtching2Vm.Dispose();
|
||||
ChuckUnlockValveRightEtching2Vm.Dispose();
|
||||
ChuckEjectValveFrontEtching2Vm.Dispose();
|
||||
ChuckEjectValveBackEtching2Vm.Dispose();
|
||||
ChuckUnlockCmdButtonEtching2Vm?.Dispose();
|
||||
ChuckUnlockCmdButtonEtching2Vm = null;
|
||||
ChuckLockCmdButtonEtching2Vm?.Dispose();
|
||||
ChuckLockCmdButtonEtching2Vm = null;
|
||||
ChuckLockCmdButtonEtching2Vm?.Dispose();
|
||||
ChuckEjectCmdButtonEtching2Vm = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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!;
|
||||
}
|
||||
}
|
||||
}
|
||||
114
uniper_hmi_old/UniperHMI/Pages/ViewModels/EventsPageVM.cs
Normal file
114
uniper_hmi_old/UniperHMI/Pages/ViewModels/EventsPageVM.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
using TcEventLoggerAdsProxyLib;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public partial class EventData : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
public uint id;
|
||||
|
||||
[ObservableProperty]
|
||||
public string? message;
|
||||
|
||||
[ObservableProperty]
|
||||
public DateTime raised;
|
||||
|
||||
[ObservableProperty]
|
||||
public DateTime cleared;
|
||||
|
||||
[ObservableProperty]
|
||||
public DateTime confirmed;
|
||||
};
|
||||
|
||||
public sealed partial class EventsPageVM : ObservableObject
|
||||
{
|
||||
public ObservableCollection<EventData> CurrentEvents { get; private set; } = [];
|
||||
private readonly object _lock = new();
|
||||
|
||||
private readonly TcEventLogger _logger;
|
||||
|
||||
[ObservableProperty]
|
||||
private EventData? currentEvent;
|
||||
|
||||
// 599264352000000000 ticks is a date used by beckhoff for events that didnt happen up to this point
|
||||
private const long NoTime = 599264352000000000;
|
||||
|
||||
|
||||
public EventsPageVM(TcEventLogger logger)
|
||||
{
|
||||
_logger = logger;
|
||||
|
||||
_logger.AlarmRaised += SimpleAlarmRaisedEvent;
|
||||
_logger.AlarmCleared += SimpleAlarmClearedEvent;
|
||||
_logger.AlarmConfirmed += SimpleConfirmedAlarmEvent;
|
||||
|
||||
#if DEBUG
|
||||
|
||||
#else
|
||||
|
||||
_logger.Connect("10.103.32.50.1.1");
|
||||
#endif
|
||||
|
||||
GetAllActiveEvents();
|
||||
}
|
||||
|
||||
private void RebuildCurrentEventsList()
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
CurrentEvents.Clear();
|
||||
}
|
||||
|
||||
GetAllActiveEvents();
|
||||
}
|
||||
|
||||
private void SimpleConfirmedAlarmEvent(TcAlarm alarm, bool remove)
|
||||
{
|
||||
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
||||
}
|
||||
|
||||
private void SimpleAlarmClearedEvent(TcAlarm alarm, bool remove)
|
||||
{
|
||||
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
||||
}
|
||||
|
||||
private void SimpleAlarmRaisedEvent(TcAlarm alarm)
|
||||
{
|
||||
Application.Current.Dispatcher.BeginInvoke(RebuildCurrentEventsList);
|
||||
}
|
||||
|
||||
private void GetAllActiveEvents()
|
||||
{
|
||||
EventData eventData;
|
||||
List<EventData> tempEventList = [];
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
foreach (var alarm in _logger.ActiveAlarms)
|
||||
{
|
||||
eventData = new()
|
||||
{
|
||||
Id = alarm.EventId,
|
||||
Message = alarm.GetText(1033),
|
||||
Raised = alarm.TimeRaised,
|
||||
Cleared = alarm.TimeCleared,
|
||||
Confirmed = alarm.TimeConfirmed
|
||||
};
|
||||
|
||||
tempEventList.Add(eventData);
|
||||
}
|
||||
|
||||
IEnumerable<EventData> _eventQuery =
|
||||
from data in tempEventList
|
||||
orderby data.Raised descending
|
||||
select data;
|
||||
|
||||
CurrentEvent = _eventQuery.FirstOrDefault();
|
||||
CurrentEvents = new ObservableCollection<EventData>(_eventQuery);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class HighVoltageStationPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM doorValveHotControlVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM testChamberHotValveVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private AnalogValueVM tempSPHotVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM doorValveColdControlVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private BinaryValveControlVM testChamberColdValveVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private AnalogValueVM tempSPColdVm;
|
||||
|
||||
public HighVoltageStationPageVM()
|
||||
{
|
||||
DoorValveHotControlVm = new BinaryValveControlVM();
|
||||
TestChamberHotValveVm = new BinaryValveControlVM();
|
||||
TempSPHotVm = new AnalogValueVM();
|
||||
|
||||
DoorValveColdControlVm = new BinaryValveControlVM();
|
||||
TestChamberColdValveVm = new BinaryValveControlVM();
|
||||
TempSPColdVm = new AnalogValueVM();
|
||||
}
|
||||
|
||||
public HighVoltageStationPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
DoorValveHotControlVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stDoorValve");
|
||||
TestChamberHotValveVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stTestChamberValve");
|
||||
TempSPHotVm = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterHot.stTempSP", false);
|
||||
|
||||
DoorValveColdControlVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stDoorValve");
|
||||
TestChamberColdValveVm = new BinaryValveControlVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stTestChamberValve");
|
||||
TempSPColdVm = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHVTesterCold.stTempSP", false);
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
DoorValveHotControlVm.Dispose();
|
||||
TestChamberHotValveVm.Dispose();
|
||||
TempSPHotVm.Dispose();
|
||||
DoorValveColdControlVm.Dispose();
|
||||
TestChamberColdValveVm.Dispose();
|
||||
TempSPColdVm.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
408
uniper_hmi_old/UniperHMI/Pages/ViewModels/HotCoolPlatePageVM.cs
Normal file
408
uniper_hmi_old/UniperHMI/Pages/ViewModels/HotCoolPlatePageVM.cs
Normal file
@@ -0,0 +1,408 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
using System.Windows;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class HotCoolPlatePageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
private const string sPieceOnHotplate1 = ".stHotplate.stPiece1";
|
||||
private const string sPieceOnHotplate2 = ".stHotplate.stPiece2";
|
||||
private const string sPieceOnHotplate3 = ".stHotplate.stPiece3";
|
||||
private const string sPieceOnHotplate4 = ".stHotplate.stPiece4";
|
||||
private const string sPieceOnHotplate5 = ".stHotplate.stPiece5";
|
||||
private const string sPieceOnHotplate6 = ".stHotplate.stPiece6";
|
||||
private const string sPieceOnHotplate7 = ".stHotplate.stPiece7";
|
||||
private const string sPieceOnHotplate8 = ".stHotplate.stPiece8";
|
||||
private const string sPieceOnHotplate9 = ".stHotplate.stPiece9";
|
||||
|
||||
private const string sPieceOnCoolplate1 = ".stCoolplate.stPiece1";
|
||||
private const string sPieceOnCoolplate2 = ".stCoolplate.stPiece2";
|
||||
private const string sPieceOnCoolplate3 = ".stCoolplate.stPiece3";
|
||||
private const string sPieceOnCoolplate4 = ".stCoolplate.stPiece4";
|
||||
private const string sPieceOnCoolplate5 = ".stCoolplate.stPiece5";
|
||||
private const string sPieceOnCoolplate6 = ".stCoolplate.stPiece6";
|
||||
private const string sPieceOnCoolplate7 = ".stCoolplate.stPiece7";
|
||||
private const string sPieceOnCoolplate8 = ".stCoolplate.stPiece8";
|
||||
private const string sPieceOnCoolplate9 = ".stCoolplate.stPiece9";
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
[ObservableProperty]
|
||||
private AnalogValueVM hotPlateTargetTemperature;
|
||||
|
||||
[ObservableProperty]
|
||||
private AnalogValueVM hotPlateActualTemperature;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? enableHotPlateButtonVm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? disableHotPlateButtonVm;
|
||||
|
||||
[ObservableProperty]
|
||||
private AnalogValueVM coolPlateTargetTemperature;
|
||||
|
||||
[ObservableProperty]
|
||||
private AnalogValueVM coolPlateActualTemperature;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? enableCoolPlateButtonVm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM? disableCoolPlateButtonVm;
|
||||
|
||||
[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()
|
||||
{
|
||||
EnableHotPlateButtonVm = new HMIControlButtonVM();
|
||||
DisableHotPlateButtonVm = new HMIControlButtonVM();
|
||||
|
||||
EnableCoolPlateButtonVm = new HMIControlButtonVM();
|
||||
DisableCoolPlateButtonVm = new HMIControlButtonVM();
|
||||
|
||||
HotPlateActualTemperature = new AnalogValueVM();
|
||||
HotPlateTargetTemperature = new AnalogValueVM();
|
||||
|
||||
CoolPlateActualTemperature = new AnalogValueVM();
|
||||
CoolPlateTargetTemperature = new AnalogValueVM();
|
||||
|
||||
|
||||
}
|
||||
public HotCoolPlatePageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
EnableHotPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stHotplate.stEnableBtn");
|
||||
DisableHotPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stHotplate.stDisableBtn");
|
||||
|
||||
EnableCoolPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stCoolplate.stEnableBtn");
|
||||
DisableCoolPlateButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stCoolplate.stDisableBtn");
|
||||
|
||||
HotPlateActualTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHotplate.stPV", true);
|
||||
CoolPlateActualTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stCoolplate.stPV", true);
|
||||
|
||||
HotPlateTargetTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stHotplate.stSetpoint", false);
|
||||
CoolPlateTargetTemperature = new AnalogValueVM(_adsManager, "GVL_SCADA.stMachine.stCoolplate.stSetpoint", false);
|
||||
|
||||
_adsManager.Register(sPieceOnHotplate1, HotplatePiece1Changed);
|
||||
_adsManager.Register(sPieceOnHotplate2, HotplatePiece2Changed);
|
||||
_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 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()
|
||||
{
|
||||
HotPlateActualTemperature.Dispose();
|
||||
HotPlateTargetTemperature.Dispose();
|
||||
CoolPlateActualTemperature.Dispose();
|
||||
CoolPlateTargetTemperature.Dispose();
|
||||
|
||||
EnableCoolPlateButtonVm?.Dispose();
|
||||
EnableCoolPlateButtonVm = null;
|
||||
EnableHotPlateButtonVm?.Dispose();
|
||||
EnableHotPlateButtonVm = null;
|
||||
DisableCoolPlateButtonVm?.Dispose();
|
||||
DisableCoolPlateButtonVm = null;
|
||||
DisableHotPlateButtonVm?.Dispose();
|
||||
DisableHotPlateButtonVm = null;
|
||||
_adsManager?.Deregister(sPieceOnHotplate1, HotplatePiece1Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate2, HotplatePiece2Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate3, HotplatePiece3Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate4, HotplatePiece4Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate5, HotplatePiece5Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate6, HotplatePiece6Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate7, HotplatePiece7Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate8, HotplatePiece8Changed);
|
||||
_adsManager?.Deregister(sPieceOnHotplate9, HotplatePiece9Changed);
|
||||
|
||||
_adsManager?.Deregister(sPieceOnCoolplate1, CoolplatePiece1Changed);
|
||||
_adsManager?.Deregister(sPieceOnCoolplate2, CoolplatePiece2Changed);
|
||||
_adsManager?.Deregister(sPieceOnCoolplate3, CoolplatePiece3Changed);
|
||||
_adsManager?.Deregister(sPieceOnCoolplate4, CoolplatePiece4Changed);
|
||||
_adsManager?.Deregister(sPieceOnCoolplate5, CoolplatePiece5Changed);
|
||||
_adsManager?.Deregister(sPieceOnCoolplate6, CoolplatePiece6Changed);
|
||||
_adsManager?.Deregister(sPieceOnCoolplate7, CoolplatePiece7Changed);
|
||||
_adsManager?.Deregister(sPieceOnCoolplate8, CoolplatePiece8Changed);
|
||||
_adsManager?.Deregister(sPieceOnCoolplate9, CoolplatePiece9Changed);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
677
uniper_hmi_old/UniperHMI/Pages/ViewModels/KukaRobotPageVM.cs
Normal file
677
uniper_hmi_old/UniperHMI/Pages/ViewModels/KukaRobotPageVM.cs
Normal file
@@ -0,0 +1,677 @@
|
||||
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 System.Printing;
|
||||
using System.Windows;
|
||||
using InfineonHMI.Model;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
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 = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byPlaceOnCoolPlate";
|
||||
private const string sHotplateIndex = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byPlaceOnHotPlate";
|
||||
private const string sPieceThickness = "_adsVariable_kukaPieceThickness";
|
||||
private const string sJobGrippSide = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byGripperNumber";
|
||||
private const string sJobGrippType = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byGripperNumber";
|
||||
private const string sChuckMagazinPlace = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.byChuckNumber";
|
||||
private const string sSelectedRobotJob = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.eJob";
|
||||
private const string sActiveRobotJob = "_adsVariable_kukaActiveRobotJob";
|
||||
private const string sFinishedRobotJob = "_adsVariable_kukaFinishedRobotJob";
|
||||
private const string sSelectedPLCJob = "_adsVariable_kukaPLCJob";
|
||||
private const string sOffsetPick_X = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosX";
|
||||
private const string sOffsetPick_Y = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosY";
|
||||
private const string sOffsetPlace_X = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosX";
|
||||
private const string sOffsetPlace_Y = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosY";
|
||||
private const string sOffsetNIOPick_X = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosX";
|
||||
private const string sOffsetNIOPick_Y = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosY";
|
||||
private const string sOffsetNIOPlace_X = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosX";
|
||||
private const string sOffsetNIOPlace_Y = "GVL_SCADA.stMachine.stKukaRobot.stJobParams.rPosY";
|
||||
|
||||
|
||||
private BMSControlModeEntry currentControlMode;
|
||||
public BMSControlModeEntry CurrentControlMode
|
||||
{
|
||||
get { return currentControlMode; }
|
||||
set
|
||||
{
|
||||
currentControlMode = value;
|
||||
ccmChanged();
|
||||
}
|
||||
}
|
||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeRobotJob;
|
||||
|
||||
[ObservableProperty]
|
||||
private RobotJobentry robotJobActiveValue;
|
||||
|
||||
[ObservableProperty]
|
||||
private RobotJobentry robotJobFinishedValue;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canStartRobotJob;
|
||||
|
||||
[ObservableProperty]
|
||||
private HMIControlButtonVM? startButton;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canAbortRobotJob;
|
||||
|
||||
[ObservableProperty]
|
||||
private HMIControlButtonVM? abortButton;
|
||||
|
||||
private const string sChuckOnPlace1 = "_adsVariable_MagazinPlace1";
|
||||
private const string sChuckOnPlace2 = "_adsVariable_MagazinPlace2";
|
||||
private const string sChuckOnPlace3 = "_adsVariable_MagazinPlace3";
|
||||
private const string sChuckOnPlace4 = "_adsVariable_MagazinPlace4";
|
||||
private const string sChuckOnPlace5 = "_adsVariable_MagazinPlace5";
|
||||
private const string sChuckOnPlace6 = "_adsVariable_MagazinPlace6";
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace1;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace2;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace3;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace4;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace5;
|
||||
|
||||
[ObservableProperty]
|
||||
private Visibility magazinPlace6;
|
||||
|
||||
private int jobGrippSide;
|
||||
public int JobGrippSide
|
||||
{
|
||||
get { return jobGrippSide; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref jobGrippSide, value);
|
||||
_adsManager?.WriteValue(sJobGrippSide, value);
|
||||
}
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeJobGrippSide;
|
||||
|
||||
|
||||
private int jobGrippType;
|
||||
public int JobGrippType
|
||||
{
|
||||
get { return jobGrippType; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref jobGrippType, value);
|
||||
_adsManager?.WriteValue(sJobGrippType, value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeJobGrippType;
|
||||
|
||||
|
||||
private int chuckMagazinPlace;
|
||||
public int ChuckMagazinPlace
|
||||
{
|
||||
get { return chuckMagazinPlace; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref chuckMagazinPlace, value);
|
||||
_adsManager?.WriteValue(sChuckMagazinPlace, value);
|
||||
}
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeChuckMagazinPlace;
|
||||
|
||||
|
||||
private double pieceThickness;
|
||||
public double PieceThickness
|
||||
{
|
||||
get { return pieceThickness; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref pieceThickness, value);
|
||||
_adsManager?.WriteValue(sPieceThickness, value);
|
||||
}
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangePieceThickness;
|
||||
|
||||
|
||||
private double offsetPick_X;
|
||||
public double OffsetPick_X
|
||||
{
|
||||
get { return offsetPick_X; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref offsetPick_X, value);
|
||||
_adsManager?.WriteValue(sOffsetPick_X, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private double offsetPick_Y;
|
||||
public double OffsetPick_Y
|
||||
{
|
||||
get { return offsetPick_Y; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref offsetPick_Y, value);
|
||||
_adsManager?.WriteValue(sOffsetPick_Y, value);
|
||||
}
|
||||
}
|
||||
[ObservableProperty]
|
||||
private bool canChangeOffsetPick;
|
||||
|
||||
|
||||
private double offsetPlace_X;
|
||||
public double OffsetPlace_X
|
||||
{
|
||||
get { return offsetPlace_X; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref offsetPlace_X, value);
|
||||
_adsManager?.WriteValue(sOffsetPlace_X, value);
|
||||
}
|
||||
}
|
||||
|
||||
private double offsetPlace_Y;
|
||||
public double OffsetPlace_Y
|
||||
{
|
||||
get { return offsetPlace_Y; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref offsetPlace_Y, value);
|
||||
_adsManager?.WriteValue(sOffsetPlace_Y, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeOffsetPlace;
|
||||
|
||||
|
||||
private double offsetNIOPick_X;
|
||||
public double OffsetNIOPick_X
|
||||
{
|
||||
get { return offsetNIOPick_X; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref offsetNIOPick_X, value);
|
||||
_adsManager?.WriteValue(sOffsetNIOPick_X, value);
|
||||
}
|
||||
}
|
||||
|
||||
private double offsetNIOPick_Y;
|
||||
public double OffsetNIOPick_Y
|
||||
{
|
||||
get { return offsetNIOPick_Y; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref offsetNIOPick_Y, value);
|
||||
_adsManager?.WriteValue(sOffsetNIOPick_Y, value);
|
||||
}
|
||||
}
|
||||
[ObservableProperty]
|
||||
private bool canChangeOffsetNIOPick;
|
||||
|
||||
|
||||
private double offsetNIOPlace_X;
|
||||
public double OffsetNIOPlace_X
|
||||
{
|
||||
get { return offsetNIOPlace_X; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref offsetNIOPlace_X, value);
|
||||
_adsManager?.WriteValue(sOffsetNIOPlace_X, value);
|
||||
}
|
||||
}
|
||||
|
||||
private double offsetNIOPlace_Y;
|
||||
public double OffsetNIOPlace_Y
|
||||
{
|
||||
get { return offsetNIOPlace_Y; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref offsetNIOPlace_Y, value);
|
||||
_adsManager?.WriteValue(sOffsetNIOPlace_Y, value);
|
||||
}
|
||||
}
|
||||
[ObservableProperty]
|
||||
private bool canChangeOffsetNIOPlace;
|
||||
|
||||
|
||||
private int hotplateIndex;
|
||||
public int HotplateIndex
|
||||
{
|
||||
get { return hotplateIndex; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref hotplateIndex, value);
|
||||
_adsManager?.WriteValue(sHotplateIndex, value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
[ObservableProperty]
|
||||
private bool canChangeHotPlateIndex;
|
||||
|
||||
|
||||
private int coolplateIndex;
|
||||
public int CoolplateIndex
|
||||
{
|
||||
get { return coolplateIndex; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref coolplateIndex, value);
|
||||
_adsManager?.WriteValue(sCoolplateIndex, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canChangeCoolPlateIndex;
|
||||
|
||||
[ObservableProperty]
|
||||
private RobotJobenum robotJob;
|
||||
|
||||
[ObservableProperty]
|
||||
private 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]
|
||||
private 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
|
||||
{
|
||||
SetProperty(ref selectedRobotJob, value);
|
||||
CanChangeChuckMagazinPlace = (value == RobotJobs.First(i => i.eJob == RobotJobenum.PICK_CHUCK_MAGAZIN))
|
||||
|| (value == RobotJobs.First(i => i.eJob == RobotJobenum.PUT_CHUCK_MAGAZIN));
|
||||
CanChangeJobGrippType = value == RobotJobs.First(i => i.eJob == RobotJobenum.PICK_GRIPPER);
|
||||
|
||||
_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);
|
||||
selectedPLCJob = PLCJobs.First(i => i.eJob == PLCJobenum.NONE);
|
||||
|
||||
canChangeRobotJob = true;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.NONE);
|
||||
robotJobActiveValue = RobotJobs.First(i => i.eJob == RobotJobenum.NONE);
|
||||
robotJobFinishedValue = RobotJobs.First(i => i.eJob == RobotJobenum.NONE);
|
||||
selectedPLCJob = PLCJobs.First(i => i.eJob == PLCJobenum.NONE);
|
||||
|
||||
_adsManager.Register(sJobGrippSide, OnJobGrippSideValueChanged);
|
||||
_adsManager.Register(sJobGrippType, OnJobGrippTypeValueChanged);
|
||||
_adsManager.Register(sChuckMagazinPlace, OnChuckMagazinPlaceValueChanged);
|
||||
_adsManager.Register(sPieceThickness, OnPieceThicknessValueChanged);
|
||||
_adsManager.Register(sSelectedPLCJob, OnSelectedPLCJobValueChanged);
|
||||
_adsManager.Register(sSelectedRobotJob, OnSelectedRobotJobValueChanged);
|
||||
_adsManager.Register(sActiveRobotJob, OnActiveRobotJobValueChanged);
|
||||
_adsManager.Register(sFinishedRobotJob, OnFinishedRobotJobValueChanged);
|
||||
_adsManager.Register(sOffsetPick_X, OnOffsetPickXValueChanged);
|
||||
_adsManager.Register(sOffsetPick_Y, OnOffsetPickYValueChanged);
|
||||
_adsManager.Register(sCoolplateIndex, OnCoolPlateIndexValueChanged);
|
||||
_adsManager.Register(sHotplateIndex, OnHotPlateIndexValueChanged);
|
||||
_adsManager.Register(sOffsetNIOPlace_Y, OnOffsetNIOPlaceYValueChanged);
|
||||
_adsManager.Register(sOffsetNIOPlace_X, OnOffsetNIOPlaceXValueChanged);
|
||||
_adsManager.Register(sOffsetNIOPick_Y, OnOffsetNIOPickYValueChanged);
|
||||
_adsManager.Register(sOffsetNIOPick_X, OnOffsetNIOPickXValueChanged);
|
||||
_adsManager.Register(sOffsetPlace_Y, OnOffsetPlaceYValueChanged);
|
||||
_adsManager.Register(sOffsetPlace_X, OnOffsetPlaceXValueChanged);
|
||||
|
||||
_adsManager.Register(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||
_adsManager.Register(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||
_adsManager.Register(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||
_adsManager.Register(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||
_adsManager.Register(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||
_adsManager.Register(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||
|
||||
canChangeRobotJob = true;
|
||||
canChangeJobGrippType = false;
|
||||
|
||||
canChangeChuckMagazinPlace = false;
|
||||
canChangeJobGrippType = false;
|
||||
|
||||
_adsManager.Register("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||
|
||||
}
|
||||
|
||||
private void OnJobGrippSideValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
JobGrippSide = (byte)e.Value;
|
||||
}
|
||||
private void OnJobGrippTypeValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
JobGrippType = (byte)e.Value;
|
||||
}
|
||||
private void OnChuckMagazinPlaceValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
ChuckMagazinPlace = (byte)e.Value;
|
||||
}
|
||||
private void OnPieceThicknessValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
PieceThickness = (int)e.Value;
|
||||
}
|
||||
private void OnSelectedPLCJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
SelectedPLCJob = PLCJobs.First(i => (ushort)i.eJob == (ushort)e.Value);
|
||||
}
|
||||
private void OnSelectedRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
SelectedRobotJob = RobotJobs.First(i => (ushort)i.eJob == (ushort)e.Value);
|
||||
}
|
||||
private void OnActiveRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
RobotJobActiveValue = RobotJobs.First(i => (ushort)i.eJob == (ushort)e.Value);
|
||||
}
|
||||
private void OnFinishedRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
RobotJobFinishedValue = RobotJobs.First(i => (ushort)i.eJob == (ushort)e.Value);
|
||||
}
|
||||
private void OnHotPlateIndexValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
HotplateIndex = (byte)e.Value;
|
||||
}
|
||||
private void OnCoolPlateIndexValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
CoolplateIndex = (byte)e.Value;
|
||||
}
|
||||
private void OnOffsetPickXValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetPick_X = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetPickYValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetPick_Y = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetPlaceXValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetPlace_X = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetPlaceYValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetPlace_Y = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetNIOPickXValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetNIOPick_X = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetNIOPickYValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetNIOPick_Y = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetNIOPlaceXValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetNIOPlace_X = (float)e.Value;
|
||||
}
|
||||
private void OnOffsetNIOPlaceYValueChanged(object sender, ValueChangedEventArgs e)
|
||||
{
|
||||
OffsetNIOPlace_Y = (float)e.Value;
|
||||
}
|
||||
|
||||
private void ChuckOnPlace1Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace1 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace1 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace2Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace2 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace2 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace3Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace3 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace3 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace4Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace4 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace4 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace5Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace5 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace5 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
private void ChuckOnPlace6Changed(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if ((bool)e.Value)
|
||||
{
|
||||
MagazinPlace6 = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
MagazinPlace6 = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StartButton?.Dispose();
|
||||
StartButton = null;
|
||||
AbortButton?.Dispose();
|
||||
AbortButton = null;
|
||||
|
||||
_adsManager?.Deregister(sJobGrippSide, OnJobGrippSideValueChanged);
|
||||
_adsManager?.Deregister(sJobGrippType, OnJobGrippTypeValueChanged);
|
||||
_adsManager?.Deregister(sChuckMagazinPlace, OnChuckMagazinPlaceValueChanged);
|
||||
_adsManager?.Deregister(sPieceThickness, OnPieceThicknessValueChanged);
|
||||
_adsManager?.Deregister(sSelectedPLCJob, OnSelectedPLCJobValueChanged);
|
||||
_adsManager?.Deregister(sSelectedRobotJob, OnSelectedRobotJobValueChanged);
|
||||
_adsManager?.Deregister(sActiveRobotJob, OnActiveRobotJobValueChanged);
|
||||
_adsManager?.Deregister(sFinishedRobotJob, OnFinishedRobotJobValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPick_X, OnOffsetPickXValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPick_Y, OnOffsetPickYValueChanged);
|
||||
_adsManager?.Deregister(sCoolplateIndex, OnCoolPlateIndexValueChanged);
|
||||
_adsManager?.Deregister(sHotplateIndex, OnHotPlateIndexValueChanged);
|
||||
_adsManager?.Deregister(sOffsetNIOPlace_Y, OnOffsetNIOPlaceYValueChanged);
|
||||
_adsManager?.Deregister(sOffsetNIOPlace_X, OnOffsetNIOPlaceXValueChanged);
|
||||
_adsManager?.Deregister(sOffsetNIOPick_Y, OnOffsetNIOPickYValueChanged);
|
||||
_adsManager?.Deregister(sOffsetNIOPick_X, OnOffsetNIOPickXValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPlace_Y, OnOffsetPlaceYValueChanged);
|
||||
_adsManager?.Deregister(sOffsetPlace_X, OnOffsetPlaceXValueChanged);
|
||||
|
||||
_adsManager?.Deregister(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||
_adsManager?.Deregister(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||
|
||||
_adsManager?.Deregister("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,300 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using TcEventLoggerAdsProxyLib;
|
||||
|
||||
namespace InfineonHMI;
|
||||
|
||||
public sealed partial class MachineOverviewPageVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty] private StringControlButtonVM dummyStringVM;
|
||||
|
||||
[ObservableProperty] private Page currentDetailPage;
|
||||
|
||||
|
||||
|
||||
private readonly IAdsManager _adsManager;
|
||||
private readonly IConfiguration _config;
|
||||
|
||||
|
||||
// Last active event
|
||||
[ObservableProperty] private string currentActiveEvent = "";
|
||||
|
||||
// Empty page
|
||||
private readonly Page _emptyPage;
|
||||
|
||||
// Last navigate message
|
||||
private readonly Stack<NavigateMessage> _messageStack = new();
|
||||
NavigateMessage? _currentMessage;
|
||||
|
||||
// Hot Coolplate page view model
|
||||
HotCoolPlatePageVM? _hotCoolplatePageVM;
|
||||
|
||||
AlignmentStationPageVM? _alignmentStationPageVM;
|
||||
|
||||
EtchingStation1PageVM? _etchingStation1PageVm;
|
||||
|
||||
EtchingStation2PageVM? _etchingStation2PageVm;
|
||||
|
||||
HighVoltageStationPageVM? _highVoltageStationPageVm;
|
||||
|
||||
MediaCabinetPageVM? _mediaCabinetPageVM;
|
||||
|
||||
NIOStationPageVM? _nioStationPageVm;
|
||||
|
||||
TrayFeederPageVM? _trayFeederPageVm;
|
||||
|
||||
private ProductionOverviewPageVM? _prodVM;
|
||||
|
||||
private MainWindowVM _mainVm;
|
||||
|
||||
// Kuka Robot page view model
|
||||
KukaRobotPageVM? _kukaRobotPageVM;
|
||||
|
||||
public MachineOverviewPageVM()
|
||||
{
|
||||
// default ctor
|
||||
}
|
||||
public MachineOverviewPageVM(IAdsManager adsManager, IConfiguration config,MainWindowVM mainVm, ProductionOverviewPageVM prodVm, TcEventLogger eventLogger)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_config = config;
|
||||
_prodVM = prodVm;
|
||||
_mainVm = mainVm;
|
||||
// Create dummy string
|
||||
DummyStringVM = new StringControlButtonVM();
|
||||
|
||||
// Create empty page
|
||||
_emptyPage = new();
|
||||
|
||||
CurrentDetailPage = _emptyPage;
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public void TrayfeederPageClicked()
|
||||
{
|
||||
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(TrayFeederPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void AlignerPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(AlignmentStationPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Etching1PageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(EtchingStation1Page));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Etching2PageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(EtchingStation2Page));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void HVTestPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(HighVoltageStationPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void HotCoolplatePageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(HotCoolPlatePage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void NIOStationPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(NIOStationPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public void KukaPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(KukaRobotPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void MediaCabinetPageClicked()
|
||||
{
|
||||
NavigateMessage message = new("", typeof(ProductionOverviewPage));
|
||||
NavigateMessage nextMessage = new("", typeof(MediaCabinetPage));
|
||||
this.Dispose();
|
||||
_mainVm?.NavigateFromOuterPage(message, nextMessage);
|
||||
}
|
||||
|
||||
// Only use for forward traversal!
|
||||
public void Receive(NavigateMessage message)
|
||||
{
|
||||
// Only change page if its a new page type
|
||||
if (CurrentDetailPage.GetType() == message.type)
|
||||
return;
|
||||
|
||||
// Push current message
|
||||
if (_currentMessage != null)
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
// Save current message for later push
|
||||
_currentMessage = message;
|
||||
|
||||
// Set can navigate back
|
||||
|
||||
Navigate(message);
|
||||
}
|
||||
|
||||
private void Navigate(NavigateMessage message)
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentDetailPage.DataContext is IDisposable viewModel)
|
||||
{
|
||||
CurrentDetailPage.DataContext = null;
|
||||
viewModel.Dispose();
|
||||
}
|
||||
|
||||
|
||||
// Create new page
|
||||
switch (message.type.Name)
|
||||
{
|
||||
case nameof(TrayFeederPage):
|
||||
if (_trayFeederPageVm == null)
|
||||
_trayFeederPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
||||
|
||||
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
|
||||
CurrentDetailPage = trayFeederPage;
|
||||
break;
|
||||
|
||||
case nameof(AlignmentStationPage):
|
||||
// Create seetings page view model only once
|
||||
if (_alignmentStationPageVM == null)
|
||||
_alignmentStationPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stAligner");
|
||||
|
||||
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
|
||||
CurrentDetailPage = settingsPage;
|
||||
break;
|
||||
|
||||
case nameof(EtchingStation1Page):
|
||||
if (_etchingStation1PageVm == null)
|
||||
_etchingStation1PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher1");
|
||||
|
||||
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
|
||||
CurrentDetailPage = etchingStation1Page;
|
||||
break;
|
||||
|
||||
case nameof(EtchingStation2Page):
|
||||
if (_etchingStation2PageVm == null)
|
||||
_etchingStation2PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher2");
|
||||
|
||||
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
|
||||
CurrentDetailPage = etchingStation2Page;
|
||||
break;
|
||||
|
||||
case nameof(HighVoltageStationPage):
|
||||
if (_highVoltageStationPageVm == null)
|
||||
_highVoltageStationPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
||||
|
||||
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
|
||||
CurrentDetailPage = highVoltageStationPage;
|
||||
break;
|
||||
|
||||
case nameof(HotCoolPlatePage):
|
||||
if (_hotCoolplatePageVM == null)
|
||||
_hotCoolplatePageVM = new(_adsManager, "GVL_Config.stMachine");
|
||||
|
||||
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
||||
CurrentDetailPage = hotCoolPlatePage;
|
||||
break;
|
||||
|
||||
case nameof(NIOStationPage):
|
||||
if (_nioStationPageVm == null)
|
||||
_nioStationPageVm = new(_adsManager, "GVL_Config.stMachine.stNOK");
|
||||
|
||||
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
|
||||
CurrentDetailPage = nIOStationPage;
|
||||
break;
|
||||
|
||||
case nameof(KukaRobotPage):
|
||||
// Create page view model only once
|
||||
if (_kukaRobotPageVM == null)
|
||||
_kukaRobotPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stKukaRobot");
|
||||
|
||||
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
||||
CurrentDetailPage = kukaRobotPage;
|
||||
break;
|
||||
|
||||
case nameof(MediaCabinetPage):
|
||||
if (_mediaCabinetPageVM == null)
|
||||
_mediaCabinetPageVM = new(_adsManager, "GVL_Config.stMachine");
|
||||
|
||||
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
|
||||
CurrentDetailPage = mediaCabinetPage;
|
||||
break;
|
||||
|
||||
default:
|
||||
CurrentDetailPage = new Page();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void AckAlarms()
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stConfirmAlarmsBtn.xRequest", true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentDetailPage.DataContext is IDisposable viewModel)
|
||||
{
|
||||
CurrentDetailPage.DataContext = null;
|
||||
viewModel.Dispose();
|
||||
}
|
||||
|
||||
DummyStringVM.Dispose();
|
||||
}
|
||||
}
|
||||
108
uniper_hmi_old/UniperHMI/Pages/ViewModels/MediaCabinetPageVM.cs
Normal file
108
uniper_hmi_old/UniperHMI/Pages/ViewModels/MediaCabinetPageVM.cs
Normal file
@@ -0,0 +1,108 @@
|
||||
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 Common;
|
||||
using InfineonHMI.Model;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class MediaCabinetPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
private IAdsManager _adsManager;
|
||||
private string? _variableName;
|
||||
|
||||
[ObservableProperty] private MediaContainerVm container1Vm;
|
||||
[ObservableProperty] private MediaContainerVm container2Vm;
|
||||
[ObservableProperty] private MediaContainerVm container3Vm;
|
||||
[ObservableProperty] private MediaContainerVm container4Vm;
|
||||
[ObservableProperty] private MediaContainerVm container5Vm;
|
||||
[ObservableProperty] private MediaContainerVm container6Vm;
|
||||
[ObservableProperty] private MediaContainerVm container7Vm;
|
||||
[ObservableProperty] private MediaContainerVm container8Vm;
|
||||
[ObservableProperty] private MediaContainerVm container9Vm;
|
||||
|
||||
|
||||
public MediaCabinetPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
Container1Vm = new MediaContainerVm(adsManager, variableName + ".stContainer1");
|
||||
Container2Vm = new MediaContainerVm(adsManager, variableName + ".stContainer2");
|
||||
Container3Vm = new MediaContainerVm(adsManager, variableName + ".stContainer3");
|
||||
Container4Vm = new MediaContainerVm(adsManager, variableName + ".stContainer4");
|
||||
Container5Vm = new MediaContainerVm(adsManager, variableName + ".stContainer5");
|
||||
Container6Vm = new MediaContainerVm(adsManager, variableName + ".stContainer6");
|
||||
Container7Vm = new MediaContainerVm(adsManager, variableName + ".stContainer7");
|
||||
Container8Vm = new MediaContainerVm(adsManager, variableName + ".stContainer8");
|
||||
Container9Vm = new MediaContainerVm(adsManager, variableName + ".stContainer9");
|
||||
|
||||
Container1Vm.SName = "Container1";
|
||||
Container2Vm.SName = "Container2";
|
||||
Container3Vm.SName = "Container3";
|
||||
Container4Vm.SName = "Container4";
|
||||
Container5Vm.SName = "Container5";
|
||||
Container6Vm.SName = "Container6";
|
||||
Container7Vm.SName = "Container7";
|
||||
Container8Vm.SName = "Container8";
|
||||
Container9Vm.SName = "Container9";
|
||||
|
||||
}
|
||||
|
||||
public MediaCabinetPageVM()
|
||||
{
|
||||
Container1Vm = new MediaContainerVm();
|
||||
Container2Vm = new MediaContainerVm();
|
||||
Container3Vm = new MediaContainerVm();
|
||||
Container4Vm = new MediaContainerVm();
|
||||
Container5Vm = new MediaContainerVm();
|
||||
Container6Vm = new MediaContainerVm();
|
||||
Container7Vm = new MediaContainerVm();
|
||||
Container8Vm = new MediaContainerVm();
|
||||
Container9Vm = new MediaContainerVm();
|
||||
|
||||
|
||||
Container1Vm.SName = "Container1";
|
||||
Container2Vm.SName = "Container2";
|
||||
Container3Vm.SName = "Container3";
|
||||
Container4Vm.SName = "Container4";
|
||||
Container5Vm.SName = "Container5";
|
||||
Container6Vm.SName = "Container6";
|
||||
Container7Vm.SName = "Container7";
|
||||
Container8Vm.SName = "Container8";
|
||||
Container9Vm.SName = "Container9";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
Container1Vm.Dispose();
|
||||
Container2Vm.Dispose();
|
||||
Container3Vm.Dispose();
|
||||
Container4Vm.Dispose();
|
||||
Container5Vm.Dispose();
|
||||
Container6Vm.Dispose();
|
||||
Container7Vm.Dispose();
|
||||
Container8Vm.Dispose();
|
||||
Container9Vm.Dispose();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using UniperHMI.OwnControls;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
public sealed partial class ModuleOverviewPageVM : ObservableObject, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private UnitControlButtonVM unit1;
|
||||
|
||||
[ObservableProperty]
|
||||
private UnitControlButtonVM unit2;
|
||||
|
||||
[ObservableProperty]
|
||||
private UnitControlButtonVM unit3;
|
||||
|
||||
[ObservableProperty]
|
||||
private UnitControlButtonVM unit4;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
private readonly string? _variableName;
|
||||
|
||||
public ModuleOverviewPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
unit1 = new(_adsManager, _variableName + ".stHMIInterfaceUnit1");
|
||||
unit2 = new(_adsManager, _variableName + ".stHMIInterfaceUnit2");
|
||||
unit3 = new(_adsManager, _variableName + ".stHMIInterfaceUnit3");
|
||||
unit4 = new(_adsManager, _variableName + ".stHMIInterfaceUnit4");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Unit1?.Dispose();
|
||||
Unit2?.Dispose();
|
||||
Unit3?.Dispose();
|
||||
Unit4?.Dispose();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Unit1Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit1", typeof(UnitOverviewPage), "Unit 1"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Unit2Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit2", typeof(UnitOverviewPage), "Unit 2"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Unit3Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit3", typeof(UnitOverviewPage), "Unit 3"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Unit4Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceUnit4", typeof(UnitOverviewPage), "Unit 4"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class NIOStationPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM clampDiagValveVm;
|
||||
|
||||
[ObservableProperty] private BinaryValveControlVM clampAcrossValveVm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM clampCmdButtonVm;
|
||||
|
||||
[ObservableProperty] private HMIControlButtonVM unclampCmdButtonVm;
|
||||
|
||||
public NIOStationPageVM()
|
||||
{
|
||||
ClampDiagValveVm = new BinaryValveControlVM();
|
||||
ClampAcrossValveVm = new BinaryValveControlVM();
|
||||
ClampCmdButtonVm = new HMIControlButtonVM();
|
||||
UnclampCmdButtonVm = new HMIControlButtonVM();
|
||||
}
|
||||
|
||||
public NIOStationPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
ClampDiagValveVm = new BinaryValveControlVM(_adsManager, _variableName + ".stClampDiagValve");
|
||||
ClampAcrossValveVm = new BinaryValveControlVM(_adsManager, _variableName + ".stClampAcrossValve");
|
||||
ClampCmdButtonVm = new HMIControlButtonVM(_adsManager, _variableName + ".stClampCmd");
|
||||
UnclampCmdButtonVm = new HMIControlButtonVM(_adsManager, _variableName + "stUnclampCmd");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
ClampDiagValveVm.Dispose();
|
||||
ClampAcrossValveVm.Dispose();
|
||||
ClampCmdButtonVm.Dispose();
|
||||
UnclampCmdButtonVm.Dispose();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using TcEventLoggerAdsProxyLib;
|
||||
|
||||
namespace InfineonHMI;
|
||||
|
||||
public sealed partial class ProductionOverviewPageVM : ObservableObject, IRecipient<NavigateMessage>, IDisposable
|
||||
{
|
||||
|
||||
[ObservableProperty] private StringControlButtonVM dummyStringVM;
|
||||
|
||||
[ObservableProperty] private Page currentDetailPage;
|
||||
|
||||
[ObservableProperty] private bool canNavigateBack;
|
||||
|
||||
private readonly IAdsManager _adsManager;
|
||||
private readonly IConfiguration _config;
|
||||
private readonly TcEventLogger _eventlogger;
|
||||
|
||||
|
||||
// Last active event
|
||||
[ObservableProperty] private string currentActiveEvent = "";
|
||||
|
||||
private readonly object _lock = new();
|
||||
|
||||
// Empty page
|
||||
private readonly Page _emptyPage;
|
||||
|
||||
// Last navigate message
|
||||
private readonly Stack<NavigateMessage> _messageStack = new();
|
||||
NavigateMessage? _currentMessage;
|
||||
|
||||
// Hot Coolplate page view model
|
||||
HotCoolPlatePageVM? _hotCoolplatePageVM;
|
||||
|
||||
AlignmentStationPageVM? _alignmentStationPageVM;
|
||||
|
||||
EtchingStation1PageVM? _etchingStation1PageVm;
|
||||
|
||||
EtchingStation2PageVM? _etchingStation2PageVm;
|
||||
|
||||
HighVoltageStationPageVM? _highVoltageStationPageVm;
|
||||
|
||||
MediaCabinetPageVM? _mediaCabinetPageVM;
|
||||
|
||||
NIOStationPageVM? _nioStationPageVm;
|
||||
|
||||
TrayFeederPageVM? _trayFeederPageVm;
|
||||
|
||||
|
||||
// Kuka Robot page view model
|
||||
KukaRobotPageVM? _kukaRobotPageVM;
|
||||
|
||||
public ProductionOverviewPageVM()
|
||||
{
|
||||
// default ctor
|
||||
}
|
||||
public ProductionOverviewPageVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger, NavigateMessage? message = null)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_config = config;
|
||||
// Create dummy string
|
||||
DummyStringVM = new StringControlButtonVM();
|
||||
|
||||
// Create empty page
|
||||
_emptyPage = new();
|
||||
|
||||
CurrentDetailPage = _emptyPage;
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
if (message != null)
|
||||
{
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
WeakReferenceMessenger.Default.Register<NavigateMessage>(this);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void TrayfeederPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["TrayFeederVarName"]!, typeof(TrayFeederPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void AlignerPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["AlignerVarName"]!, typeof(AlignmentStationPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Etching1PageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["Etching1VarName"]!, typeof(EtchingStation1Page));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void Etching2PageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["Etching2VarName"]!, typeof(EtchingStation2Page));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void HVTestPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["HVTestVarName"]!, typeof(HighVoltageStationPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void HotCoolplatePageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["HotCoolplateVarName"]!, typeof(HotCoolPlatePage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void NIOStationPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["NIOStationVarName"]!, typeof(NIOStationPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public void KukaPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["KukaRobotVarName"]!, typeof(KukaRobotPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void MediaCabinetPageClicked()
|
||||
{
|
||||
_messageStack.Clear();
|
||||
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||
NavigateMessage message = new(_config["MediaCabinetVarName"]!, typeof(MediaCabinetPage));
|
||||
Receive(message);
|
||||
}
|
||||
|
||||
// Only use for forward traversal!
|
||||
public void Receive(NavigateMessage message)
|
||||
{
|
||||
// Only change page if its a new page type
|
||||
if (CurrentDetailPage.GetType() == message.type)
|
||||
return;
|
||||
|
||||
// Push current message
|
||||
if (_currentMessage != null)
|
||||
_messageStack.Push(_currentMessage);
|
||||
|
||||
// Save current message for later push
|
||||
_currentMessage = message;
|
||||
|
||||
// Set can navigate back
|
||||
CanNavigateBack = true;
|
||||
|
||||
Navigate(message);
|
||||
}
|
||||
|
||||
public void NavigateFromOuterPage(NavigateMessage message)
|
||||
{
|
||||
_currentMessage = message;
|
||||
|
||||
CanNavigateBack = true;
|
||||
Navigate(message);
|
||||
}
|
||||
|
||||
private void Navigate(NavigateMessage message)
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentDetailPage.DataContext is IDisposable viewModel)
|
||||
{
|
||||
CurrentDetailPage.DataContext = null;
|
||||
viewModel.Dispose();
|
||||
}
|
||||
|
||||
// Create new page
|
||||
switch (message.type.Name)
|
||||
{
|
||||
case nameof(TrayFeederPage):
|
||||
if (_trayFeederPageVm == null)
|
||||
_trayFeederPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
||||
|
||||
TrayFeederPage trayFeederPage = new() { DataContext = _trayFeederPageVm };
|
||||
CurrentDetailPage = trayFeederPage;
|
||||
break;
|
||||
|
||||
case nameof(AlignmentStationPage):
|
||||
// Create seetings page view model only once
|
||||
if (_alignmentStationPageVM == null)
|
||||
_alignmentStationPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stAligner");
|
||||
|
||||
AlignmentStationPage settingsPage = new() { DataContext = _alignmentStationPageVM };
|
||||
CurrentDetailPage = settingsPage;
|
||||
break;
|
||||
|
||||
case nameof(EtchingStation1Page):
|
||||
if (_etchingStation1PageVm == null)
|
||||
_etchingStation1PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher1");
|
||||
|
||||
EtchingStation1Page etchingStation1Page = new() { DataContext = _etchingStation1PageVm };
|
||||
CurrentDetailPage = etchingStation1Page;
|
||||
break;
|
||||
|
||||
case nameof(EtchingStation2Page):
|
||||
if (_etchingStation2PageVm == null)
|
||||
_etchingStation2PageVm = new(_adsManager, "GVL_CONFIG.stMachine.stEtcher2");
|
||||
|
||||
EtchingStation2Page etchingStation2Page = new() { DataContext = _etchingStation2PageVm };
|
||||
CurrentDetailPage = etchingStation2Page;
|
||||
break;
|
||||
|
||||
case nameof(HighVoltageStationPage):
|
||||
if (_highVoltageStationPageVm == null)
|
||||
_highVoltageStationPageVm = new(_adsManager, "GVL_CONFIG.stMachine");
|
||||
|
||||
HighVoltageStationPage highVoltageStationPage = new() { DataContext = _highVoltageStationPageVm };
|
||||
CurrentDetailPage = highVoltageStationPage;
|
||||
break;
|
||||
|
||||
case nameof(HotCoolPlatePage):
|
||||
if (_hotCoolplatePageVM == null)
|
||||
_hotCoolplatePageVM = new(_adsManager, "GVL_Config.stMachine");
|
||||
|
||||
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
||||
CurrentDetailPage = hotCoolPlatePage;
|
||||
break;
|
||||
|
||||
case nameof(NIOStationPage):
|
||||
if (_nioStationPageVm == null)
|
||||
_nioStationPageVm = new(_adsManager, "GVL_Config.stMachine.stNOK");
|
||||
|
||||
NIOStationPage nIOStationPage = new() { DataContext = _nioStationPageVm };
|
||||
CurrentDetailPage = nIOStationPage;
|
||||
break;
|
||||
|
||||
case nameof(KukaRobotPage):
|
||||
// Create page view model only once
|
||||
if (_kukaRobotPageVM == null)
|
||||
_kukaRobotPageVM = new(_adsManager, "GVL_CONFIG.stMachine.stKukaRobot");
|
||||
|
||||
KukaRobotPage kukaRobotPage = new() { DataContext = _kukaRobotPageVM };
|
||||
CurrentDetailPage = kukaRobotPage;
|
||||
break;
|
||||
|
||||
case nameof(MediaCabinetPage):
|
||||
if (_mediaCabinetPageVM == null)
|
||||
_mediaCabinetPageVM = new(_adsManager, "GVL_Config.stMachine");
|
||||
|
||||
MediaCabinetPage mediaCabinetPage = new() { DataContext= _mediaCabinetPageVM };
|
||||
CurrentDetailPage = mediaCabinetPage;
|
||||
break;
|
||||
|
||||
default:
|
||||
CurrentDetailPage = new Page();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void AckAlarms()
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stConfirmAlarmsBtn.xRequest", true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Dispose current pages viewmodel
|
||||
if (CurrentDetailPage.DataContext is IDisposable viewModel)
|
||||
{
|
||||
CurrentDetailPage.DataContext = null;
|
||||
viewModel.Dispose();
|
||||
}
|
||||
|
||||
DummyStringVM.Dispose();
|
||||
}
|
||||
}
|
||||
746
uniper_hmi_old/UniperHMI/Pages/ViewModels/ReceipePageVM.cs
Normal file
746
uniper_hmi_old/UniperHMI/Pages/ViewModels/ReceipePageVM.cs
Normal file
@@ -0,0 +1,746 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Printing;
|
||||
using System.Runtime.InteropServices.JavaScript;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Input;
|
||||
using Common;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using InfineonHMI.Model;
|
||||
using Microsoft.Win32;
|
||||
using InfineonHMI.Common;
|
||||
using TwinCAT.PlcOpen;
|
||||
|
||||
namespace InfineonHMI;
|
||||
|
||||
public sealed partial class ReceipePageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
|
||||
#region Properties
|
||||
private AdsManager _adsManager;
|
||||
|
||||
private int maxFlowNodes = 10;
|
||||
private int maxTrayPositions = 20;
|
||||
private int maxEtcherRobotPositions = 20;
|
||||
|
||||
[ObservableProperty] private ObservableCollection<TrayPosition> trayPositions;
|
||||
[ObservableProperty] private ParamControlIntVm cameraProgramsVm = new ();
|
||||
[ObservableProperty] private ParamControlIntVm chucksVm = new ();
|
||||
[ObservableProperty] private ParamControlIntVm gripperVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm permissibleBeamParamDeviationsVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlFloatVm diameterVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm thicknessVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm timeIntervallBeamCheckVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlFloatVm restingTimeHotplateVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm targetTemperatureHotplateVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm restingTimeCoolplateVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm targetTemperatureCoolplateVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlFloatVm hvtestVoltageVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvmaxTestCurrentVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvrampTimeVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvtestFrequencyVm = new ();
|
||||
[ObservableProperty] private ParamControlIntVm hvpolarityVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvtestPressureN2Vm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvn2PrePurgeTimeVm = new ();
|
||||
[ObservableProperty] private ParamControlIntVm hvnumRetriesVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvtestTemperatureVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvTestOkVoltageVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm hvTestOkCurrentVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlIntVm numberRobotPositionsVm = new ();
|
||||
[ObservableProperty] private ParamControlFloatVm chuckRpmVm = new ();
|
||||
[ObservableProperty] private ObservableCollection<EtcherRobotStepData> etcherRobotSteps;
|
||||
[ObservableProperty] private ParamControlFloatVm radialPosLowerWaterJetVm = new ();
|
||||
|
||||
[ObservableProperty] private ParamControlIntVm flowNodeCountVm = new ();
|
||||
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region FlowReceipe
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<StationEntry> flowStationsVm =
|
||||
[
|
||||
new StationEntry(Stationenum.EINGABE, "Eingabetray"),
|
||||
new StationEntry(Stationenum.QRCODE, "QR Code Scan"),
|
||||
new StationEntry(Stationenum.AUSRICHTEN, "Ausrichten"),
|
||||
new StationEntry(Stationenum.AETZEN, "Ätzstation 1/2"),
|
||||
new StationEntry(Stationenum.HEIZPLATTE, "Heizplatte"),
|
||||
new StationEntry(Stationenum.KUEHLPLATTE, "Kühlplatte"),
|
||||
new StationEntry(Stationenum.HOCHVOLTHEISS, "Hochvolt Heiss"),
|
||||
new StationEntry(Stationenum.HOCHVOLTKALT, "Hochvolt Kalt"),
|
||||
new StationEntry(Stationenum.AUSGABE, "Ausgabetray"),
|
||||
new StationEntry(Stationenum.NIOSTATION, "NIO Station")
|
||||
|
||||
];
|
||||
|
||||
[ObservableProperty] private ObservableCollection<FlowReceipeEntry> flowReceipeEntries;
|
||||
|
||||
[RelayCommand]
|
||||
public void AddFlowReceipeEntry()
|
||||
{
|
||||
var nodeid = FlowReceipeEntries.Count;
|
||||
FlowReceipeEntries.Add(new FlowReceipeEntry
|
||||
{
|
||||
NodeId = nodeid,
|
||||
MaxRetries = 0,
|
||||
NextNodeFail = -1,
|
||||
NextNodeSuccess = -1,
|
||||
NextNodeRetry = -1,
|
||||
Priority = 100,
|
||||
Station = FlowStationsVm[0]
|
||||
});
|
||||
if (FlowReceipeEntries.Count >= maxFlowNodes)
|
||||
{
|
||||
CanAddFlowReceipeEntry = false;
|
||||
}
|
||||
|
||||
if (FlowReceipeEntries.Count > 0)
|
||||
{
|
||||
CanRemoveFlowReceipeEntry = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void addFlowReceipeEntry(FlowReceipeEntry fre)
|
||||
{
|
||||
var nodeid = FlowReceipeEntries.Count;
|
||||
FlowReceipeEntries.Add(new FlowReceipeEntry
|
||||
{
|
||||
NodeId = nodeid,
|
||||
MaxRetries = fre.MaxRetries,
|
||||
NextNodeFail = fre.NextNodeFail,
|
||||
NextNodeSuccess = fre.NextNodeSuccess,
|
||||
NextNodeRetry = fre.NextNodeRetry,
|
||||
Priority = fre.Priority,
|
||||
Station = new StationEntry(fre.Station.eStation, fre.Station.sName)
|
||||
});
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void RemoveFlowReceipeEntry()
|
||||
{
|
||||
FlowReceipeEntries.Remove(SelectedFlowReceipeEntry);
|
||||
var receipes = new ObservableCollection<FlowReceipeEntry>(FlowReceipeEntries);
|
||||
|
||||
FlowReceipeEntries.Clear();
|
||||
|
||||
foreach (var receipe in receipes)
|
||||
addFlowReceipeEntry(receipe);
|
||||
|
||||
|
||||
if (FlowReceipeEntries.Count < maxFlowNodes)
|
||||
{
|
||||
CanAddFlowReceipeEntry = true;
|
||||
}
|
||||
|
||||
if (FlowReceipeEntries.Count > 0)
|
||||
{
|
||||
CanRemoveFlowReceipeEntry = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CanRemoveFlowReceipeEntry = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void FlowReceipeEntryUp()
|
||||
{
|
||||
var selectedIndex = FlowReceipeEntries.IndexOf(SelectedFlowReceipeEntry);
|
||||
if (selectedIndex == 0)
|
||||
return;
|
||||
FlowReceipeEntries.Move(selectedIndex, selectedIndex - 1);
|
||||
|
||||
var receipes = new ObservableCollection<FlowReceipeEntry>(FlowReceipeEntries);
|
||||
FlowReceipeEntries.Clear();
|
||||
|
||||
foreach (var receipe in receipes)
|
||||
addFlowReceipeEntry(receipe);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void FlowReceipeEntryDown()
|
||||
{
|
||||
var selectedIndex = FlowReceipeEntries.IndexOf(SelectedFlowReceipeEntry);
|
||||
if (selectedIndex >= FlowReceipeEntries.Count)
|
||||
return;
|
||||
FlowReceipeEntries.Move(selectedIndex, selectedIndex + 1);
|
||||
|
||||
var receipes = new ObservableCollection<FlowReceipeEntry>(FlowReceipeEntries);
|
||||
FlowReceipeEntries.Clear();
|
||||
|
||||
foreach (var receipe in receipes)
|
||||
addFlowReceipeEntry(receipe);
|
||||
|
||||
}
|
||||
|
||||
[ObservableProperty] private bool canAddFlowReceipeEntry;
|
||||
[ObservableProperty] private bool canRemoveFlowReceipeEntry;
|
||||
|
||||
[ObservableProperty] private FlowReceipeEntry selectedFlowReceipeEntry;
|
||||
|
||||
#endregion Flowreceipe
|
||||
|
||||
#region Traypositions
|
||||
[ObservableProperty] private TrayPosition selectedTrayPosition;
|
||||
|
||||
|
||||
[ObservableProperty] private bool canAddTrayPosition;
|
||||
[ObservableProperty] private bool canRemoveTrayPosition;
|
||||
|
||||
[RelayCommand]
|
||||
public void AddTrayPosition()
|
||||
{
|
||||
var posId = TrayPositions.Count;
|
||||
TrayPositions.Add(new TrayPosition
|
||||
{
|
||||
PosId = posId,
|
||||
PosX = 0.0f,
|
||||
PosY = 0.0f,
|
||||
|
||||
});
|
||||
if (TrayPositions.Count >= maxTrayPositions)
|
||||
{
|
||||
CanAddTrayPosition = false;
|
||||
}
|
||||
|
||||
if (TrayPositions.Count > 0)
|
||||
{
|
||||
CanRemoveTrayPosition = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void addTrayPosition(TrayPosition trayPos)
|
||||
{
|
||||
var posId = TrayPositions.Count;
|
||||
TrayPositions.Add(new TrayPosition
|
||||
{
|
||||
PosId = posId,
|
||||
PosX = trayPos.PosX,
|
||||
PosY = trayPos.PosY
|
||||
});
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void RemoveTrayPosition()
|
||||
{
|
||||
TrayPositions.Remove(SelectedTrayPosition);
|
||||
var positions = new ObservableCollection<TrayPosition>(TrayPositions);
|
||||
|
||||
TrayPositions.Clear();
|
||||
|
||||
foreach (var position in positions)
|
||||
addTrayPosition(position);
|
||||
|
||||
|
||||
if (TrayPositions.Count < maxTrayPositions)
|
||||
{
|
||||
CanAddTrayPosition = true;
|
||||
}
|
||||
|
||||
if (TrayPositions.Count > 0)
|
||||
{
|
||||
CanRemoveTrayPosition = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CanRemoveTrayPosition = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void TrayPositionUp()
|
||||
{
|
||||
var selectedIndex = TrayPositions.IndexOf(SelectedTrayPosition);
|
||||
if (selectedIndex == 0)
|
||||
return;
|
||||
TrayPositions.Move(selectedIndex, selectedIndex - 1);
|
||||
|
||||
var positions = new ObservableCollection<TrayPosition>(TrayPositions);
|
||||
TrayPositions.Clear();
|
||||
|
||||
foreach (var pos in positions)
|
||||
addTrayPosition(pos);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void TrayPositionDown()
|
||||
{
|
||||
var selectedIndex = TrayPositions.IndexOf(SelectedTrayPosition);
|
||||
if (selectedIndex >= TrayPositions.Count)
|
||||
return;
|
||||
TrayPositions.Move(selectedIndex, selectedIndex + 1);
|
||||
|
||||
var positions = new ObservableCollection<TrayPosition>(TrayPositions);
|
||||
TrayPositions.Clear();
|
||||
|
||||
foreach (var pos in positions)
|
||||
addTrayPosition(pos);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion Traypositions
|
||||
|
||||
#region EtcherRobotPositions
|
||||
|
||||
[ObservableProperty] private EtcherRobotStepData selectedEtchRobotStep;
|
||||
|
||||
|
||||
[ObservableProperty] private bool canAddEtchRobotStep;
|
||||
[ObservableProperty] private bool canRemoveEtchRobotStep;
|
||||
|
||||
[RelayCommand]
|
||||
public void AddEtchRobotStep()
|
||||
{
|
||||
EtcherRobotSteps.Add(new EtcherRobotStepData()
|
||||
{
|
||||
PosX = 0.0f,
|
||||
PosY = 0.0f,
|
||||
PosZ = 0.0f,
|
||||
MoveSpeed = 0.0f,
|
||||
AngleAlpha = 0.0f,
|
||||
WaterFromAbove = false,
|
||||
WaterFromBelow = false,
|
||||
Medium = 0,
|
||||
Delay = 0.0f
|
||||
});
|
||||
if (EtcherRobotSteps.Count >= maxEtcherRobotPositions)
|
||||
{
|
||||
CanAddEtchRobotStep = false;
|
||||
}
|
||||
|
||||
if (EtcherRobotSteps.Count > 0)
|
||||
{
|
||||
CanRemoveEtchRobotStep = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void addEtchRobotStep(EtcherRobotStepData etchStep)
|
||||
{
|
||||
var posId = EtcherRobotSteps.Count;
|
||||
EtcherRobotSteps.Add(new EtcherRobotStepData()
|
||||
{
|
||||
PosX = etchStep.PosX,
|
||||
PosY = etchStep.PosY,
|
||||
PosZ = etchStep.PosZ,
|
||||
MoveSpeed = etchStep.MoveSpeed,
|
||||
AngleAlpha = etchStep.AngleAlpha,
|
||||
WaterFromAbove = etchStep.WaterFromAbove,
|
||||
WaterFromBelow = etchStep.WaterFromBelow,
|
||||
Medium = etchStep.Medium,
|
||||
Delay = etchStep.Delay
|
||||
});
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void RemoveEtchRobotStep()
|
||||
{
|
||||
EtcherRobotSteps.Remove(SelectedEtchRobotStep);
|
||||
var steps = new ObservableCollection<EtcherRobotStepData>(EtcherRobotSteps);
|
||||
|
||||
EtcherRobotSteps.Clear();
|
||||
|
||||
foreach (var step in steps)
|
||||
addEtchRobotStep(step);
|
||||
|
||||
|
||||
if (EtcherRobotSteps.Count < maxEtcherRobotPositions)
|
||||
{
|
||||
CanAddEtchRobotStep = true;
|
||||
}
|
||||
|
||||
if (EtcherRobotSteps.Count > 0)
|
||||
{
|
||||
CanRemoveEtchRobotStep = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CanRemoveEtchRobotStep = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void EtchRobotStepUp()
|
||||
{
|
||||
var selectedIndex = EtcherRobotSteps.IndexOf(SelectedEtchRobotStep);
|
||||
if (selectedIndex == 0)
|
||||
return;
|
||||
EtcherRobotSteps.Move(selectedIndex, selectedIndex - 1);
|
||||
|
||||
var steps = new ObservableCollection<EtcherRobotStepData>(EtcherRobotSteps);
|
||||
EtcherRobotSteps.Clear();
|
||||
|
||||
foreach (var step in steps)
|
||||
addEtchRobotStep(step);
|
||||
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void EtchRobotStepDown()
|
||||
{
|
||||
var selectedIndex = EtcherRobotSteps.IndexOf(SelectedEtchRobotStep);
|
||||
if (selectedIndex >= EtcherRobotSteps.Count)
|
||||
return;
|
||||
EtcherRobotSteps.Move(selectedIndex, selectedIndex + 1);
|
||||
|
||||
var steps = new ObservableCollection<EtcherRobotStepData>(EtcherRobotSteps);
|
||||
EtcherRobotSteps.Clear();
|
||||
|
||||
foreach (var step in steps)
|
||||
addEtchRobotStep(step);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Commands
|
||||
|
||||
[RelayCommand]
|
||||
public void WriteToPlc()
|
||||
{
|
||||
SendDataToPLC();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void ReadReceipeFile()
|
||||
{
|
||||
var dlg = new OpenFileDialog();
|
||||
if (dlg.ShowDialog() != true)
|
||||
return ;
|
||||
|
||||
var dto = new ReceipeDto();
|
||||
dto.Read(dlg.FileName);
|
||||
GetDto(dto);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void WriteReceipeFile()
|
||||
{
|
||||
var dlg = new SaveFileDialog();
|
||||
if (dlg.ShowDialog() != true)
|
||||
return;
|
||||
|
||||
var dto = SetDto();
|
||||
dto.Write(dlg.FileName);
|
||||
}
|
||||
|
||||
|
||||
#endregion Commands
|
||||
|
||||
|
||||
#region ctor
|
||||
|
||||
public ReceipePageVM()
|
||||
{
|
||||
|
||||
|
||||
maxFlowNodes = 10;
|
||||
maxEtcherRobotPositions = 10;
|
||||
maxTrayPositions = 10;
|
||||
|
||||
TrayPositions = new ();
|
||||
EtcherRobotSteps = new ();
|
||||
FlowReceipeEntries = new ();
|
||||
|
||||
CameraProgramsVm.SName = "Kameraprogramme: ";
|
||||
ChucksVm.SName = "Drehteller: ";
|
||||
GripperVm.SName = "Greifertyp: ";
|
||||
PermissibleBeamParamDeviationsVm.SName = "Max. Strahlabweichung: ";
|
||||
DiameterVm.SName = "Teiledurchmesser: ";
|
||||
ThicknessVm.SName = "Teiledicke: ";
|
||||
TimeIntervallBeamCheckVm.SName = "Intervall Strahlvermessung: ";
|
||||
RestingTimeHotplateVm.SName = "Verweilzeit Heizplatte: ";
|
||||
TargetTemperatureHotplateVm.SName = "Zieltemperatur Heizplatte: ";
|
||||
RestingTimeCoolplateVm.SName = "Verweilzeit Kühlplatte: ";
|
||||
TargetTemperatureCoolplateVm.SName = "Zieltemperatur Kühlplatte";
|
||||
|
||||
RadialPosLowerWaterJetVm.SName = "Radial Position Unterwasserstrahl: ";
|
||||
ChuckRpmVm.SName = "Drehzahl: ";
|
||||
HvmaxTestCurrentVm.SName = "HV: Max. Teststrom: ";
|
||||
Hvn2PrePurgeTimeVm.SName = "HV: Vorreinigungszeit: ";
|
||||
HvnumRetriesVm.SName = "HV: Anzahl Wiederholversuche: ";
|
||||
HvpolarityVm.SName = "HV: Polarität (1=Pos, 2=Neg): ";
|
||||
HvrampTimeVm.SName = "HV: Rampenzeit: ";
|
||||
HvtestFrequencyVm.SName = "HV: Testfrequenz: ";
|
||||
HvTestOkCurrentVm.SName = "HV: Teststrom Teil OK";
|
||||
HvTestOkVoltageVm.SName = "HV: Testspannung Teil OK";
|
||||
HvtestTemperatureVm.SName = "HV: Testtemperatur: ";
|
||||
HvtestVoltageVm.SName = "HV: Testspannung: ";
|
||||
HvtestPressureN2Vm.SName = "HV: DruckN2: ";
|
||||
|
||||
FlowReceipeEntries = new();
|
||||
|
||||
FlowReceipeEntries.Add(new FlowReceipeEntry
|
||||
{
|
||||
Priority = 100,
|
||||
Station = FlowStationsVm[0],
|
||||
MaxRetries = 0,
|
||||
NextNodeSuccess = 1,
|
||||
NextNodeRetry = -1,
|
||||
NextNodeFail = -1
|
||||
});
|
||||
|
||||
|
||||
CanAddTrayPosition = true;
|
||||
CanRemoveTrayPosition = false;
|
||||
CanAddFlowReceipeEntry = true;
|
||||
CanRemoveFlowReceipeEntry = false;
|
||||
CanAddEtchRobotStep = true;
|
||||
CanRemoveEtchRobotStep = false;
|
||||
|
||||
}
|
||||
|
||||
public ReceipePageVM(AdsManager adsManager)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
|
||||
var val = _adsManager.ReadValue("GVL_Scheduler.MAX_RECIPE_NODES");
|
||||
maxFlowNodes = (val == null) ? 10 : (int)val; ;
|
||||
val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
maxEtcherRobotPositions = (val == null) ? 10 : (int)val;
|
||||
val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
maxTrayPositions = (val == null) ? 10 : (int)val;
|
||||
|
||||
|
||||
|
||||
TrayPositions = new ();
|
||||
EtcherRobotSteps = new ();
|
||||
FlowReceipeEntries = new ();
|
||||
|
||||
CameraProgramsVm.SName = "Kameraprogramme: ";
|
||||
ChucksVm.SName = "Drehteller: ";
|
||||
GripperVm.SName = "Greifertyp: ";
|
||||
PermissibleBeamParamDeviationsVm.SName = "Max. Strahlabweichung: ";
|
||||
DiameterVm.SName = "Teiledurchmesser: ";
|
||||
ThicknessVm.SName = "Teiledicke: ";
|
||||
TimeIntervallBeamCheckVm.SName = "Intervall Strahlvermessung: ";
|
||||
RestingTimeHotplateVm.SName = "Verweilzeit Heizplatte: ";
|
||||
TargetTemperatureHotplateVm.SName = "Zieltemperatur Heizplatte: ";
|
||||
RestingTimeCoolplateVm.SName = "Verweilzeit Kühlplatte: ";
|
||||
TargetTemperatureCoolplateVm.SName = "Zieltemperatur Kühlplatte";
|
||||
|
||||
RadialPosLowerWaterJetVm.SName = "Radial Position Unterwasserstrahl: ";
|
||||
ChuckRpmVm.SName = "Drehzahl: ";
|
||||
HvmaxTestCurrentVm.SName = "HV: Max. Teststrom: ";
|
||||
Hvn2PrePurgeTimeVm.SName = "HV: Vorreinigungszeit: ";
|
||||
HvnumRetriesVm.SName = "HV: Anzahl Wiederholversuche: ";
|
||||
HvpolarityVm.SName = "HV: Polarität (1=Pos, 2=Neg): ";
|
||||
HvrampTimeVm.SName = "HV: Rampenzeit: ";
|
||||
HvtestFrequencyVm.SName = "HV: Testfrequenz: ";
|
||||
HvTestOkCurrentVm.SName = "HV: Teststrom Teil OK";
|
||||
HvTestOkVoltageVm.SName = "HV: Testspannung Teil OK";
|
||||
HvtestTemperatureVm.SName = "HV: Testtemperatur: ";
|
||||
HvtestVoltageVm.SName = "HV: Testspannung: ";
|
||||
HvtestPressureN2Vm.SName = "HV: DruckN2: ";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion ctor
|
||||
|
||||
|
||||
|
||||
private ReceipeDto SetDto()
|
||||
{
|
||||
var receipe = new ReceipeDto();
|
||||
|
||||
receipe.ReceipeObject.MachineParameters.TrayPositions = new List<TrayPosition>(TrayPositions);
|
||||
receipe.ReceipeObject.MachineParameters.CameraPrograms = CameraProgramsVm.Value;
|
||||
receipe.ReceipeObject.MachineParameters.Chucks = ChucksVm.Value;
|
||||
receipe.ReceipeObject.MachineParameters.Gripper = GripperVm.Value;
|
||||
receipe.ReceipeObject.MachineParameters.PermissibleBeamParameterDeviations = PermissibleBeamParamDeviationsVm.Value;
|
||||
|
||||
receipe.ReceipeObject.ProductParameters.Diameter = DiameterVm.Value;
|
||||
receipe.ReceipeObject.ProductParameters.Thickness = ThicknessVm.Value;
|
||||
receipe.ReceipeObject.ProductParameters.TimeIntervallBeamCheck = TimeIntervallBeamCheckVm.Value;
|
||||
|
||||
receipe.ReceipeObject.ReceipeHotplate.RestingTime = RestingTimeHotplateVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHotplate.TargetTemperature = TargetTemperatureHotplateVm.Value;
|
||||
|
||||
receipe.ReceipeObject.ReceipeCoolplate.RestingTime = RestingTimeCoolplateVm.Value;
|
||||
receipe.ReceipeObject.ReceipeCoolplate.TargetTemperature = TargetTemperatureCoolplateVm.Value;
|
||||
|
||||
receipe.ReceipeObject.ReceipeEtcher.NumberRobotPos = (ushort)NumberRobotPositionsVm.Value;
|
||||
receipe.ReceipeObject.ReceipeEtcher.RadialPosLowerWaterJet = RadialPosLowerWaterJetVm.Value;
|
||||
receipe.ReceipeObject.ReceipeEtcher.Rpm = ChuckRpmVm.Value;
|
||||
receipe.ReceipeObject.ReceipeEtcher.RobotStepData = new List<EtcherRobotStepData>(EtcherRobotSteps);
|
||||
|
||||
receipe.ReceipeObject.ReceipeHvTester.MaximumTestCurrent = HvmaxTestCurrentVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.N2PrePurgetime = Hvn2PrePurgeTimeVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.NumRetries = (ushort)HvnumRetriesVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.Polarity = (ushort)HvpolarityVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.RampTime = HvrampTimeVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestFrequency = HvtestFrequencyVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestOkCurrent = HvTestOkCurrentVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestOkVoltage = HvTestOkVoltageVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestTemperature = HvtestTemperatureVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestVoltage = HvtestVoltageVm.Value;
|
||||
receipe.ReceipeObject.ReceipeHvTester.TestpressureN2 = HvtestPressureN2Vm.Value;
|
||||
|
||||
receipe.ReceipeObject.Flowreceipe.Nodes = new List<FlowReceipeNode>();
|
||||
foreach (var entry in FlowReceipeEntries)
|
||||
{
|
||||
var node = new FlowReceipeNode();
|
||||
node.StationType = (ushort)entry.Station.eStation;
|
||||
node.Priority = entry.Priority;
|
||||
node.NextNodeSuccess = entry.NextNodeSuccess;
|
||||
node.NextNodeRetry = entry.NextNodeRetry;
|
||||
node.NextNodeFail = entry.NextNodeFail;
|
||||
node.MaxRetries = entry.MaxRetries;
|
||||
|
||||
receipe.ReceipeObject.Flowreceipe.Nodes.Add(node);
|
||||
}
|
||||
|
||||
receipe.ReceipeObject.Flowreceipe.NodeCount = receipe.ReceipeObject.Flowreceipe.Nodes.Count;
|
||||
|
||||
|
||||
return receipe;
|
||||
}
|
||||
|
||||
private void GetDto(ReceipeDto receipe)
|
||||
{
|
||||
TrayPositions = new (receipe.ReceipeObject.MachineParameters.TrayPositions);
|
||||
CameraProgramsVm.Value = receipe.ReceipeObject.MachineParameters.CameraPrograms;
|
||||
ChucksVm.Value = receipe.ReceipeObject.MachineParameters.Chucks;
|
||||
GripperVm.Value = receipe.ReceipeObject.MachineParameters.Gripper;
|
||||
PermissibleBeamParamDeviationsVm.Value = receipe.ReceipeObject.MachineParameters.PermissibleBeamParameterDeviations;
|
||||
|
||||
DiameterVm.Value = receipe.ReceipeObject.ProductParameters.Diameter;
|
||||
ThicknessVm.Value = receipe.ReceipeObject.ProductParameters.Thickness;
|
||||
TimeIntervallBeamCheckVm.Value = receipe.ReceipeObject.ProductParameters.TimeIntervallBeamCheck;
|
||||
|
||||
RestingTimeHotplateVm.Value = receipe.ReceipeObject.ReceipeHotplate.RestingTime;
|
||||
TargetTemperatureHotplateVm.Value = receipe.ReceipeObject.ReceipeHotplate.TargetTemperature;
|
||||
|
||||
RestingTimeCoolplateVm.Value = receipe.ReceipeObject.ReceipeCoolplate.RestingTime;
|
||||
TargetTemperatureCoolplateVm.Value = receipe.ReceipeObject.ReceipeCoolplate.TargetTemperature;
|
||||
|
||||
NumberRobotPositionsVm.Value = receipe.ReceipeObject.ReceipeEtcher.NumberRobotPos;
|
||||
RadialPosLowerWaterJetVm.Value = receipe.ReceipeObject.ReceipeEtcher.RadialPosLowerWaterJet;
|
||||
ChuckRpmVm.Value = receipe.ReceipeObject.ReceipeEtcher.Rpm;
|
||||
EtcherRobotSteps = new (receipe.ReceipeObject.ReceipeEtcher.RobotStepData);
|
||||
|
||||
HvmaxTestCurrentVm.Value = receipe.ReceipeObject.ReceipeHvTester.MaximumTestCurrent;
|
||||
Hvn2PrePurgeTimeVm.Value = receipe.ReceipeObject.ReceipeHvTester.N2PrePurgetime;
|
||||
HvnumRetriesVm.Value = receipe.ReceipeObject.ReceipeHvTester.NumRetries;
|
||||
HvpolarityVm.Value = receipe.ReceipeObject.ReceipeHvTester.Polarity;
|
||||
HvrampTimeVm.Value = receipe.ReceipeObject.ReceipeHvTester.RampTime;
|
||||
HvtestFrequencyVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestFrequency;
|
||||
HvTestOkCurrentVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestOkCurrent;
|
||||
HvTestOkVoltageVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestOkVoltage;
|
||||
HvtestTemperatureVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestTemperature;
|
||||
HvtestVoltageVm.Value = receipe.ReceipeObject.ReceipeHvTester.TestVoltage;
|
||||
HvtestPressureN2Vm.Value = receipe.ReceipeObject.ReceipeHvTester.TestpressureN2;
|
||||
|
||||
FlowReceipeEntries.Clear();
|
||||
foreach (var node in receipe.ReceipeObject.Flowreceipe.Nodes)
|
||||
{
|
||||
var station = FlowStationsVm.First(i => (uint)i.eStation == (uint)node.StationType);
|
||||
|
||||
AddFlowReceipeEntry();
|
||||
FlowReceipeEntries.Last().MaxRetries = node.MaxRetries;
|
||||
FlowReceipeEntries.Last().NextNodeRetry = node.NextNodeRetry;
|
||||
FlowReceipeEntries.Last().NextNodeFail = node.NextNodeFail;
|
||||
FlowReceipeEntries.Last().NextNodeSuccess = node.NextNodeSuccess;
|
||||
FlowReceipeEntries.Last().Priority = node.Priority;
|
||||
FlowReceipeEntries.Last().Station = station;
|
||||
}
|
||||
|
||||
FlowNodeCountVm.Value = receipe.ReceipeObject.Flowreceipe.NodeCount;
|
||||
}
|
||||
|
||||
private void SendDataToPLC()
|
||||
{
|
||||
var val = _adsManager.ReadValue("GVL_Scheduler.MAX_RECIPE_NODES");
|
||||
maxFlowNodes = (val == null) ? 10 : (int)val; ;
|
||||
val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
maxEtcherRobotPositions = (val == null) ? 10:(int)val;
|
||||
val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
maxTrayPositions = (val == null) ? 20 : (int)val;
|
||||
|
||||
for (var i = 0; i < maxTrayPositions && i < TrayPositions.Count; i++)
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stTray.arPosX[" + i + "]", TrayPositions[i].PosX);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stTray.arPosY[" + i + "]", TrayPositions[i].PosY);
|
||||
}
|
||||
|
||||
var trayPosCountToPlc = TrayPositions.Count < maxTrayPositions ? TrayPositions.Count : maxTrayPositions;
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stTray.iPosCnt", trayPosCountToPlc);
|
||||
|
||||
for (var i = 0; i < maxEtcherRobotPositions && i < EtcherRobotSteps.Count; i++)
|
||||
{
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosX", EtcherRobotSteps[i].PosX);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosY", EtcherRobotSteps[i].PosY);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosZ", EtcherRobotSteps[i].PosZ);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rAngleAlpha", EtcherRobotSteps[i].AngleAlpha);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rMoveSpeed", EtcherRobotSteps[i].MoveSpeed);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rDelay", EtcherRobotSteps[i].Delay);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].uiMedium", EtcherRobotSteps[i].Medium);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromBelow", EtcherRobotSteps[i].WaterFromBelow);
|
||||
_adsManager.WriteValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromAbove", EtcherRobotSteps[i].WaterFromAbove);
|
||||
}
|
||||
|
||||
|
||||
for (var i = 0; (i < maxFlowNodes && i < FlowReceipeEntries.Count); i++)
|
||||
{
|
||||
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].Priority);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].Station.eStation);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].MaxRetries);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeSuccess);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeRetry);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeFail);
|
||||
|
||||
}
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.uiNodeCnt", FlowNodeCountVm.Value);
|
||||
|
||||
|
||||
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", CameraProgramsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", ChucksVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", GripperVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", PermissibleBeamParamDeviationsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", DiameterVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", ThicknessVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", TimeIntervallBeamCheckVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rRestingTime", RestingTimeHotplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rTemp", TargetTemperatureHotplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rRestingTime", RestingTimeCoolplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rTemp", TargetTemperatureCoolplateVm.Value);
|
||||
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.uiNumRobotPos", NumberRobotPositionsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.rRadialPosLowerWaterJet", RadialPosLowerWaterJetVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.rChuckRPM", ChuckRpmVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestVoltage", HvtestVoltageVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rMaxTestCurrent", HvmaxTestCurrentVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rRampTime", HvrampTimeVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestFrequency", HvtestFrequencyVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.uiPolarity", HvpolarityVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestPresN2", HvtestPressureN2Vm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rN2PrePurgeTime", Hvn2PrePurgeTimeVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.uiNumRetries", HvnumRetriesVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestTemp", HvtestTemperatureVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestOkVoltage", HvTestOkVoltageVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestOkCurrent", HvTestOkCurrentVm.Value);
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI;
|
||||
|
||||
public sealed partial class StringOverviewPageVM : ObservableObject, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private ModuleControlButtonVM module1;
|
||||
|
||||
[ObservableProperty]
|
||||
private ModuleControlButtonVM module2;
|
||||
|
||||
[ObservableProperty]
|
||||
private ModuleControlButtonVM module3;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
private readonly string? _variableName;
|
||||
|
||||
public StringOverviewPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
module1 = new(_adsManager, _variableName + ".stHMIInterfaceModule1");
|
||||
module2 = new(_adsManager, _variableName + ".stHMIInterfaceModule2");
|
||||
module3 = new(_adsManager, _variableName + ".stHMIInterfaceModule3");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Module1?.Dispose();
|
||||
Module2?.Dispose();
|
||||
Module3?.Dispose();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void Module1Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule1", typeof(ModuleOverviewPage), "Module 1"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void Module2Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule2", typeof(ModuleOverviewPage), "Module 2"));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void Module3Clicked()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new NavigateMessage(_variableName + ".stHMIInterfaceModule3", typeof(ModuleOverviewPage), "Module 3"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using HMIToolkit;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using TwinCAT.TypeSystem;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using InfineonHMI.Model;
|
||||
namespace InfineonHMI
|
||||
{
|
||||
public sealed partial class TrayFeederPageVM : ObservableValidator, IDisposable
|
||||
{
|
||||
private readonly string? _variableName;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
|
||||
public TrayFeederPageVM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TrayFeederPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Heisig.HMI.AdsManager;
|
||||
|
||||
namespace UniperHMI;
|
||||
|
||||
public sealed partial class UnitOverviewPageVM : ObservableObject, IDisposable
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string unitName;
|
||||
|
||||
[ObservableProperty]
|
||||
private UnitDetailsControlVM unitControlVM;
|
||||
|
||||
private readonly IAdsManager? _adsManager;
|
||||
private readonly string? _variableName;
|
||||
|
||||
public UnitOverviewPageVM(IAdsManager adsManager, string variableName)
|
||||
{
|
||||
_adsManager = adsManager;
|
||||
_variableName = variableName;
|
||||
|
||||
unitControlVM = new(_adsManager, _variableName);
|
||||
|
||||
unitName = "Unit X";
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UnitControlVM?.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<Page
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.AlignmentStationPage"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:AlignmentStationPageVM}}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="AlignmentStationPage" FontSize="40">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Alignment Station" VerticalAlignment="Top" HorizontalAlignment="Left" />
|
||||
|
||||
<HMIToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="center" VerticalAlignment="Center" DataContext="{Binding Path=VacuumValveControlVm}"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
uniper_hmi_old/UniperHMI/Pages/Views/AutomaticModePage.xaml
Normal file
49
uniper_hmi_old/UniperHMI/Pages/Views/AutomaticModePage.xaml
Normal file
@@ -0,0 +1,49 @@
|
||||
<Page x:Class="UniperHMI.AutomaticModePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="AutomaticModePage">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
|
||||
|
||||
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
|
||||
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class AutomaticModePage : Page
|
||||
{
|
||||
public AutomaticModePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<Page x:Class="UniperHMI.BatteryOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||
mc:Ignorable="d"
|
||||
x:Name="root"
|
||||
d:DataContext="{d:DesignInstance Type=local:BatteryOverviewPageVM, IsDesignTimeCreatable=False}"
|
||||
Title="ManualModePage" Height="Auto" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
|
||||
<Grid Margin="10" Width="Auto" Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="0" DataContext="{Binding String1VM}" Command="{Binding ElementName=root, Path=DataContext.String1ClickedCommand}" SMUName="String 1" Margin="0,0,5,0" />
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="1" DataContext="{Binding String2VM}" Command="{Binding ElementName=root, Path=DataContext.String2ClickedCommand}" SMUName="String 2" Margin="0,0,5,0" />
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="2" DataContext="{Binding DummyStringVM}" SMUName="String 3" Margin="0,0,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="3" DataContext="{Binding DummyStringVM}" SMUName="String 4" Margin="0,0,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="4" DataContext="{Binding DummyStringVM}" SMUName="String 5" Margin="0,0,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="0" Grid.Column="5" DataContext="{Binding DummyStringVM}" SMUName="String 6" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="0" DataContext="{Binding DummyStringVM}" SMUName="String 7" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="1" DataContext="{Binding DummyStringVM}" SMUName="String 8" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="2" DataContext="{Binding DummyStringVM}" SMUName="String 9" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="3" DataContext="{Binding DummyStringVM}" SMUName="String 10" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="4" DataContext="{Binding DummyStringVM}" SMUName="String 11" Margin="0,5,5,0" IsEnabled="False"/>
|
||||
<local:SMUControlButton Grid.Row="1" Grid.Column="5" DataContext="{Binding DummyStringVM}" SMUName="String 12" Margin="0,5,0,0" IsEnabled="False"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ManualModePage.xaml
|
||||
/// </summary>
|
||||
public partial class BatteryOverviewPage : Page
|
||||
{
|
||||
public BatteryOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
//Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
uniper_hmi_old/UniperHMI/Pages/Views/ChuckMagazinPage.xaml
Normal file
64
uniper_hmi_old/UniperHMI/Pages/Views/ChuckMagazinPage.xaml
Normal file
@@ -0,0 +1,64 @@
|
||||
<Page x:Class="UniperHMI.ChuckMagazinPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Blablubb">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Magazinbelegung: " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Content="Tellerplatz 1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" Content="Tellerplatz 2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="1" Grid.Column="7" Grid.ColumnSpan="2" Content="Tellerplatz 3" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Content="Tellerplatz 4" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2" Content="Tellerplatz 5" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="5" Grid.Column="7" Grid.ColumnSpan="2" Content="Tellerplatz 6" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
|
||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="230" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="230"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace1}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace2}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="2" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace3}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace4}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace5}" VerticalAlignment="Center" Width="210"/>
|
||||
<Ellipse Grid.Column="7" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="210" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace6}" VerticalAlignment="Center" Width="210"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<Page x:Class="InfineonHMI.EtchingStation1Page"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:EtchingStation1PageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="EtchingStationPage">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Etching Station 1" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="35" />
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding VacuumValveControlEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveControlEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveLeftEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveRightEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveFrontEtching1Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveBackEtching1Vm}"/>
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="3" Content="Teller Entriegeln" DataContext="{Binding ChuckUnlockCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30" />
|
||||
<Button Grid.Row="2" Grid.Column="3" Content="Teller Verriegeln" DataContext="{Binding ChuckLockCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
<Button Grid.Row="3" Grid.Column="3" Content="Teller Auswerfen" DataContext="{Binding ChuckEjectCmdButtonEtching1Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class EtchingStation1Page : Page
|
||||
{
|
||||
public EtchingStation1Page()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<Page x:Class="InfineonHMI.EtchingStation2Page"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:EtchingStation2PageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="EtchingStationPage">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Etching Station 2" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="35" />
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding VacuumValveControlEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveControlEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="0" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveLeftEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckUnlockValveRightEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveFrontEtching2Vm}"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="2" Grid.Row="3" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding ChuckEjectValveBackEtching2Vm}"/>
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="3" Content="Teller Entriegeln" DataContext="{Binding ChuckUnlockCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
<Button Grid.Row="2" Grid.Column="3" Content="Teller Verriegeln" DataContext="{Binding ChuckLockCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
<Button Grid.Row="3" Grid.Column="3" Content="Teller Auswerfen" DataContext="{Binding ChuckEjectCmdButtonEtching2Vm}" HorizontalAlignment="Center" Width="320" Height="140" FontSize="30"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class EtchingStation2Page : Page
|
||||
{
|
||||
public EtchingStation2Page()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
uniper_hmi_old/UniperHMI/Pages/Views/EtchingStationPage.xaml
Normal file
49
uniper_hmi_old/UniperHMI/Pages/Views/EtchingStationPage.xaml
Normal 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>
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
25
uniper_hmi_old/UniperHMI/Pages/Views/EventsPage.xaml
Normal file
25
uniper_hmi_old/UniperHMI/Pages/Views/EventsPage.xaml
Normal file
@@ -0,0 +1,25 @@
|
||||
<Page x:Class="InfineonHMI.EventsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:EventsPageVM, IsDesignTimeCreatable=False}"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
Title="EventsPage">
|
||||
<Page.Resources>
|
||||
<local:DateTimeToEventTimeConverter x:Key="dtConverter" />
|
||||
</Page.Resources>
|
||||
|
||||
<Grid>
|
||||
<DataGrid ItemsSource="{Binding CurrentEvents}" AutoGenerateColumns="False" IsReadOnly="True">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Message" Binding="{Binding Message}" Width="400"/>
|
||||
<DataGridTextColumn Header="Raised" Binding="{Binding Raised, Converter={StaticResource dtConverter}}" Width="*" SortDirection="Descending"/>
|
||||
<DataGridTextColumn Header="Cleared" Binding="{Binding Cleared, Converter={StaticResource dtConverter}}" Width="*"/>
|
||||
<DataGridTextColumn Header="Confirmed" Binding="{Binding Confirmed, Converter={StaticResource dtConverter}}" Width="*"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</Page>
|
||||
14
uniper_hmi_old/UniperHMI/Pages/Views/EventsPage.xaml.cs
Normal file
14
uniper_hmi_old/UniperHMI/Pages/Views/EventsPage.xaml.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI;
|
||||
|
||||
/// <summary>
|
||||
/// Interaktionslogik für EventsPage.xaml
|
||||
/// </summary>
|
||||
public partial class EventsPage : Page
|
||||
{
|
||||
public EventsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<Page x:Class="InfineonHMI.HighVoltageStationPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:hmiToolkit="clr-namespace:HMIToolkit"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:HighVoltageStationPageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="High Voltage Test Station">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Hochvolt Test Station Heiß" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="35"/>
|
||||
<Label Grid.Row="0" Grid.Column="3" Content="Hochvolt Test Station Kalt" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="35"/>
|
||||
<Border Grid.Row="0" Grid.Column="2" Grid.RowSpan="9" BorderBrush="White" BorderThickness="0,0,1,0"></Border>
|
||||
<Border Grid.Row="0" Grid.Column="3" Grid.RowSpan="9" BorderBrush="White" BorderThickness="1,0,0,0"></Border>
|
||||
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="0" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveHotControlVm }"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="3" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding DoorValveColdControlVm }"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="1" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding TestChamberHotValveVm }"/>
|
||||
<hmiToolkit:BinaryValveControl Grid.Column="4" Grid.Row="1" Grid.RowSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding TestChamberColdValveVm }"/>
|
||||
|
||||
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="1" FontSize="40" Content="Solltemperatur" HorizontalAlignment="left" Margin="5"/>
|
||||
<hmiToolkit:AnalogValue Grid.Column="2" Grid.Row="1" Height="60" Width="260" HorizontalAlignment="Left" Margin="60" VerticalAlignment="Center" DataContext="{Binding TempSPHotVm}"/>
|
||||
<Label Grid.Column="5" Grid.Row="1" FontSize="40" Content="Solltemperatur" Margin="5"/>
|
||||
<hmiToolkit:AnalogValue Grid.Column="5" Grid.Row="1" Height="60" Width="260" Margin="60" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TempSPColdVm}"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
100
uniper_hmi_old/UniperHMI/Pages/Views/HotCoolPlatePage.xaml
Normal file
100
uniper_hmi_old/UniperHMI/Pages/Views/HotCoolPlatePage.xaml
Normal file
@@ -0,0 +1,100 @@
|
||||
<Page xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.HotCoolPlatePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:HotCoolPlatePageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="HotCoolPlatePage">
|
||||
|
||||
<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.RowSpan="9" Grid.Column="4" BorderBrush="WhiteSmoke" BorderThickness="2,0,0,0" />
|
||||
<Border Grid.Row="0" Grid.RowSpan="9" Grid.Column="3" BorderBrush="WhiteSmoke" BorderThickness="0,0,2,0" />
|
||||
<Label Grid.Row="0" Grid.Column="0" FontSize="35" Content="Heizplatte" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
|
||||
<Label Grid.Row="0" Grid.Column="4" FontSize="35" Content="Kühlplatte" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
|
||||
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="1" Content="Einschalten" DataContext="{Binding EnableHotPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||
<Button Grid.Row="0" Grid.Column="2" Content="Ausschalten" DataContext="{Binding DisableHotPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="5" Content="Einschalten" DataContext="{Binding EnableCoolPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||
<Button Grid.Row="0" Grid.Column="6" Content="Ausschalten" DataContext="{Binding DisableCoolPlateButtonVm}" HorizontalAlignment="Center" Width="280" Height="100" FontSize="35" />
|
||||
|
||||
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" FontSize="35" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
<Label Grid.Row="2" Grid.Column="4" FontSize="35" Content="Belegung:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="1" FontSize="40" Content="Temperatur Soll" VerticalAlignment="Top" HorizontalAlignment="Center"/>
|
||||
<HMIToolkit:AnalogValue Grid.Column="1" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding HotPlateTargetTemperature}"/>
|
||||
<Label Grid.Row="1" Grid.Column="2" Content="Temperatur Ist" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40" />
|
||||
<HMIToolkit:AnalogValue Grid.Column="2" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding HotPlateActualTemperature}"/>
|
||||
<Label Grid.Row="1" Grid.Column="5" Content="Temperatur Soll" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40"/>
|
||||
<HMIToolkit:AnalogValue Grid.Column="5" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding CoolPlateTargetTemperature}"/>
|
||||
<Label Grid.Row="1" Grid.Column="6" Content="Temperatur Ist" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40"/>
|
||||
<HMIToolkit:AnalogValue Grid.Column="6" Grid.Row="1" Height="80" Width="160" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{Binding CoolPlateActualTemperature}"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility1}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility2}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility3}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility4}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility5}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility6}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility7}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="1" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="2" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding HotPlateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
||||
|
||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility1}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility2}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility3}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility4}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility5}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility6}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="4" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility7}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="5" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility8}" VerticalAlignment="Center" Width="120"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="6" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="120" Margin="10" Stroke="WhiteSmoke" Fill="Gray" Visibility="{Binding CoolPlateVisibility9}" VerticalAlignment="Center" Width="120"/>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
169
uniper_hmi_old/UniperHMI/Pages/Views/KukaRobotPage.xaml
Normal file
169
uniper_hmi_old/UniperHMI/Pages/Views/KukaRobotPage.xaml
Normal file
@@ -0,0 +1,169 @@
|
||||
<Page x:Class="InfineonHMI.KukaRobotPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:KukaRobotPageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="KukaRobotPage">
|
||||
|
||||
<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="2" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,4,1,1" Margin="5,5,0,0"/>
|
||||
<Border Grid.Row="2" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,4,4,1" Margin="0,5,5,0"/>
|
||||
<Label Grid.Row="2" Grid.Column="2" Content="Offset Abholen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="2" Grid.Column="4" Content="Offset Abholen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_Y}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="2" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetPick}" Text="{Binding OffsetPick_X}" MaxLines="1" Margin="10,15,15,10" TextAlignment="Right" />
|
||||
<Border Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,1" Margin="5,0,0,0"/>
|
||||
<Border Grid.Row="3" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,1" Margin="0,0,5,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="Offset Ablegen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="4" Content="Offset Ablegen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_Y}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="3" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetPlace}" Text="{Binding OffsetPlace_X}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
|
||||
<Border Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,1" Margin="5,0,0,0"/>
|
||||
<Border Grid.Row="4" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,1" Margin="0,0,5,0"/>
|
||||
<Label Grid.Row="4" Grid.Column="2" Content="Offset NIO Abholen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="4" Grid.Column="4" Content="Offset NIO Abholen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_Y}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="4" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetNIOPick}" Text="{Binding OffsetNIOPick_X}" MaxLines="1" Margin="10,10,15,10" TextAlignment="Right" />
|
||||
|
||||
<Border Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="4,1,1,4" Margin="5,0,0,5"/>
|
||||
<Border Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2" BorderBrush="WhiteSmoke" BorderThickness="1,1,4,4" Margin="0,0,5,5"/>
|
||||
<Label Grid.Row="5" Grid.Column="2" Content="Offset NIO Ablegen in mm (X):" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
|
||||
<Label Grid.Row="5" Grid.Column="4" Content="Offset NIO Ablegen in mm (Y):" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<TextBox Grid.Row="5" Grid.Column="5" IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_Y}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
||||
<TextBox Grid.Row="5" Grid.Column="3" IsEnabled="{Binding CanChangeOffsetNIOPlace}" Text="{Binding OffsetNIOPlace_X}" MaxLines="1" Margin="10,10,15,15" TextAlignment="Right" />
|
||||
|
||||
|
||||
|
||||
<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" />
|
||||
|
||||
<Label Grid.Row="6" Grid.Column="3" Content="Magazinbelegung: " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
|
||||
|
||||
<Grid Grid.Column ="4" Grid.Row="6" Grid.RowSpan="3" Grid.ColumnSpan="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Tellerplatz 1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2" Content="Tellerplatz 2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" Content="Tellerplatz 3" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="Tellerplatz 4" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="2" Content="Tellerplatz 5" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
<Label Grid.Row="3" Grid.Column="6" Grid.ColumnSpan="2" Content="Tellerplatz 6" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||
|
||||
<Ellipse Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="85" Margin="0" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="85"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace1}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace2}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace3}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="0" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace4}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="3" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace5}" VerticalAlignment="Center" Width="80"/>
|
||||
<Ellipse Grid.Column="6" Grid.Row="4" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="80" Margin="0" Stroke="WhiteSmoke" Fill="DarkCyan" Visibility="{Binding MagazinPlace6}" VerticalAlignment="Center" Width="80"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
22
uniper_hmi_old/UniperHMI/Pages/Views/KukaRobotPage.xaml.cs
Normal file
22
uniper_hmi_old/UniperHMI/Pages/Views/KukaRobotPage.xaml.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
163
uniper_hmi_old/UniperHMI/Pages/Views/MachineOverviewPage.xaml
Normal file
163
uniper_hmi_old/UniperHMI/Pages/Views/MachineOverviewPage.xaml
Normal file
@@ -0,0 +1,163 @@
|
||||
<Page x:Class="InfineonHMI.MachineOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=uniperHmi:MachineOverviewPageVM, IsDesignTimeCreatable=True}"
|
||||
Title="Production Overview">
|
||||
|
||||
<Viewbox Stretch="none">
|
||||
<Grid Width="3840" Height="1650">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.12*"/>
|
||||
<ColumnDefinition Width="0.93*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" Margin="25 0 0 0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
FontFamily="Arial"
|
||||
Content="Trayfeeder
Ein-/Ausgabe"
|
||||
Command="{Binding TrayfeederPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Margin="5"
|
||||
FontSize="39"
|
||||
Content="Ausrichtstation"
|
||||
Command="{Binding AlignerPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="2"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Ätzer 1"
|
||||
Command="{Binding Etching1PageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="3"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Ätzer 2"
|
||||
Command="{Binding Etching2PageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="4"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="HV Test"
|
||||
Command="{Binding HVTestPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="5"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Heiz-
/Kühlplatte"
|
||||
Command="{Binding HotCoolplatePageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="6"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="NOK Station"
|
||||
Command="{Binding NIOStationPageClickedCommand}"/>
|
||||
|
||||
<Border Grid.Row="7"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0,5,0,0"/>
|
||||
|
||||
<Button Grid.Row="7"
|
||||
Margin="5,15,5,5"
|
||||
FontSize="36" Content="Kuka Roboter"
|
||||
Command="{Binding KukaPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="8"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
FontFamily="Arial"
|
||||
Content="Medienschrank"
|
||||
Command="{Binding MediaCabinetPageClickedCommand}"/>
|
||||
|
||||
</Grid>
|
||||
<!-- DETAIL PAGE -->
|
||||
|
||||
|
||||
<Frame x:Name="DetailFrame"
|
||||
Grid.Column="1"
|
||||
NavigationUIVisibility="Hidden"
|
||||
Content="{Binding CurrentDetailPage}"/>
|
||||
|
||||
<Image Grid.Column="1" Source="/Anlagenuebersicht.png" Stretch="Fill" Height="1504" Width="1936"/>
|
||||
<Button Command="{Binding TrayfeederPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2203,572,820,780"/>
|
||||
<Button Command="{Binding KukaPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1822,610,1380,780"/>
|
||||
<Button Command="{Binding Etching1PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1480,819,1749,644" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="-23.091"/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding Etching2PageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1431,473,1770,971" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="24.991"/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding HVTestPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1706,183,1472,1202" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="-105.32"/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding HotCoolplatePageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="2039,316,1175,1106" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="-56.721"/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding MediaCabinetPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="878,565,2350,641"/>
|
||||
|
||||
<Button Command="{Binding AlignerPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1633,1048,1594,474" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="27.441"/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Button Command="{Binding NIOStationPageClickedCommand}" Background="Transparent" Grid.Column="1" Margin="1707,932,1543,601" RenderTransformOrigin="0.5,0.5">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="27.441"/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class MachineOverviewPage : Page
|
||||
{
|
||||
public MachineOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
uniper_hmi_old/UniperHMI/Pages/Views/MediaCabinetPage.xaml
Normal file
45
uniper_hmi_old/UniperHMI/Pages/Views/MediaCabinetPage.xaml
Normal file
@@ -0,0 +1,45 @@
|
||||
<Page x:Class="InfineonHMI.MediaCabinetPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:common="clr-namespace:Common"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:MediaCabinetPageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="1600" d:DesignWidth="3800"
|
||||
Title="Media Cabinet">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="33*" />
|
||||
<RowDefinition Height="33*" />
|
||||
<RowDefinition Height="33*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Mediacabinet Page" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
|
||||
<common:MediaContainer Grid.Row="1" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container1Vm}"/>
|
||||
<common:MediaContainer Grid.Row="2" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container2Vm}"/>
|
||||
<common:MediaContainer Grid.Row="3" Grid.Column="0" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container3Vm}"/>
|
||||
|
||||
|
||||
<common:MediaContainer Grid.Row="1" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container4Vm}"/>
|
||||
<common:MediaContainer Grid.Row="2" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container5Vm}"/>
|
||||
<common:MediaContainer Grid.Row="3" Grid.Column="1" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container6Vm}"/>
|
||||
|
||||
|
||||
<common:MediaContainer Grid.Row="1" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container7Vm}"/>
|
||||
<common:MediaContainer Grid.Row="2" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container8Vm}"/>
|
||||
<common:MediaContainer Grid.Row="3" Grid.Column="2" Height="400" Width="300" Margin="10" HorizontalAlignment="Center" DataContext="{Binding Container9Vm}"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
25
uniper_hmi_old/UniperHMI/Pages/Views/ModuleOverviewPage.xaml
Normal file
25
uniper_hmi_old/UniperHMI/Pages/Views/ModuleOverviewPage.xaml
Normal file
@@ -0,0 +1,25 @@
|
||||
<Page x:Class="UniperHMI.ModuleOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
d:DataContext="{d:DesignInstance Type=local:ModuleOverviewPageVM, IsDesignTimeCreatable=False}"
|
||||
mc:Ignorable="d"
|
||||
Width="Auto" Height="Auto" x:Name="root" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
|
||||
<Grid Margin="10" ShowGridLines="False" Width="Auto" Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<local:SMUControlButton SMUName="Unit 1" DataContext="{Binding Unit1}" Command="{Binding ElementName=root, Path=DataContext.Unit1ClickedCommand}" Grid.Row="0" Grid.Column="0" Margin="0,0,5,0" />
|
||||
<local:SMUControlButton SMUName="Unit 2" DataContext="{Binding Unit2}" Command="{Binding ElementName=root, Path=DataContext.Unit2ClickedCommand}" Grid.Row="0" Grid.Column="1" />
|
||||
<local:SMUControlButton SMUName="Unit 3" DataContext="{Binding Unit3}" Command="{Binding ElementName=root, Path=DataContext.Unit3ClickedCommand}" Grid.Row="1" Grid.Column="0" Margin="0,5,5,0" />
|
||||
<local:SMUControlButton SMUName="Unit 4" DataContext="{Binding Unit4}" Command="{Binding ElementName=root, Path=DataContext.Unit4ClickedCommand}" Grid.Row="1" Grid.Column="1" Margin="0,5,0,0"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ModuleOverviewPage.xaml
|
||||
/// </summary>
|
||||
public partial class ModuleOverviewPage : Page
|
||||
{
|
||||
public ModuleOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
uniper_hmi_old/UniperHMI/Pages/Views/NIOStationPage.xaml
Normal file
46
uniper_hmi_old/UniperHMI/Pages/Views/NIOStationPage.xaml
Normal file
@@ -0,0 +1,46 @@
|
||||
<Page
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="InfineonHMI.NIOStationPage"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:NIOStationPageVM}}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="NIOStationPage">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="NIO Station" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<HMIToolkit:BinaryValveControl DataContext="{Binding ClampDiagValveVm}" Grid.Column="0" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
||||
<HMIToolkit:BinaryValveControl DataContext="{Binding ClampAcrossValveVm}" Grid.Column="1" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="2" Content="Tray Fixieren" DataContext="{Binding ClampCmdButtonVm}" HorizontalAlignment="Center" Width="180" Height="60" />
|
||||
<Button Grid.Row="2" Grid.Column="2" Content="Tray Lösen" DataContext="{Binding UnclampCmdButtonVm}" HorizontalAlignment="Center" Width="180" Height="60" />
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
22
uniper_hmi_old/UniperHMI/Pages/Views/NIOStationPage.xaml.cs
Normal file
22
uniper_hmi_old/UniperHMI/Pages/Views/NIOStationPage.xaml.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
100
uniper_hmi_old/UniperHMI/Pages/Views/ProductionOverviewPage.xaml
Normal file
100
uniper_hmi_old/UniperHMI/Pages/Views/ProductionOverviewPage.xaml
Normal file
@@ -0,0 +1,100 @@
|
||||
<Page x:Class="InfineonHMI.ProductionOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=uniperHmi:ProductionOverviewPageVM, IsDesignTimeCreatable=True}"
|
||||
Title="Production Overview">
|
||||
|
||||
<Viewbox Stretch="none">
|
||||
<Grid Width="3840" Height="1650">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.12*"/>
|
||||
<ColumnDefinition Width="0.93*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" Margin="25 0 0 0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
FontFamily="Arial"
|
||||
Content="Trayfeeder
Ein-/Ausgabe"
|
||||
Command="{Binding TrayfeederPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Margin="5"
|
||||
FontSize="39"
|
||||
Content="Ausrichtstation"
|
||||
Command="{Binding AlignerPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="2"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Ätzer 1"
|
||||
Command="{Binding Etching1PageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="3"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Ätzer 2"
|
||||
Command="{Binding Etching2PageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="4"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="HV Test"
|
||||
Command="{Binding HVTestPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="5"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="Heiz-
/Kühlplatte"
|
||||
Command="{Binding HotCoolplatePageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="6"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
Content="NOK Station"
|
||||
Command="{Binding NIOStationPageClickedCommand}"/>
|
||||
|
||||
<Border Grid.Row="7"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0,5,0,0"/>
|
||||
|
||||
<Button Grid.Row="7"
|
||||
Margin="5,15,5,5"
|
||||
FontSize="36" Content="Kuka Roboter"
|
||||
Command="{Binding KukaPageClickedCommand}"/>
|
||||
|
||||
<Button Grid.Row="8"
|
||||
Margin="5"
|
||||
FontSize="36"
|
||||
FontFamily="Arial"
|
||||
Content="Medienschrank"
|
||||
Command="{Binding MediaCabinetPageClickedCommand}"/>
|
||||
|
||||
</Grid>
|
||||
<!-- DETAIL PAGE -->
|
||||
<Frame x:Name="DetailFrame"
|
||||
Grid.Column="1"
|
||||
NavigationUIVisibility="Hidden"
|
||||
Content="{Binding CurrentDetailPage}"/>
|
||||
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</Page>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class ProductionOverviewPage : Page
|
||||
{
|
||||
public ProductionOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
192
uniper_hmi_old/UniperHMI/Pages/Views/ReceipePage.xaml
Normal file
192
uniper_hmi_old/UniperHMI/Pages/Views/ReceipePage.xaml
Normal file
@@ -0,0 +1,192 @@
|
||||
<Page x:Class="InfineonHMI.Pages.Views.ReceipePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:uniperHmi="clr-namespace:InfineonHMI"
|
||||
xmlns:common="clr-namespace:Common"
|
||||
d:DataContext="{d:DesignInstance Type=uniperHmi:ReceipePageVM, IsDesignTimeCreatable=True}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1900" d:DesignWidth="3800">
|
||||
|
||||
<Page.Resources>
|
||||
<CollectionViewSource x:Key="FlowStations" Source="{Binding FlowStationsVm}"></CollectionViewSource>
|
||||
</Page.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="33*"/>
|
||||
<ColumnDefinition Width="33*"/>
|
||||
<ColumnDefinition Width="17*"/>
|
||||
<ColumnDefinition Width="17*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Grid.Row="0" x:Name="BtnReadReceipeFile"
|
||||
Content="Rezept aus Datei Laden"
|
||||
Width="120"
|
||||
Command="{Binding ReadReceipeFileCommand}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10"/>
|
||||
|
||||
<Button Grid.Row="0" x:Name="BtnWriteReceipeFile"
|
||||
Content="Rezept speichern"
|
||||
Width="120"
|
||||
Command="{Binding WriteReceipeFileCommand}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10"/>
|
||||
<Button Grid.Row="0" x:Name="BtnWriteToPlc"
|
||||
Content="Sende Daten an SPS"
|
||||
Width="120"
|
||||
Command="{Binding WriteToPlcCommand}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10"/>
|
||||
</StackPanel>
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Allgemein: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding CameraProgramsVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChucksVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding GripperVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding DiameterVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ThicknessVm}"/>
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="9" Content="Heiz-/ Kühlplatte: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RestingTimeHotplateVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TargetTemperatureHotplateVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RestingTimeCoolplateVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="13" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TargetTemperatureCoolplateVm}"/>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="15" Content="Ätzerparameter: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="16" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding PermissibleBeamParamDeviationsVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="17" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding TimeIntervallBeamCheckVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="18" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding RadialPosLowerWaterJetVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="0" Grid.Row="19" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding ChuckRpmVm}"/>
|
||||
|
||||
<Label Grid.Column="1" Grid.Row="1" Content="Hochvolt Parameter: " VerticalAlignment="Center" FontSize="24"></Label>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="2" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvmaxTestCurrentVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="3" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding Hvn2PrePurgeTimeVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="4" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvnumRetriesVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="5" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvpolarityVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="6" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvrampTimeVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="7" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestFrequencyVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="8" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkCurrentVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="9" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvTestOkVoltageVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestTemperatureVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="11" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestVoltageVm}"/>
|
||||
<common:ParamControlFloat Grid.Column="1" Grid.Row="12" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" DataContext="{Binding HvtestPressureN2Vm}"/>
|
||||
|
||||
<Label Grid.Column="1" Grid.Row="14" Content="Durchlaufrezept Tabelle"></Label>
|
||||
<Grid Grid.Column="1" Grid.Row="15" Grid.RowSpan="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="90*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid Grid.Column="0" ItemsSource="{Binding FlowReceipeEntries}"
|
||||
SelectedItem="{Binding SelectedFlowReceipeEntry, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="NodeID" Binding="{Binding NodeId}"/>
|
||||
<DataGridTextColumn Header="Priorität" Binding="{Binding Priority}"/>
|
||||
<DataGridComboBoxColumn Header="Station"
|
||||
ItemsSource="{Binding Source={StaticResource FlowStations}}"
|
||||
SelectedValueBinding="{Binding Station, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True}"/>
|
||||
<DataGridTextColumn Header="Max. Wdh." Binding="{Binding MaxRetries}"/>
|
||||
<DataGridTextColumn Header="Nächste Node" Binding="{Binding NextNodeSuccess}"/>
|
||||
<DataGridTextColumn Header="Nächste Node bei Wdh." Binding="{Binding NextNodeRetry}"/>
|
||||
<DataGridTextColumn Header="Nächste Node bei Fail" Binding="{Binding NextNodeFail}"></DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical">
|
||||
<Button Content="+" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding AddFlowReceipeEntryCommand}" IsEnabled="{Binding CanAddFlowReceipeEntry}"></Button>
|
||||
<Button Content="-" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding RemoveFlowReceipeEntryCommand}" IsEnabled="{Binding CanRemoveFlowReceipeEntry}"></Button>
|
||||
<Button Content="↑" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding FlowReceipeEntryUpCommand}"></Button>
|
||||
<Button Content="↓" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding FlowReceipeEntryDownCommand}"></Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="1" Content="Traypositionen" FontSize="24"></Label>
|
||||
<Grid Grid.Column="2" Grid.Row="1" Grid.RowSpan="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80*"/>
|
||||
<ColumnDefinition Width="20*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid Grid.Column="0" ItemsSource="{Binding TrayPositions}"
|
||||
SelectedItem="{Binding SelectedTrayPosition}"
|
||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Pos Nr." Binding="{Binding PosId}"/>
|
||||
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}"/>
|
||||
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}"></DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical">
|
||||
<Button Content="+" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding AddTrayPositionCommand}" IsEnabled="{Binding CanAddTrayPosition}"></Button>
|
||||
<Button Content="-" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding RemoveTrayPositionCommand}" IsEnabled="{Binding CanRemoveTrayPosition}"></Button>
|
||||
<Button Content="↑" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding TrayPositionUpCommand}"></Button>
|
||||
<Button Content="↓" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding TrayPositionDownCommand}"></Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="9" Content="Ätzschritte Mecademic Roboter"></Label>
|
||||
<Grid Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="10" Grid.RowSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="90*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid Grid.Column="0" ItemsSource="{Binding EtcherRobotSteps}"
|
||||
SelectedItem="{Binding SelectedEtchRobotStep, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutoGenerateColumns="False" CanUserAddRows="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Pos X" Binding="{Binding PosX}"/>
|
||||
<DataGridTextColumn Header="Pos Y" Binding="{Binding PosY}"/>
|
||||
<DataGridTextColumn Header="Pos Z" Binding="{Binding PosZ}"/>
|
||||
<DataGridTextColumn Header="Winkel Alpha" Binding="{Binding AngleAlpha}"/>
|
||||
<DataGridTextColumn Header="Geschw." Binding="{Binding MoveSpeed}"/>
|
||||
<DataGridTextColumn Header="Wartezeit" Binding="{Binding Delay}"/>
|
||||
<DataGridTextColumn Header="Medium" Binding="{Binding Medium}"/>
|
||||
<DataGridCheckBoxColumn Header="Oberwasseer" Binding="{Binding WaterFromAbove}"/>
|
||||
<DataGridCheckBoxColumn Header="Unterwasser" Binding="{Binding WaterFromBelow}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical">
|
||||
<Button Content="+" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding AddEtchRobotStepCommand}" IsEnabled="{Binding CanAddEtchRobotStep}"></Button>
|
||||
<Button Content="-" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding RemoveEtchRobotStepCommand}" IsEnabled="{Binding CanRemoveEtchRobotStep}"></Button>
|
||||
<Button Content="↑" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding EtchRobotStepUpCommand}"></Button>
|
||||
<Button Content="↓" FontSize="24" Width="60" Height="60" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10" Command="{Binding EtchRobotStepDownCommand}"></Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
15
uniper_hmi_old/UniperHMI/Pages/Views/ReceipePage.xaml.cs
Normal file
15
uniper_hmi_old/UniperHMI/Pages/Views/ReceipePage.xaml.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI.Pages.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Receipes Overview Page
|
||||
/// </summary>
|
||||
public partial class ReceipePage : Page
|
||||
{
|
||||
public ReceipePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
23
uniper_hmi_old/UniperHMI/Pages/Views/StringOverviewPage.xaml
Normal file
23
uniper_hmi_old/UniperHMI/Pages/Views/StringOverviewPage.xaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<Page x:Class="UniperHMI.StringOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:StringOverviewPageVM, IsDesignTimeCreatable=False}"
|
||||
Title="StringOverviewPage"
|
||||
Width="Auto" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
x:Name="root">
|
||||
|
||||
<Grid Margin="10" Width="Auto" Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:SMUControlButton SMUName="Modul 1" DataContext="{Binding Module1}" Command="{Binding ElementName=root, Path=DataContext.Module1ClickedCommand}" Grid.Column="0" Margin="0,0,5,0"/>
|
||||
<local:SMUControlButton SMUName="Modul 2" DataContext="{Binding Module2}" Command="{Binding ElementName=root, Path=DataContext.Module2ClickedCommand}" Grid.Column="1" Margin="0,0,5,0"/>
|
||||
<local:SMUControlButton SMUName="Modul 3" DataContext="{Binding Module3}" Command="{Binding ElementName=root, Path=DataContext.Module3ClickedCommand}" Grid.Column="2"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für StringOverviewPage.xaml
|
||||
/// </summary>
|
||||
public partial class StringOverviewPage : Page
|
||||
{
|
||||
public StringOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
33
uniper_hmi_old/UniperHMI/Pages/Views/TrayFeederPage.xaml
Normal file
33
uniper_hmi_old/UniperHMI/Pages/Views/TrayFeederPage.xaml
Normal file
@@ -0,0 +1,33 @@
|
||||
<Page x:Class="InfineonHMI.TrayFeederPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:InfineonHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:TrayFeederPageVM, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="800" d:DesignWidth="1850"
|
||||
Title="Trayfeeder">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="TrayFeederPage" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
16
uniper_hmi_old/UniperHMI/Pages/Views/TrayFeederPage.xaml.cs
Normal file
16
uniper_hmi_old/UniperHMI/Pages/Views/TrayFeederPage.xaml.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace InfineonHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AutomaticModePage.xaml
|
||||
/// </summary>
|
||||
public partial class TrayFeederPage : Page
|
||||
{
|
||||
public TrayFeederPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
16
uniper_hmi_old/UniperHMI/Pages/Views/UnitOverviewPage.xaml
Normal file
16
uniper_hmi_old/UniperHMI/Pages/Views/UnitOverviewPage.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<Page x:Class="UniperHMI.UnitOverviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UniperHMI"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=local:UnitOverviewPageVM, IsDesignTimeCreatable=False}"
|
||||
Width="Auto" Height="Auto"
|
||||
Title="UnitOverviewPage"
|
||||
x:Name="root">
|
||||
|
||||
<Grid>
|
||||
<local:UnitDetailsControl UnitName="{Binding ElementName=root, Path=DataContext.UnitName}" DataContext="{Binding UnitControlVM}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace UniperHMI;
|
||||
|
||||
/// <summary>
|
||||
/// Interaktionslogik für UnitOverviewPage.xaml
|
||||
/// </summary>
|
||||
public partial class UnitOverviewPage : Page
|
||||
{
|
||||
public UnitOverviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user