PressMtrDelta added to BenchPath, PressDeltaXyz added to TestRslt, test methods modified, ver. 2.12.373

This commit is contained in:
Milan Hanajik 2016-10-18 18:48:20 +02:00
parent d1fb0e0f0a
commit bab677c5c2
35 changed files with 1159 additions and 1016 deletions

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@ -8,15 +8,16 @@ namespace Config.Entities
{
public class BenchPath : IHasItemNr, IHasValves
{
public virtual int Id { get; protected set; }
public virtual int ItemNr { get; set; }
public virtual int Id { get; protected set; }
public virtual int ItemNr { get; set; }
public virtual string Name { get; set; }
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
public virtual float Qto { get; set; } /// Water flow in [m3/h]
public virtual string TempIn { get; set; }
public virtual string TempOut { get; set; }
public virtual string PressIn { get; set; }
public virtual string PressOut { get; set; }
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
public virtual float Qto { get; set; } /// Water flow in [m3/h]
public virtual string TempMtrUp { get; set; }
public virtual string TempMtrDown { get; set; }
public virtual string PressMtrUp { get; set; }
public virtual string PressMtrDown { get; set; }
public virtual string PressMtrDelta { get; set; }
public virtual string StopBFValve { get; set; }
/// Valves
@ -27,7 +28,7 @@ namespace Config.Entities
public BenchPath()
{
ValvesOpen = string.Empty;
ValvesOpen = string.Empty;
ValvesClose = string.Empty;
}
@ -42,14 +43,16 @@ namespace Config.Entities
{
BenchPath result = new BenchPath(name, itemNr);
result.Qfrom = Qfrom;
result.Qto = Qto;
result.TempIn = TempIn;
result.TempOut = TempOut;
result.PressIn = PressIn;
result.PressOut = PressOut;
result.ValvesOpen = ValvesOpen;
result.ValvesClose = ValvesClose;
result.Qfrom = Qfrom;
result.Qto = Qto;
result.TempMtrUp = TempMtrUp;
result.TempMtrDown = TempMtrDown;
result.PressMtrUp = PressMtrUp;
result.PressMtrDown = PressMtrDown;
result.PressMtrDelta = PressMtrDelta;
result.StopBFValve = StopBFValve;
result.ValvesOpen = ValvesOpen;
result.ValvesClose = ValvesClose;
return result;
}

View File

@ -15,10 +15,11 @@ namespace Config.Mappings
Map(x => x.Name);
Map(x => x.Qfrom);
Map(x => x.Qto);
Map(x => x.TempIn);
Map(x => x.TempOut);
Map(x => x.PressIn);
Map(x => x.PressOut);
Map(x => x.TempMtrUp).Column("TempIn");
Map(x => x.TempMtrDown).Column("TempOut");
Map(x => x.PressMtrUp).Column("PressIn");
Map(x => x.PressMtrDown).Column("PressOut");
Map(x => x.PressMtrDelta);
Map(x => x.StopBFValve);
Map(x => x.ValvesOpen)
.CustomType("StringClob")

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.11.368.0")]
[assembly: AssemblyFileVersion("2.11.368.0")]
[assembly: AssemblyVersion("2.12.373.0")]
[assembly: AssemblyFileVersion("2.12.373.0")]

View File

@ -44,7 +44,7 @@ namespace Results.Entities
{
if (TestRslts.Count == 0) return 0;
float sum = 0;
foreach (var tr in TestRslts) sum += tr.AmbientTempAve;
foreach (var tr in TestRslts) sum += tr.AmbTempMean;
return sum / TestRslts.Count;
}
@ -52,7 +52,7 @@ namespace Results.Entities
{
if (TestRslts.Count == 0) return 0;
float sum = 0;
foreach (var tr in TestRslts) sum += tr.AmbientPressAve;
foreach (var tr in TestRslts) sum += tr.AmbPressMean;
return sum / TestRslts.Count;
}
@ -60,7 +60,7 @@ namespace Results.Entities
{
if (TestRslts.Count == 0) return 0;
float sum = 0;
foreach (var tr in TestRslts) sum += tr.AmbientHumiAve;
foreach (var tr in TestRslts) sum += tr.AmbHumiMean;
return sum / TestRslts.Count;
}

View File

@ -41,59 +41,66 @@ namespace Results.Entities
public virtual double RefEnergy { get; set; } /// [J] Joul
/// Auxiliary results
public virtual float AmbientTempAve { get; set; } /// [°C] Average ambient air temperature
public virtual float AmbTempMean { get; set; } /// [°C] Average ambient air temperature
public virtual float AmbTempStart { get; set; } /// [°C] Ambient air temperature on test start
public virtual float AmbTempEnd { get; set; } /// [°C] Ambient air temperature on test end
public virtual float AmbTempMin { get; set; } /// [°C] Minimum ambient air temperature
public virtual float AmbTempMax { get; set; } /// [°C] Maximum ambient air temperature
public virtual float AmbientPressAve { get; set; } /// [bar] Average ambient air pressure
public virtual float AmbPressMean { get; set; } /// [bar] Average ambient air pressure
public virtual float AmbPressStart { get; set; } /// [bar] Ambient air pressure on test start
public virtual float AmbPressEnd { get; set; } /// [bar] Ambient air pressure on test end
public virtual float AmbPressMin { get; set; } /// [bar] Minimum ambient air pressure
public virtual float AmbPressMax { get; set; } /// [bar] Maximum ambient air pressure
public virtual float AmbientHumiAve { get; set; } /// [%] Average ambient air relative humidity
public virtual float AmbHumiMean { get; set; } /// [%] Average ambient air relative humidity
public virtual float AmbHumiStart { get; set; } /// [%] Ambient air relative humidity on test start
public virtual float AmbHumiEnd { get; set; } /// [%] Ambient air relative humidity on test end
public virtual float AmbHumiMin { get; set; } /// [%] Minimum ambient air relative humidity
public virtual float AmbHumiMax { get; set; } /// [%] Maximum ambient air relative humidity
public virtual float PressUpAvrg { get; set; } /// [bar] Input water pressure (average)
public virtual float PressUpMean { get; set; } /// [bar] Input water pressure (average)
public virtual float PressUpStart { get; set; } /// [bar]
public virtual float PressUpEnd { get; set; } /// [bar]
public virtual float PressUpMin { get; set; } /// [bar]
public virtual float PressUpMax { get; set; } /// [bar]
public virtual float PressDownAvrg { get; set; } /// [bar]
public virtual float PressDownMean { get; set; } /// [bar]
public virtual float PressDownStart { get; set; } /// [bar]
public virtual float PressDownEnd { get; set; } /// [bar]
public virtual float PressDownMin { get; set; } /// [bar]
public virtual float PressDownMax { get; set; } /// [bar]
public virtual float TempInAvrg { get; set; } /// [°C]
public virtual float TempInStart { get; set; } /// [°C]
public virtual float TempInEnd { get; set; } /// [°C]
public virtual float TempInMin { get; set; } /// [°C]
public virtual float TempInMax { get; set; } /// [°C]
public virtual float TempOutAvrg { get; set; } /// [°C]
public virtual float TempOutStart { get; set; } /// [°C]
public virtual float TempOutEnd { get; set; } /// [°C]
public virtual float TempOutMin { get; set; } /// [°C]
public virtual float TempOutMax { get; set; } /// [°C]
public virtual float TempDivAvrg { get; set; } /// [°C]
public virtual float PressDeltaMean { get; set; } /// [bar]
public virtual float PressDeltaStart { get; set; } /// [bar]
public virtual float PressDeltaEnd { get; set; } /// [bar]
public virtual float PressDeltaMin { get; set; } /// [bar]
public virtual float PressDeltaMax { get; set; } /// [bar]
public virtual float TempUpMean { get; set; } /// [°C]
public virtual float TempUpStart { get; set; } /// [°C]
public virtual float TempUpEnd { get; set; } /// [°C]
public virtual float TempUpMin { get; set; } /// [°C]
public virtual float TempUpMax { get; set; } /// [°C]
public virtual float TempDownMean { get; set; } /// [°C]
public virtual float TempDownStart { get; set; } /// [°C]
public virtual float TempDownEnd { get; set; } /// [°C]
public virtual float TempDownMin { get; set; } /// [°C]
public virtual float TempDownMax { get; set; } /// [°C]
public virtual float TempDivMean { get; set; } /// [°C]
public virtual float TempDivStart { get; set; } /// [°C]
public virtual float TempDivEnd { get; set; } /// [°C]
public virtual float TempDivMin { get; set; } /// [°C]
public virtual float TempDivMax { get; set; } /// [°C]
public virtual float FlowMin { get; set; } /// [m3/h] minimum flow
public virtual float FlowStart { get; set; } /// [m3/h] minimum flow
public virtual float FlowEnd { get; set; } /// [m3/h] maximum flow
public virtual float FlowMin { get; set; } /// [m3/h] minimum flow
public virtual float FlowMax { get; set; } /// [m3/h] maximum flow
public virtual float Custom1 { get; set; } /// [°C] T ref warm mean
public virtual float Custom2 { get; set; } /// [°C] T ref warm start
public virtual float Custom3 { get; set; } /// [°C] T ref warm end
public virtual float Custom4 { get; set; } /// [°C] T ref warm min
public virtual float Custom5 { get; set; } /// [°C] T ref warm max
public virtual float Custom6 { get; set; } /// [°C] T ref cold mean
public virtual float Custom7 { get; set; } /// [°C] T ref cold start
public virtual float Custom8 { get; set; } /// [°C] T ref cold end
public virtual float Custom9 { get; set; } /// [°C] T ref cold min
public virtual float Custom10 { get; set; } /// [°C] T ref cold max
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
public virtual float Custom2 { get; set; } /// [°C] T ref hi start
public virtual float Custom3 { get; set; } /// [°C] T ref hi end
public virtual float Custom4 { get; set; } /// [°C] T ref hi min
public virtual float Custom5 { get; set; } /// [°C] T ref hi max
public virtual float Custom6 { get; set; } /// [°C] T ref lo mean
public virtual float Custom7 { get; set; } /// [°C] T ref lo start
public virtual float Custom8 { get; set; } /// [°C] T ref lo end
public virtual float Custom9 { get; set; } /// [°C] T ref lo min
public virtual float Custom10 { get; set; } /// [°C] T ref lo max
/// Wrappers
public virtual string Name() { return Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }

View File

@ -20,8 +20,8 @@ namespace Results
Test_end_time, /// 13
Test_time, /// 14
Flow, /// 15
T_in, /// 16
T_out, /// 17
T_up_mean, /// 16
T_down_mean, /// 17
T_div, /// 18
P_up, /// 19
P_up_start, /// 20
@ -88,6 +88,9 @@ namespace Results
TempLoStart, /// 81
TempLoEnd, /// 82
TempLoAve, /// 83
P_delta_mean, /// 84
P_delta_start, /// 85
P_delta_end, /// 86
Count,
}

View File

@ -114,19 +114,22 @@ namespace Results
AllItems.Add(new ItemSpec("Test end time", Strings.T_end, x => x.EndTime().ToShortTimeString(), (x, y, z) => z.EndTime().ToShortTimeString(), (x, z) => z.EndTime().ToShortTimeString()));
AllItems.Add(new ItemSpec("Test time", Strings.T_s, x => x.TestTime.ToString("F2"), (x, y, z) => z.TestTime.ToString("F2"), (x, z) => z.TestTime.ToString("F2")));
AllItems.Add(new ItemSpec("Flow", Strings.Flow + " [m3/h]", x => Utils.DoubleToStr(x.FlowVolume(), 4), (x, y, z) => Utils.DoubleToStr(z.FlowVolume(), 4), (x, z) => Utils.DoubleToStr(x.FlowVolume(), 4)));
AllItems.Add(new ItemSpec("T in", Strings.T_in + " [°C]", x => x.TestRslt.TempInAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempInAvrg.ToString("F2"), (x, z) => z.TestRslt.TempInAvrg.ToString("F2")));
AllItems.Add(new ItemSpec("T out", Strings.T_out + " [°C]", x => x.TestRslt.TempOutAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempOutAvrg.ToString("F2"), (x, z) => z.TestRslt.TempOutAvrg.ToString("F2")));
AllItems.Add(new ItemSpec("T div", Strings.T_div + " [°C]", x => x.TestRslt.TempDivAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempDivAvrg.ToString("F2"), (x, z) => z.TestRslt.TempDivAvrg.ToString("F2")));
AllItems.Add(new ItemSpec("P up", Strings.P_up + " [kPa]", x => (100 * x.TestRslt.PressUpAvrg).ToString("F3"), (x, y, z) => z.TestRslt.PressUpAvrg.ToString("F3"), (x, z) => z.TestRslt.PressUpAvrg.ToString("F3")));
AllItems.Add(new ItemSpec("T in", Strings.T_in + " [°C]", x => x.TestRslt.TempUpMean.ToString("F2"), (x, y, z) => z.TestRslt.TempUpMean.ToString("F2"), (x, z) => z.TestRslt.TempUpMean.ToString("F2")));
AllItems.Add(new ItemSpec("T out", Strings.T_out + " [°C]", x => x.TestRslt.TempDownMean.ToString("F2"), (x, y, z) => z.TestRslt.TempDownMean.ToString("F2"), (x, z) => z.TestRslt.TempDownMean.ToString("F2")));
AllItems.Add(new ItemSpec("T div", Strings.T_div + " [°C]", x => x.TestRslt.TempDivMean.ToString("F2"), (x, y, z) => z.TestRslt.TempDivMean.ToString("F2"), (x, z) => z.TestRslt.TempDivMean.ToString("F2")));
AllItems.Add(new ItemSpec("P up", Strings.P_up + " [kPa]", x => (100 * x.TestRslt.PressUpMean).ToString("F3"), (x, y, z) => z.TestRslt.PressUpMean.ToString("F3"), (x, z) => z.TestRslt.PressUpMean.ToString("F3")));
AllItems.Add(new ItemSpec("P up start", Strings.P_up_start + " [kPa]", x => (100 * x.TestRslt.PressUpStart).ToString("F3"), (x, y, z) => z.TestRslt.PressUpStart.ToString("F3"), (x, z) => z.TestRslt.PressUpStart.ToString("F3")));
AllItems.Add(new ItemSpec("P up end", Strings.P_up_end + " [kPa]", x => (100 * x.TestRslt.PressUpEnd).ToString("F3"), (x, y, z) => z.TestRslt.PressUpEnd.ToString("F3"), (x, z) => z.TestRslt.PressUpEnd.ToString("F3")));
AllItems.Add(new ItemSpec("P down", Strings.P_dn + " [kPa]", x => (100 * x.TestRslt.PressDownAvrg).ToString("F3"), (x, y, z) => z.TestRslt.PressDownAvrg.ToString("F3"), (x, z) => z.TestRslt.PressDownAvrg.ToString("F3")));
AllItems.Add(new ItemSpec("P down", Strings.P_dn + " [kPa]", x => (100 * x.TestRslt.PressDownMean).ToString("F3"), (x, y, z) => z.TestRslt.PressDownMean.ToString("F3"), (x, z) => z.TestRslt.PressDownMean.ToString("F3")));
AllItems.Add(new ItemSpec("P down start", Strings.P_dn_start + " [kPa]", x => (100 * x.TestRslt.PressDownStart).ToString("F3"), (x, y, z) => z.TestRslt.PressDownStart.ToString("F3"), (x, z) => z.TestRslt.PressDownStart.ToString("F3")));
AllItems.Add(new ItemSpec("P down end", Strings.P_dn_end + " [kPa]", x => (100 * x.TestRslt.PressDownEnd).ToString("F3"), (x, y, z) => z.TestRslt.PressDownEnd.ToString("F3"), (x, z) => z.TestRslt.PressDownEnd.ToString("F3")));
AllItems.Add(new ItemSpec("P delta", Strings.P_delta + " [kPa]", x => (100 * x.TestRslt.PressDeltaMean).ToString("F3"), (x, y, z) => z.TestRslt.PressDeltaMean.ToString("F3"), (x, z) => z.TestRslt.PressDeltaMean.ToString("F3")));
AllItems.Add(new ItemSpec("P delta start", Strings.P_delta_start + " [kPa]", x => (100 * x.TestRslt.PressDeltaStart).ToString("F3"), (x, y, z) => z.TestRslt.PressDeltaStart.ToString("F3"), (x, z) => z.TestRslt.PressDeltaStart.ToString("F3")));
AllItems.Add(new ItemSpec("P delta end", Strings.P_delta_end + " [kPa]", x => (100 * x.TestRslt.PressDeltaEnd).ToString("F3"), (x, y, z) => z.TestRslt.PressDeltaEnd.ToString("F3"), (x, z) => z.TestRslt.PressDeltaEnd.ToString("F3")));
AllItems.Add(new ItemSpec("Reference error", Strings.ErrRef + " [%]", x => x.TestRslt.ErrorMaster.ToString("F3"), (x, y, z) => z.TestRslt.ErrorMaster.ToString("F3"), (x, z) => z.TestRslt.ErrorMaster.ToString("F3")));
AllItems.Add(new ItemSpec("Ambient temperature", Strings.T_amb + " [°C]", x => x.TestRslt.AmbientTempAve.ToString("F1"), (x, y, z) => z.TestRslt.AmbientTempAve.ToString("F1"), (x, z) => z.TestRslt.AmbientTempAve.ToString("F1")));
AllItems.Add(new ItemSpec("Ambient pressure", Strings.P_amb + " [mbar]", x => (1000 * x.TestRslt.AmbientPressAve).ToString("F0"), (x, y, z) => (1000 * z.TestRslt.AmbientPressAve).ToString("F0"), (x, z) => (1000 * z.TestRslt.AmbientPressAve).ToString("F0")));
AllItems.Add(new ItemSpec("Ambient humidity", Strings.H_amb + " [%]", x => x.TestRslt.AmbientHumiAve.ToString("F1"), (x, y, z) => z.TestRslt.AmbientHumiAve.ToString("F1"), (x, z) => z.TestRslt.AmbientHumiAve.ToString("F1")));
AllItems.Add(new ItemSpec("Ambient temperature", Strings.T_amb + " [°C]", x => x.TestRslt.AmbTempMean.ToString("F1"), (x, y, z) => z.TestRslt.AmbTempMean.ToString("F1"), (x, z) => z.TestRslt.AmbTempMean.ToString("F1")));
AllItems.Add(new ItemSpec("Ambient pressure", Strings.P_amb + " [mbar]", x => (1000 * x.TestRslt.AmbPressMean).ToString("F0"), (x, y, z) => (1000 * z.TestRslt.AmbPressMean).ToString("F0"), (x, z) => (1000 * z.TestRslt.AmbPressMean).ToString("F0")));
AllItems.Add(new ItemSpec("Ambient humidity", Strings.H_amb + " [%]", x => x.TestRslt.AmbHumiMean.ToString("F1"), (x, y, z) => z.TestRslt.AmbHumiMean.ToString("F1"), (x, z) => z.TestRslt.AmbHumiMean.ToString("F1")));
/// Single and combined meter results
AllItems.Add(new ItemSpec("Volume", Strings.Volume + " [l]", x => x.VolumeMeter.ToString("F3"), (x, y, z) => z.VolumeMeter.ToString("F3"), (x, z) => x.VolumeMeter.ToString("F3")));

View File

@ -39,46 +39,53 @@ namespace Results.Mappings
#if HEAT_METERS_SUPPORT
Map(x => x.RefEnergy);
#endif
Map(x => x.AmbientTempAve);
Map(x => x.AmbTempMean).Column("AmbientTempAve");
Map(x => x.AmbTempStart);
Map(x => x.AmbTempEnd);
Map(x => x.AmbTempMin);
Map(x => x.AmbTempMax);
Map(x => x.AmbientPressAve);
Map(x => x.AmbPressMean).Column("AmbientPressAve");
Map(x => x.AmbPressStart);
Map(x => x.AmbPressEnd);
Map(x => x.AmbPressMin);
Map(x => x.AmbPressMax);
Map(x => x.AmbientHumiAve);
Map(x => x.AmbHumiMean).Column("AmbientHumiAve");
Map(x => x.AmbHumiStart);
Map(x => x.AmbHumiEnd);
Map(x => x.AmbHumiMin);
Map(x => x.AmbHumiMax);
Map(x => x.PressUpAvrg);
Map(x => x.PressUpMean).Column("PressUpAvrg");
Map(x => x.PressUpStart);
Map(x => x.PressUpEnd);
Map(x => x.PressUpMin);
Map(x => x.PressUpMax);
Map(x => x.PressDownAvrg);
Map(x => x.PressDownMean).Column("PressDownAvrg");
Map(x => x.PressDownStart);
Map(x => x.PressDownEnd);
Map(x => x.PressDownMin);
Map(x => x.PressDownMax);
Map(x => x.TempInAvrg);
Map(x => x.TempInStart);
Map(x => x.TempInEnd);
Map(x => x.TempInMin);
Map(x => x.TempInMax);
Map(x => x.TempOutAvrg);
Map(x => x.TempOutStart);
Map(x => x.TempOutEnd);
Map(x => x.TempOutMin);
Map(x => x.TempOutMax);
Map(x => x.TempDivAvrg);
Map(x => x.PressDeltaMean);
Map(x => x.PressDeltaStart);
Map(x => x.PressDeltaEnd);
Map(x => x.PressDeltaMin);
Map(x => x.PressDeltaMax);
Map(x => x.TempUpMean).Column("TempInAvrg");
Map(x => x.TempUpStart).Column("TempInStart");
Map(x => x.TempUpEnd).Column("TempInEnd");
Map(x => x.TempUpMin).Column("TempInMin");
Map(x => x.TempUpMax).Column("TempInMax");
Map(x => x.TempDownMean).Column("TempOutAvrg");
Map(x => x.TempDownStart).Column("TempOutStart");
Map(x => x.TempDownEnd).Column("TempOutEnd");
Map(x => x.TempDownMin).Column("TempOutMin");
Map(x => x.TempDownMax).Column("TempOutMax");
Map(x => x.TempDivMean).Column("TempDivAvrg");
Map(x => x.TempDivStart);
Map(x => x.TempDivEnd);
Map(x => x.TempDivMin);
Map(x => x.TempDivMax);
Map(x => x.FlowStart);
Map(x => x.FlowEnd);
Map(x => x.FlowMin);
Map(x => x.FlowMax);

View File

@ -298,11 +298,11 @@ namespace Results.Output.Printers.Munich
PrintAt(e, FromTest(rowCnt, 5), mtr.Passed ? "iO" : "NiO");
}
PrintAt(e, FromTest(rowCnt, 6), mtr.TestRslt.FlowMass.ToString("F1"));
PrintAt(e, FromTest(rowCnt, 7), mtr.TestRslt.TempOutAvrg.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 7), mtr.TestRslt.TempDownMean.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 8), mtr.TestRslt.DensityDiv.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 9), mtr.TestTime.ToString("F1"));
PrintAt(e, FromTest(rowCnt, 10), mtr.TestRslt.PressUpAvrg.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 11), mtr.TestRslt.PressDownAvrg.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 10), mtr.TestRslt.PressUpMean.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 11), mtr.TestRslt.PressDownMean.ToString("F2"));
rowCnt++;
}

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.11.368.0")]
[assembly: AssemblyFileVersion("2.11.368.0")]
[assembly: AssemblyVersion("2.12.373.0")]
[assembly: AssemblyFileVersion("2.12.373.0")]

