Measurement of valve open/close time required for E11, E12 evaluation. DiverterStart/DiverterEnd is float in sec., ver. 2.17.677
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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; } }
|
||||
|
||||
/// <summary> Extracted from the StatusP in RunDeviceBefore </summary>
|
||||
public bool EmergencyStop { get { return emergencyStop; } }
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ namespace TBF.BenchControl.GenericDevices
|
||||
/// <param name="testRslt">A valid test result</param>
|
||||
/// <param name="diverter">true = diverter was used (times apply)</param>
|
||||
/// <param name="startStopValve">true = start/stop valve was used (times apply)</param>
|
||||
/// <param name="switchTimeStart">Test start switch time in ms</param>
|
||||
/// <param name="switchTimeEnd">Test end switch time in ms</param>
|
||||
/// <param name="switchTimeStart">Diverter or valve switch time in s on test start</param>
|
||||
/// <param name="switchTimeEnd">Diverter or valve switch time in s on test end</param>
|
||||
/// <returns>Error flags</returns>
|
||||
int GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, int switchTimeStart, int switchTimeEnd);
|
||||
int GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd);
|
||||
|
||||
/// <summary>
|
||||
/// Get water meter error flags (evaluated from all meter test results)
|
||||
|
||||
+4
-4
@@ -25,8 +25,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
IList<Event> e = new List<Event>(); /// 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);
|
||||
|
||||
+2
-2
@@ -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]
|
||||
|
||||
|
||||
+4
-2
@@ -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)
|
||||
|
||||
+4
-4
@@ -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))
|
||||
|
||||
+4
-4
@@ -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);
|
||||
|
||||
@@ -30,10 +30,10 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
/// <param name="testRslt">A valid test result</param>
|
||||
/// <param name="diverter">true = diverter was used (times apply)</param>
|
||||
/// <param name="startStopValve">true = start/stop valve was used (times apply)</param>
|
||||
/// <param name="switchTimeStart">Test start switch time in ms</param>
|
||||
/// <param name="switchTimeEnd">Test end switch time in ms</param>
|
||||
/// <param name="switchTimeStart">Diverter or valve switch time in s on test start</param>
|
||||
/// <param name="switchTimeEnd">Diverter or valve switch time in s on test end</param>
|
||||
/// <returns>Error flags</returns>
|
||||
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
|
||||
|
||||
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user