diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs
index 5ef38cbc9..9d2af9537 100644
--- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs
+++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs
@@ -187,7 +187,7 @@ namespace TBF.BenchControl.Sequences
/// Empties the tank: opens the emptying valve and measures the weight.
///
/// Valve to empty the tank
- /// Balance underneath the tank
+ /// Scale underneath the tank
/// Event.Done or Event.Error
protected Event DrainTheTank(IValve drainValve, IScale scale, IList extraOperations)
{
@@ -485,18 +485,18 @@ namespace TBF.BenchControl.Sequences
switch (step.EndCondition)
{
case StepCondition.Scale1Empty:
- endContitionFulfilled = (StateMachine.Balance1 == null) || StateMachine.Balance1.IsEmpty();
+ endContitionFulfilled = (StateMachine.Scale1 == null) || StateMachine.Scale1.IsEmpty();
break;
case StepCondition.Scale2Empty:
- endContitionFulfilled = (StateMachine.Balance2 == null) || StateMachine.Balance2.IsEmpty();
+ endContitionFulfilled = (StateMachine.Scale2 == null) || StateMachine.Scale2.IsEmpty();
break;
case StepCondition.Scale3Empty:
- endContitionFulfilled = (StateMachine.Balance3 == null) || StateMachine.Balance3.IsEmpty();
+ endContitionFulfilled = (StateMachine.Scale3 == null) || StateMachine.Scale3.IsEmpty();
break;
case StepCondition.AllScalesEmpty:
- endContitionFulfilled = ((StateMachine.Balance1 == null) || StateMachine.Balance1.IsEmpty()) &&
- ((StateMachine.Balance2 == null) || StateMachine.Balance2.IsEmpty()) &&
- ((StateMachine.Balance3 == null) || StateMachine.Balance3.IsEmpty());
+ endContitionFulfilled = ((StateMachine.Scale1 == null) || StateMachine.Scale1.IsEmpty()) &&
+ ((StateMachine.Scale2 == null) || StateMachine.Scale2.IsEmpty()) &&
+ ((StateMachine.Scale3 == null) || StateMachine.Scale3.IsEmpty());
break;
}
*/
@@ -772,9 +772,9 @@ namespace TBF.BenchControl.Sequences
sb.Append(";"); sb.Append("60");
sb.Append(";"); sb.Append("0");
sb.Append(";"); sb.Append("0");
- sb.Append(";"); sb.Append(outPath.FlowMeter.Idx1);
+ sb.Append(";"); sb.Append((outPath != null && outPath.FlowMeter != null) ? outPath.FlowMeter.Idx1 : 0);
sb.Append(";"); sb.Append(" ");
- sb.Append(";"); if (outPath.Scale != null) sb.Append(outPath.Scale.Name);
+ sb.Append(";"); sb.Append((outPath != null && outPath.Scale != null) ? outPath.Scale.Name : string.Empty);
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); /// [%]
@@ -823,10 +823,8 @@ namespace TBF.BenchControl.Sequences
sb.Append(";"); sb.Append(tstRslt.TestTime); /// t
sb.Append(";"); sb.Append(tstRslt.ErrorMaster); /// Eelm . . . chyba etalonu voci komercne pravej hodnote
sb.Append(";"); sb.Append(" "); /// Emass . . . chyba druheho etalonu voci komercne pravej hodnote (teraz vynechavame)
- sb.Append(";"); if (outPath.FlowMeter != null && outPath.FlowMeter.LtrPerPulse != 0)
- {
- sb.Append(1.0f / outPath.FlowMeter.LtrPerPulse); /// Const.MID . konstanta eatlonu
- }
+ sb.Append(";"); sb.Append((outPath != null && outPath.FlowMeter != null && outPath.FlowMeter.LtrPerPulse != 0) ? (1.0f / outPath.FlowMeter.LtrPerPulse) : 0);
+ /// Const.MID . konstanta eatlonu
sb.Append(";"); sb.Append(" "); /// Const.MA . . konstanta druheho etalonu
sb.Append(";"); sb.Append("0"); /// Time Div Start celkovy cas v [ms]
sb.Append(";"); sb.Append("0"); /// Time Div Start1