Tests when test volume exceeds the tank capacity cannot be executed, an error message appears.

This commit is contained in:
Milan Hanajik
2017-03-10 13:10:57 +01:00
parent 20fce538de
commit 87bc0131cf
5 changed files with 30 additions and 0 deletions
@@ -75,6 +75,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
int flowSetTime0 = StateMachine.Time;
if (test.Volume >= outPath.Balance.Capacity * Constants.TankFullFactor)
{
Bridge.OnError(this, Strings.Test_volume_exceeds_the_scale_capacity);
retVal = Event.Error;
goto stopTest;
}
///
/// Optionally display prompt to emerge temperature meters to appropriate baths for heat meters test
///
@@ -124,6 +124,13 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
//------------------------------------------------
Bridge.OnActivity(this, Strings.Checking_tank_capacity);
//------------------------------------------------
if (test.Volume >= outPath.Balance.Capacity * Constants.TankFullFactor)
{
Bridge.OnError(this, Strings.Test_volume_exceeds_the_scale_capacity);
retVal = Event.Error;
goto stopTest;
}
bool emptyTheTank = test.Emptying;
if (!emptyTheTank) /// If condition met => skip measuring and force emptying