- FixedStartMassCollection method ready to be tested
- FlyingStart method (without mass collection) flow corrections fixed - DataEntry/WMStates data entry forms added (used by FixedStartMassCollection method) - minor changes
This commit is contained in:
+59
-2
@@ -42,6 +42,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
int totalPulses = (int)(test.Volume / ltrPerRefPulse);
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
float[] wmBeginStates = new float[Program.WMsCount];
|
||||
float[] wmEndStates = new float[Program.WMsCount];
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
|
||||
@@ -171,8 +174,36 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
|
||||
///
|
||||
/// Enter the watermeter states here
|
||||
/// Enter watermeter begin states here
|
||||
///
|
||||
GenericDevices.IDataEntry dataEntryCmpnt =
|
||||
TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as GenericDevices.IDataEntry;
|
||||
if (dataEntryCmpnt != null)
|
||||
{
|
||||
IOperation showFormOp = dataEntryCmpnt.ShowWMStatesFormOp();
|
||||
if (showFormOp != null)
|
||||
{
|
||||
Bridge.OnActivity(this, "Enter the water meter data");
|
||||
State.Create("FixedStartMassCollection : Enter begin-state")
|
||||
.AddOperation(showFormOp)
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.UiCmdStop)) { retVal = Event.Error; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.ModelessFormClosed));
|
||||
|
||||
for (int i = 0; i < Program.WMsCount; i++)
|
||||
{
|
||||
BenchControl.Elde.FixedStartRegisterReader.RegisterReader registerReader =
|
||||
sensPath.RegisterReaders[i] as BenchControl.Elde.FixedStartRegisterReader.RegisterReader;
|
||||
registerReader.BeginWMState = dataEntryCmpnt.WMState(i);
|
||||
registerReader.EndWMState = dataEntryCmpnt.WMState(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
@@ -337,8 +368,34 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
|
||||
///
|
||||
/// Enter the watermeter states here
|
||||
/// Enter watermeter end states here
|
||||
///
|
||||
if (dataEntryCmpnt != null)
|
||||
{
|
||||
IOperation showFormOp = dataEntryCmpnt.ShowWMStatesFormOp();
|
||||
if (showFormOp != null)
|
||||
{
|
||||
Bridge.OnActivity(this, "Enter the water meter data");
|
||||
State.Create("FixedStartMassCollection : Enter end-state")
|
||||
.AddOperation(showFormOp)
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.UiCmdStop)) { retVal = Event.Error; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.ModelessFormClosed));
|
||||
|
||||
|
||||
for (int i = 0; i < Program.WMsCount; i++)
|
||||
{
|
||||
BenchControl.Elde.FixedStartRegisterReader.RegisterReader registerReader =
|
||||
sensPath.RegisterReaders[i] as BenchControl.Elde.FixedStartRegisterReader.RegisterReader;
|
||||
registerReader.EndWMState = dataEntryCmpnt.WMState(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
|
||||
@@ -249,10 +249,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
tstRslt.FlowMass = 0; /// [kg/h]
|
||||
tstRslt.FlowVolume = 3600.0f * ltrPerRefPulse * cBrd.EtPulses(0) / tstRslt.Time; /// [l/h]
|
||||
tstRslt.PulsesMaster = cBrd.EtPulses(0); /// Pulses of the master flow meter (test total)
|
||||
/// TODO: tuto pokracovat
|
||||
tstRslt.VolumeMaster = ltrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume);
|
||||
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
|
||||
tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume / 1000.0f); /// Convert the flow to [m3/h]
|
||||
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
|
||||
/// Corrected master pulses per liter
|
||||
if (tstRslt.VolumeCTV <= float.Epsilon)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user