View File

@ -339,6 +339,42 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to P delta.
/// </summary>
internal static string P_delta {
get {
return ResourceManager.GetString("P_delta", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to P delta end.
/// </summary>
internal static string P_delta_end {
get {
return ResourceManager.GetString("P_delta_end", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to P delta mean.
/// </summary>
internal static string P_delta_mean {
get {
return ResourceManager.GetString("P_delta_mean", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to P delta start.
/// </summary>
internal static string P_delta_start {
get {
return ResourceManager.GetString("P_delta_start", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to P down.
/// </summary>

View File

@ -369,4 +369,16 @@
<data name="Energy_ref" xml:space="preserve">
<value>Energy ref.</value>
</data>
<data name="P_delta" xml:space="preserve">
<value>P delta</value>
</data>
<data name="P_delta_end" xml:space="preserve">
<value>P delta end</value>
</data>
<data name="P_delta_mean" xml:space="preserve">
<value>P delta mean</value>
</data>
<data name="P_delta_start" xml:space="preserve">
<value>P delta start</value>
</data>
</root>

View File

@ -121,19 +121,22 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_end_time, Strings.T_end + "()", Quantity.DateTime, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).EndTime.ToString() : string.Format(f, w.GetTestRslt(t).EndTime))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_time, Strings.T_s + "()", Quantity.Time, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, Strings.Flow + "()", Quantity.Flow, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_in, Strings.T_in + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempInAvrg).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_out, Strings.T_out + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempOutAvrg).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div, Strings.T_div + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivAvrg).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up, Strings.P_up + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpAvrg).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_mean, Strings.T_in + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempUpMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_mean, Strings.T_out + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDownMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div, Strings.T_div + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up, Strings.P_up + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_start, Strings.P_up_start + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_end, Strings.P_up_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down, Strings.P_dn + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownAvrg).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down, Strings.P_dn + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_start, Strings.P_dn_start + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_end, Strings.P_dn_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, Strings.ErrRef + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, Strings.T_amb + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientTempAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientTempAve).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, Strings.P_amb + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientPressAve()).ToString(string.IsNullOrEmpty(p) ? "F0" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientPressAve).ToString(string.IsNullOrEmpty(p) ? "F0" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, Strings.H_amb + "()", Quantity.Humidity, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientHumiAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientHumiAve).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_mean, Strings.P_delta + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_start, Strings.P_delta_start + "()",Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_end, Strings.P_delta_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, Strings.ErrRef + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, Strings.T_amb + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientTempAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbTempMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, Strings.P_amb + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientPressAve()).ToString(string.IsNullOrEmpty(p) ? "F0" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbPressMean).ToString(string.IsNullOrEmpty(p) ? "F0" : p)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, Strings.H_amb + "()", Quantity.Humidity, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientHumiAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbHumiMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
/// Single and combined meter results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, Strings.Volume + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));

View File

@ -12,10 +12,11 @@ namespace TBF.BenchControl
public string Name;
public float Qfrom;
public float Qto;
public ITempMeter TempIn;
public ITempMeter TempOut;
public IPressureMeter PressIn;
public IPressureMeter PressOut;
public ITempMeter TempMtrUp;
public ITempMeter TempMtrDown;
public IPressureMeter PressMtrUp;
public IPressureMeter PressMtrDown;
public IPressureMeter PressMtrDelta;
public IValve StopBFValve;
public IList<IValve> ValvesOpen;
public IList<IValve> ValvesClose;
@ -35,10 +36,11 @@ namespace TBF.BenchControl
{
Qfrom = entity.Qfrom;
Qto = entity.Qto;
TempIn = TbfComponents.FindComponent(entity.TempIn, components) as ITempMeter;
TempOut = TbfComponents.FindComponent(entity.TempOut, components) as ITempMeter;
PressIn = TbfComponents.FindComponent(entity.PressIn, components) as IPressureMeter;
PressOut = TbfComponents.FindComponent(entity.PressOut, components) as IPressureMeter;
TempMtrUp = TbfComponents.FindComponent(entity.TempMtrUp, components) as ITempMeter;
TempMtrDown = TbfComponents.FindComponent(entity.TempMtrDown, components) as ITempMeter;
PressMtrUp = TbfComponents.FindComponent(entity.PressMtrUp, components) as IPressureMeter;
PressMtrDown = TbfComponents.FindComponent(entity.PressMtrDown, components) as IPressureMeter;
PressMtrDelta = TbfComponents.FindComponent(entity.PressMtrDelta, components) as IPressureMeter;
StopBFValve = TbfComponents.FindComponent(entity.StopBFValve, components) as IValve;
string[] vOpen = entity.ValvesOpen.Split(new char[] { ';' });

View File

@ -299,11 +299,11 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
PrintAt(e, FromTest(rowCnt, 5), mtr.Passed ? "iO" : "NiO");
}
PrintAt(e, FromTest(rowCnt, 6), mtr.TestRslt.FlowMass.ToString("F1"));
PrintAt(e, FromTest(rowCnt, 7), mtr.TestRslt.TempOutAvrg.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 7), mtr.TestRslt.TempDownMean.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 8), mtr.TestRslt.DensityDiv.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 9), mtr.TestTime.ToString("F1"));
PrintAt(e, FromTest(rowCnt, 10), mtr.TestRslt.PressUpAvrg.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 11), mtr.TestRslt.PressDownAvrg.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 10), mtr.TestRslt.PressUpMean.ToString("F2"));
PrintAt(e, FromTest(rowCnt, 11), mtr.TestRslt.PressDownMean.ToString("F2"));
rowCnt++;
}

