aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-05-10 14:57:24 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-05-10 14:57:24 +0300
commitedd7e8af06fe0e70e78ce2de9423ec49a799b78a (patch)
tree87ed11cd060ea9e562277df8063a4e7bc19a5cd0 /Software/Visual_Studio
parent41463773c087d7aa8d085edf78613530d948e950 (diff)
downloadTango-edd7e8af06fe0e70e78ce2de9423ec49a799b78a.tar.gz
Tango-edd7e8af06fe0e70e78ce2de9423ec49a799b78a.zip
add values to UI dashboard indicators
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs59
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs178
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs72
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml81
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs7
6 files changed, 350 insertions, 51 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs
new file mode 100644
index 000000000..ded7e33e8
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using Tango.Core;
+
+namespace Tango.PPC.UI.Models
+{
+ public class MachineOverviewItem : ExtendedObject
+ {
+ private String _displayValue;
+ public String DisplayValue
+ {
+ get { return _displayValue; }
+ set { _displayValue = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _status;
+ public String Status
+ {
+ get { return _status; }
+ set { _status = value; RaisePropertyChangedAuto(); }
+ }
+
+ private Color _color;
+ public Color Color
+ {
+ get { return _color; }
+ set { _color = value; RaisePropertyChangedAuto(); }
+ }
+
+ private double _maxValue;
+
+ public double MaxValue
+ {
+ get { return _maxValue; }
+ set { _maxValue = value; RaisePropertyChangedAuto(); }
+ }
+
+ private double _value;
+
+ public double Value
+ {
+ get { return _value; }
+ set { _value = value; RaisePropertyChangedAuto(); }
+ }
+
+ public MachineOverviewItem()
+ {
+ Color = Colors.Gray;
+ DisplayValue = "--";
+ Value = 0;
+ MaxValue = 100;
+ }
+
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
new file mode 100644
index 000000000..d5d8407b7
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
@@ -0,0 +1,178 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using Tango.BL.Entities;
+using Tango.Core;
+using Tango.PMR.Diagnostics;
+using Tango.PPC.Common;
+using Tango.Settings;
+
+namespace Tango.PPC.UI.Models
+{
+ public class MachineOverviewModel : ExtendedObject
+ {
+ public MachineOverviewItem DryerZone3 { get; set; }
+ public MachineOverviewItem DryerAir { get; set; }
+ public MachineOverviewItem Tunnel { get; set; }
+ public MachineOverviewItem PumpsPressure { get; set; }
+ public MachineOverviewItem Lubricant { get; set; }
+
+ private PPCSettings _settings;
+ /// <summary>
+ /// Gets the main PPC settings.
+ /// </summary>
+ public PPCSettings Settings
+ {
+ get
+ {
+ if (_settings == null)
+ {
+ _settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+ }
+
+ return _settings;
+ }
+ private set { _settings = value; }
+ }
+
+ public MachineOverviewModel()
+ {
+ DryerZone3 = new MachineOverviewItem();
+ DryerAir = new MachineOverviewItem();
+ DryerAir.MaxValue =140;
+ Tunnel = new MachineOverviewItem();
+ PumpsPressure = new MachineOverviewItem();
+ PumpsPressure.MaxValue = 6;
+ Lubricant = new MachineOverviewItem();
+ Lubricant.MaxValue = 100;
+ Lubricant.Value = 100;
+ }
+
+ public void Update(StartDiagnosticsResponse diagnostics, Rml rml, ProcessParametersTable processParameters)
+ {
+ //Dryer Zone 3
+ var dryerZone3State = diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.HeaterZone3);
+ UpdateHeaterItem(DryerZone3, dryerZone3State);
+
+ //Dryer Air
+ var dryerAirState = diagnostics.Monitors.EuSpare1.FirstOrDefault();
+ UpdateDryerAirItem(dryerAirState);
+ //diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.DryerAirHeater);
+
+
+ //Tunnel
+ var tunnelState = diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.ETunnelHeater);
+ UpdateHeaterItem(Tunnel, tunnelState);
+
+ //Pumps Pressure
+ if (diagnostics.Monitors.EuInkLinesPressure.Count > 0 && diagnostics.Monitors.EuInkLinesPressure.Any(x => x.Data.Count > 0))
+ {
+ var pumpsPressuerValue = diagnostics.Monitors.EuInkLinesPressure.SelectMany(x => x.Data).Max();
+ UpdatePumpsPressureItem(pumpsPressuerValue);
+ }
+
+ //Lubricant
+ var lubricantValue = diagnostics.Monitors.EuLubricantCurrent.FirstOrDefault();
+ UpdateLubricantItem( rml, lubricantValue);
+ }
+
+ private void UpdateHeaterItem(MachineOverviewItem item, HeaterState state)
+ {
+ if (state != null)
+ {
+
+ if (state.IsRampingUp)
+ {
+ item.Status = "Heating Up";
+ item.Color = Colors.Orange;
+ item.DisplayValue = $"{state.CurrentValue} / {state.SetPoint}";
+ item.MaxValue = state.SetPoint;
+ item.Value = state.CurrentValue;
+ }
+ else if (state.CurrentValue > state.SetPoint)
+ {
+ item.Status = "Over-temperature";
+ item.Color = Colors.Red;
+ item.DisplayValue = $"{state.CurrentValue} / {state.SetPoint}";
+ item.MaxValue = state.SetPoint;
+ item.Value = state.CurrentValue;
+ }
+ else if (state.IsInSetPoint)
+ {
+ item.Status = "Operational";
+ item.Color = Colors.Green;
+ item.DisplayValue = $" {state.SetPoint}";
+ item.MaxValue = state.SetPoint;
+ item.Value = state.CurrentValue;
+ }
+ else
+ {
+ item.Color = Colors.Gray;
+ item.MaxValue = 100;
+ item.Value = 0;
+ }
+ }
+ }
+
+ private void UpdateDryerAirItem(double currentvalue)
+ {
+ if (currentvalue < 140)
+ {
+ DryerAir.Status = "Heating Up";
+ DryerAir.Color = Colors.Orange;
+ DryerAir.DisplayValue = $"{currentvalue}";
+ }
+ else if (currentvalue >= 140)
+ {
+ DryerAir.Status = "Operational";
+ DryerAir.Color = Colors.Green;
+ DryerAir.DisplayValue = $"{currentvalue}";
+ }
+ DryerAir.Value = currentvalue;
+ }
+
+ private void UpdatePumpsPressureItem(double maxValue)
+ {
+ if (maxValue > 6)
+ {
+ PumpsPressure.Status = "Overpressure";
+ PumpsPressure.Color = Colors.Red;
+ PumpsPressure.DisplayValue = maxValue.ToString();
+ }
+ else
+ {
+ PumpsPressure.Status = "Operational";
+ PumpsPressure.Color = Colors.Green;
+ PumpsPressure.DisplayValue = maxValue.ToString();
+ }
+ PumpsPressure.Value = maxValue;
+ }
+
+ private void UpdateLubricantItem(Rml rml, double lubricantValue)
+ {
+ if (rml != null)
+ {
+ var rmlLubrication = Settings.LubricationLevels.FirstOrDefault(x => x.RmlGuid == rml.Guid);
+ if (( rml.Lubricant == false)
+ || (rmlLubrication != null && rmlLubrication.LubricationLevel == Common.Lubrication.LubricationLevel.No))
+ {
+ Lubricant.Status = "NotActive";
+ Lubricant.DisplayValue = "None";
+ Lubricant.Color = Colors.Gray;
+
+ return;
+ }
+ Lubricant.Status = "Active";
+ Lubricant.DisplayValue = lubricantValue.ToString();
+ Lubricant.Color = Colors.Green;
+ }
+
+ Lubricant.Status = "NotActive";
+ Lubricant.DisplayValue = "None";
+ Lubricant.Color = Colors.Gray;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
index 7772c1f55..b3dffea5d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
@@ -229,6 +229,8 @@
<Compile Include="Dialogs\UpdateFromFileViewVM.cs" />
<Compile Include="Helpers\DpiHelper.cs" />
<Compile Include="InternalModule.cs" />
+ <Compile Include="Models\MachineOverviewItem.cs" />
+ <Compile Include="Models\MachineOverviewModel.cs" />
<Compile Include="Modules\DefaultPPCModuleLoader.cs" />
<Compile Include="Navigation\DefaultNavigationManager.cs" />
<Compile Include="Notifications\DefaultNotificationProvider.cs" />
@@ -937,7 +939,7 @@ if $(ConfigurationName) == Debug "rc.exe" "$(TargetPath)" --set-version-string "
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
index fba49ced3..6d77ebcb9 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
@@ -8,12 +8,14 @@ using Tango.BL.Enumerations;
using Tango.Core.Commands;
using Tango.Core.DI;
using Tango.Integration.Operation;
+using Tango.PMR.Diagnostics;
using Tango.PPC.Common;
using Tango.PPC.Common.Diagnostics;
using Tango.PPC.Jobs;
using Tango.PPC.Jobs.NavigationObjects;
using Tango.PPC.Jobs.Views;
using Tango.PPC.Maintenance.Models;
+using Tango.PPC.UI.Models;
namespace Tango.PPC.UI.ViewModels
{
@@ -23,9 +25,9 @@ namespace Tango.PPC.UI.ViewModels
[TangoInject]
public IDiagnosticsFrameProvider DefaultDiagnosticsFrameProvider { get; set; }
-
- private JobHandler _handler;
+
+ private JobHandler _handler;
private Job _job;
/// <summary>
@@ -34,10 +36,13 @@ namespace Tango.PPC.UI.ViewModels
public Job Job
{
get { return _job; }
- set { _job = value;
- if(_job == null)
+ set
+ {
+ _job = value;
+ if (_job == null)
IsDyeingProcess = false;
- RaisePropertyChangedAuto(); }
+ RaisePropertyChangedAuto();
+ }
}
private RunningJobStatus _runningJobStatus;
@@ -47,13 +52,14 @@ namespace Tango.PPC.UI.ViewModels
public RunningJobStatus RunningJobStatus
{
get { return _runningJobStatus; }
- set {
+ set
+ {
_runningJobStatus = value;
- IsDyeingProcess = (_runningJobStatus != null && _runningJobStatus.CurrentSegment != null);
- if(_runningJobStatus != null && _runningJobStatus.CurrentSegment != null)
+ IsDyeingProcess = (_runningJobStatus != null && _runningJobStatus.CurrentSegment != null);
+ if (_runningJobStatus != null && _runningJobStatus.CurrentSegment != null)
{
- var segment = Job.Segments.FirstOrDefault(x=>x.SegmentIndex == _runningJobStatus.CurrentSegment.SegmentIndex);
- if(segment != null)
+ var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == _runningJobStatus.CurrentSegment.SegmentIndex);
+ if (segment != null)
CurrentBrushStop = segment.FirstBrushStop;
}
RaisePropertyChangedAuto();
@@ -104,8 +110,9 @@ namespace Tango.PPC.UI.ViewModels
public bool IsDyeingProcess
{
get { return _isDyeingProcess; }
- set {
- if(_isDyeingProcess != value)
+ set
+ {
+ if (_isDyeingProcess != value)
{
_isDyeingProcess = value;
RaisePropertyChangedAuto();
@@ -118,8 +125,9 @@ namespace Tango.PPC.UI.ViewModels
public BrushStop CurrentBrushStop
{
get { return _currentBrushStop; }
- set {
- if(_currentBrushStop != value)
+ set
+ {
+ if (_currentBrushStop != value)
{
_currentBrushStop = value;
OnUpdateCurrentBrush();
@@ -147,7 +155,7 @@ namespace Tango.PPC.UI.ViewModels
{
get { return GetVolumeLiquidType(LiquidTypes.Black); }
}
-
+
public double LightCyanOutput
{
get { return GetVolumeLiquidType(LiquidTypes.LightCyan); }
@@ -180,6 +188,8 @@ namespace Tango.PPC.UI.ViewModels
set { _midTankLevels = value; RaisePropertyChangedAuto(); }
}
+ public MachineOverviewModel OverviewModel { get; set; }
+
#endregion
#region Commands
@@ -206,7 +216,7 @@ namespace Tango.PPC.UI.ViewModels
public MachineStatusViewVM()
{
- StopCommand = new RelayCommand(StopJob, ()=>CanStopped());
+ StopCommand = new RelayCommand(StopJob, () => CanStopped());
AbortCommand = new RelayCommand(AbortJob, () => CanStopped());
GoToJobCommand = new RelayCommand(GoToJob);
JobStatusViewCommand = new RelayCommand(JobStatusView);
@@ -217,6 +227,8 @@ namespace Tango.PPC.UI.ViewModels
IsEnabledStopButton = false;
IsSpoolView = false;
IsWeghtView = false;
+
+ OverviewModel = new MachineOverviewModel();
}
public override void OnApplicationReady()
@@ -237,12 +249,12 @@ namespace Tango.PPC.UI.ViewModels
MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted;
MachineProvider.MachineOperator.PrintingEnded += MachineOperator_PrintingEnded;
- //DefaultDiagnosticsFrameProvider.FrameReceived += DefaultDiagnosticsFrameProvider_FrameReceived;
+ DefaultDiagnosticsFrameProvider.FrameReceived += DefaultDiagnosticsFrameProvider_FrameReceived;
}
private void DefaultDiagnosticsFrameProvider_FrameReceived(object sender, PMR.Diagnostics.StartDiagnosticsResponse e)
{
- var frame = e;
+ OverviewModel.Update(e, this.Job != null ? Job.Rml : null, null);
}
private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e)
@@ -296,24 +308,24 @@ namespace Tango.PPC.UI.ViewModels
private void JobHandler_CanCancelChanged(object sender, EventArgs e)
{
- InvokeUI( () =>
- {
- IsEnabledStopButton = _handler.CanCancel;
- StopCommand.RaiseCanExecuteChanged();
- AbortCommand.RaiseCanExecuteChanged();
- });
+ InvokeUI(() =>
+ {
+ IsEnabledStopButton = _handler.CanCancel;
+ StopCommand.RaiseCanExecuteChanged();
+ AbortCommand.RaiseCanExecuteChanged();
+ });
}
-
+
#endregion
#region Methods
private void GoToJob()
{
-
+
NavigationManager.NavigateWithObject<JobsV2Module, JobEurekaView, JobNavigationObject>(new JobNavigationObject() { Job = _handler.Job });
NavigationManager.ClearHistoryExcept<JobsView>();
-
+
}
/// <summary>
/// Toggles the application technician mode.
@@ -329,7 +341,7 @@ namespace Tango.PPC.UI.ViewModels
ApplicationManager.ExitTechnicianMode();
}
}
-
+
protected void JobStatusView()
{
IsJobStatusViewEnable = true;
@@ -342,7 +354,7 @@ namespace Tango.PPC.UI.ViewModels
private double GetVolumeLiquidType(LiquidTypes liquidType)
{
- if(CurrentBrushStop != null && CurrentBrushStop.LiquidVolumes != null && CurrentBrushStop.LiquidVolumes.Count > 0)
+ if (CurrentBrushStop != null && CurrentBrushStop.LiquidVolumes != null && CurrentBrushStop.LiquidVolumes.Count > 0)
{
var lt = CurrentBrushStop.LiquidVolumes.FirstOrDefault(x => x.LiquidType == liquidType);
@@ -372,7 +384,7 @@ namespace Tango.PPC.UI.ViewModels
protected void ClearAllNotifications()
{
- NotificationProvider.NotificationItems.Where(x=>x.CanClose).ToList().ForEach(y=> NotificationProvider.PopNotification(y));
+ NotificationProvider.NotificationItems.Where(x => x.CanClose).ToList().ForEach(y => NotificationProvider.PopNotification(y));
}
protected void OnUpdateCurrentBrush()
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
index 66bc6f580..6edc90844 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
@@ -867,29 +867,54 @@
<Image Source="../Images/Overview Icons/Sensors.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/>
<TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Sensors</TextBlock>
</StackPanel>
- <UniformGrid Columns="5" Rows="1" Height="120" Margin="40 11 40 0">
+ <UniformGrid Columns="5" Rows="1" Height="120" Margin="40 11 40 0" DataContext="{Binding OverviewModel}">
<StackPanel Orientation="Vertical">
<Grid>
- <touch:TouchArcProgress Foreground="Green" RingThickness="8" Value="10" Maximum="10" Minimum="0" Width="100" Height="100"></touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Bold" Foreground="Green">10</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 10" FontSize="{StaticResource TangoComboBoxItemFontSize}" >Bar</TextBlock>
+ <touch:TouchArcProgress RingThickness="8" Value="{Binding DryerZone3.Value}" Maximum="{Binding DryerZone3.MaxValue}" Minimum="0" Width="100" Height="100">
+ <touch:TouchArcProgress.Foreground>
+ <SolidColorBrush Color="{Binding DryerZone3.Color}"/>
+ </touch:TouchArcProgress.Foreground>
+ </touch:TouchArcProgress>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Bold" Text="{Binding DryerZone3.DisplayValue}">
+ <TextBlock.Foreground>
+ <SolidColorBrush Color="{Binding DryerZone3.Color}"/>
+ </TextBlock.Foreground>
+ </TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 10" FontSize="{StaticResource TangoComboBoxItemFontSize}" >&#186;C</TextBlock>
</Grid>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Pressure</TextBlock>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone 3</TextBlock>
</StackPanel>
<StackPanel Orientation="Vertical">
<Grid>
- <touch:TouchArcProgress Foreground="Green" RingThickness="8" Value="200" Maximum="200" Minimum="0" Width="100" Height="100"></touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Foreground="Green">200</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="&#186;C" ></TextBlock>
- </Grid>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone</TextBlock>
+ <touch:TouchArcProgress RingThickness="8" Value="{Binding DryerAir.Value}" Maximum="{Binding DryerAir.MaxValue}" Minimum="0" Width="100" Height="100">
+ <touch:TouchArcProgress.Foreground>
+ <SolidColorBrush Color="{Binding DryerAir.Color}"/>
+ </touch:TouchArcProgress.Foreground>
+ </touch:TouchArcProgress>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding DryerAir.DisplayValue}">
+ <TextBlock.Foreground>
+ <SolidColorBrush Color="{Binding DryerAir.Color}"/>
+ </TextBlock.Foreground>
+ </TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="&#186;C" >
+ </TextBlock>
+ </Grid>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Air</TextBlock>
</StackPanel>
<StackPanel Orientation="Vertical">
<Grid>
- <touch:TouchArcProgress Foreground="Red" RingThickness="8" Value="80" Maximum="200" Minimum="0" Width="100" Height="100"></touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Foreground="Black">80/200</TextBlock>
+ <touch:TouchArcProgress RingThickness="8" Value="{Binding Tunnel.Value}" Maximum="{Binding Tunnel.MaxValue}" Minimum="0" Width="100" Height="100">
+ <touch:TouchArcProgress.Foreground>
+ <SolidColorBrush Color="{Binding Tunnel.Color}"/>
+ </touch:TouchArcProgress.Foreground>
+ </touch:TouchArcProgress>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding Tunnel.DisplayValue}">
+ <TextBlock.Foreground>
+ <SolidColorBrush Color="{Binding Tunnel.Color}"/>
+ </TextBlock.Foreground>
+ </TextBlock>
<TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="&#186;C"></TextBlock>
</Grid>
@@ -897,21 +922,37 @@
</StackPanel>
<StackPanel Orientation="Vertical">
<Grid>
- <touch:TouchArcProgress Foreground="Green" RingThickness="8" Value="200" Maximum="200" Minimum="0" Width="100" Height="100"></touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Foreground="Green">200</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="&#186;C"></TextBlock>
+ <touch:TouchArcProgress RingThickness="8" Value="{Binding PumpsPressure.Value}" Maximum="{Binding PumpsPressure.MaxValue}" Minimum="0" Width="100" Height="100">
+ <touch:TouchArcProgress.Foreground>
+ <SolidColorBrush Color="{Binding PumpsPressure.Color}"/>
+ </touch:TouchArcProgress.Foreground>
+ </touch:TouchArcProgress>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding PumpsPressure.DisplayValue}">
+ <TextBlock.Foreground>
+ <SolidColorBrush Color="{Binding PumpsPressure.Color}"/>
+ </TextBlock.Foreground>
+ </TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="Bar"></TextBlock>
</Grid>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dyeing Head</TextBlock>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Pumps pressure</TextBlock>
</StackPanel>
<StackPanel Orientation="Vertical">
<Grid>
- <touch:TouchArcProgress Foreground="red" RingThickness="8" Value="218" Maximum="200" Minimum="0" Width="100" Height="100"></touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Foreground="Red">218/200</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="&#186;C"></TextBlock>
+ <touch:TouchArcProgress RingThickness="8" Value="{Binding Lubricant.Value}" Maximum="{Binding Lubricant.MaxValue}" Minimum="0" Width="100" Height="100">
+ <touch:TouchArcProgress.Foreground>
+ <SolidColorBrush Color="{Binding Lubricant.Color}"/>
+ </touch:TouchArcProgress.Foreground>
+ </touch:TouchArcProgress>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding Lubricant.DisplayValue}">
+ <TextBlock.Foreground>
+ <SolidColorBrush Color="{Binding Lubricant.Color}"/>
+ </TextBlock.Foreground>
+ </TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="mVolts"></TextBlock>
</Grid>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dyeing Head</TextBlock>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Lubricant</TextBlock>
</StackPanel>
</UniformGrid>
<Grid Margin="0 23 0 0">
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 5bf3b8a9a..ac5e69425 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -620,6 +620,13 @@ namespace Tango.Emulations.Emulators
monitors.Dispenser7MotorFrequency.AddRange(dispenserFrequencies[6].Data);
monitors.Dispenser8MotorFrequency.AddRange(dispenserFrequencies[7].Data);
+ res.HeatersStates.Add(new HeaterState()
+ {
+ CurrentValue = 50,
+ IsInSetPoint = false,
+ SetPoint = 100
+ });
+
res.DigitalInterfaceStates.AddRange(_digitalOutputPinsStates.Concat(_digitalInputPinsStates));
res.ComponentsStates.AddRange(_componentsStates);
res.HeatersStates.AddRange(_heater_states);