Impl HotCoolplate Page, Start Impl. NIOStation Page, Impll ChuckMagazinPage
This commit is contained in:
@@ -67,7 +67,7 @@
|
|||||||
<Button Grid.Column="3" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Trayfeeder 
Ein- /Ausgabe" Command="{Binding EventsListClickedCommand}"/>
|
<Button Grid.Column="3" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Trayfeeder 
Ein- /Ausgabe" Command="{Binding EventsListClickedCommand}"/>
|
||||||
|
|
||||||
<!-- Softkey 5 -->
|
<!-- Softkey 5 -->
|
||||||
<Button Grid.Column="4" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Heiz-/Kühlplatte" />
|
<Button Grid.Column="4" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Heiz-/Kühlplatte" Command="{Binding HotCoolplateClickedCommand}" />
|
||||||
|
|
||||||
<!-- Softkey 6 -->
|
<!-- Softkey 6 -->
|
||||||
<Button Grid.Column="5" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Hochvolt-Test" />
|
<Button Grid.Column="5" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Hochvolt-Test" />
|
||||||
@@ -82,10 +82,10 @@
|
|||||||
<Button Grid.Column="8" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="NIO"/>
|
<Button Grid.Column="8" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="NIO"/>
|
||||||
|
|
||||||
<!-- Softkey 10 -->
|
<!-- Softkey 10 -->
|
||||||
<Button Grid.Column="9" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Tellermagazin"/>
|
<Button Grid.Column="9" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Tellermagazin" Command="{Binding ChuckMagazinClickedCommand}"/>
|
||||||
|
|
||||||
<!-- Softkey 11 -->
|
<!-- Softkey 11 -->
|
||||||
<Button Grid.Column="10" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Kuka-Roboter" Command="{Binding KukaRobotClickedCommand}"/>
|
<Button Grid.Column="10" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Kuka-Roboter" Command="{Binding KukaRobotClickedCommand}"/>
|
||||||
|
|
||||||
<Button Grid.Column="11" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Medien-Schrank"/>
|
<Button Grid.Column="11" MinWidth="80" MinHeight="80" Margin="0,0,2,0" Content="Medien-Schrank"/>
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,14 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
// Settings page viem model
|
// Settings page viem model
|
||||||
SettingsPageVM? _settingsPageVM;
|
SettingsPageVM? _settingsPageVM;
|
||||||
|
|
||||||
// Kuka Robot page view model
|
// Hot Coolplate page view model
|
||||||
KukaRobotPageVM? _kukaRobotPageVM;
|
HotCoolPlatePageVM? _hotCoolplatePageVM;
|
||||||
|
|
||||||
|
// Chuck Magazin page view model
|
||||||
|
ChuckMagazinPageVM? _chuckMagazinPageVM;
|
||||||
|
|
||||||
|
// Kuka Robot page view model
|
||||||
|
KukaRobotPageVM? _kukaRobotPageVM;
|
||||||
|
|
||||||
public MainWindowVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger)
|
public MainWindowVM(IAdsManager adsManager, IConfiguration config, TcEventLogger eventLogger)
|
||||||
{
|
{
|
||||||
@@ -127,8 +133,27 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
NavigateMessage message = new(_config["KukaRobotVarName"]!, typeof(KukaRobotPage));
|
NavigateMessage message = new(_config["KukaRobotVarName"]!, typeof(KukaRobotPage));
|
||||||
Receive(message);
|
Receive(message);
|
||||||
}
|
}
|
||||||
|
[RelayCommand]
|
||||||
|
public void HotCoolplateClicked()
|
||||||
|
{
|
||||||
|
StatusBarVisible = Visibility.Visible;
|
||||||
|
_messageStack.Clear();
|
||||||
|
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||||
|
NavigateMessage message = new(_config["HotCoolplateVarName"]!, typeof(HotCoolPlatePage));
|
||||||
|
Receive(message);
|
||||||
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
|
public void ChuckMagazinClicked()
|
||||||
|
{
|
||||||
|
StatusBarVisible = Visibility.Visible;
|
||||||
|
_messageStack.Clear();
|
||||||
|
_currentMessage = new NavigateMessage("", typeof(Page));
|
||||||
|
NavigateMessage message = new(_config["ChuckMagazinVarName"]!, typeof(ChuckMagazinPage));
|
||||||
|
Receive(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
public void NavigateBack()
|
public void NavigateBack()
|
||||||
{
|
{
|
||||||
if (_messageStack.Count == 0)
|
if (_messageStack.Count == 0)
|
||||||
@@ -261,6 +286,25 @@ public sealed partial class MainWindowVM : ObservableObject, IRecipient<Navigate
|
|||||||
Breadcrumb = " > Kuka Roboter";
|
Breadcrumb = " > Kuka Roboter";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case nameof(HotCoolPlatePage):
|
||||||
|
if (_hotCoolplatePageVM == null)
|
||||||
|
_hotCoolplatePageVM = new(_adsManager, "GVL_Config.stHotCoolplateConfig");
|
||||||
|
|
||||||
|
HotCoolPlatePage hotCoolPlatePage = new() {DataContext = _hotCoolplatePageVM };
|
||||||
|
CurrentPage = hotCoolPlatePage;
|
||||||
|
Breadcrumb = " > Heiz- /Kühlplatte";
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case nameof(ChuckMagazinPage):
|
||||||
|
if (_chuckMagazinPageVM == null)
|
||||||
|
_chuckMagazinPageVM = new(_adsManager, "GVL_Config.stChuckMagazinConfig");
|
||||||
|
|
||||||
|
ChuckMagazinPage chuckMagazinPage = new() { DataContext= _chuckMagazinPageVM };
|
||||||
|
CurrentPage = chuckMagazinPage;
|
||||||
|
Breadcrumb = " > Tellermagazin";
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
CurrentPage = new Page();
|
CurrentPage = new Page();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -24,16 +24,16 @@ namespace UniperHMI
|
|||||||
private int processValue;
|
private int processValue;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public HMIControlButtonVM? startButton;
|
private HMIControlButtonVM? startButton;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public HMIControlButtonVM? stopButton;
|
private HMIControlButtonVM? stopButton;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
private ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
||||||
[
|
[
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
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.AUTO_LOCAL, "Auto Local"),
|
||||||
@@ -87,35 +87,9 @@ namespace UniperHMI
|
|||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
StartButton?.Dispose();
|
|
||||||
StartButton = null;
|
|
||||||
StopButton?.Dispose();
|
|
||||||
StopButton = null;
|
|
||||||
|
|
||||||
_adsManager?.Deregister("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
|
||||||
|
|
||||||
_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
|
||||||
private void StartAutomatic()
|
|
||||||
{
|
|
||||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", Setpoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
[RelayCommand]
|
|
||||||
private void StopAutomatic()
|
|
||||||
{
|
|
||||||
_adsManager?.WriteValue(_variableName + ".diSetpointAutomatic", 0);
|
|
||||||
Setpoint = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ValidationResult ValidatePower(int power, ValidationContext context)
|
|
||||||
{
|
|
||||||
if (power < -40000 || power > 40000)
|
|
||||||
return new("Must be between -40.000 and +40.000");
|
|
||||||
else
|
|
||||||
return ValidationResult.Success!;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,62 +1,48 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using HMIToolkit;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using Heisig.HMI.AdsManager;
|
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using TwinCAT.TypeSystem;
|
using Heisig.HMI.AdsManager;
|
||||||
|
using HMIToolkit;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Windows;
|
||||||
|
using TwinCAT.TypeSystem;
|
||||||
using UniperHMI.Model;
|
using UniperHMI.Model;
|
||||||
namespace UniperHMI
|
namespace UniperHMI
|
||||||
{
|
{
|
||||||
public sealed partial class ChuckMagazinPageVM : ObservableValidator, IDisposable
|
public sealed partial class ChuckMagazinPageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
private int _setpoint;
|
|
||||||
|
|
||||||
[Range(-40000, 40000)]
|
|
||||||
public int Setpoint
|
|
||||||
{
|
|
||||||
get => this._setpoint;
|
|
||||||
set => SetProperty(ref this._setpoint, value, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private int processValue;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
public HMIControlButtonVM? startButton;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
public HMIControlButtonVM? stopButton;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
|
||||||
[
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
|
||||||
];
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private BMSControlModeEntry selectedControlMode;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private bool canChangeControlMode;
|
|
||||||
|
|
||||||
private readonly string? _variableName;
|
private readonly string? _variableName;
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
public ChuckMagazinPageVM()
|
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()
|
||||||
{
|
{
|
||||||
StartButton = new HMIControlButtonVM();
|
|
||||||
StopButton = new HMIControlButtonVM();
|
|
||||||
SelectedControlMode = ReqBMSControlModes[1];
|
|
||||||
canChangeControlMode = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChuckMagazinPageVM(IAdsManager adsManager, string variableName)
|
public ChuckMagazinPageVM(IAdsManager adsManager, string variableName)
|
||||||
@@ -64,57 +50,91 @@ namespace UniperHMI
|
|||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
|
|
||||||
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
_adsManager.Register(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||||
//StopButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStopAutoButton");
|
_adsManager.Register(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||||
|
_adsManager.Register(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||||
|
_adsManager.Register(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||||
|
_adsManager.Register(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||||
|
_adsManager.Register(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||||
|
|
||||||
SelectedControlMode = ReqBMSControlModes[1];
|
}
|
||||||
|
|
||||||
_adsManager.Register("GVL_SCADA.xCanChangeControlMode", CCCMChanged);
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetpointChanged(object? sender, ValueChangedEventArgs e)
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Setpoint = (int)e.Value;
|
_adsManager?.Deregister(sChuckOnPlace1, ChuckOnPlace1Changed);
|
||||||
}
|
_adsManager?.Deregister(sChuckOnPlace2, ChuckOnPlace2Changed);
|
||||||
|
_adsManager?.Deregister(sChuckOnPlace3, ChuckOnPlace3Changed);
|
||||||
private void CCCMChanged(object? sender, ValueChangedEventArgs e)
|
_adsManager?.Deregister(sChuckOnPlace4, ChuckOnPlace4Changed);
|
||||||
{
|
_adsManager?.Deregister(sChuckOnPlace5, ChuckOnPlace5Changed);
|
||||||
CanChangeControlMode = (bool)e.Value;
|
_adsManager?.Deregister(sChuckOnPlace6, ChuckOnPlace6Changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
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!;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,11 @@ namespace UniperHMI
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility coolPlateVisibility9;
|
private Visibility coolPlateVisibility9;
|
||||||
|
|
||||||
|
public HotCoolPlatePageVM()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
public HotCoolPlatePageVM(IAdsManager adsManager, string variableName)
|
public HotCoolPlatePageVM(IAdsManager adsManager, string variableName)
|
||||||
{
|
{
|
||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
@@ -347,27 +351,27 @@ namespace UniperHMI
|
|||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_adsManager?.Register(sHotplateActualTemp, HotplateTempChanged);
|
_adsManager?.Deregister(sHotplateActualTemp, HotplateTempChanged);
|
||||||
_adsManager?.Register(sCoolplateActualTemp, CoolplateTempChanged);
|
_adsManager?.Deregister(sCoolplateActualTemp, CoolplateTempChanged);
|
||||||
_adsManager?.Register(sPieceOnHotplate1, HotplatePiece1Changed);
|
_adsManager?.Deregister(sPieceOnHotplate1, HotplatePiece1Changed);
|
||||||
_adsManager?.Register(sPieceOnHotplate2, HotplatePiece2Changed);
|
_adsManager?.Deregister(sPieceOnHotplate2, HotplatePiece2Changed);
|
||||||
_adsManager?.Register(sPieceOnHotplate3, HotplatePiece3Changed);
|
_adsManager?.Deregister(sPieceOnHotplate3, HotplatePiece3Changed);
|
||||||
_adsManager?.Register(sPieceOnHotplate4, HotplatePiece4Changed);
|
_adsManager?.Deregister(sPieceOnHotplate4, HotplatePiece4Changed);
|
||||||
_adsManager?.Register(sPieceOnHotplate5, HotplatePiece5Changed);
|
_adsManager?.Deregister(sPieceOnHotplate5, HotplatePiece5Changed);
|
||||||
_adsManager?.Register(sPieceOnHotplate6, HotplatePiece6Changed);
|
_adsManager?.Deregister(sPieceOnHotplate6, HotplatePiece6Changed);
|
||||||
_adsManager?.Register(sPieceOnHotplate7, HotplatePiece7Changed);
|
_adsManager?.Deregister(sPieceOnHotplate7, HotplatePiece7Changed);
|
||||||
_adsManager?.Register(sPieceOnHotplate8, HotplatePiece8Changed);
|
_adsManager?.Deregister(sPieceOnHotplate8, HotplatePiece8Changed);
|
||||||
_adsManager?.Register(sPieceOnHotplate9, HotplatePiece9Changed);
|
_adsManager?.Deregister(sPieceOnHotplate9, HotplatePiece9Changed);
|
||||||
|
|
||||||
_adsManager?.Register(sPieceOnCoolplate1, CoolplatePiece1Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate1, CoolplatePiece1Changed);
|
||||||
_adsManager?.Register(sPieceOnCoolplate2, CoolplatePiece2Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate2, CoolplatePiece2Changed);
|
||||||
_adsManager?.Register(sPieceOnCoolplate3, CoolplatePiece3Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate3, CoolplatePiece3Changed);
|
||||||
_adsManager?.Register(sPieceOnCoolplate4, CoolplatePiece4Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate4, CoolplatePiece4Changed);
|
||||||
_adsManager?.Register(sPieceOnCoolplate5, CoolplatePiece5Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate5, CoolplatePiece5Changed);
|
||||||
_adsManager?.Register(sPieceOnCoolplate6, CoolplatePiece6Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate6, CoolplatePiece6Changed);
|
||||||
_adsManager?.Register(sPieceOnCoolplate7, CoolplatePiece7Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate7, CoolplatePiece7Changed);
|
||||||
_adsManager?.Register(sPieceOnCoolplate8, CoolplatePiece8Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate8, CoolplatePiece8Changed);
|
||||||
_adsManager?.Register(sPieceOnCoolplate9, CoolplatePiece9Changed);
|
_adsManager?.Deregister(sPieceOnCoolplate9, CoolplatePiece9Changed);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ namespace UniperHMI
|
|||||||
private const string sJobGrippType = "_adsVariable_kukaJobGrippType";
|
private const string sJobGrippType = "_adsVariable_kukaJobGrippType";
|
||||||
private const string sChuckMagazinPlace = "_adsVariable_kukaChuckMagazinPlace";
|
private const string sChuckMagazinPlace = "_adsVariable_kukaChuckMagazinPlace";
|
||||||
private const string sSelectedRobotJob = "_adsVariable_kukaRobotJob";
|
private const string sSelectedRobotJob = "_adsVariable_kukaRobotJob";
|
||||||
|
private const string sActiveRobotJob = "_adsVariable_kukaActiveRobotJob";
|
||||||
|
private const string sFinishedRobotJob = "_adsVariable_kukaFinishedRobotJob";
|
||||||
|
private const string sSelectedPLCJob = "_adsVariable_kukaPLCJob";
|
||||||
private const string sOffsetPick_X = "_adsVariable_kukaOffsetPick_X";
|
private const string sOffsetPick_X = "_adsVariable_kukaOffsetPick_X";
|
||||||
private const string sOffsetPick_Y = "_adsVariable_kukaOffsetPick_Y";
|
private const string sOffsetPick_Y = "_adsVariable_kukaOffsetPick_Y";
|
||||||
private const string sOffsetPlace_X = "_adsVariable_kukaOffsetPlace_X";
|
private const string sOffsetPlace_X = "_adsVariable_kukaOffsetPlace_X";
|
||||||
@@ -51,25 +54,25 @@ namespace UniperHMI
|
|||||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
private E_BMS_CONTROL_MODE bmsControlMode;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeRobotJob;
|
private bool canChangeRobotJob;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public RobotJobentry robotJobActiveValue;
|
private RobotJobentry robotJobActiveValue;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public RobotJobentry robotJobFinishedValue;
|
private RobotJobentry robotJobFinishedValue;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canStartRobotJob;
|
private bool canStartRobotJob;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public HMIControlButtonVM? startButton;
|
private HMIControlButtonVM? startButton;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canAbortRobotJob;
|
private bool canAbortRobotJob;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public HMIControlButtonVM? abortButton;
|
private HMIControlButtonVM? abortButton;
|
||||||
|
|
||||||
|
|
||||||
private int jobGrippSide;
|
private int jobGrippSide;
|
||||||
@@ -84,7 +87,7 @@ namespace UniperHMI
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeJobGrippSide;
|
private bool canChangeJobGrippSide;
|
||||||
|
|
||||||
|
|
||||||
private int jobGrippType;
|
private int jobGrippType;
|
||||||
@@ -100,7 +103,7 @@ namespace UniperHMI
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeJobGrippType;
|
private bool canChangeJobGrippType;
|
||||||
|
|
||||||
|
|
||||||
private int chuckMagazinPlace;
|
private int chuckMagazinPlace;
|
||||||
@@ -115,7 +118,7 @@ namespace UniperHMI
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeChuckMagazinPlace;
|
private bool canChangeChuckMagazinPlace;
|
||||||
|
|
||||||
|
|
||||||
private double pieceThickness;
|
private double pieceThickness;
|
||||||
@@ -130,7 +133,7 @@ namespace UniperHMI
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangePieceThickness;
|
private bool canChangePieceThickness;
|
||||||
|
|
||||||
|
|
||||||
private double offsetPick_X;
|
private double offsetPick_X;
|
||||||
@@ -156,7 +159,7 @@ namespace UniperHMI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeOffsetPick;
|
private bool canChangeOffsetPick;
|
||||||
|
|
||||||
|
|
||||||
private double offsetPlace_X;
|
private double offsetPlace_X;
|
||||||
@@ -183,7 +186,7 @@ namespace UniperHMI
|
|||||||
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeOffsetPlace;
|
private bool canChangeOffsetPlace;
|
||||||
|
|
||||||
|
|
||||||
private double offsetNIOPick_X;
|
private double offsetNIOPick_X;
|
||||||
@@ -208,7 +211,7 @@ namespace UniperHMI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeOffsetNIOPick;
|
private bool canChangeOffsetNIOPick;
|
||||||
|
|
||||||
|
|
||||||
private double offsetNIOPlace_X;
|
private double offsetNIOPlace_X;
|
||||||
@@ -233,7 +236,7 @@ namespace UniperHMI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeOffsetNIOPlace;
|
private bool canChangeOffsetNIOPlace;
|
||||||
|
|
||||||
|
|
||||||
private int hotplateIndex;
|
private int hotplateIndex;
|
||||||
@@ -249,7 +252,7 @@ namespace UniperHMI
|
|||||||
|
|
||||||
}
|
}
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeHotPlateIndex;
|
private bool canChangeHotPlateIndex;
|
||||||
|
|
||||||
|
|
||||||
private int coolplateIndex;
|
private int coolplateIndex;
|
||||||
@@ -265,13 +268,13 @@ namespace UniperHMI
|
|||||||
|
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public bool canChangeCoolPlateIndex;
|
private bool canChangeCoolPlateIndex;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private RobotJobenum robotJob;
|
private RobotJobenum robotJob;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public ObservableCollection<RobotJobentry> robotJobs =
|
private ObservableCollection<RobotJobentry> robotJobs =
|
||||||
[
|
[
|
||||||
new RobotJobentry(RobotJobenum.NONE, " ------- "),
|
new RobotJobentry(RobotJobenum.NONE, " ------- "),
|
||||||
new RobotJobentry(RobotJobenum.PICK_TRAYFEEDER, "10 - Hole Teil von Trayfeeder 'Eingabe' "),
|
new RobotJobentry(RobotJobenum.PICK_TRAYFEEDER, "10 - Hole Teil von Trayfeeder 'Eingabe' "),
|
||||||
@@ -305,7 +308,7 @@ namespace UniperHMI
|
|||||||
];
|
];
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public ObservableCollection<PLCJobentry> pLCJobs =
|
private ObservableCollection<PLCJobentry> pLCJobs =
|
||||||
[
|
[
|
||||||
new PLCJobentry(PLCJobenum.NONE, " ------- "),
|
new PLCJobentry(PLCJobenum.NONE, " ------- "),
|
||||||
new PLCJobentry(PLCJobenum.SCAN_QR_CODE, "10 - QR Code Scannen"),
|
new PLCJobentry(PLCJobenum.SCAN_QR_CODE, "10 - QR Code Scannen"),
|
||||||
@@ -366,54 +369,136 @@ namespace UniperHMI
|
|||||||
currentControlMode = new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual");
|
currentControlMode = new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual");
|
||||||
CurrentControlMode = new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual");
|
CurrentControlMode = new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual");
|
||||||
|
|
||||||
selectedRobotJob = RobotJobs.First(i => i.eJob == RobotJobenum.WARMUP);
|
_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, OnOffsetPickYValueChanged);
|
||||||
|
_adsManager.Register(sOffsetPick_Y, OnOffsetPickXValueChanged);
|
||||||
|
_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, OnOffsetNIOPlaceXValueChanged);
|
||||||
|
|
||||||
canChangeRobotJob = true;
|
canChangeRobotJob = true;
|
||||||
selectedPLCJob = PLCJobs.First(i => i.eJob == PLCJobenum.NONE);
|
canChangeJobGrippType = false;
|
||||||
|
|
||||||
jobGrippSide = 1;
|
|
||||||
jobGrippType = 2;
|
|
||||||
canChangeJobGrippType = false;
|
|
||||||
robotJobActiveValue = RobotJobs.First(i => i.eJob == RobotJobenum.PUT_HVTEST_COLD);
|
|
||||||
robotJobFinishedValue = RobotJobs.First(i => i.eJob == RobotJobenum.PICK_HOTPLATE);
|
|
||||||
|
|
||||||
chuckMagazinPlace = 2;
|
|
||||||
canChangeChuckMagazinPlace = false;
|
canChangeChuckMagazinPlace = false;
|
||||||
canChangeJobGrippType = false;
|
canChangeJobGrippType = false;
|
||||||
|
|
||||||
|
_adsManager.Register("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||||
|
|
||||||
|
|
||||||
pieceThickness = 2.7;
|
|
||||||
|
|
||||||
offsetPlace_X = 88;
|
|
||||||
offsetPlace_Y = 79;
|
|
||||||
|
|
||||||
offsetPick_X = 89;
|
|
||||||
offsetPick_Y = 81;
|
|
||||||
|
|
||||||
offsetNIOPick_X = 176;
|
|
||||||
offsetNIOPick_Y = 90;
|
|
||||||
|
|
||||||
offsetNIOPlace_X = 123;
|
|
||||||
offsetNIOPlace_Y = 313;
|
|
||||||
|
|
||||||
hotplateIndex = 3;
|
|
||||||
coolplateIndex = 5;
|
|
||||||
|
|
||||||
//_adsManager.Register("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
|
||||||
|
|
||||||
//_adsManager.Register(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
private void OnJobGrippSideValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
jobGrippSide = (int)e.Value;
|
||||||
|
}
|
||||||
|
private void OnJobGrippTypeValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
jobGrippType = (int)e.Value;
|
||||||
|
}
|
||||||
|
private void OnChuckMagazinPlaceValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
chuckMagazinPlace = (int)e.Value;
|
||||||
|
}
|
||||||
|
private void OnPieceThicknessValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
pieceThickness = (int)e.Value;
|
||||||
|
}
|
||||||
|
private void OnSelectedPLCJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
selectedPLCJob = PLCJobs.First(i => (int)i.eJob == (int)e.Value);
|
||||||
|
}
|
||||||
|
private void OnSelectedRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
selectedRobotJob = RobotJobs.First(i => (int)i.eJob == (int)e.Value);
|
||||||
|
}
|
||||||
|
private void OnActiveRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
robotJobActiveValue = RobotJobs.First(i => (int)i.eJob == (int)e.Value);
|
||||||
|
}
|
||||||
|
private void OnFinishedRobotJobValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
robotJobFinishedValue = RobotJobs.First(i => (int)i.eJob == (int)e.Value);
|
||||||
|
}
|
||||||
|
private void OnHotPlateIndexValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
hotplateIndex = (int)e.Value;
|
||||||
|
}
|
||||||
|
private void OnCoolPlateIndexValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
coolplateIndex = (int)e.Value;
|
||||||
|
}
|
||||||
|
private void OnOffsetPickXValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
offsetPick_X = (double)e.Value;
|
||||||
|
}
|
||||||
|
private void OnOffsetPickYValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
offsetPick_Y = (double)e.Value;
|
||||||
|
}
|
||||||
|
private void OnOffsetPlaceXValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
offsetPlace_X = (double)e.Value;
|
||||||
|
}
|
||||||
|
private void OnOffsetPlaceYValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
offsetPlace_X = (double)e.Value;
|
||||||
|
}
|
||||||
|
private void OnOffsetNIOPickXValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
offsetNIOPick_X = (double)e.Value;
|
||||||
|
}
|
||||||
|
private void OnOffsetNIOPickYValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
offsetNIOPick_Y = (double)e.Value;
|
||||||
|
}
|
||||||
|
private void OnOffsetNIOPlaceXValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
offsetNIOPlace_X = (double)e.Value;
|
||||||
|
}
|
||||||
|
private void OnOffsetNIOPlaceYValueChanged(object sender, ValueChangedEventArgs e)
|
||||||
|
{
|
||||||
|
OffsetNIOPlace_Y = (double)e.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
{
|
{
|
||||||
StartButton?.Dispose();
|
StartButton?.Dispose();
|
||||||
StartButton = null;
|
StartButton = null;
|
||||||
AbortButton?.Dispose();
|
AbortButton?.Dispose();
|
||||||
AbortButton = null;
|
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, OnOffsetPickYValueChanged);
|
||||||
|
_adsManager?.Deregister(sOffsetPick_Y, OnOffsetPickXValueChanged);
|
||||||
|
_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, OnOffsetNIOPlaceXValueChanged);
|
||||||
|
|
||||||
_adsManager?.Deregister("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
_adsManager?.Deregister("GVL_SCADA.eCurrentControlMode", CurrentControlModeChanged);
|
||||||
|
|
||||||
//_adsManager?.Deregister(_variableName + ".diSetpointAutomatic", SetpointChanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CurrentControlModeChanged(object? sender, ValueChangedEventArgs e)
|
private void CurrentControlModeChanged(object? sender, ValueChangedEventArgs e)
|
||||||
|
|||||||
@@ -11,53 +11,18 @@ namespace UniperHMI
|
|||||||
{
|
{
|
||||||
public sealed partial class NIOStationPageVM : ObservableValidator, IDisposable
|
public sealed partial class NIOStationPageVM : ObservableValidator, IDisposable
|
||||||
{
|
{
|
||||||
private int _setpoint;
|
|
||||||
|
|
||||||
[Range(-40000, 40000)]
|
|
||||||
public int Setpoint
|
|
||||||
{
|
|
||||||
get => this._setpoint;
|
|
||||||
set => SetProperty(ref this._setpoint, value, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private int processValue;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
public HMIControlButtonVM? startButton;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
public HMIControlButtonVM? stopButton;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private E_BMS_CONTROL_MODE bmsControlMode;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
public ObservableCollection<BMSControlModeEntry> reqBMSControlModes =
|
|
||||||
[
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_REMOTE, "Auto Remote"),
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.AUTO_LOCAL, "Auto Local"),
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.SAFETY_CHECK, "Safety Check"),
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.CAPACITY_TEST, "Capacity Test"),
|
|
||||||
new BMSControlModeEntry(E_BMS_CONTROL_MODE.MANUAL, "Manual")
|
|
||||||
];
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private BMSControlModeEntry selectedControlMode;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private bool canChangeControlMode;
|
|
||||||
|
|
||||||
private readonly string? _variableName;
|
private readonly string? _variableName;
|
||||||
|
|
||||||
private readonly IAdsManager? _adsManager;
|
private readonly IAdsManager? _adsManager;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private BinaryValveControlVM cylinderNIOPlateVM;
|
||||||
|
|
||||||
public NIOStationPageVM()
|
public NIOStationPageVM()
|
||||||
{
|
{
|
||||||
StartButton = new HMIControlButtonVM();
|
cylinderNIOPlateVM = new BinaryValveControlVM();
|
||||||
StopButton = new HMIControlButtonVM();
|
|
||||||
SelectedControlMode = ReqBMSControlModes[1];
|
|
||||||
canChangeControlMode = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NIOStationPageVM(IAdsManager adsManager, string variableName)
|
public NIOStationPageVM(IAdsManager adsManager, string variableName)
|
||||||
@@ -65,57 +30,16 @@ namespace UniperHMI
|
|||||||
_adsManager = adsManager;
|
_adsManager = adsManager;
|
||||||
_variableName = variableName;
|
_variableName = variableName;
|
||||||
|
|
||||||
//StartButton = new HMIControlButtonVM(_adsManager, _variableName + ".stStartAutoButton");
|
cylinderNIOPlateVM = new BinaryValveControlVM(_adsManager, _variableName);
|
||||||
//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()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
StartButton?.Dispose();
|
CylinderNIOPlateVM?.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!;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,41 +9,56 @@
|
|||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="800" d:DesignWidth="1850"
|
||||||
Title="Blablubb">
|
Title="Blablubb">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition />
|
||||||
<Grid.RowDefinitions>
|
<ColumnDefinition />
|
||||||
<RowDefinition />
|
<ColumnDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition />
|
||||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
<RowDefinition />
|
||||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="Magazinbelegung: " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
|
|
||||||
<Label Grid.Row="2" Grid.Column="1" Content="Current Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Content="Tellerplatz 1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10" />
|
||||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding BmsControlMode}" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
<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"/>
|
||||||
|
|
||||||
<Label Grid.Row="3" Grid.Column="1" Content="Status:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
|
||||||
<TextBox Grid.Row="3" Width="125" Grid.Column="2" Text="Charging" MaxLines="1" IsReadOnly="True" TextAlignment="Right"/>
|
|
||||||
|
|
||||||
<Label Grid.Row="4" Grid.Column="1" Content="Target Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
||||||
<TextBox Grid.Row="4" Width="125" Grid.Column="2" Text="{Binding Setpoint}" MaxLines="1" Margin="0,5,0,0" TextAlignment="Right" />
|
|
||||||
|
|
||||||
<Label Grid.Row="5" Grid.Column="1" Content="Actual Power (W):" Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
|
||||||
<TextBox Grid.Row="5" Width="125" Grid.Column="2" Text="{Binding ProcessValue}" MaxLines="1" Margin="0,5,0,0" IsReadOnly="True" TextAlignment="Right" />
|
|
||||||
|
|
||||||
<Button Grid.Row="6" Grid.Column="1" Command="{Binding StartAutomaticCommand}" Content="Start" Margin="0,5,5,0" />
|
|
||||||
<Button Grid.Row="6" Grid.Column="2" Command="{Binding StopAutomaticCommand}" Content="Stop" Margin="5,5,0,0" />
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -44,11 +44,11 @@
|
|||||||
<Label Grid.Row="1" Grid.Column="0" Content="Temperatur Soll" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
<Label Grid.Row="1" Grid.Column="0" Content="Temperatur Soll" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Margin="10" Text="{Binding HotPlateTargetTemperature}"/>
|
<TextBox Grid.Row="1" Grid.Column="1" Margin="10" Text="{Binding HotPlateTargetTemperature}"/>
|
||||||
<Label Grid.Row="1" Grid.Column="2" Content="Temperatur Ist" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
<Label Grid.Row="1" Grid.Column="2" Content="Temperatur Ist" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||||
<TextBox Grid.Row="1" Grid.Column="3" Margin="10" Text="{Binding HotPlateActualTemperature}"/>
|
<TextBox Grid.Row="1" Grid.Column="3" Margin="10" Text="{Binding HotPlateActualTemperature}" IsEnabled="False"/>
|
||||||
<Label Grid.Row="1" Grid.Column="5" Content="Temperatur Soll" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
<Label Grid.Row="1" Grid.Column="5" Content="Temperatur Soll" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||||
<TextBox Grid.Row="1" Grid.Column="6" Margin="10" Text="{Binding CoolPlateTargetTemperature}"/>
|
<TextBox Grid.Row="1" Grid.Column="6" Margin="10" Text="{Binding CoolPlateTargetTemperature}"/>
|
||||||
<Label Grid.Row="1" Grid.Column="7" Content="Temperatur Ist" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
<Label Grid.Row="1" Grid.Column="7" Content="Temperatur Ist" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" />
|
||||||
<TextBox Grid.Row="1" Grid.Column="8" Margin="10" Text="{Binding CoolPlateActualTemperature}"/>
|
<TextBox Grid.Row="1" Grid.Column="8" Margin="10" Text="{Binding CoolPlateActualTemperature}" IsEnabled="False"/>
|
||||||
<Ellipse Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="2" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="2" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
<Ellipse Grid.Column="3" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
<Ellipse Grid.Column="3" Grid.Row="3" Grid.RowSpan="2" HorizontalAlignment="Center" Height="150" Margin="10" Stroke="WhiteSmoke" Fill="WhiteSmoke" VerticalAlignment="Center" Width="150"/>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="800" d:DesignWidth="1850"
|
||||||
Title="Blablubb">
|
Title="KukaRobotPage">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -1,49 +1,43 @@
|
|||||||
<Page x:Class="UniperHMI.NIOStationPage"
|
<Page
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:UniperHMI"
|
xmlns:local="clr-namespace:UniperHMI"
|
||||||
|
xmlns:HMIToolkit="clr-namespace:HMIToolkit" x:Class="UniperHMI.NIOStationPage"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=local:AutomaticModePageVM, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type local:AutomaticModePageVM}}"
|
||||||
d:DesignHeight="800" d:DesignWidth="1850"
|
d:DesignHeight="800" d:DesignWidth="1850"
|
||||||
Title="Blablubb">
|
Title="Blablubb">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition />
|
||||||
<Grid.RowDefinitions>
|
<ColumnDefinition />
|
||||||
<RowDefinition />
|
<ColumnDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition />
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition />
|
||||||
<Label Grid.Row="1" Grid.Column="1" Content="Requested Control Mode:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
<RowDefinition />
|
||||||
<ComboBox Grid.Row="1" Grid.Column="2" IsEnabled="{Binding CanChangeControlMode}" ItemsSource="{Binding ReqBMSControlModes}" SelectedItem="{Binding SelectedControlMode}"/>
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="Spannzylinder: " HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||||
|
<HMIToolkit:BinaryValveControl DataContext="{Binding CylinderNIOPlateVM}" Grid.Column="0" HorizontalAlignment="Center" Grid.Row="1" Grid.RowSpan="4" VerticalAlignment="Top" />
|
||||||
|
|
||||||
<Label Grid.Row="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" />
|
</Grid>
|
||||||
<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>
|
</Page>
|
||||||
|
|||||||
Reference in New Issue
Block a user