aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Models
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-05-16 16:12:09 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-05-16 16:12:09 +0300
commitcd8bec354b018a03ed3960ed4f76970d4cbff2ef (patch)
tree7fb730f86eb289cab99d3717c672a173e9efdc52 /Software/Visual_Studio/PPC/Tango.PPC.UI/Models
parent207ac666dd0e091ec58af244b0e98cda33789d7f (diff)
downloadTango-cd8bec354b018a03ed3960ed4f76970d4cbff2ef.tar.gz
Tango-cd8bec354b018a03ed3960ed4f76970d4cbff2ef.zip
Bugs + added Display Job Outline button in Tech. mode
Related Work Items: #8407
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs30
1 files changed, 17 insertions, 13 deletions
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;