View File

@ -8,33 +8,34 @@ namespace TBF.BenchControl.Sequences
{
public static IBenchInfo BenchInfo;
public static FloatBox AmbientTemp = new FloatBox() { Name = "Ambient Temperature", Format = "F1" }; /// [Celsius]
public static FloatBox AmbientPressure = new FloatBox() { Name = "Ambient Pressure", Format = "F0", Factor = 1000 }; /// [bar], printed by ToString() in [mbar]
public static FloatBox AmbientHumidity = new FloatBox() { Name = "Ambient Humidity", Format = "F1" }; /// [%]
public static DoubleBox TempIn = new DoubleBox() { Name = "Temperature In", Format = "F2" }; /// [°C]
public static DoubleBox TempOut = new DoubleBox() { Name = "Temperature Out", Format = "F2" }; /// [°C]
public static DoubleBox TempDiv = new DoubleBox() { Name = "Temperature Div", Format = "F2" }; /// [°C]
public static FloatBox PressureUp = new FloatBox() { Name = "Pressure In", Format = "F2" }; /// [bar]
public static FloatBox PressureDown = new FloatBox() { Name = "Pressure Out", Format = "F2" }; /// [bar]
public static FloatBox AmbTemp = new FloatBox() { Name = "Ambient Temperature", Format = "F1" }; /// [Celsius]
public static FloatBox AmbPress = new FloatBox() { Name = "Ambient Pressure", Format = "F0", Factor = 1000 }; /// [bar], printed by ToString() in [mbar]
public static FloatBox AmbHumi = new FloatBox() { Name = "Ambient Humidity", Format = "F1" }; /// [%]
public static DoubleBox TempUp = new DoubleBox() { Name = "Temperature Up", Format = "F2" }; /// [°C]
public static DoubleBox TempDown = new DoubleBox() { Name = "Temperature Dn", Format = "F2" }; /// [°C]
public static DoubleBox TempDiv = new DoubleBox() { Name = "Temperature Div", Format = "F2" }; /// [°C]
public static FloatBox PressUp = new FloatBox() { Name = "Pressure Up", Format = "F2" }; /// [bar]
public static FloatBox PressDown = new FloatBox() { Name = "Pressure Dn", Format = "F2" }; /// [bar]
public static FloatBox PressDelta = new FloatBox() { Name = "Pressure Delta", Format = "F2" }; /// [bar]
public static float LtrPerRefPulse; /// to calculate the ref.volume
public static float LtrPerRefPulse; /// to calculate the ref.volume
public static int RefPulses;
public static int RefPulsesDelta;
public static DoubleBox RefFreq = new DoubleBox() { Name = "RefFreq", Format = "F2" };
public static DoubleBox RefFlow = new DoubleBox() { Name = "RefFlow", Format = "F2" }; /// [m3/h]
public static DoubleBox RefFlow = new DoubleBox() { Name = "RefFlow", Format = "F2" }; /// [m3/h]
public static DoubleBox Mass = new DoubleBox() { Name = "Mass", Format = "F3" }; /// [kg]
public static DoubleBox StartMass = new DoubleBox() { Name = "Start Mass", Format = "F3" }; /// [kg]
public static DoubleBox EndMass = new DoubleBox() { Name = "End Mass", Format = "F3" }; /// [kg]
public static DoubleBox Mass = new DoubleBox() { Name = "Mass", Format = "F3" }; /// [kg]
public static DoubleBox StartMass = new DoubleBox() { Name = "Start Mass", Format = "F3" }; /// [kg]
public static DoubleBox EndMass = new DoubleBox() { Name = "End Mass", Format = "F3" }; /// [kg]
public static DateTime TestStartTime;
public static DateTime TestEndTime;
/// Heat meters only
public static DoubleBox TempRefWarm1 = new DoubleBox() { Name = "T ref warm 1", Format = "F3" }; /// [°C]
public static DoubleBox TempRefWarm2 = new DoubleBox() { Name = "T ref warm 2", Format = "F3" }; /// [°C]
public static DoubleBox TempRefCold1 = new DoubleBox() { Name = "T ref cold 1", Format = "F3" }; /// [°C]
public static DoubleBox TempRefCold2 = new DoubleBox() { Name = "T ref cold 2", Format = "F3" }; /// [°C]
public static DoubleBox TempRefHi1 = new DoubleBox() { Name = "T hi ac 1", Format = "F3" }; /// [°C]
public static DoubleBox TempRefHi2 = new DoubleBox() { Name = "T hi ac 2", Format = "F3" }; /// [°C]
public static DoubleBox TempRefLo1 = new DoubleBox() { Name = "T lo ac 1", Format = "F3" }; /// [°C]
public static DoubleBox TempRefLo2 = new DoubleBox() { Name = "T lo ac 2", Format = "F3" }; /// [°C]
public static Results.BatchResults BatchRslts;
@ -72,36 +73,38 @@ namespace TBF.BenchControl.Sequences
///
/// Statistics of 'continuous' variables (temperature, pressure, flow, etc.)
///
public static Statistics AmbientTempStat = new Statistics();
public static Statistics AmbientPressureStat = new Statistics();
public static Statistics AmbientHumidityStat = new Statistics();
public static Statistics TempInStat = new Statistics();
public static Statistics TempOutStat = new Statistics();
public static Statistics AmbTempStat = new Statistics();
public static Statistics AmbPressStat = new Statistics();
public static Statistics AmbHumiStat = new Statistics();
public static Statistics TempUpStat = new Statistics();
public static Statistics TempDownStat = new Statistics();
public static Statistics TempDivStat = new Statistics();
public static Statistics PressureUpStat = new Statistics();
public static Statistics PressureDownStat = new Statistics();
public static Statistics RefFlowStat = new Statistics();
public static Statistics PressUpStat = new Statistics();
public static Statistics PressDownStat = new Statistics();
public static Statistics PressDeltaStat = new Statistics();
public static Statistics RefFlowStat = new Statistics();
public static Statistics TempRefWarmStat = new Statistics();
public static Statistics TempRefColdStat = new Statistics();
public static Statistics TempRefHiStat = new Statistics();
public static Statistics TempRefLoStat = new Statistics();
public static Statistics Energy = new Statistics();
public static Statistics VolumeForEnergy = new Statistics();
public static int lastEnergyUpdateTime;
protected static void ClearAllStatistics()
{
AmbientTempStat.Clear();
AmbientPressureStat.Clear();
AmbientHumidityStat.Clear();
TempInStat.Clear();
TempOutStat.Clear();
AmbTempStat.Clear();
AmbPressStat.Clear();
AmbHumiStat.Clear();
TempUpStat.Clear();
TempDownStat.Clear();
TempDivStat.Clear();
PressureUpStat.Clear();
PressureDownStat.Clear();
RefFlowStat.Clear();
PressUpStat.Clear();
PressDownStat.Clear();
PressDeltaStat.Clear();
RefFlowStat.Clear();
TempRefWarmStat.Clear();
TempRefColdStat.Clear();
TempRefHiStat.Clear();
TempRefLoStat.Clear();
Energy.Clear();
VolumeForEnergy.Clear();
lastEnergyUpdateTime = 0;
@ -109,20 +112,21 @@ namespace TBF.BenchControl.Sequences
protected static void UpdateAllStatistics()
{
AmbientTempStat.Update(AmbientTemp);
AmbientPressureStat.Update(AmbientPressure);
AmbientHumidityStat.Update(AmbientHumidity);
TempInStat.Update(TempIn);
TempOutStat.Update(TempOut);
AmbTempStat.Update(AmbTemp);
AmbPressStat.Update(AmbPress);
AmbHumiStat.Update(AmbHumi);
TempUpStat.Update(TempUp);
TempDownStat.Update(TempDown);
TempDivStat.Update(TempDiv);
PressureUpStat.Update(PressureUp);
PressureDownStat.Update(PressureDown);
RefFlowStat.Update(RefFlow);
PressUpStat.Update(PressUp);
PressDownStat.Update(PressDown);
PressDeltaStat.Update(PressDelta);
RefFlowStat.Update(RefFlow);
if (BatchRslts.Batch.HeatMeter)
{
TempRefWarmStat.Update((TempRefWarm1.Val + TempRefWarm2.Val) / 2);
TempRefColdStat.Update((TempRefCold1.Val + TempRefCold2.Val) / 2);
TempRefHiStat.Update((TempRefHi1.Val + TempRefHi2.Val) / 2);
TempRefLoStat.Update((TempRefLo1.Val + TempRefLo2.Val) / 2);
}
}
}

View File

@ -81,28 +81,29 @@ namespace TBF.BenchControl.Sequences
{
logger.Info(Environment.NewLine);
if (sectionName != null) logger.Info(sectionName);
logger.Info("Time Flow TstTime Ref.cnt Ref.vol Tin Tout Tdiv Pin Pout Mass VolMM Tamb Hamb Pamb Rv");
logger.Info("Time Flow TstTime Ref.cnt Ref.vol Tup Tdown Tdiv Pup Pdown Pdelta Mass VolMM Tamb Hamb Pamb Rv");
logger.Info(Environment.NewLine);
}
public void LogProcessData(ILog logger)
{
logger.InfoFormat("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15}",
logger.InfoFormat("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16}",
DateTime.Now.ToLongTimeString(),
Utils.DoubleToStr(RefFlow.Val, 4),
StateMachine.ControlBoard.TTime.ToString("F3"),
StateMachine.ControlBoard.EtPulses(0),
Formulas.VolumeFromPulses(StateMachine.ControlBoard.EtPulses(0), 1.0f / LtrPerRefPulse).ToString("F3"),
TempIn,
TempOut,
TempUp,
TempDown,
TempDiv,
PressureUp,
PressureDown,
Mass,
PressUp,
PressDown,
PressDelta,
Mass,
"VolMM",
AmbientTemp,
AmbientHumidity,
AmbientPressure,
AmbTemp,
AmbHumi,
AmbPress,
outPath.RegulValve.Position.ToString("F1"));
}
@ -110,33 +111,34 @@ namespace TBF.BenchControl.Sequences
{
logger.Info(Environment.NewLine);
if (sectionName != null) logger.Info(sectionName);
logger.Info("Time Flow TstTime Ref.cnt Ref.vol Tin Tout Tdiv Pin Pout Mass VolMM Tamb Hamb Pamb Rv Thiac1 Thiac2 Tloac1 Tloac2");
logger.Info("Time Flow TstTime Ref.cnt Ref.vol Tup Tdown Tdiv Pup Pdown Pdelta Mass VolMM Tamb Hamb Pamb Rv Thiac1 Thiac2 Tloac1 Tloac2");
logger.Info(Environment.NewLine);
}
public void LogProcessDataHeatMeters(ILog logger)
{
logger.InfoFormat("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19}",
logger.InfoFormat("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19} {20}",
DateTime.Now.ToLongTimeString(),
Utils.DoubleToStr(RefFlow.Val, 4),
StateMachine.ControlBoard.TTime.ToString("F3"),
StateMachine.ControlBoard.EtPulses(0),
Formulas.VolumeFromPulses(StateMachine.ControlBoard.EtPulses(0), 1.0f / LtrPerRefPulse).ToString("F3"),
TempIn,
TempOut,
TempUp,
TempDown,
TempDiv,
PressureUp,
PressureDown,
PressUp,
PressDown,
PressDelta,
Mass,
"VolMM",
AmbientTemp,
AmbientHumidity,
AmbientPressure,
AmbTemp,
AmbHumi,
AmbPress,
outPath.RegulValve.Position.ToString("F1"),
TempRefWarm1,
TempRefWarm2,
TempRefCold1,
TempRefCold2);
TempRefHi1,
TempRefHi2,
TempRefLo1,
TempRefLo2);
}
@ -655,19 +657,20 @@ namespace TBF.BenchControl.Sequences
.AddOperation(checkUiOp)
.AddOperations(measureOperations)
.AddOperation(readRegistersOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(realTest ? outPath.Balance.ReadMassOp(ref Mass) : null)
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi)
: null)
//.AddOperation(realTest ? (ticTac ? queryEnd1 : queryEnd2) : null)
.AddOperation(realTest ? queryEnd1 : null)
@ -719,24 +722,33 @@ namespace TBF.BenchControl.Sequences
sb.Append(";"); sb.Append(outPath.FlowMeter.Idx1);
sb.Append(";"); sb.Append(" ");
sb.Append(";"); if (outPath.Balance != null) sb.Append(outPath.Balance.Name);
sb.Append(";"); sb.Append(tstRslt.AmbientTempAve);
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.mbar, tstRslt.AmbientPressAve).ToString("F0")); /// [mbar]
sb.Append(";"); sb.Append(tstRslt.AmbientHumiAve); /// [%]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressUpAvrg).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressDownAvrg).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressUpStart).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressDownStart).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressUpEnd).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(tstRslt.AmbTempMean);
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.mbar, tstRslt.AmbPressMean).ToString("F0")); /// [mbar]
sb.Append(";"); sb.Append(tstRslt.AmbHumiMean); /// [%]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressUpMean).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressDownMean).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressDeltaMean).ToString("F1")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressUpStart).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressDownStart).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressDeltaStart).ToString("F1")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressUpEnd).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressDownEnd).ToString("F0")); /// [kPa]
sb.Append(";"); sb.Append(tstRslt.TempInAvrg);
sb.Append(";"); sb.Append(tstRslt.TempOutAvrg);
sb.Append(";"); sb.Append(tstRslt.TempDivAvrg);
sb.Append(";"); sb.Append(tstRslt.TempInStart);
sb.Append(";"); sb.Append(tstRslt.TempOutStart);
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.kPa, tstRslt.PressDeltaEnd).ToString("F1")); /// [kPa]
sb.Append(";"); sb.Append(tstRslt.TempUpMean);
sb.Append(";"); sb.Append(tstRslt.TempDownMean);
sb.Append(";"); sb.Append(tstRslt.TempDivMean);
sb.Append(";"); sb.Append(tstRslt.Custom1); /// T hi mean
sb.Append(";"); sb.Append(tstRslt.Custom6); /// T lo mean
sb.Append(";"); sb.Append(tstRslt.TempUpStart);
sb.Append(";"); sb.Append(tstRslt.TempDownStart);
sb.Append(";"); sb.Append(tstRslt.TempDivStart);
sb.Append(";"); sb.Append(tstRslt.TempInEnd);
sb.Append(";"); sb.Append(tstRslt.TempOutEnd);
sb.Append(";"); sb.Append(tstRslt.Custom2); /// T hi start
sb.Append(";"); sb.Append(tstRslt.Custom7); /// T lo start
sb.Append(";"); sb.Append(tstRslt.TempUpEnd);
sb.Append(";"); sb.Append(tstRslt.TempDownEnd);
sb.Append(";"); sb.Append(tstRslt.TempDivEnd);
sb.Append(";"); sb.Append(tstRslt.Custom3); /// T hi end
sb.Append(";"); sb.Append(tstRslt.Custom8); /// T lo end
sb.Append(";"); sb.Append(tstRslt.MassStartRaw);
sb.Append(";"); sb.Append(tstRslt.MassStart);
sb.Append(";"); sb.Append(tstRslt.MassEndRaw);
@ -953,34 +965,34 @@ namespace TBF.BenchControl.Sequences
tstRslt.VolumeMaster = tstRslt.TargetVolume();
tstRslt.ErrorMaster = 0;
tstRslt.AmbientTempAve = 20.0f;
tstRslt.AmbientPressAve = 1.0f;
tstRslt.AmbientHumiAve = 50.0f;
tstRslt.AmbTempMean = 20.0f;
tstRslt.AmbPressMean = 1.0f;
tstRslt.AmbHumiMean = 50.0f;
tstRslt.PressUpStart = 1.0f;
tstRslt.PressDownStart = 1.0f;
tstRslt.TempInStart = 20.0f;
tstRslt.TempOutStart = 20.0f;
tstRslt.TempUpStart = 20.0f;
tstRslt.TempDownStart = 20.0f;
tstRslt.TempDivStart = 20.0f;
tstRslt.PressUpEnd = 1.0f;
tstRslt.PressDownEnd = 1.0f;
tstRslt.TempInEnd = 20.0f;
tstRslt.TempOutEnd = 20.0f;
tstRslt.TempUpEnd = 20.0f;
tstRslt.TempDownEnd = 20.0f;
tstRslt.TempDivEnd = 20.0f;
tstRslt.PressUpAvrg = 1.0f;
tstRslt.PressDownAvrg = 1.0f;
tstRslt.TempInAvrg = 20.0f;
tstRslt.TempOutAvrg = 20.0f;
tstRslt.TempDivAvrg = 20.0f;
tstRslt.PressUpMean = 1.0f;
tstRslt.PressDownMean = 1.0f;
tstRslt.TempUpMean = 20.0f;
tstRslt.TempDownMean = 20.0f;
tstRslt.TempDivMean = 20.0f;
tstRslt.PressUpMin = 1.0f;
tstRslt.PressDownMin = 1.0f;
tstRslt.TempInMin = 20.0f;
tstRslt.TempOutMin = 20.0f;
tstRslt.TempUpMin = 20.0f;
tstRslt.TempDownMin = 20.0f;
tstRslt.TempDivMin = 20.0f;
tstRslt.PressUpMax = 1.0f;
tstRslt.PressDownMax = 1.0f;
tstRslt.TempInMax = 20.0f;
tstRslt.TempOutMax = 20.0f;
tstRslt.TempUpMax = 20.0f;
tstRslt.TempDownMax = 20.0f;
tstRslt.TempDivMax = 20.0f;
tstRslt.FlowMin = 0; /// TODO
@ -1057,34 +1069,34 @@ namespace TBF.BenchControl.Sequences
tstRslt.VolumeMaster = tstRslt.TargetVolume();
tstRslt.ErrorMaster = 0;
tstRslt.AmbientTempAve = 20.0f;
tstRslt.AmbientPressAve = 1.0f;
tstRslt.AmbientHumiAve = 50.0f;
tstRslt.AmbTempMean = 20.0f;
tstRslt.AmbPressMean = 1.0f;
tstRslt.AmbHumiMean = 50.0f;
tstRslt.PressUpStart = 1.0f;
tstRslt.PressDownStart = 1.0f;
tstRslt.TempInStart = 20.0f;
tstRslt.TempOutStart = 20.0f;
tstRslt.TempUpStart = 20.0f;
tstRslt.TempDownStart = 20.0f;
tstRslt.TempDivStart = 20.0f;
tstRslt.PressUpEnd = 1.0f;
tstRslt.PressDownEnd = 1.0f;
tstRslt.TempInEnd = 20.0f;
tstRslt.TempOutEnd = 20.0f;
tstRslt.TempUpEnd = 20.0f;
tstRslt.TempDownEnd = 20.0f;
tstRslt.TempDivEnd = 20.0f;
tstRslt.PressUpAvrg = 1.0f;
tstRslt.PressDownAvrg = 1.0f;
tstRslt.TempInAvrg = 20.0f;
tstRslt.TempOutAvrg = 20.0f;
tstRslt.TempDivAvrg = 20.0f;
tstRslt.PressUpMean = 1.0f;
tstRslt.PressDownMean = 1.0f;
tstRslt.TempUpMean = 20.0f;
tstRslt.TempDownMean = 20.0f;
tstRslt.TempDivMean = 20.0f;
tstRslt.PressUpMin = 1.0f;
tstRslt.PressDownMin = 1.0f;
tstRslt.TempInMin = 20.0f;
tstRslt.TempOutMin = 20.0f;
tstRslt.TempUpMin = 20.0f;
tstRslt.TempDownMin = 20.0f;
tstRslt.TempDivMin = 20.0f;
tstRslt.PressUpMax = 1.0f;
tstRslt.PressDownMax = 1.0f;
tstRslt.TempInMax = 20.0f;
tstRslt.TempOutMax = 20.0f;
tstRslt.TempUpMax = 20.0f;
tstRslt.TempDownMax = 20.0f;
tstRslt.TempDivMax = 20.0f;
tstRslt.FlowMin = 0; /// TODO
@ -1181,34 +1193,34 @@ namespace TBF.BenchControl.Sequences
tstRslt.VolumeMaster = tstRslt.TargetVolume();
tstRslt.ErrorMaster = 0;
tstRslt.AmbientTempAve = 20.0f;
tstRslt.AmbientPressAve = 1.0f;
tstRslt.AmbientHumiAve = 50.0f;
tstRslt.AmbTempMean = 20.0f;
tstRslt.AmbPressMean = 1.0f;
tstRslt.AmbHumiMean = 50.0f;
tstRslt.PressUpStart = 1.0f;
tstRslt.PressDownStart = 1.0f;
tstRslt.TempInStart = 20.0f;
tstRslt.TempOutStart = 20.0f;
tstRslt.TempUpStart = 20.0f;
tstRslt.TempDownStart = 20.0f;
tstRslt.TempDivStart = 20.0f;
tstRslt.PressUpEnd = 1.0f;
tstRslt.PressDownEnd = 1.0f;
tstRslt.TempInEnd = 20.0f;
tstRslt.TempOutEnd = 20.0f;
tstRslt.TempUpEnd = 20.0f;
tstRslt.TempDownEnd = 20.0f;
tstRslt.TempDivEnd = 20.0f;
tstRslt.PressUpAvrg = 1.0f;
tstRslt.PressDownAvrg = 1.0f;
tstRslt.TempInAvrg = 20.0f;
tstRslt.TempOutAvrg = 20.0f;
tstRslt.TempDivAvrg = 20.0f;
tstRslt.PressUpMean = 1.0f;
tstRslt.PressDownMean = 1.0f;
tstRslt.TempUpMean = 20.0f;
tstRslt.TempDownMean = 20.0f;
tstRslt.TempDivMean = 20.0f;
tstRslt.PressUpMin = 1.0f;
tstRslt.PressDownMin = 1.0f;
tstRslt.TempInMin = 20.0f;
tstRslt.TempOutMin = 20.0f;
tstRslt.TempUpMin = 20.0f;
tstRslt.TempDownMin = 20.0f;
tstRslt.TempDivMin = 20.0f;
tstRslt.PressUpMax = 1.0f;
tstRslt.PressDownMax = 1.0f;
tstRslt.TempInMax = 20.0f;
tstRslt.TempOutMax = 20.0f;
tstRslt.TempUpMax = 20.0f;
tstRslt.TempDownMax = 20.0f;
tstRslt.TempDivMax = 20.0f;
tstRslt.FlowMin = 0; /// TODO

