As sent to Munich
This commit is contained in:
@@ -98,14 +98,22 @@ namespace TBF.BenchControl.Sequences
|
||||
static SequenceBase()
|
||||
{
|
||||
results = new List<Entities.TestResult>();
|
||||
}
|
||||
|
||||
///------------------------------------------------------------
|
||||
/// Test related (instance) variables.
|
||||
/// Created when test sequence is open.
|
||||
/// They persist during all repetitions of the same test
|
||||
///------------------------------------------------------------
|
||||
protected BenchControl.FeedingPath inPath;
|
||||
WMVolumes = new FloatBox[Program.WMsCount];
|
||||
WMErrors = new FloatBox[Program.WMsCount];
|
||||
for (int i = 0; i < Program.WMsCount; i++)
|
||||
{
|
||||
WMVolumes[i] = new FloatBox() { Name = string.Format("Volume{0}", i), Format = "F2" };
|
||||
WMErrors[i] = new FloatBox() { Name = string.Format("Error{0}", i), Format = "F2" };
|
||||
}
|
||||
}
|
||||
|
||||
///------------------------------------------------------------
|
||||
/// Test related (instance) variables.
|
||||
/// Created when test sequence is open.
|
||||
/// They persist during all repetitions of the same test
|
||||
///------------------------------------------------------------
|
||||
protected BenchControl.FeedingPath inPath;
|
||||
protected BenchControl.BenchPath benchPath;
|
||||
protected BenchControl.OutputPath outPath;
|
||||
protected BenchControl.MetersPath sensPath;
|
||||
@@ -113,18 +121,17 @@ namespace TBF.BenchControl.Sequences
|
||||
protected Entities.TransitionSequence transitionStart;
|
||||
protected Entities.TransitionSequence transitionStop;
|
||||
|
||||
|
||||
#region Temperature_Pressure_Humidity
|
||||
|
||||
protected FloatBox tempIn = new FloatBox() { Name = "Temperature In", Format = "F1" };
|
||||
protected FloatBox tempOut = new FloatBox() { Name = "Temperature Out", Format = "F1" };
|
||||
protected FloatBox tempDiv = new FloatBox() { Name = "Temperature Div", Format = "F1" };
|
||||
|
||||
protected FloatBox pressIn = new FloatBox() { Name = "Pressure In", Format = "F1" };
|
||||
protected FloatBox pressOut = new FloatBox() { Name = "Pressure Out", Format = "F1" };
|
||||
|
||||
protected FloatBox airTemperature = new FloatBox() { Name = "Ambient Temperature", Format = "F1" };
|
||||
protected FloatBox airPressure = new FloatBox() { Name = "Ambient Pressure", Format = "F1" };
|
||||
protected FloatBox airHumidity = new FloatBox() { Name = "Ambient Humidity", Format = "F1" };
|
||||
protected static FloatBox tempIn = new FloatBox() { Name = "Temperature In", Format = "F1" };
|
||||
protected static FloatBox tempOut = new FloatBox() { Name = "Temperature Out", Format = "F1" };
|
||||
protected static FloatBox tempDiv = new FloatBox() { Name = "Temperature Div", Format = "F1" };
|
||||
protected static FloatBox pressIn = new FloatBox() { Name = "Pressure In", Format = "F3", Factor = 0.01f };
|
||||
protected static FloatBox pressOut = new FloatBox() { Name = "Pressure Out", Format = "F3", Factor = 0.01f };
|
||||
protected static FloatBox airTemperature = new FloatBox() { Name = "Ambient Temperature", Format = "F1" };
|
||||
protected static FloatBox airPressure = new FloatBox() { Name = "Ambient Pressure", Format = "F1" };
|
||||
protected static FloatBox airHumidity = new FloatBox() { Name = "Ambient Humidity", Format = "F1" };
|
||||
///
|
||||
protected float tempInSum;
|
||||
protected float tempOutSum;
|
||||
@@ -183,10 +190,6 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
#endregion
|
||||
|
||||
protected bool ticTac = false;
|
||||
protected int[] WMPulses = new int[Program.WMsCount];
|
||||
protected int[] WMRefPulses = new int[Program.WMsCount];
|
||||
|
||||
|
||||
protected IOperation readRegisters1;
|
||||
protected IOperation readRegisters2;
|
||||
@@ -195,25 +198,42 @@ namespace TBF.BenchControl.Sequences
|
||||
protected IOperation checkUiOp;
|
||||
|
||||
|
||||
protected IntBox refCount = new IntBox() { Name = "RefCount" };
|
||||
protected FloatBox refFreq = new FloatBox() { Name = "RefFreq", Format = "F2" };
|
||||
protected FloatBox refFlow = new FloatBox() { Name = "RefFlow", Format = "F2" };
|
||||
protected FloatBox mass = new FloatBox() { Name = "Mass", Format = "F1" };
|
||||
protected FloatBox startMass = new FloatBox() { Name = "Start Mass", Format = "F1" };
|
||||
protected FloatBox endMass = new FloatBox() { Name = "End Mass", Format = "F1" };
|
||||
protected bool ticTac = false;
|
||||
protected int[] WMPulses = new int[Program.WMsCount];
|
||||
protected int[] WMRefPulses = new int[Program.WMsCount];
|
||||
|
||||
protected static FloatBox[] WMVolumes;
|
||||
protected static FloatBox[] WMErrors;
|
||||
|
||||
protected static IntBox refCount = new IntBox() { Name = "RefCount" };
|
||||
protected static FloatBox refFreq = new FloatBox() { Name = "RefFreq", Format = "F2" };
|
||||
protected static FloatBox refFlow = new FloatBox() { Name = "RefFlow", Format = "F2" };
|
||||
protected static FloatBox mass = new FloatBox() { Name = "Mass", Format = "F1" };
|
||||
protected static FloatBox startMass = new FloatBox() { Name = "Start Mass", Format = "F1" };
|
||||
protected static FloatBox endMass = new FloatBox() { Name = "End Mass", Format = "F1" };
|
||||
|
||||
/// <summary>
|
||||
/// To clear process values at the beginning of each test
|
||||
/// </summary>
|
||||
protected void ClearProcessValues()
|
||||
{
|
||||
//if (WMPulses != null) { for (int i = 0; i < WMPulses.Length; i++) WMPulses[i] = 0; }
|
||||
//if (WMRefPulses != null) { for (int i = 0; i < WMRefPulses.Length; i++) WMPulses[i] = 0; }
|
||||
|
||||
for (int i = 0; i < Program.WMsCount; i++)
|
||||
{
|
||||
WMPulses[i] = 0;
|
||||
WMPulses[i] = 0;
|
||||
WMVolumes[i].Clear();
|
||||
WMErrors[i].Clear();
|
||||
}
|
||||
|
||||
refCount.Clear();
|
||||
refFreq.Clear();
|
||||
refFlow.Clear();
|
||||
mass.Clear();
|
||||
startMass.Clear();
|
||||
endMass.Clear();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -438,8 +458,7 @@ namespace TBF.BenchControl.Sequences
|
||||
/// <param name="time">Current test time in [s]</param>
|
||||
/// <param name="progress">Current progress 0 .. 1.0f</param>
|
||||
/// <returns>Data for the UI</returns>
|
||||
protected TestProgressEventArgs GetTestProgressData(Entities.Test test, Entities.TestResult tstRslt,
|
||||
int currentRefPulses, float time, float progress)
|
||||
protected TestProgressEventArgs GetTestProgressData(Entities.Test test, Entities.TestResult tstRslt, Elde.ControlBoardDev cBrd, float time, float progress)
|
||||
{
|
||||
TestProgressEventArgs data = new TestProgressEventArgs();
|
||||
|
||||
@@ -448,25 +467,30 @@ namespace TBF.BenchControl.Sequences
|
||||
//float ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
float refPulsesPerLtr = 7200.0f / outPath.FlowMeter.NominalFlow; /// [pulse/ltr]
|
||||
|
||||
data.RefPulses = currentRefPulses;
|
||||
data.Flow = refFlow.Val;
|
||||
data.Volume = Formulas.VolumeFromPulses(currentRefPulses, refPulsesPerLtr);
|
||||
data.RefPulses = cBrd.EtPulses(0);
|
||||
|
||||
refFreq.Val = cBrd.ReferenceFreq;
|
||||
data.FlowMtrFreq = refFreq;
|
||||
|
||||
data.Flow = refFlow;
|
||||
data.Volume = new FloatBox() { Name = "Volume", Format = "F1", Val = Formulas.VolumeFromPulses(data.RefPulses, refPulsesPerLtr) };
|
||||
data.Time = time;
|
||||
data.Mass = mass.Val;
|
||||
data.StartMass = startMass;
|
||||
data.Mass = mass;
|
||||
|
||||
data.Progress = progress;
|
||||
float estCurrentTime = TimeEstimateBeginRpts + ((float)(tstRslt.RepetitionNr - 1) + progress) * TimeEstimateOneTest;
|
||||
data.OveralProgress = estCurrentTime / TimeEstimateTotal;
|
||||
|
||||
data.Tin = tempIn.Val;
|
||||
data.Tout = tempOut.Val;
|
||||
data.Tdiv = tempDiv.Val;
|
||||
data.Pin = pressIn.Val;
|
||||
data.Pout = pressOut.Val;
|
||||
data.Tin = tempIn;
|
||||
data.Tout = tempOut;
|
||||
data.Tdiv = tempDiv;
|
||||
data.Pin = pressIn;
|
||||
data.Pout = pressOut;
|
||||
|
||||
data.AmbientTemp = airTemperature.Val;
|
||||
data.AmbientPressure = airPressure.Val;
|
||||
data.AmbientHumidity = airHumidity.Val;
|
||||
data.AmbientTemp = airTemperature;
|
||||
data.AmbientPressure = airPressure;
|
||||
data.AmbientHumidity = airHumidity;
|
||||
|
||||
for (int i = 0; i < Program.WMsCount; i++)
|
||||
{
|
||||
@@ -475,7 +499,7 @@ namespace TBF.BenchControl.Sequences
|
||||
data.WmPulses[i] = WMPulses[i];
|
||||
data.WmRefPulses[i] = WMRefPulses[i];
|
||||
data.WmVolume[i] = Formulas.VolumeFromPulses(WMPulses[i], sensPath.RegisterReaders[i].PulsesPerLtr);
|
||||
data.WmErrPct[i] = Formulas.ErrorFromVolumes(data.WmVolume[i], data.Volume);
|
||||
if (data.Volume.Valid) { data.WmErrPct[i] = Formulas.ErrorFromVolumes(data.WmVolume[i], data.Volume.Val); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user