From cd8bec354b018a03ed3960ed4f76970d4cbff2ef Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 16 May 2023 16:12:09 +0300 Subject: Bugs + added Display Job Outline button in Tech. mode Related Work Items: #8407 --- .../Tango.PPC.UI/Models/MachineOverviewModel.cs | 30 ++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs index d5d8407b7..bd34122c6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs @@ -14,6 +14,8 @@ namespace Tango.PPC.UI.Models { public class MachineOverviewModel : ExtendedObject { + public static double DryerAirMaxValue = 120.0; + public MachineOverviewItem DryerZone3 { get; set; } public MachineOverviewItem DryerAir { get; set; } public MachineOverviewItem Tunnel { get; set; } @@ -42,7 +44,7 @@ namespace Tango.PPC.UI.Models { DryerZone3 = new MachineOverviewItem(); DryerAir = new MachineOverviewItem(); - DryerAir.MaxValue =140; + DryerAir.MaxValue = DryerAirMaxValue; Tunnel = new MachineOverviewItem(); PumpsPressure = new MachineOverviewItem(); PumpsPressure.MaxValue = 6; @@ -84,7 +86,9 @@ namespace Tango.PPC.UI.Models if (state != null) { - if (state.IsRampingUp) + if (state.IsRampingUp && + (state.SetPoint != 0 + && (state.CurrentValue <= (state.SetPoint - 10)))) { item.Status = "Heating Up"; item.Color = Colors.Orange; @@ -92,15 +96,7 @@ namespace Tango.PPC.UI.Models 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) + else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) || state.CurrentValue <= (state.SetPoint + 10))) { item.Status = "Operational"; item.Color = Colors.Green; @@ -108,6 +104,14 @@ namespace Tango.PPC.UI.Models item.MaxValue = state.SetPoint; item.Value = state.CurrentValue; } + else if (!state.IsRampingUp && (state.CurrentValue < (state.SetPoint - 10) || state.CurrentValue > (state.SetPoint + 10))) + { + item.Status = "Over-temperature"; + item.Color = Colors.Red; + item.DisplayValue = $"{state.CurrentValue} / {state.SetPoint}"; + item.MaxValue = state.SetPoint; + item.Value = state.CurrentValue > state.SetPoint? state.SetPoint : state.CurrentValue; + } else { item.Color = Colors.Gray; @@ -119,13 +123,13 @@ namespace Tango.PPC.UI.Models private void UpdateDryerAirItem(double currentvalue) { - if (currentvalue < 140) + if (currentvalue < DryerAirMaxValue) { DryerAir.Status = "Heating Up"; DryerAir.Color = Colors.Orange; DryerAir.DisplayValue = $"{currentvalue}"; } - else if (currentvalue >= 140) + else if (currentvalue >= DryerAirMaxValue) { DryerAir.Status = "Operational"; DryerAir.Color = Colors.Green; -- cgit v1.3.1