View File

@ -262,49 +262,54 @@ namespace TBF.BenchControl.TestMethods.Adjustment
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivMean); /// [kg/m3]
/// Main results
tstRslt.StartTime = TestStartTime;

View File

@ -576,49 +576,54 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivMean); /// [kg/m3]
/// Main results
tstRslt.StartTime = TestStartTime;

View File

@ -251,13 +251,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
//------------------------------------------------
State.Create("FixedStartAdvanced : Measuring the start mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperations(measureOperations)
.AddOperation(outPath.Balance.ReadStableMassOp(ref StartMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
@ -368,13 +369,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
State.Create("FixedStartAdvanced : Waiting before 2nd mass measurement")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -394,13 +396,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
//------------------------------------------------
State.Create("FixedStartAdvanced : Measuring the end mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadStableMassOp(ref EndMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -430,7 +433,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
double massStart = Formulas.CorrectedValue(StartMass.Val, outPath.Balance.Corrections);
double massEnd = Formulas.CorrectedValue(EndMass.Val, outPath.Balance.Corrections);
double densityOut = Formulas.WaterDensityFromTemp(TempOutStat.Average);
double densityOut = Formulas.WaterDensityFromTemp(TempDownStat.Average);
double volumeCTV = 1.00103f * 1000.0f * (massEnd - massStart) / densityOut;
///
@ -477,49 +480,54 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivMean); /// [kg/m3]
/// Main results
tstRslt.StartTime = TestStartTime;

View File

@ -220,10 +220,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
State.Create("FixedStartMassCollection : Check temperature stabilized.")
.AddOperation(checkUiOp)
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(heatMetersPromptOp)
.EnterState();
do
@ -232,18 +232,18 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (e.Contains(Event.Next)) goto temperature_set;
if (TempRefWarm1.Val != 0 && TempRefWarm2.Val != 0 && TempRefCold1.Val != 0 && TempRefCold2.Val != 0)
if (TempRefHi1.Val != 0 && TempRefHi2.Val != 0 && TempRefLo1.Val != 0 && TempRefLo2.Val != 0)
{
if (StateMachine.Time - lastTimeSec > 10 || StateMachine.Time - lastTimeSec < 0)
{
double Tw = (TempRefWarm1.Val + TempRefWarm2.Val) / 2;
double Tc = (TempRefCold1.Val + TempRefCold2.Val) / 2;
double Tw = (TempRefHi1.Val + TempRefHi2.Val) / 2;
double Tc = (TempRefLo1.Val + TempRefLo2.Val) / 2;
if (heatMetersTestParams.TempWarmLo <= Tw && Tw <= heatMetersTestParams.TempWarmHi &&
heatMetersTestParams.TempColdLo <= Tc && Tc <= heatMetersTestParams.TempColdHi &&
Math.Abs(Tw - Tw_last) <= heatMetersTestParams.ChangeInTimeWarm &&
Math.Abs(Tc - Tc_last) <= heatMetersTestParams.ChangeInTimeCold &&
Math.Abs(TempRefWarm1.Val - TempRefWarm2.Val) <= heatMetersTestParams.DeltaTempWarm &&
Math.Abs(TempRefCold1.Val - TempRefCold2.Val) <= heatMetersTestParams.DeltaTempCold)
Math.Abs(TempRefHi1.Val - TempRefHi2.Val) <= heatMetersTestParams.DeltaTempWarm &&
Math.Abs(TempRefLo1.Val - TempRefLo2.Val) <= heatMetersTestParams.DeltaTempCold)
{
goto temperature_set;
}
@ -265,10 +265,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
State.Create("FixedStartMassCollection : Closing the start/stop valve before the fixed start test")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, outPath.StartValve))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
.EnterState();
do
@ -302,10 +302,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
Bridge.OnActivity(this, Strings.Enter_water_meter_data);
State.Create("FixedStartMassCollection : Enter begin-state")
.AddOperation((dataEntryCmpnt as GenericDevices.IHasWMStatesForm).ShowTestStartFormOp())
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(checkUiOp)
.EnterState();
do
@ -330,17 +330,18 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
//------------------------------------------------
State.Create("FixedStartMassCollection : Measuring the start mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperations(measureOperations)
.AddOperation(outPath.Balance.ReadStableMassOp(ref StartMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
@ -362,10 +363,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
State.Create("FixedStartMassCollection : Starting the test")
.AddOperation(checkUiOp)
.AddOperations(measureOperations)
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
test.Qfrom, test.Qto, 2 * totalPulses, (float)test.TolerRed))
.EnterState();
@ -380,10 +381,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
State.Create("FixedStartMassCollection : Opening the start/stop valve at the beginning of the fixed start test")
.AddOperation(checkUiOp)
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.StartValve, null))
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
.EnterState();
@ -445,8 +446,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
else
{
//double deltaTime = (double)(StateMachine.Time - lastEnergyUpdateTime);
double T_in = (TempRefWarm1.Val + TempRefWarm2.Val) / 2; /// [°C]
double T_out = (TempRefCold1.Val + TempRefCold2.Val) / 2; /// [°C]
double T_in = (TempRefHi1.Val + TempRefHi2.Val) / 2; /// [°C]
double T_out = (TempRefLo1.Val + TempRefLo2.Val) / 2; /// [°C]
double deltaVolume = LtrPerRefPulse * RefPulsesDelta; /// [l]
double deltaEnergy = (0.001 * deltaVolume) * (T_in - T_out) * Formulas.HeatCoefficientWater(16, T_in, T_out, heatMetersTestParams.FlowMeasuredAtHiTempPipe); /// [J] = [m3] * [K] * [J/(m3 K)]
Energy.Update(deltaEnergy);
@ -480,10 +481,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
State.Create("FixedStartMassCollection : Closing the start/stop valve at the end of the fixed start test")
.AddOperation(checkUiOp)
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, outPath.StartValve))
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
.EnterState();
@ -497,17 +498,18 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
State.Create("FixedStartMassCollection : Waiting before 2nd mass measurement")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -527,17 +529,18 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
//------------------------------------------------
State.Create("FixedStartMassCollection : Measuring the end mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadStableMassOp(ref EndMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -567,7 +570,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
double massStart = Formulas.CorrectedValue(StartMass.Val, outPath.Balance.Corrections);
double massEnd = Formulas.CorrectedValue(EndMass.Val, outPath.Balance.Corrections);
double densityOut = Formulas.WaterDensityFromTemp(TempOutStat.Average); /// [kg/m3]
double densityOut = Formulas.WaterDensityFromTemp(TempDownStat.Average); /// [kg/m3]
double volumeCTV = 1001.03 * (massEnd - massStart) / densityOut;
double refEnergy = Energy.Sum * volumeCTV / VolumeForEnergy.Sum; /// [J]=[J]*[l]/[l]
@ -624,49 +627,54 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivMean); /// [kg/m3]
/// Main results
tstRslt.StartTime = TestStartTime;
@ -743,16 +751,16 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
///
tstRslt.RefEnergy = Energy.Sum * tstRslt.VolumeCTV / VolumeForEnergy.Sum; /// [J] = [J] * [l] / [l]
tstRslt.Custom1 = (float)TempRefWarmStat.Average;
tstRslt.Custom2 = (float)TempRefWarmStat.First;
tstRslt.Custom3 = (float)TempRefWarmStat.Last;
tstRslt.Custom4 = (float)TempRefWarmStat.Min;
tstRslt.Custom5 = (float)TempRefWarmStat.Max;
tstRslt.Custom6 = (float)TempRefColdStat.Average;
tstRslt.Custom7 = (float)TempRefColdStat.First;
tstRslt.Custom8 = (float)TempRefColdStat.Last;
tstRslt.Custom9 = (float)TempRefColdStat.Min;
tstRslt.Custom10 = (float)TempRefColdStat.Max;
tstRslt.Custom1 = (float)TempRefHiStat.Average;
tstRslt.Custom2 = (float)TempRefHiStat.First;
tstRslt.Custom3 = (float)TempRefHiStat.Last;
tstRslt.Custom4 = (float)TempRefHiStat.Min;
tstRslt.Custom5 = (float)TempRefHiStat.Max;
tstRslt.Custom6 = (float)TempRefLoStat.Average;
tstRslt.Custom7 = (float)TempRefLoStat.First;
tstRslt.Custom8 = (float)TempRefLoStat.Last;
tstRslt.Custom9 = (float)TempRefLoStat.Min;
tstRslt.Custom10 = (float)TempRefLoStat.Max;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
{

View File

@ -205,10 +205,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
State.Create("FlyingStart : Check temperature stabilized.")
.AddOperation(checkUiOp)
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(heatMetersPromptOp)
.EnterState();
do
@ -217,18 +217,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (e.Contains(Event.Next)) goto temperature_set;
if (TempRefWarm1.Val != 0 && TempRefWarm2.Val != 0 && TempRefCold1.Val != 0 && TempRefCold2.Val != 0)
if (TempRefHi1.Val != 0 && TempRefHi2.Val != 0 && TempRefLo1.Val != 0 && TempRefLo2.Val != 0)
{
if (StateMachine.Time - lastTimeSec > 10 || StateMachine.Time - lastTimeSec < 0)
{
double Tw = (TempRefWarm1.Val + TempRefWarm2.Val) / 2;
double Tc = (TempRefCold1.Val + TempRefCold2.Val) / 2;
double Tw = (TempRefHi1.Val + TempRefHi2.Val) / 2;
double Tc = (TempRefLo1.Val + TempRefLo2.Val) / 2;
if (heatMetersTestParams.TempWarmLo <= Tw && Tw <= heatMetersTestParams.TempWarmHi &&
heatMetersTestParams.TempColdLo <= Tc && Tc <= heatMetersTestParams.TempColdHi &&
Math.Abs(Tw - Tw_last) <= heatMetersTestParams.ChangeInTimeWarm &&
Math.Abs(Tc - Tc_last) <= heatMetersTestParams.ChangeInTimeCold &&
Math.Abs(TempRefWarm1.Val - TempRefWarm2.Val) <= heatMetersTestParams.DeltaTempWarm &&
Math.Abs(TempRefCold1.Val - TempRefCold2.Val) <= heatMetersTestParams.DeltaTempCold)
Math.Abs(TempRefHi1.Val - TempRefHi2.Val) <= heatMetersTestParams.DeltaTempWarm &&
Math.Abs(TempRefLo1.Val - TempRefLo2.Val) <= heatMetersTestParams.DeltaTempCold)
{
goto temperature_set;
}
@ -257,17 +257,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
//------------------------------------------------
State.Create("FlyingStart : Starting the test")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperations(measureOperations)
.AddOperation(processDataLoggingOp)
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
@ -300,17 +301,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
.AddOperation(checkUiOp)
.AddOperations(measureOperations)
.AddOperation(readRegistersOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi)
: null)
.AddOperation(queryEnd1)
.AddOperation(processDataLoggingOp)
@ -348,8 +350,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
else
{
//double deltaTime = (double)(StateMachine.Time - lastEnergyUpdateTime);
double T_in = (TempRefWarm1.Val + TempRefWarm2.Val) / 2; /// [°C]
double T_out = (TempRefCold1.Val + TempRefCold2.Val) / 2; /// [°C]
double T_in = (TempRefHi1.Val + TempRefHi2.Val) / 2; /// [°C]
double T_out = (TempRefLo1.Val + TempRefLo2.Val) / 2; /// [°C]
double deltaVolume = LtrPerRefPulse * RefPulsesDelta; /// [l]
double deltaEnergy = (0.001 * deltaVolume) * (T_in - T_out) * Formulas.HeatCoefficientWater(16, T_in, T_out, heatMetersTestParams.FlowMeasuredAtHiTempPipe); /// [J] = [m3] * [K] * [J/(m3 K)]
Energy.Update(deltaEnergy);
@ -386,49 +388,54 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivMean); /// [kg/m3]
/// Main results
tstRslt.StartTime = TestStartTime;
@ -464,16 +471,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
///
tstRslt.RefEnergy = Energy.Sum * tstRslt.VolumeCTV / VolumeForEnergy.Sum; /// [J] = [J] * [l] / [l]
tstRslt.Custom1 = (float)TempRefWarmStat.Average;
tstRslt.Custom2 = (float)TempRefWarmStat.First;
tstRslt.Custom3 = (float)TempRefWarmStat.Last;
tstRslt.Custom4 = (float)TempRefWarmStat.Min;
tstRslt.Custom5 = (float)TempRefWarmStat.Max;
tstRslt.Custom6 = (float)TempRefColdStat.Average;
tstRslt.Custom7 = (float)TempRefColdStat.First;
tstRslt.Custom8 = (float)TempRefColdStat.Last;
tstRslt.Custom9 = (float)TempRefColdStat.Min;
tstRslt.Custom10 = (float)TempRefColdStat.Max;
tstRslt.Custom1 = (float)TempRefHiStat.Average;
tstRslt.Custom2 = (float)TempRefHiStat.First;
tstRslt.Custom3 = (float)TempRefHiStat.Last;
tstRslt.Custom4 = (float)TempRefHiStat.Min;
tstRslt.Custom5 = (float)TempRefHiStat.Max;
tstRslt.Custom6 = (float)TempRefLoStat.Average;
tstRslt.Custom7 = (float)TempRefLoStat.First;
tstRslt.Custom8 = (float)TempRefLoStat.Last;
tstRslt.Custom9 = (float)TempRefLoStat.Min;
tstRslt.Custom10 = (float)TempRefLoStat.Max;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
{

View File

@ -305,10 +305,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
State.Create("FlyingStartMassCollection : Check temperature stabilized.")
.AddOperation(checkUiOp)
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(heatMetersPromptOp)
.EnterState();
do
@ -317,18 +317,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
if (e.Contains(Event.Next)) goto temperature_set;
if (TempRefWarm1.Val != 0 && TempRefWarm2.Val != 0 && TempRefCold1.Val != 0 && TempRefCold2.Val != 0)
if (TempRefHi1.Val != 0 && TempRefHi2.Val != 0 && TempRefLo1.Val != 0 && TempRefLo2.Val != 0)
{
if (StateMachine.Time - lastTimeSec > 10 || StateMachine.Time - lastTimeSec < 0)
{
double Tw = (TempRefWarm1.Val + TempRefWarm2.Val) / 2;
double Tc = (TempRefCold1.Val + TempRefCold2.Val) / 2;
double Tw = (TempRefHi1.Val + TempRefHi2.Val) / 2;
double Tc = (TempRefLo1.Val + TempRefLo2.Val) / 2;
if (heatMetersTestParams.TempWarmLo <= Tw && Tw <= heatMetersTestParams.TempWarmHi &&
heatMetersTestParams.TempColdLo <= Tc && Tc <= heatMetersTestParams.TempColdHi &&
Math.Abs(Tw - Tw_last) <= heatMetersTestParams.ChangeInTimeWarm &&
Math.Abs(Tc - Tc_last) <= heatMetersTestParams.ChangeInTimeCold &&
Math.Abs(TempRefWarm1.Val - TempRefWarm2.Val) <= heatMetersTestParams.DeltaTempWarm &&
Math.Abs(TempRefCold1.Val - TempRefCold2.Val) <= heatMetersTestParams.DeltaTempCold)
Math.Abs(TempRefHi1.Val - TempRefHi2.Val) <= heatMetersTestParams.DeltaTempWarm &&
Math.Abs(TempRefLo1.Val - TempRefLo2.Val) <= heatMetersTestParams.DeltaTempCold)
{
goto temperature_set;
}
@ -365,10 +365,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
IList<IOperation> extraOps = new List<IOperation>();
if (heatMetersPath != null)
{
extraOps.Add(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1));
extraOps.Add(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2));
extraOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1));
extraOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2));
extraOps.Add(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1));
extraOps.Add(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2));
extraOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1));
extraOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2));
}
switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance, extraOps))
{
@ -383,10 +383,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
{
State.Create("FlyingStartMassCollection : Waiting before 1st mass measurement")
.AddOperation(checkUiOp)
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(new Operations.TimerOp(test.TimeFlow2Mass))
.EnterState();
@ -404,21 +404,25 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
Bridge.OnActivity(this, Strings.Measuring_the_weight);
//------------------------------------------------
LogProcessHeader(processDataLogger, "Start mass");
if (heatMetersPath == null)
LogProcessHeader(processDataLogger, "Start mass");
else
LogProcessHeaderHeatMeters(processDataLogger, "Start mass");
State.Create("FlyingStartMassCollection : Measuring the start mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperations(measureOperations)
.AddOperation(outPath.Balance.ReadStableMassOp(ref StartMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
@ -432,7 +436,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
}
while (!e.Contains(Event.BalanceDone));
LogProcessHeader(processDataLogger, "Measurement");
if (heatMetersPath == null)
LogProcessHeader(processDataLogger, "Measurement");
else
LogProcessHeaderHeatMeters(processDataLogger, "Measurement");
log.WarnFormat("Start mass = {0}kg", StartMass);
Mass.Val = StartMass.Val;
@ -442,17 +449,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
//------------------------------------------------
State.Create("FlyingStartMassCollection : Starting the test")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperations(measureOperations)
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -485,19 +493,20 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
.AddOperation(checkUiOp)
.AddOperations(measureOperations)
.AddOperation(readRegistersOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi)
: null)
.AddOperation(cBrd.QueryMeasurementEndOp())
.AddOperation(processDataLoggingOp)
@ -535,8 +544,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
else
{
//double deltaTime = (double)(StateMachine.Time - lastEnergyUpdateTime);
double T_in = (TempRefWarm1.Val + TempRefWarm2.Val) / 2; /// [°C]
double T_out = (TempRefCold1.Val + TempRefCold2.Val) / 2; /// [°C]
double T_in = (TempRefHi1.Val + TempRefHi2.Val) / 2; /// [°C]
double T_out = (TempRefLo1.Val + TempRefLo2.Val) / 2; /// [°C]
double deltaVolume = LtrPerRefPulse * RefPulsesDelta; /// [l]
double deltaEnergy = (0.001 * deltaVolume) * (T_in - T_out) * Formulas.HeatCoefficientWater(16, T_in, T_out, heatMetersTestParams.FlowMeasuredAtHiTempPipe); /// [J] = [m3] * [K] * [J/(m3 K)]
Energy.Update(deltaEnergy);
@ -557,18 +566,19 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
//------------------------------------------------
State.Create("FlyingStartMassCollection : Waiting before the 2nd mass measurement")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(readRegistersOp)
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -582,22 +592,26 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
}
while (!e.Contains(Event.TimerExpired));
LogProcessHeader(processDataLogger, "End mass");
if (heatMetersPath == null)
LogProcessHeader(processDataLogger, "End mass");
else
LogProcessHeaderHeatMeters(processDataLogger, "End mass");
State.Create("FlyingStartMassCollection : Measuring the end mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(readRegistersOp)
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadStableMassOp(ref EndMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -631,49 +645,54 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivMean); /// [kg/m3]
/// Main results
tstRslt.StartTime = TestStartTime;
@ -758,16 +777,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
///
tstRslt.RefEnergy = Energy.Sum * tstRslt.VolumeCTV / VolumeForEnergy.Sum; /// [J] = [J] * [l] / [l]
tstRslt.Custom1 = (float)TempRefWarmStat.Average;
tstRslt.Custom2 = (float)TempRefWarmStat.First;
tstRslt.Custom3 = (float)TempRefWarmStat.Last;
tstRslt.Custom4 = (float)TempRefWarmStat.Min;
tstRslt.Custom5 = (float)TempRefWarmStat.Max;
tstRslt.Custom6 = (float)TempRefColdStat.Average;
tstRslt.Custom7 = (float)TempRefColdStat.First;
tstRslt.Custom8 = (float)TempRefColdStat.Last;
tstRslt.Custom9 = (float)TempRefColdStat.Min;
tstRslt.Custom10 = (float)TempRefColdStat.Max;
tstRslt.Custom1 = (float)TempRefHiStat.Average;
tstRslt.Custom2 = (float)TempRefHiStat.First;
tstRslt.Custom3 = (float)TempRefHiStat.Last;
tstRslt.Custom4 = (float)TempRefHiStat.Min;
tstRslt.Custom5 = (float)TempRefHiStat.Max;
tstRslt.Custom6 = (float)TempRefLoStat.Average;
tstRslt.Custom7 = (float)TempRefLoStat.First;
tstRslt.Custom8 = (float)TempRefLoStat.Last;
tstRslt.Custom9 = (float)TempRefLoStat.Min;
tstRslt.Custom10 = (float)TempRefLoStat.Max;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
{

View File

@ -60,11 +60,12 @@ namespace TBF.BenchControl.TestMethods.LeakTest
State.Create("LeakTest : Starting the pump")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
.EnterState();
do
@ -90,10 +91,11 @@ namespace TBF.BenchControl.TestMethods.LeakTest
State.Create("LeakTest : Setting the water pressure")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(new Operations.TimerOp(5))
.EnterState();
do
@ -108,17 +110,17 @@ namespace TBF.BenchControl.TestMethods.LeakTest
UiBridge.Bridge.OnLog(this, string.Format("time = {0}, pump_power = {1}%, pressure_up = {2}bar, pressure_down = {3}bar\r\n",
StateMachine.Time - startTime,
pumpPower.ToString("F0"),
PressureUp.ToString(),
PressureDown.ToString()));
PressUp.ToString(),
PressDown.ToString()));
float step = (pumpPower < 40.0f) ? 5.0f : ((pumpPower < 60.0f) ? 3.0f : ((pumpPower < 80.0f) ? 2.0f : 1.0f));
if (PressureDown.Val < testParams.PressureLo)
if (PressDown.Val < testParams.PressureLo)
{
if (pumpPower == 100.0f) break; /// Already at max. pump power -> Quit loop
pumpPower = Math.Min(pumpPower + step, 100.0f); /// Limit max. power to 100%
}
else if (PressureDown.Val > testParams.PressureHi)
else if (PressDown.Val > testParams.PressureHi)
{
if (pumpPower == 0) break; /// Already at min. pump power -> Quit loop
pumpPower = Math.Max(pumpPower - step, 0); /// Limit min. power to 0%
@ -143,10 +145,11 @@ namespace TBF.BenchControl.TestMethods.LeakTest
//------------------------------------------------
State.Create("LeakTest : Maximum water pressure set")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(new Operations.TimerOp(testParams.DurationPMax))
.EnterState();
do
@ -178,10 +181,11 @@ namespace TBF.BenchControl.TestMethods.LeakTest
State.Create("LeakTest : Closing the valve")
.AddOperation(checkUiOp)
.AddOperation(cBrd.SetValvesOp(null, outPath.StartValve))
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.EnterState();
do
{
@ -201,10 +205,11 @@ namespace TBF.BenchControl.TestMethods.LeakTest
State.Create("LeakTest : Closing the valve")
.AddOperation(checkUiOp)
.AddOperation(cBrd.SetValvesOp(null, inPath.Pump))
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.EnterState();
do
{
@ -230,10 +235,11 @@ namespace TBF.BenchControl.TestMethods.LeakTest
//------------------------------------------------
State.Create("LeakTest : Starting the test")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(new Operations.TimerOp(testParams.DurationLeak))
.EnterState();
do
@ -278,48 +284,53 @@ namespace TBF.BenchControl.TestMethods.LeakTest
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = 0;
/// Main results

View File

@ -61,11 +61,12 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
State.Create("PMaxTest : Starting the pump")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
.EnterState();
do
@ -91,10 +92,11 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
State.Create("PMaxTest : Setting the water pressure")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(new Operations.TimerOp(5))
.EnterState();
do
@ -109,17 +111,17 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
UiBridge.Bridge.OnLog(this, string.Format("time = {0}, pump_power = {1}%, pressure_up = {2}bar, pressure_down = {3}bar\r\n",
StateMachine.Time - startTime,
pumpPower.ToString("F0"),
PressureUp.ToString(),
PressureDown.ToString()));
PressUp.ToString(),
PressDown.ToString()));
float step = (pumpPower < 40.0f) ? 5.0f : ((pumpPower < 60.0f) ? 3.0f : ((pumpPower < 80.0f) ? 2.0f : 1.0f));
if (PressureDown.Val < testParams.PressureLo)
if (PressDown.Val < testParams.PressureLo)
{
if (pumpPower == 100.0f) break; /// Already at max. pump power -> Quit loop
pumpPower = Math.Min(pumpPower + step, 100.0f); /// Limit max. power to 100%
}
else if (PressureDown.Val > testParams.PressureHi)
else if (PressDown.Val > testParams.PressureHi)
{
if (pumpPower == 0) break; /// Already at min. pump power -> Quit loop
pumpPower = Math.Max(pumpPower - step, 0); /// Limit min. power to 0%
@ -144,10 +146,11 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
//------------------------------------------------
State.Create("PMaxTest : Starting the test")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(new Operations.TimerOp(testParams.DurationPMax))
.EnterState();
do
@ -192,48 +195,53 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = 0;
/// Main results

View File

@ -174,13 +174,14 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
//------------------------------------------------
State.Create("ReferenceFlowmeterCalibration : Measuring the start mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadStableMassOp(ref StartMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -241,14 +242,15 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
test_completed:
State.Create("ReferenceFlowmeterCalibration : Waiting before mass measurement")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(readRegistersOp)
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -267,13 +269,14 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
//------------------------------------------------
State.Create("ReferenceFlowmeterCalibration : Measuring the end mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadStableMassOp(ref EndMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@ -303,49 +306,54 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivMean); /// [kg/m3]
/// Main results
tstRslt.StartTime = TestStartTime;

View File

@ -228,30 +228,30 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
tstRslt.ErrorMaster = oriTestRslt.ErrorMaster;
tstRslt.AmbientTempAve = oriTestRslt.AmbientTempAve;
tstRslt.AmbientPressAve = oriTestRslt.AmbientPressAve;
tstRslt.AmbientHumiAve = oriTestRslt.AmbientHumiAve;
tstRslt.PressUpAvrg = oriTestRslt.PressUpAvrg;
tstRslt.AmbTempMean = oriTestRslt.AmbTempMean;
tstRslt.AmbPressMean = oriTestRslt.AmbPressMean;
tstRslt.AmbHumiMean = oriTestRslt.AmbHumiMean;
tstRslt.PressUpMean = oriTestRslt.PressUpMean;
tstRslt.PressUpStart = oriTestRslt.PressUpStart;
tstRslt.PressUpEnd = oriTestRslt.PressUpEnd;
tstRslt.PressUpMin = oriTestRslt.PressUpMin;
tstRslt.PressUpMax = oriTestRslt.PressUpMax;
tstRslt.PressDownAvrg = oriTestRslt.PressDownAvrg;
tstRslt.PressDownMean = oriTestRslt.PressDownMean;
tstRslt.PressDownStart = oriTestRslt.PressDownStart;
tstRslt.PressDownEnd = oriTestRslt.PressDownEnd;
tstRslt.PressDownMin = oriTestRslt.PressDownMin;
tstRslt.PressDownMax = oriTestRslt.PressDownMax;
tstRslt.TempInAvrg = oriTestRslt.TempInAvrg;
tstRslt.TempInStart = oriTestRslt.TempInStart;
tstRslt.TempInEnd = oriTestRslt.TempInEnd;
tstRslt.TempInMin = oriTestRslt.TempInMin;
tstRslt.TempInMax = oriTestRslt.TempInMax;
tstRslt.TempOutAvrg = oriTestRslt.TempOutAvrg;
tstRslt.TempOutStart = oriTestRslt.TempOutStart;
tstRslt.TempOutEnd = oriTestRslt.TempOutEnd;
tstRslt.TempOutMin = oriTestRslt.TempOutMin;
tstRslt.TempOutMax = oriTestRslt.TempOutMax;
tstRslt.TempDivAvrg = oriTestRslt.TempDivAvrg;
tstRslt.TempUpMean = oriTestRslt.TempUpMean;
tstRslt.TempUpStart = oriTestRslt.TempUpStart;
tstRslt.TempUpEnd = oriTestRslt.TempUpEnd;
tstRslt.TempUpMin = oriTestRslt.TempUpMin;
tstRslt.TempUpMax = oriTestRslt.TempUpMax;
tstRslt.TempDownMean = oriTestRslt.TempDownMean;
tstRslt.TempDownStart = oriTestRslt.TempDownStart;
tstRslt.TempDownEnd = oriTestRslt.TempDownEnd;
tstRslt.TempDownMin = oriTestRslt.TempDownMin;
tstRslt.TempDownMax = oriTestRslt.TempDownMax;
tstRslt.TempDivMean = oriTestRslt.TempDivMean;
tstRslt.TempDivStart = oriTestRslt.TempDivStart;
tstRslt.TempDivEnd = oriTestRslt.TempDivEnd;
tstRslt.TempDivMin = oriTestRslt.TempDivMin;

View File

@ -64,19 +64,19 @@ namespace TBF.Forms
float factor1 = 0.01f;
tr.PressUpAvrg *= factor1;
tr.PressUpMean *= factor1;
tr.PressUpStart *= factor1;
tr.PressUpEnd *= factor1;
tr.PressUpMin *= factor1;
tr.PressUpMax *= factor1;
tr.PressDownAvrg *= factor1;
tr.PressDownMean *= factor1;
tr.PressDownStart *= factor1;
tr.PressDownEnd *= factor1;
tr.PressDownMin *= factor1;
tr.PressDownMax *= factor1;
tr.AmbientPressAve *= 0.001f;
tr.AmbPressMean *= 0.001f;
session.SaveOrUpdate(tr);
}

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.11.372.1")]
[assembly: AssemblyFileVersion("2.11.372.1")]
[assembly: AssemblyVersion("2.12.373.1")]
[assembly: AssemblyFileVersion("2.12.373.1")]

View File

@ -2265,6 +2265,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to P delta.
/// </summary>
internal static string P_delta {
get {
return ResourceManager.GetString("P_delta", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to P up.
/// </summary>
@ -2275,25 +2284,7 @@ namespace TBF.Resources {
}
/// <summary>
/// Looks up a localized string similar to P up end.
/// </summary>
internal static string P_in_end {
get {
return ResourceManager.GetString("P_in_end", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to P up start.
/// </summary>
internal static string P_in_start {
get {
return ResourceManager.GetString("P_in_start", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to P down.
/// Looks up a localized string similar to P dn.
/// </summary>
internal static string P_out {
get {
@ -2301,24 +2292,6 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to P down end.
/// </summary>
internal static string P_out_end {
get {
return ResourceManager.GetString("P_out_end", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to P down start.
/// </summary>
internal static string P_out_start {
get {
return ResourceManager.GetString("P_out_start", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Page.
/// </summary>

View File

@ -184,7 +184,7 @@
<value>P up</value>
</data>
<data name="P_out" xml:space="preserve">
<value>P down</value>
<value>P dn</value>
</data>
<data name="Q_from_m3h" xml:space="preserve">
<value>Q from [m3/h]</value>
@ -967,18 +967,6 @@
<data name="Duration_PMax_s" xml:space="preserve">
<value>PMax duration [s]</value>
</data>
<data name="P_in_end" xml:space="preserve">
<value>P up end</value>
</data>
<data name="P_in_start" xml:space="preserve">
<value>P up start</value>
</data>
<data name="P_out_end" xml:space="preserve">
<value>P down end</value>
</data>
<data name="P_out_start" xml:space="preserve">
<value>P down start</value>
</data>
<data name="Closing_valve_Pump_off" xml:space="preserve">
<value>Closing input valve, switching the pump off</value>
</data>
@ -1594,4 +1582,7 @@
<data name="Do_you_really_want_to_delete_sequence_0" xml:space="preserve">
<value>Do you really want to delete sequence '{0}' ?</value>
</data>
<data name="P_delta" xml:space="preserve">
<value>P delta</value>
</data>
</root>

View File

@ -381,10 +381,10 @@ namespace TBF.Screens
estmtdTimeLabel.Text = args.Test.TstTime.ToString("F1");
/// Names of virtual bench components
if (args.BenchPath.PressIn != null) prInCmpntLabel.Text = args.BenchPath.PressIn.Name;
if (args.BenchPath.PressOut != null) prOutCmpntLabel.Text = args.BenchPath.PressOut.Name;
if (args.BenchPath.TempIn != null) tInCmpntLabel.Text = args.BenchPath.TempIn.Name;
if (args.BenchPath.TempOut != null) tOutCmpntLabel.Text = args.BenchPath.TempOut.Name;
if (args.BenchPath.PressMtrUp != null) prInCmpntLabel.Text = args.BenchPath.PressMtrUp.Name;
if (args.BenchPath.PressMtrDown != null) prOutCmpntLabel.Text = args.BenchPath.PressMtrDown.Name;
if (args.BenchPath.TempMtrUp != null) tInCmpntLabel.Text = args.BenchPath.TempMtrUp.Name;
if (args.BenchPath.TempMtrDown != null) tOutCmpntLabel.Text = args.BenchPath.TempMtrDown.Name;
if (args.OutputPath.TempDiv != null) tDivCmpntLabel.Text = args.OutputPath.TempDiv.Name;
if (args.OutputPath.FlowMeter != null) refFlowCmpntLabel.Text = args.OutputPath.FlowMeter.Name;
if (args.OutputPath.RegulValve != null) regValveCmpntLabel.Text = args.OutputPath.RegulValve.Name;
@ -411,16 +411,16 @@ namespace TBF.Screens
///
/// Always available
///
airTempLabel.Text = ProcessData.AmbientTemp.ToString();
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, ProcessData.AmbientPressure.Val).ToString("F0");
airHumiLabel.Text = ProcessData.AmbientHumidity.ToString();
airTempLabel.Text = ProcessData.AmbTemp.ToString();
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, ProcessData.AmbPress.Val).ToString("F0");
airHumiLabel.Text = ProcessData.AmbHumi.ToString();
tInLabel.Text = ProcessData.TempIn.ToString();
tOutLabel.Text = ProcessData.TempOut.ToString();
tInLabel.Text = ProcessData.TempUp.ToString();
tOutLabel.Text = ProcessData.TempDown.ToString();
tDivLabel.Text = ProcessData.TempDiv.ToString();
prInLabel.Text = ProcessData.PressureUp.ToString();
prOutLabel.Text = ProcessData.PressureDown.ToString();
prInLabel.Text = ProcessData.PressUp.ToString();
prOutLabel.Text = ProcessData.PressDown.ToString();
massLabel.Text = ProcessData.Mass.ToString();
@ -445,7 +445,7 @@ namespace TBF.Screens
double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val;
massDiffLabel.Text = massDiff.ToString("F3");
double volumeCtv = 1001.03 * massDiff / TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempOut.Val);
double volumeCtv = 1001.03 * massDiff / TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val);
volumeCtvLabel.Text = volumeCtv.ToString("F2");
double refError = TBF.BenchControl.Formulas.ErrorFromVolumes(refVolume, volumeCtv);
refErrorLabel.Text = refError.ToString("F3");
@ -507,16 +507,16 @@ namespace TBF.Screens
{
Results.Entities.TestRslt tRes = args.TestRslt;
airTempLabel.Text = tRes.AmbientTempAve.ToString("F1");
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, tRes.AmbientPressAve).ToString("F0");
airHumiLabel.Text = tRes.AmbientHumiAve.ToString("F1");
airTempLabel.Text = tRes.AmbTempMean.ToString("F1");
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, tRes.AmbPressMean).ToString("F0");
airHumiLabel.Text = tRes.AmbHumiMean.ToString("F1");
tInLabel.Text = tRes.TempInAvrg.ToString("F2");
tOutLabel.Text = tRes.TempOutAvrg.ToString("F2");
tDivLabel.Text = tRes.TempDivAvrg.ToString("F2");
tInLabel.Text = tRes.TempUpMean.ToString("F2");
tOutLabel.Text = tRes.TempDownMean.ToString("F2");
tDivLabel.Text = tRes.TempDivMean.ToString("F2");
prInLabel.Text = tRes.PressUpAvrg.ToString("F1");
prOutLabel.Text = tRes.PressDownAvrg.ToString("F1");
prInLabel.Text = tRes.PressUpMean.ToString("F1");
prOutLabel.Text = tRes.PressDownMean.ToString("F1");
massLabel.Text = ProcessData.Mass.ToString();
massDiffLabel.Text = (tRes.MassEnd - tRes.MassStart).ToString("F3");

View File

@ -410,10 +410,10 @@ namespace TBF.Screens
estmtdTimeLabel.Text = args.Test.TstTime.ToString("F1");
/// Names of virtual bench components
if (args.BenchPath.PressIn != null) prInCmpntLabel.Text = args.BenchPath.PressIn.Name;
if (args.BenchPath.PressOut != null) prOutCmpntLabel.Text = args.BenchPath.PressOut.Name;
if (args.BenchPath.TempIn != null) tInCmpntLabel.Text = args.BenchPath.TempIn.Name;
if (args.BenchPath.TempOut != null) tOutCmpntLabel.Text = args.BenchPath.TempOut.Name;
if (args.BenchPath.PressMtrUp != null) prInCmpntLabel.Text = args.BenchPath.PressMtrUp.Name;
if (args.BenchPath.PressMtrDown != null) prOutCmpntLabel.Text = args.BenchPath.PressMtrDown.Name;
if (args.BenchPath.TempMtrUp != null) tInCmpntLabel.Text = args.BenchPath.TempMtrUp.Name;
if (args.BenchPath.TempMtrDown != null) tOutCmpntLabel.Text = args.BenchPath.TempMtrDown.Name;
if (args.OutputPath.TempDiv != null) tDivCmpntLabel.Text = args.OutputPath.TempDiv.Name;
if (args.OutputPath.FlowMeter != null) refFlowCmpntLabel.Text = args.OutputPath.FlowMeter.Name;
if (args.OutputPath.RegulValve != null) regValveCmpntLabel.Text = args.OutputPath.RegulValve.Name;
@ -440,16 +440,16 @@ namespace TBF.Screens
///
/// Always available
///
airTempLabel.Text = ProcessData.AmbientTemp.ToString();
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, ProcessData.AmbientPressure.Val).ToString("F0");
airHumiLabel.Text = ProcessData.AmbientHumidity.ToString();
airTempLabel.Text = ProcessData.AmbTemp.ToString();
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, ProcessData.AmbPress.Val).ToString("F0");
airHumiLabel.Text = ProcessData.AmbHumi.ToString();
tInLabel.Text = ProcessData.TempIn.ToString();
tOutLabel.Text = ProcessData.TempOut.ToString();
tInLabel.Text = ProcessData.TempUp.ToString();
tOutLabel.Text = ProcessData.TempDown.ToString();
tDivLabel.Text = ProcessData.TempDiv.ToString();
prInLabel.Text = ProcessData.PressureUp.ToString();
prOutLabel.Text = ProcessData.PressureDown.ToString();
prInLabel.Text = ProcessData.PressUp.ToString();
prOutLabel.Text = ProcessData.PressDown.ToString();
massLabel.Text = ProcessData.Mass.ToString();
@ -474,7 +474,7 @@ namespace TBF.Screens
double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val;
massDiffLabel.Text = massDiff.ToString("F3");
double volumeCtv = 1001.03f * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempOut.Val);
double volumeCtv = 1001.03f * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val);
volumeCtvLabel.Text = volumeCtv.ToString("F2");
double refError = TBF.BenchControl.Formulas.ErrorFromVolumes(refVolume, volumeCtv);
refErrorLabel.Text = refError.ToString("F3");
@ -536,16 +536,16 @@ namespace TBF.Screens
{
Results.Entities.TestRslt tRes = args.TestRslt;
airTempLabel.Text = tRes.AmbientTempAve.ToString("F1");
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, tRes.AmbientPressAve).ToString("F0");
airHumiLabel.Text = tRes.AmbientHumiAve.ToString("F1");
airTempLabel.Text = tRes.AmbTempMean.ToString("F1");
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, tRes.AmbPressMean).ToString("F0");
airHumiLabel.Text = tRes.AmbHumiMean.ToString("F1");
tInLabel.Text = tRes.TempInAvrg.ToString("F2");
tOutLabel.Text = tRes.TempOutAvrg.ToString("F2");
tDivLabel.Text = tRes.TempDivAvrg.ToString("F2");
tInLabel.Text = tRes.TempUpMean.ToString("F2");
tOutLabel.Text = tRes.TempDownMean.ToString("F2");
tDivLabel.Text = tRes.TempDivMean.ToString("F2");
prInLabel.Text = tRes.PressUpAvrg.ToString("F1");
prOutLabel.Text = tRes.PressDownAvrg.ToString("F1");
prInLabel.Text = tRes.PressUpMean.ToString("F1");
prOutLabel.Text = tRes.PressDownMean.ToString("F1");
massLabel.Text = ProcessData.Mass.ToString();
massDiffLabel.Text = (tRes.MassEnd - tRes.MassStart).ToString("F3");

View File

@ -398,10 +398,10 @@ namespace TBF.Screens
estmtdTimeLabel.Text = args.Test.TstTime.ToString("F1");
/// Names of virtual bench components
if (args.BenchPath.PressIn != null) prInCmpntLabel.Text = args.BenchPath.PressIn.Name;
if (args.BenchPath.PressOut != null) prOutCmpntLabel.Text = args.BenchPath.PressOut.Name;
if (args.BenchPath.TempIn != null) tInCmpntLabel.Text = args.BenchPath.TempIn.Name;
if (args.BenchPath.TempOut != null) tOutCmpntLabel.Text = args.BenchPath.TempOut.Name;
if (args.BenchPath.PressMtrUp != null) prInCmpntLabel.Text = args.BenchPath.PressMtrUp.Name;
if (args.BenchPath.PressMtrDown != null) prOutCmpntLabel.Text = args.BenchPath.PressMtrDown.Name;
if (args.BenchPath.TempMtrUp != null) tInCmpntLabel.Text = args.BenchPath.TempMtrUp.Name;
if (args.BenchPath.TempMtrDown != null) tOutCmpntLabel.Text = args.BenchPath.TempMtrDown.Name;
if (args.OutputPath.TempDiv != null) tDivCmpntLabel.Text = args.OutputPath.TempDiv.Name;
if (args.OutputPath.FlowMeter != null) refFlowCmpntLabel.Text = args.OutputPath.FlowMeter.Name;
if (args.OutputPath.RegulValve != null) regValveCmpntLabel.Text = args.OutputPath.RegulValve.Name;
@ -445,16 +445,16 @@ namespace TBF.Screens
///
/// Always available
///
airTempLabel.Text = ProcessData.AmbientTemp.ToString();
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, ProcessData.AmbientPressure.Val).ToString("F0");
airHumiLabel.Text = ProcessData.AmbientHumidity.ToString();
airTempLabel.Text = ProcessData.AmbTemp.ToString();
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, ProcessData.AmbPress.Val).ToString("F0");
airHumiLabel.Text = ProcessData.AmbHumi.ToString();
tInLabel.Text = ProcessData.TempIn.ToString();
tOutLabel.Text = ProcessData.TempOut.ToString();
tInLabel.Text = ProcessData.TempUp.ToString();
tOutLabel.Text = ProcessData.TempDown.ToString();
tDivLabel.Text = ProcessData.TempDiv.ToString();
prUpLabel.Text = ProcessData.PressureUp.ToString();
prDownLabel.Text = ProcessData.PressureDown.ToString();
prUpLabel.Text = ProcessData.PressUp.ToString();
prDownLabel.Text = ProcessData.PressDown.ToString();
massLabel.Text = ProcessData.Mass.ToString();
@ -479,7 +479,7 @@ namespace TBF.Screens
double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val;
massDiffLabel.Text = massDiff.ToString("F3");
double volumeCtv = 1001.03f * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempOut.Val);
double volumeCtv = 1001.03f * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val);
volumeCtvLabel.Text = volumeCtv.ToString("F2");
double refError = TBF.BenchControl.Formulas.ErrorFromVolumes(refVolume, volumeCtv);
refErrorLabel.Text = refError.ToString("F3");
@ -541,16 +541,16 @@ namespace TBF.Screens
{
Results.Entities.TestRslt tRes = args.TestRslt;
airTempLabel.Text = tRes.AmbientTempAve.ToString("F1");
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, tRes.AmbientPressAve).ToString("F0");
airHumiLabel.Text = tRes.AmbientHumiAve.ToString("F1");
airTempLabel.Text = tRes.AmbTempMean.ToString("F1");
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, tRes.AmbPressMean).ToString("F0");
airHumiLabel.Text = tRes.AmbHumiMean.ToString("F1");
tInLabel.Text = tRes.TempInAvrg.ToString("F2");
tOutLabel.Text = tRes.TempOutAvrg.ToString("F2");
tDivLabel.Text = tRes.TempDivAvrg.ToString("F2");
tInLabel.Text = tRes.TempUpMean.ToString("F2");
tOutLabel.Text = tRes.TempDownMean.ToString("F2");
tDivLabel.Text = tRes.TempDivMean.ToString("F2");
prUpLabel.Text = tRes.PressUpAvrg.ToString("F1");
prDownLabel.Text = tRes.PressDownAvrg.ToString("F1");
prUpLabel.Text = tRes.PressUpMean.ToString("F1");
prDownLabel.Text = tRes.PressDownMean.ToString("F1");
massLabel.Text = ProcessData.Mass.ToString();
massDiffLabel.Text = (tRes.MassEnd - tRes.MassStart).ToString("F3");

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using System.Drawing;
@ -24,10 +24,11 @@ namespace TBF.UiControls
Name,
Qfrom,
Qto,
Tin,
Tout,
Pin,
Pout,
Tup,
Tdown,
Pup,
Pdown,
Pdelta,
StopBFValve,
FixedColumnsCount,
}
@ -66,7 +67,8 @@ namespace TBF.UiControls
Columns.Add(Strings.T_out, (ls.BenchColumnCount > 4) ? ls.BenchColumnWidths[4] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
Columns.Add(Strings.P_in, (ls.BenchColumnCount > 5) ? ls.BenchColumnWidths[5] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
Columns.Add(Strings.P_out, (ls.BenchColumnCount > 6) ? ls.BenchColumnWidths[6] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
Columns.Add(Strings.StopBFValve_chdr, (ls.BenchColumnCount > 7) ? ls.BenchColumnWidths[7] : 70 * parent.Dpi / PathsDlg.Dpi100pct);
Columns.Add(Strings.P_delta, (ls.BenchColumnCount > 7) ? ls.BenchColumnWidths[7] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
Columns.Add(Strings.StopBFValve_chdr, (ls.BenchColumnCount > 8) ? ls.BenchColumnWidths[8] : 70 * parent.Dpi / PathsDlg.Dpi100pct);
int clmn = (int)Column.FixedColumnsCount;
foreach (var vlv in parent.Valves)
{
@ -78,23 +80,25 @@ namespace TBF.UiControls
}
/// Temperatures, pressures
ComboBox tInCBox = new ComboBox();
ComboBox tOutCBox = new ComboBox();
ComboBox prInCBox = new ComboBox();
ComboBox prOutCBox = new ComboBox();
ComboBox tUpCBox = new ComboBox();
ComboBox tDownCBox = new ComboBox();
ComboBox prUpCBox = new ComboBox();
ComboBox prDownCBox = new ComboBox();
ComboBox prDeltaCBox = new ComboBox();
ComboBox stopBFValveComboBox = new ComboBox();
stopBFValveComboBox.Items.Add("---");
foreach (var cmpnt in parent.TbfComponents)
{
if (cmpnt is BenchControl.GenericDevices.ITempMeter)
{
tInCBox.Items.Add(cmpnt.Cfg.Name);
tOutCBox.Items.Add(cmpnt.Cfg.Name);
tUpCBox.Items.Add(cmpnt.Cfg.Name);
tDownCBox.Items.Add(cmpnt.Cfg.Name);
}
if (cmpnt is BenchControl.GenericDevices.IPressureMeter)
{
prInCBox.Items.Add(cmpnt.Cfg.Name);
prOutCBox.Items.Add(cmpnt.Cfg.Name);
prUpCBox.Items.Add(cmpnt.Cfg.Name);
prDownCBox.Items.Add(cmpnt.Cfg.Name);
prDeltaCBox.Items.Add(cmpnt.Cfg.Name);
}
if (cmpnt is IValve && (cmpnt as IValve).CoupledTo == null)
{
@ -107,10 +111,11 @@ namespace TBF.UiControls
editors[(int)Column.Name] = new TextBox(); /// Name
editors[(int)Column.Qfrom] = new TextBox(); /// Q_from
editors[(int)Column.Qto] = new TextBox(); /// Q_to
editors[(int)Column.Tin] = tInCBox;
editors[(int)Column.Tout] = tOutCBox;
editors[(int)Column.Pin] = prInCBox;
editors[(int)Column.Pout] = prOutCBox;
editors[(int)Column.Tup] = tUpCBox;
editors[(int)Column.Tdown] = tDownCBox;
editors[(int)Column.Pup] = prUpCBox;
editors[(int)Column.Pdown] = prDownCBox;
editors[(int)Column.Pdelta] = prDownCBox;
editors[(int)Column.StopBFValve] = stopBFValveComboBox;
/// Prepare valve combo-boxes (max. 64 valves)
for (int i = 0; i < 64; i++)
@ -187,10 +192,11 @@ namespace TBF.UiControls
lvi.SubItems.Add(path.Qfrom.ToString());
lvi.SubItems.Add(path.Qto.ToString());
lvi.SubItems.Add(path.TempIn != null ? path.TempIn.Cfg.Name : "---");
lvi.SubItems.Add(path.TempOut != null ? path.TempOut.Cfg.Name : "---");
lvi.SubItems.Add(path.PressIn != null ? path.PressIn.Cfg.Name : "---");
lvi.SubItems.Add(path.PressOut != null ? path.PressOut.Cfg.Name : "---");
lvi.SubItems.Add(path.TempMtrUp != null ? path.TempMtrUp.Cfg.Name : "---");
lvi.SubItems.Add(path.TempMtrDown != null ? path.TempMtrDown.Cfg.Name : "---");
lvi.SubItems.Add(path.PressMtrUp != null ? path.PressMtrUp.Cfg.Name : "---");
lvi.SubItems.Add(path.PressMtrDown != null ? path.PressMtrDown.Cfg.Name : "---");
lvi.SubItems.Add(path.PressMtrDelta != null ? path.PressMtrDelta.Cfg.Name : "---");
lvi.SubItems.Add((path.StopBFValve != null) ? path.StopBFValve.Cfg.Name : "---");
foreach (var valve in parent.Valves)
@ -234,10 +240,11 @@ namespace TBF.UiControls
allOk &= Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qto].Text, out Qto);
entity.Qto = Qto;
entity.TempIn = lvi.SubItems[(int)Column.Tin].Text;
entity.TempOut = lvi.SubItems[(int)Column.Tout].Text;
entity.PressIn = lvi.SubItems[(int)Column.Pin].Text;
entity.PressOut = lvi.SubItems[(int)Column.Pout].Text;
entity.TempMtrUp = lvi.SubItems[(int)Column.Tup].Text;
entity.TempMtrDown = lvi.SubItems[(int)Column.Tdown].Text;
entity.PressMtrUp = lvi.SubItems[(int)Column.Pup].Text;
entity.PressMtrDown = lvi.SubItems[(int)Column.Pdown].Text;
entity.PressMtrDelta = lvi.SubItems[(int)Column.Pdelta].Text;
entity.StopBFValve = lvi.SubItems[(int)Column.StopBFValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.StopBFValve].Text;
string valvesOpen = string.Empty;