diff --git a/Results/Entities/TestRslt.cs b/Results/Entities/TestRslt.cs
index 60d1f5739..d048f00b5 100644
--- a/Results/Entities/TestRslt.cs
+++ b/Results/Entities/TestRslt.cs
@@ -39,8 +39,8 @@ namespace Results.Entities
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
public virtual double ErrorMaster { get; set; } /// [%]
- public virtual int DiverterStart { get; set; } /// [ms] Diverter switch time on test start
- public virtual int DiverterEnd { get; set; } /// [ms] Diverter switch time on test end
+ public virtual float DiverterStart { get; set; } /// [s] Diverter switch time when test starts
+ public virtual float DiverterEnd { get; set; } /// [s] Diverter switch time when test ends
public virtual int ErrorFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
public virtual sbyte ErrorFlagsMd { get; set; } /// 0=off, 1=info, 2=on (evaluated in MeterTestRslt.Passed)
diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs
index d119c2bb4..364ea33f3 100644
--- a/Results/Properties/AssemblyInfo.cs
+++ b/Results/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.17.675.0")]
-[assembly: AssemblyFileVersion("2.17.675.0")]
+[assembly: AssemblyVersion("2.17.677.0")]
+[assembly: AssemblyFileVersion("2.17.677.0")]
diff --git a/Results/WMeterRsltItemSpec.cs b/Results/WMeterRsltItemSpec.cs
index e64686cb6..21680cd67 100644
--- a/Results/WMeterRsltItemSpec.cs
+++ b/Results/WMeterRsltItemSpec.cs
@@ -172,8 +172,8 @@ namespace Results
/// Time (duration)
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_time, Strings.T_s + "()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : DblFormat(u, f, p, "V3", w.GetTestRslt(t).TestTime)));
- AllItems.Add(new WMeterRsltItemSpec(ItemID.Diverter_start_time, "Diverter start time ()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : DblFormat(u, f, p, "F0", 1000.0 * w.GetTestRslt(t).DiverterStart)));
- AllItems.Add(new WMeterRsltItemSpec(ItemID.Diverter_end_time, "Diverter end time ()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : DblFormat(u, f, p, "F0", 1000.0 * w.GetTestRslt(t).DiverterEnd)));
+ AllItems.Add(new WMeterRsltItemSpec(ItemID.Diverter_start_time, "Diverter start time ()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : DblFormat(u, f, p, "F3", w.GetTestRslt(t).DiverterStart)));
+ AllItems.Add(new WMeterRsltItemSpec(ItemID.Diverter_end_time, "Diverter end time ()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : DblFormat(u, f, p, "F3", w.GetTestRslt(t).DiverterEnd)));
///
/// Flow
diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs
index ccaf9c500..b3da665c3 100644
--- a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs
+++ b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs
@@ -66,6 +66,7 @@ namespace TBF.BenchControl.Elde
public uint[] CyclePar { get { return controlCom.CyclePar; } set { controlCom.CyclePar = value; } }
public uint[] WMeterCont { get { return controlCom.WMeterCont; } }
public bool ManualUIAllowed { get { return controlCom.ManualUIAllowed; } set { controlCom.ManualUIAllowed = value; } }
+ public float ValveOpenCloseTime { get { return controlCom.ValveOpenCloseTime; } }
/// Extracted from the StatusP in RunDeviceBefore
public bool EmergencyStop { get { return emergencyStop; } }
diff --git a/TestBenchFramework/BenchControl/Elde/ControlComSim.cs b/TestBenchFramework/BenchControl/Elde/ControlComSim.cs
index 2ae6bb38f..4dca2a023 100644
--- a/TestBenchFramework/BenchControl/Elde/ControlComSim.cs
+++ b/TestBenchFramework/BenchControl/Elde/ControlComSim.cs
@@ -71,8 +71,10 @@ namespace TBF.BenchControl.Elde
public void SetWeight(int pos, double mass) { return; } /// not available in sim. mode
public uint[] CyclePar { get { return cyclePar; } set { cyclePar = value; } } /// dummy
- public uint[] WMeterCont { get { return wMeterCont; } } /// dummy
- ///
+ public uint[] WMeterCont { get { return wMeterCont; } } /// dummy
+
+ public float ValveOpenCloseTime { get { return 0.001f; } }
+ ///
public bool ManualUIAllowed
{
get { return manualUIAllowed; }
diff --git a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs
index 527f6d18f..48a947e0b 100644
--- a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs
+++ b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs
@@ -83,7 +83,14 @@ namespace TBF.BenchControl.Elde
public uint[] CyclePar { get { return new uint[163]; } set { return; }} /// Dummy
public uint[] WMeterCont { get { return new uint[3]; } } /// Dummy
#endif
- public bool ManualUIAllowed
+
+#if KEMPNO_50
+ public float ValveOpenCloseTime { get { return ctrlBrdComponent.ValveMoveTime[0]; } }
+#else
+ public float ValveOpenCloseTime { get { return 0.001f; } }
+#endif
+
+ public bool ManualUIAllowed
{
get { return ctrlBrdComponent.Dovolene; }
set { ctrlBrdComponent.Dovolene = value; }
diff --git a/TestBenchFramework/BenchControl/Elde/IControlCom.cs b/TestBenchFramework/BenchControl/Elde/IControlCom.cs
index a1172d633..f86a74313 100644
--- a/TestBenchFramework/BenchControl/Elde/IControlCom.cs
+++ b/TestBenchFramework/BenchControl/Elde/IControlCom.cs
@@ -35,6 +35,7 @@ namespace TBF.BenchControl.Elde
uint[] CyclePar { get; set; }
uint[] WMeterCont { get; }
bool ManualUIAllowed { get; set; }
+ float ValveOpenCloseTime { get; }
void SetReservoirTemp(int nr, float temp);
diff --git a/TestBenchFramework/BenchControl/GenericDevices/IErrorFlags.cs b/TestBenchFramework/BenchControl/GenericDevices/IErrorFlags.cs
index ea449590d..0ed46bf10 100644
--- a/TestBenchFramework/BenchControl/GenericDevices/IErrorFlags.cs
+++ b/TestBenchFramework/BenchControl/GenericDevices/IErrorFlags.cs
@@ -18,10 +18,10 @@ namespace TBF.BenchControl.GenericDevices
/// A valid test result
/// true = diverter was used (times apply)
/// true = start/stop valve was used (times apply)
- /// Test start switch time in ms
- /// Test end switch time in ms
+ /// Diverter or valve switch time in s on test start
+ /// Diverter or valve switch time in s on test end
/// Error flags
- int GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, int switchTimeStart, int switchTimeEnd);
+ int GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd);
///
/// Get water meter error flags (evaluated from all meter test results)
diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs
index ff240a2fd..0e7b0687e 100644
--- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs
@@ -25,8 +25,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
IList e = new List(); /// Events from currently running operations
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
- int switchTimeStart = 1;
- int switchTimeEnd = 1;
+ float switchTimeStart = 0.001f; /// in seconds, original vale is 1 ms
+ float switchTimeEnd = 0.001f; /// in seconds, original vale is 1 ms
if (test.Part < 1 || test.Part > Config.Data.CompoundWMsCount)
{
@@ -509,7 +509,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
/// Read the diverter switch time
- switchTimeStart = (int)cBrd.DivTime;
+ switchTimeStart = (float)cBrd.DivTime / 1000.0f;
/// Measurement loop - begin
while (true)
@@ -571,7 +571,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
TestEndTime = DateTime.Now;
/// Read the diverter switch time
- switchTimeEnd = (int)cBrd.DivTime;
+ switchTimeEnd = (float)cBrd.DivTime / 1000.0f;
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs
index 268df1ba1..e02cf59cd 100644
--- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs
@@ -34,8 +34,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
Event retVal = Event.Done;
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
- int switchTimeStart = 1;
- int switchTimeEnd = 1;
+ float switchTimeStart = 0.001f; /// in seconds, original vale is 1 ms
+ float switchTimeEnd = 0.001f; /// in seconds, original vale is 1 ms
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
index b813fa3d8..157c2c023 100644
--- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
@@ -38,8 +38,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
Event retVal = Event.Done;
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
- int switchTimeStart = 1;
- int switchTimeEnd = 1;
+ float switchTimeStart = 0.001f; /// in seconds, original vale is 1 ms
+ float switchTimeEnd = 0.001f; /// in seconds, original vale is 1 ms
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
@@ -539,6 +539,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
}
while (!e.Contains(Event.ValvesSet));
+ switchTimeStart = cBrd.ValveOpenCloseTime / 1000.0f;
/// Measurement loop - preparation
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
@@ -647,6 +648,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
}
while (e.Contains(Event.ValvesBusy));
+ switchTimeEnd = cBrd.ValveOpenCloseTime / 1000.0f;
State.Create(string.Format("{0}({1}) : Waiting before 2nd mass measurement", test.Method, test.Name))
.AddOperation(checkUiOp)
diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs
index 4b30b46aa..7981dfe1d 100644
--- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs
@@ -35,8 +35,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
Event retVal = Event.Done;
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
- int switchTimeStart = 1;
- int switchTimeEnd = 1;
+ float switchTimeStart = 0.001f; /// in seconds, original vale is 1 ms
+ float switchTimeEnd = 0.001f; /// in seconds, original vale is 1 ms
if (debugLevel == Config.Entities.DebugMode.Simulate)
{
@@ -597,7 +597,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
ClearAllStatistics(StateMachine.Time);
/// Read the diverter switch time
- switchTimeStart = (int)cBrd.DivTime;
+ switchTimeStart = (float)cBrd.DivTime / 1000.0f;
log.WarnFormat("Diverter switch time on test start = {0} ms", switchTimeStart);
/// Measurement loop - begin
@@ -724,7 +724,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
else LogProcessDataHeaderHeatMeters(processDataLogger, "End mass");
/// Read the diverter switch time
- switchTimeEnd = (int)cBrd.DivTime;
+ switchTimeEnd = (float)cBrd.DivTime / 1000.0f;
log.WarnFormat("Diverter switch time on test end = {0} ms", switchTimeEnd);
State.Create(string.Format("{0}({1}) : Measuring the end mass", test.Method, test.Name))
diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs
index b77b0a979..d449cb6ee 100644
--- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs
@@ -34,8 +34,8 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
Event retVal = Event.Done;
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
- int switchTimeStart = 1;
- int switchTimeEnd = 1;
+ float switchTimeStart = 0.001f; /// in seconds, original vale is 1 ms
+ float switchTimeEnd = 0.001f; /// in seconds, original vale is 1 ms
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
@@ -223,7 +223,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
ClearAllStatistics(StateMachine.Time);
/// Read the diverter switch time
- switchTimeStart = (int)cBrd.DivTime;
+ switchTimeStart = (float)cBrd.DivTime / 1000.0f;
/// Measurement loop - begin
while (true)
@@ -271,7 +271,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
while (!e.Contains(Event.TimerExpired));
/// Read the diverter switch time
- switchTimeEnd = (int)cBrd.DivTime;
+ switchTimeEnd = (float)cBrd.DivTime / 1000.0f;
//------------------------------------------------
Bridge.OnActivity(this, Strings.Measuring_the_weight);
diff --git a/TestBenchFramework/BenchControl/Various/ErrorFlags/Errors.cs b/TestBenchFramework/BenchControl/Various/ErrorFlags/Errors.cs
index 98366b0a0..e18e01932 100644
--- a/TestBenchFramework/BenchControl/Various/ErrorFlags/Errors.cs
+++ b/TestBenchFramework/BenchControl/Various/ErrorFlags/Errors.cs
@@ -30,10 +30,10 @@ namespace TBF.BenchControl.Various.ErrorFlags
/// A valid test result
/// true = diverter was used (times apply)
/// true = start/stop valve was used (times apply)
- /// Test start switch time in ms
- /// Test end switch time in ms
+ /// Diverter or valve switch time in s on test start
+ /// Diverter or valve switch time in s on test end
/// Error flags
- public int GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, int switchTimeStart, int switchTimeEnd)
+ public int GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd)
{
if (Mode == Config.Entities.ErrorFlagsMode.Off)
{
@@ -77,16 +77,16 @@ namespace TBF.BenchControl.Various.ErrorFlags
bool E10 = false;
if (diverter)
{
- E9 = ((double)Math.Abs(switchTimeStart - switchTimeEnd) > errorsCfg.TestParams.Coef_E9 * (switchTimeStart + switchTimeEnd));
- E10 = ((double)(switchTimeStart + switchTimeEnd) > errorsCfg.TestParams.Coef_E10 * 1000.0 * testRslt.TestTime);
+ E9 = (Math.Abs(switchTimeStart - switchTimeEnd) > errorsCfg.TestParams.Coef_E9 * (switchTimeStart + switchTimeEnd));
+ E10 = ((switchTimeStart + switchTimeEnd) > errorsCfg.TestParams.Coef_E10 * testRslt.TestTime);
}
bool E11 = false;
bool E12 = false;
if (startStopValve)
{
- E11 = ((double)(switchTimeStart + switchTimeEnd) > errorsCfg.TestParams.Coef_E11 * 1000.0 * testRslt.TestTime);
- E12 = ((double)Math.Abs(switchTimeStart - switchTimeEnd) > errorsCfg.TestParams.Coef_E12 * (switchTimeStart + switchTimeEnd));
+ E11 = ((switchTimeStart + switchTimeEnd) > errorsCfg.TestParams.Coef_E11 * testRslt.TestTime);
+ E12 = (Math.Abs(switchTimeStart - switchTimeEnd) > errorsCfg.TestParams.Coef_E12 * (switchTimeStart + switchTimeEnd));
}
/// Ambient temperature
diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs
index 0f2ca3c41..e87592da2 100644
--- a/TestBenchFramework/Properties/AssemblyInfo.cs
+++ b/TestBenchFramework/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("2.17.676.1")]
-[assembly: AssemblyFileVersion("2.17.676.1")]
+[assembly: AssemblyVersion("2.17.677.1")]
+[assembly: AssemblyFileVersion("2.17.677.1")]