PulsesPerLiter added to Entities.MeterTestResult and to result items. Version 1.4.36

More times added to Entities.Test (TimeBeforeFlow, TimeFlow2Mass, TimeMass2Start, TimeStop2Mass).
Activity display fixed in FlyingStartCollectionMethod.
This commit is contained in:
Milan Hanajik
2015-05-19 15:38:58 +02:00
parent 6690ad65ca
commit cd9042a648
15 changed files with 52 additions and 30 deletions
@@ -66,7 +66,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
float estFlowSetTime = 10.0f;
//------------------------------------------------
Bridge.OnActivity(this, Strings.Setting_the_flow);
Bridge.OnActivity(this, Strings.Starting_the_pump);
//------------------------------------------------
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
@@ -139,7 +139,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
set_flow:
//--------------------------------
//------------------------------------------------
Bridge.OnActivity(this, Strings.Setting_the_flow);
//------------------------------------------------
State.Create("FlyingStartCollectionMethod : Setting the flow")
.AddOperation(checkUiOp)
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, refFlow, 600)) /// timeout = 10 min.
@@ -188,7 +190,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
.AddOperation(outPath.Balance.ReadMassOp(ref mass))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
.AddOperation(new Operations.TimerOp(test.TimeFlow2Start))
.AddOperation(new Operations.TimerOp(test.TimeFlow2Mass))
.EnterState();
do
{
@@ -265,13 +267,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
//--------------------------------
switch (ReadRegistersTempPressAmbient(measureOperations, true))
{
case Event.Error: { retVal = Event.Error; goto stopTest; }
case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; }
case Event.Error: { retVal = Event.Error; goto stopTest; }
case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; }
case Event.MeasurementCompleted: goto test_completed;
}
int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0);
//------------------------------------------------
int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0);
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime));
//------------------------------------------------
if (firstTime)
{
@@ -326,7 +330,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
.AddOperation(outPath.Balance.ReadMassOp(ref mass))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
.AddOperation(new Operations.TimerOp(test.Time2MassMsrmt))
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
.EnterState();
do
{
@@ -421,6 +425,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
tstRslt.Meters[i].SerialNr = (WaterMeters.Count > i) ? WaterMeters[i].SerialNr : string.Empty;
tstRslt.Meters[i].VolumeStart = 0; /// liter
tstRslt.Meters[i].VolumeEnd = 0; /// liter
tstRslt.Meters[i].PulsesPerLiter = (sensPath.RegisterReaders[i] == null ? 1.0f : sensPath.RegisterReaders[i].PulsesPerLtr);
if (sensPath.RegisterReaders[i].PulsesPerLtr <= float.Epsilon) tstRslt.Meters[i].VolumeMeter = 0;
else tstRslt.Meters[i].VolumeMeter = Convert.ToSingle(WMPulses[i]) / sensPath.RegisterReaders[i].PulsesPerLtr;
tstRslt.Meters[i].VolumeRef = tstRslt.ConstMaster * WMRefPulses[i]; /// liter