TestMethods.FlowAdjustment, TestMethods.FixedStartMassCollAdvanced, DataEntry24 changes, ver. 3.1.1471
This commit is contained in:
@@ -89,11 +89,11 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +106,9 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ namespace TBF.BenchControl.DataEntry.Fewa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +106,9 @@ namespace TBF.BenchControl.DataEntry.Fewa
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -107,11 +107,11 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,6 +124,9 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -107,11 +107,11 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,6 +124,9 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,11 +81,11 @@ namespace TBF.BenchControl.DataEntry.Munich
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.wMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.wMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,11 +94,11 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,6 +111,9 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ namespace TBF.BenchControl.DataEntry.Single
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +106,9 @@ namespace TBF.BenchControl.DataEntry.Single
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +106,9 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
///
|
///
|
||||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
|
||||||
///
|
///
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -25,16 +25,14 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
bool[] disabled; /// This array is shared between forms
|
bool[] disabled; /// This array is shared between forms
|
||||||
|
|
||||||
string[] wmCycleEndState;
|
|
||||||
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
|
|
||||||
|
|
||||||
double[] wmStartState;
|
double[] wmStartState;
|
||||||
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
|
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
|
||||||
|
string[] wmStartStateStr;
|
||||||
|
|
||||||
double[] wmEndState;
|
double[] wmEndState;
|
||||||
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
|
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
|
||||||
|
string[] wmEndStateStr;
|
||||||
string[] wmStartStateStr;
|
public string WMEndStateStr(int wmNr) { return (wmNr >= 0 && wmNr < wmEndStateStr.Length) ? wmEndStateStr[wmNr] : string.Empty; }
|
||||||
|
|
||||||
|
|
||||||
System.Windows.Forms.Form modelessDlg;
|
System.Windows.Forms.Form modelessDlg;
|
||||||
@@ -54,7 +52,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
ShowFormAtCycleBeginning,
|
ShowFormAtCycleBeginning,
|
||||||
ShowFormAtCycleEnd,
|
ShowFormAtCycleEnd,
|
||||||
EnterTestStartStates,
|
EnterTestStartStates,
|
||||||
EnterTestEndStates,
|
EnterAdvancedTestStartStates,
|
||||||
|
EnterTestEndStates,
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentOp currentOp;
|
CurrentOp currentOp;
|
||||||
@@ -73,7 +72,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
wmStartState = new double[Config.Data.WMsCount];
|
wmStartState = new double[Config.Data.WMsCount];
|
||||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||||
wmEndState = new double[Config.Data.WMsCount];
|
wmEndState = new double[Config.Data.WMsCount];
|
||||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
wmEndStateStr = new string[Config.Data.WMsCount];
|
||||||
|
|
||||||
currentOp = CurrentOp.None;
|
currentOp = CurrentOp.None;
|
||||||
log.Debug(this.ToString());
|
log.Debug(this.ToString());
|
||||||
@@ -89,11 +88,11 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +105,16 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>Reference to the operation</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
|
{
|
||||||
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
|
currentOp = CurrentOp.EnterAdvancedTestStartStates;
|
||||||
|
this.regReaders = regReaders;
|
||||||
|
this.waterMeters = waterMeters;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
@@ -137,7 +146,17 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, myRef.disabled);
|
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, myRef.disabled);
|
||||||
modelessDlg.Show();
|
modelessDlg.Show();
|
||||||
}
|
}
|
||||||
///
|
///
|
||||||
|
void OpenAdvancedTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||||
|
{
|
||||||
|
if (wmEndStateStr.Length == waterMeters.Count)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < waterMeters.Count; i++) wmEndStateStr[i] = waterMeters[i].EndState;
|
||||||
|
}
|
||||||
|
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, wmEndStateStr, myRef.disabled);
|
||||||
|
modelessDlg.Show();
|
||||||
|
}
|
||||||
|
///
|
||||||
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
||||||
{
|
{
|
||||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||||
@@ -169,7 +188,10 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
case CurrentOp.EnterTestStartStates:
|
case CurrentOp.EnterTestStartStates:
|
||||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||||
break;
|
break;
|
||||||
case CurrentOp.EnterTestEndStates:
|
case CurrentOp.EnterAdvancedTestStartStates:
|
||||||
|
Program.MainWnd.Invoke(new EntryFormDlgt(OpenAdvancedTestStartStatesDlg), this);
|
||||||
|
break;
|
||||||
|
case CurrentOp.EnterTestEndStates:
|
||||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
|
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -214,11 +236,12 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
if (waterMeters[i] != null)
|
if (waterMeters[i] != null)
|
||||||
{
|
{
|
||||||
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
|
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
|
||||||
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
|
wmEndStateStr[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
|
else if (modelessDlg is TestStartEndForm &&
|
||||||
|
(currentOp == CurrentOp.EnterTestStartStates || currentOp == CurrentOp.EnterAdvancedTestStartStates))
|
||||||
{
|
{
|
||||||
/// Fixed start test - start
|
/// Fixed start test - start
|
||||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||||
@@ -245,7 +268,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||||
{
|
{
|
||||||
wmEndState[i] = dlg.WMEndState[i];
|
wmEndState[i] = dlg.WMEndState[i];
|
||||||
}
|
waterMeters[i].EndState = wmEndStateStr[i] = dlg.WMEndStateStr[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,15 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
{
|
{
|
||||||
public partial class TestStartEndForm : Form, GenericDevices.IHasCompleted
|
public partial class TestStartEndForm : Form, GenericDevices.IHasCompleted
|
||||||
{
|
{
|
||||||
|
enum Kind
|
||||||
|
{
|
||||||
|
Undefined,
|
||||||
|
Start,
|
||||||
|
AdvancedStart,
|
||||||
|
End,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static readonly ILog log = LogManager.GetLogger(typeof(TestStartEndForm));
|
private static readonly ILog log = LogManager.GetLogger(typeof(TestStartEndForm));
|
||||||
|
|
||||||
// Set to 'true' when the form closes
|
// Set to 'true' when the form closes
|
||||||
@@ -32,7 +41,10 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
// To be retrieved after the form closes
|
// To be retrieved after the form closes
|
||||||
public double[] WMEndState;
|
public double[] WMEndState;
|
||||||
|
|
||||||
bool endStates; /// false=start states, true=end states
|
// To be retrieved after the form closes
|
||||||
|
public readonly string[] WMEndStateStr;
|
||||||
|
|
||||||
|
Kind kind; /// false=start states, true=end states
|
||||||
double refVolume;
|
double refVolume;
|
||||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||||
@@ -101,7 +113,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||||
: this()
|
: this()
|
||||||
{
|
{
|
||||||
endStates = false;
|
kind = Kind.Start;
|
||||||
|
|
||||||
this.WaterMetersCount = waterMetersCount;
|
this.WaterMetersCount = waterMetersCount;
|
||||||
this.regReaders = regReaders;
|
this.regReaders = regReaders;
|
||||||
@@ -111,7 +123,30 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
|
|
||||||
WMStartState = new double[waterMetersCount];
|
WMStartState = new double[waterMetersCount];
|
||||||
WMStartStateStr = new string[waterMetersCount];
|
WMStartStateStr = new string[waterMetersCount];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor to fill in start states
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="waterMetersCount">Number of water meters</param>
|
||||||
|
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||||
|
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] wmEndStateStr, bool[] disabled)
|
||||||
|
: this()
|
||||||
|
{
|
||||||
|
kind = Kind.AdvancedStart;
|
||||||
|
|
||||||
|
this.WaterMetersCount = waterMetersCount;
|
||||||
|
this.regReaders = regReaders;
|
||||||
|
if (wmEndStateStr == null || wmEndStateStr.Length != waterMetersCount)
|
||||||
|
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||||
|
this.WMEndStateStr = wmEndStateStr;
|
||||||
|
this.disabled = disabled;
|
||||||
|
|
||||||
|
ShuffleTextBoxes();
|
||||||
|
|
||||||
|
WMStartState = new double[waterMetersCount];
|
||||||
|
WMStartStateStr = new string[waterMetersCount];
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor to fill in end states
|
/// Constructor to fill in end states
|
||||||
@@ -126,7 +161,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
double refVolume, double errLimLo, double errLimHi)
|
double refVolume, double errLimLo, double errLimHi)
|
||||||
: this()
|
: this()
|
||||||
{
|
{
|
||||||
endStates = true;
|
kind = Kind.End;
|
||||||
|
|
||||||
this.WaterMetersCount = waterMetersCount;
|
this.WaterMetersCount = waterMetersCount;
|
||||||
this.regReaders = regReaders;
|
this.regReaders = regReaders;
|
||||||
@@ -142,7 +177,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
ShuffleTextBoxes();
|
ShuffleTextBoxes();
|
||||||
|
|
||||||
WMEndState = new double[waterMetersCount];
|
WMEndState = new double[waterMetersCount];
|
||||||
}
|
WMEndStateStr = new string[waterMetersCount];
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make sure the layout of labels/text boxes on the screen
|
/// Make sure the layout of labels/text boxes on the screen
|
||||||
@@ -185,7 +221,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (endStates)
|
if (kind == Kind.End)
|
||||||
{
|
{
|
||||||
/// End of test
|
/// End of test
|
||||||
for (int i = 0; i < TextBoxesCount; i++)
|
for (int i = 0; i < TextBoxesCount; i++)
|
||||||
@@ -207,7 +243,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (kind == Kind.Start || kind == Kind.AdvancedStart)
|
||||||
{
|
{
|
||||||
/// Start of test
|
/// Start of test
|
||||||
for (int i = 0; i < TextBoxesCount; i++)
|
for (int i = 0; i < TextBoxesCount; i++)
|
||||||
@@ -221,8 +257,13 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
startTextBoxes[i].Enabled = true;
|
startTextBoxes[i].Enabled = true;
|
||||||
activeTextBoxes.Add(startTextBoxes[i]);
|
activeTextBoxes.Add(startTextBoxes[i]);
|
||||||
activeWmNrs.Add(i);
|
activeWmNrs.Add(i);
|
||||||
|
|
||||||
|
if ((kind == Kind.AdvancedStart) && (WMEndStateStr != null) && (i < WMEndStateStr.Length) && (!string.IsNullOrEmpty(WMEndStateStr[i])))
|
||||||
|
{
|
||||||
|
startTextBoxes[i].Text = WMEndStateStr[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((activeTextBoxes.Count > 0) && (activeWmNrs.Count > 0))
|
if ((activeTextBoxes.Count > 0) && (activeWmNrs.Count > 0))
|
||||||
@@ -248,14 +289,15 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (endStates)
|
if (kind == Kind.End)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Math.Min(WaterMetersCount, TextBoxesCount); i++)
|
for (int i = 0; i < Math.Min(WaterMetersCount, TextBoxesCount); i++)
|
||||||
{
|
{
|
||||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||||
{
|
{
|
||||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
WMEndStateStr[i] = endTextBoxes[i].Text;
|
||||||
}
|
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +106,9 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -85,11 +85,11 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +102,10 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
|
|||||||
@@ -139,11 +139,11 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,6 +156,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowCycleEndFormOp()
|
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||||
{
|
{
|
||||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
this.waterMeters = waterMeters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +106,9 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ namespace TBF.BenchControl.GenericDevices
|
|||||||
/// Displays form at the end of the cycle (usually to enter the end state).
|
/// Displays form at the end of the cycle (usually to enter the end state).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Operation to be used in the sequence</returns>
|
/// <returns>Operation to be used in the sequence</returns>
|
||||||
IOperation ShowCycleEndFormOp();
|
IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
///
|
///
|
||||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||||
///
|
///
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Results.Entities;
|
||||||
|
|
||||||
namespace TBF.BenchControl.GenericDevices
|
namespace TBF.BenchControl.GenericDevices
|
||||||
{
|
{
|
||||||
public interface IHasWMStatesForm
|
public interface IHasWMStatesForm
|
||||||
@@ -8,12 +12,16 @@ namespace TBF.BenchControl.GenericDevices
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Water meter states on start of test
|
/// Water meter states on start of test
|
||||||
/// </summary>
|
/// </summary>
|
||||||
double WMStartState(int wmNr);
|
/// <param name="wmNr0">Zero based water meter number</param>
|
||||||
|
/// <returns>Water meter state in liters</returns>
|
||||||
|
double WMStartState(int wmNr0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Water meter states at the end of test
|
/// Water meter states at the end of test
|
||||||
/// </summary>
|
/// </summary>
|
||||||
double WMEndState(int wmNr);
|
/// <param name="wmNr0">Zero based water meter number</param>
|
||||||
|
/// <returns>Water meter state in liters</returns>
|
||||||
|
double WMEndState(int wmNr0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Displays form at the beginning of the test to enter water meter start start.
|
/// Displays form at the beginning of the test to enter water meter start start.
|
||||||
@@ -21,6 +29,12 @@ namespace TBF.BenchControl.GenericDevices
|
|||||||
/// <returns>Operation to be used in the sequence</returns>
|
/// <returns>Operation to be used in the sequence</returns>
|
||||||
IOperation ShowTestStartFormOp(IRegisterReader[] regReaders);
|
IOperation ShowTestStartFormOp(IRegisterReader[] regReaders);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Displays form at the beginning of the test to enter water meter start start.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Operation to be used in the sequence</returns>
|
||||||
|
IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<WaterMeter> waterMeters);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Displays form at the end of the test to enter water meter start start.
|
/// Displays form at the end of the test to enter water meter start start.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -103,6 +103,9 @@ namespace TBF.BenchControl.RegisterReaders.KPackE.DataEntryForRadio
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <returns>null (not implemented)</returns>
|
||||||
|
public IOperation ShowAdvancedTestStartFormOp(IRegisterReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters) { return null; }
|
||||||
|
|
||||||
/// <returns>Reference to the operation</returns>
|
/// <returns>Reference to the operation</returns>
|
||||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1196,7 +1196,7 @@ namespace TBF.BenchControl.Sequences
|
|||||||
{
|
{
|
||||||
/// Open the modeless form for the end of the cycle
|
/// Open the modeless form for the end of the cycle
|
||||||
State.Create("MainSeq : Enter end data")
|
State.Create("MainSeq : Enter end data")
|
||||||
.AddOperation((dataEntryCmpnt as GenericDevices.IHasCycleEndForm).ShowCycleEndFormOp())
|
.AddOperation((dataEntryCmpnt as GenericDevices.IHasCycleEndForm).ShowCycleEndFormOp(TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters))
|
||||||
.AddOperation(checkUiOp)
|
.AddOperation(checkUiOp)
|
||||||
.EnterState();
|
.EnterState();
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ namespace TBF.BenchControl.Sequences
|
|||||||
|
|
||||||
protected IOperation readRegistersOp;
|
protected IOperation readRegistersOp;
|
||||||
protected IOperation queryEnd1;
|
protected IOperation queryEnd1;
|
||||||
protected IOperation queryEnd2;
|
|
||||||
protected IOperation checkUiOp;
|
protected IOperation checkUiOp;
|
||||||
|
|
||||||
protected IOperation processDataLoggingOp;
|
protected IOperation processDataLoggingOp;
|
||||||
|
|||||||
@@ -72,11 +72,15 @@ namespace TBF.BenchControl
|
|||||||
Factories.Add(new TestMethods.FixedStartMassCollection.Single.Factory());
|
Factories.Add(new TestMethods.FixedStartMassCollection.Single.Factory());
|
||||||
Factories.Add(new TestMethods.FixedStartMassCollection.Compound.Factory());
|
Factories.Add(new TestMethods.FixedStartMassCollection.Compound.Factory());
|
||||||
Factories.Add(new TestMethods.FixedStartMassCollection.HeatMeters.Factory());
|
Factories.Add(new TestMethods.FixedStartMassCollection.HeatMeters.Factory());
|
||||||
|
Factories.Add(new TestMethods.FixedStartMassCollAdvanced.Single.Factory());
|
||||||
|
Factories.Add(new TestMethods.FixedStartMassCollAdvanced.Compound.Factory());
|
||||||
|
Factories.Add(new TestMethods.FixedStartMassCollAdvanced.HeatMeters.Factory());
|
||||||
Factories.Add(new TestMethods.FixedStartMassCollDeferredEval.Single.Factory());
|
Factories.Add(new TestMethods.FixedStartMassCollDeferredEval.Single.Factory());
|
||||||
Factories.Add(new TestMethods.FixedStartMassCollDeferredEval.Compound.Factory());
|
Factories.Add(new TestMethods.FixedStartMassCollDeferredEval.Compound.Factory());
|
||||||
Factories.Add(new TestMethods.FixedStartMassCollDeferredEval.HeatMeters.Factory());
|
Factories.Add(new TestMethods.FixedStartMassCollDeferredEval.HeatMeters.Factory());
|
||||||
Factories.Add(new TestMethods.FixedStartTankCollection.Single.Factory());
|
Factories.Add(new TestMethods.FixedStartTankCollection.Single.Factory());
|
||||||
Factories.Add(new TestMethods.FixedStartTankCollection.Compound.Factory());
|
Factories.Add(new TestMethods.FixedStartTankCollection.Compound.Factory());
|
||||||
|
Factories.Add(new TestMethods.FlowAdjustment.Factory());
|
||||||
Factories.Add(new TestMethods.FlyingStart.Single.Factory());
|
Factories.Add(new TestMethods.FlyingStart.Single.Factory());
|
||||||
Factories.Add(new TestMethods.FlyingStart.Compound.Factory());
|
Factories.Add(new TestMethods.FlyingStart.Compound.Factory());
|
||||||
Factories.Add(new TestMethods.FlyingStart.HeatMeters.Factory());
|
Factories.Add(new TestMethods.FlyingStart.HeatMeters.Factory());
|
||||||
|
|||||||
@@ -123,21 +123,21 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
|||||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,7 +390,6 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -118,21 +118,21 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -583,7 +583,6 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
///
|
///
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
||||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||||
|
|||||||
@@ -116,21 +116,21 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,21 +93,21 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,21 +92,21 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -561,7 +561,6 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
||||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||||
|
|||||||
@@ -100,21 +100,21 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,7 +427,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
||||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||||
|
|||||||
@@ -110,21 +110,21 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,7 +588,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
||||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using log4net;
|
||||||
|
using Config.Entities;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.Compound
|
||||||
|
{
|
||||||
|
public class Component : ComponentBase, GenericDevices.ITestMethod
|
||||||
|
{
|
||||||
|
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanTest(MetersKind meters) { return meters == MetersKind.Combined; }
|
||||||
|
public bool DoTransitions() { return true; }
|
||||||
|
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
||||||
|
{
|
||||||
|
return FixedStartMassCollAdvancedSeq.CheckDeviceCaps(test, devices, out message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Component() { }
|
||||||
|
///
|
||||||
|
public Component(Generic.IComponentCfg cfg)
|
||||||
|
: base(cfg)
|
||||||
|
{
|
||||||
|
log.Debug(this.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||||
|
{
|
||||||
|
return (new FixedStartMassCollAdvancedSeq()).Execute(test, repetNr, isLastRepetition, true, null, DebugLevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TBF.BenchControl.Generic;
|
||||||
|
using TBF.BenchControl.Configs.NameOnly;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.Compound
|
||||||
|
{
|
||||||
|
public class Factory : IComponentFactory
|
||||||
|
{
|
||||||
|
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||||
|
|
||||||
|
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
|
||||||
|
|
||||||
|
public IComponent DummyComponent() { return new Component(); }
|
||||||
|
|
||||||
|
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||||
|
|
||||||
|
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(29), this); }
|
||||||
|
|
||||||
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||||
|
{
|
||||||
|
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1113
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using log4net;
|
||||||
|
using Config.Entities;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.HeatMeters
|
||||||
|
{
|
||||||
|
public class Component : ComponentBase, GenericDevices.ITestMethod
|
||||||
|
{
|
||||||
|
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanTest(MetersKind meters) { return meters == MetersKind.HeatMeter; }
|
||||||
|
public bool DoTransitions() { return true; }
|
||||||
|
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
||||||
|
{
|
||||||
|
return FixedStartMassCollAdvancedSeq.CheckDeviceCaps(test, devices, out message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
readonly TestMethodCfg testMethodCfg;
|
||||||
|
|
||||||
|
public Component() { }
|
||||||
|
///
|
||||||
|
public Component(Generic.IComponentCfg cfg)
|
||||||
|
: base(cfg)
|
||||||
|
{
|
||||||
|
testMethodCfg = cfg as TestMethodCfg;
|
||||||
|
log.Debug(this.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||||
|
{
|
||||||
|
return (new FixedStartMassCollAdvancedSeq()).Execute(test, repetNr, isLastRepetition, false, testMethodCfg.TestParams, DebugLevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TBF.BenchControl.Generic;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.HeatMeters
|
||||||
|
{
|
||||||
|
public class Factory : IComponentFactory
|
||||||
|
{
|
||||||
|
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||||
|
|
||||||
|
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
|
||||||
|
|
||||||
|
public IComponent DummyComponent() { return new Component(); }
|
||||||
|
|
||||||
|
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||||
|
|
||||||
|
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(29), this); }
|
||||||
|
|
||||||
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||||
|
{
|
||||||
|
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
using Config.Entities;
|
||||||
|
using TBF.BenchControl.Generic;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.HeatMeters
|
||||||
|
{
|
||||||
|
public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||||
|
{
|
||||||
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg) })[0];
|
||||||
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||||
|
|
||||||
|
public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); }
|
||||||
|
|
||||||
|
/// <summary> Test parameters </summary>
|
||||||
|
[XmlIgnore]
|
||||||
|
public TestParams TestParams;
|
||||||
|
public override IParamsProvider GetRuntimeTestParamsProvider() { return TestParams; }
|
||||||
|
public override IParamsProvider CreateTestParamsProvider() { return new TestParams(true); }
|
||||||
|
public override IParamsProvider GetUITestParamsProvider(Test test)
|
||||||
|
{
|
||||||
|
return (test.Method == Name) ? base.GetUITestParamsProvider(test) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Private parameterless constructor invoked by all other (public) constructors
|
||||||
|
TestMethodCfg()
|
||||||
|
{
|
||||||
|
TestParams = new TestParams(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TestMethodCfg(string name, IComponentFactory factory)
|
||||||
|
: this()
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
Factory = factory;
|
||||||
|
ParentName = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ToString(int i)
|
||||||
|
{
|
||||||
|
return string.Format("Name={0}", Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+69
@@ -0,0 +1,69 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Config.Entities;
|
||||||
|
using TBF.BenchControl.Generic;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.HeatMeters
|
||||||
|
{
|
||||||
|
public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl
|
||||||
|
{
|
||||||
|
public bool ShowMore { get { return false; } }
|
||||||
|
|
||||||
|
TestMethodCfg config;
|
||||||
|
public IComponentCfg Config
|
||||||
|
{
|
||||||
|
get { return config as IComponentCfg; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
config = value as TestMethodCfg;
|
||||||
|
Redraw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TestMethodCfgCtrl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Closing()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Redraw()
|
||||||
|
{
|
||||||
|
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||||
|
classNameLabel.Text = config.Factory.ClassName;
|
||||||
|
nameTextBox.Text = config.Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Unlock()
|
||||||
|
{
|
||||||
|
nameTextBox.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||||
|
{
|
||||||
|
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CfgUpdateFlags UpdateCfg()
|
||||||
|
{
|
||||||
|
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||||
|
|
||||||
|
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||||
|
|
||||||
|
config.Name = nameTextBox.Text;
|
||||||
|
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+86
@@ -0,0 +1,86 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.HeatMeters
|
||||||
|
{
|
||||||
|
partial class TestMethodCfgCtrl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.nameLabel = new System.Windows.Forms.Label();
|
||||||
|
this.classNameLabel = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// nameTextBox
|
||||||
|
//
|
||||||
|
this.nameTextBox.Enabled = false;
|
||||||
|
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||||
|
this.nameTextBox.Name = "nameTextBox";
|
||||||
|
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||||
|
this.nameTextBox.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// nameLabel
|
||||||
|
//
|
||||||
|
this.nameLabel.AutoSize = true;
|
||||||
|
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||||
|
this.nameLabel.Name = "nameLabel";
|
||||||
|
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.nameLabel.TabIndex = 4;
|
||||||
|
this.nameLabel.Text = "Name";
|
||||||
|
//
|
||||||
|
// classNameLabel
|
||||||
|
//
|
||||||
|
this.classNameLabel.AutoSize = true;
|
||||||
|
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||||
|
this.classNameLabel.Name = "classNameLabel";
|
||||||
|
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||||
|
this.classNameLabel.TabIndex = 3;
|
||||||
|
this.classNameLabel.Text = "ComonentName";
|
||||||
|
//
|
||||||
|
// BasicPrinterCfgCtrl
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.nameTextBox);
|
||||||
|
this.Controls.Add(this.nameLabel);
|
||||||
|
this.Controls.Add(this.classNameLabel);
|
||||||
|
this.Name = "BasicPrinterCfgCtrl";
|
||||||
|
this.Size = new System.Drawing.Size(300, 200);
|
||||||
|
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox nameTextBox;
|
||||||
|
private System.Windows.Forms.Label nameLabel;
|
||||||
|
private System.Windows.Forms.Label classNameLabel;
|
||||||
|
}
|
||||||
|
}
|
||||||
+120
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,197 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
using Config.Entities;
|
||||||
|
using TBF.BenchControl.Generic;
|
||||||
|
using TBF.Resources;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.HeatMeters
|
||||||
|
{
|
||||||
|
public class TestParams : TestParamsBase, IParamsProvider, ITestParams
|
||||||
|
{
|
||||||
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestParams) })[0];
|
||||||
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||||
|
|
||||||
|
public float ErrorLimitLo; /// [%]
|
||||||
|
public float ErrorLimitHi; /// [%]
|
||||||
|
public bool EvaluateVolume; /// true = evaluate also the volume, false = evaluate only energy
|
||||||
|
public float TempWarmLo; /// Low limit for warm temperature [°C]
|
||||||
|
public float TempWarmHi; /// High limit for warm temperature [°C]
|
||||||
|
public float TempColdLo; /// Low limit for cold temperature [°C]
|
||||||
|
public float TempColdHi; /// High limit for cold temperature [°C]
|
||||||
|
public bool FlowMeasuredAtHiTempPipe; /// true = flow measured at high temp. pipe, false = flow measured at low temp. pipe
|
||||||
|
public float DeltaTempWarm;
|
||||||
|
public float DeltaTempCold;
|
||||||
|
public float ChangeInTimeWarm;
|
||||||
|
public float ChangeInTimeCold;
|
||||||
|
public string Prompt;
|
||||||
|
|
||||||
|
public override void InitializeAll()
|
||||||
|
{
|
||||||
|
FlowMeasuredAtHiTempPipe = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string[] paramNames = new string[]
|
||||||
|
{
|
||||||
|
Strings.Err_limit_neg_pct_chdr,
|
||||||
|
Strings.Err_limit_pos_pct_chdr,
|
||||||
|
Strings.Evaluate_volume,
|
||||||
|
"T hi min",
|
||||||
|
"T hi max",
|
||||||
|
"T lo min",
|
||||||
|
"T lo max",
|
||||||
|
"Flow measured at high temp.pipe",
|
||||||
|
"Delta T warm",
|
||||||
|
"Delta T cold",
|
||||||
|
"Change in time T warm",
|
||||||
|
"Change in time T cold",
|
||||||
|
Strings.Prompt,
|
||||||
|
};
|
||||||
|
public override string ParamName(int i) { return paramNames[i]; }
|
||||||
|
public override int ParamsCount() { return paramNames.Length; }
|
||||||
|
|
||||||
|
public override string ToString(int i)
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0: return ErrorLimitLo.ToString();
|
||||||
|
case 1: return ErrorLimitHi.ToString();
|
||||||
|
case 2: return (EvaluateVolume ? Strings.yes : Strings.no);
|
||||||
|
case 3: return TempWarmLo.ToString();
|
||||||
|
case 4: return TempWarmHi.ToString();
|
||||||
|
case 5: return TempColdLo.ToString();
|
||||||
|
case 6: return TempColdHi.ToString();
|
||||||
|
case 7: return (FlowMeasuredAtHiTempPipe ? Strings.yes : Strings.no);
|
||||||
|
case 8: return DeltaTempWarm.ToString();
|
||||||
|
case 9: return DeltaTempCold.ToString();
|
||||||
|
case 10: return ChangeInTimeWarm.ToString();
|
||||||
|
case 11: return ChangeInTimeCold.ToString();
|
||||||
|
case 12: return Prompt;
|
||||||
|
default: return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0: ErrorLimitLo = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 1: ErrorLimitHi = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 2: EvaluateVolume = strValue.Equals(Strings.yes); return CfgUpdateFlags.None;
|
||||||
|
case 3: TempWarmLo = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 4: TempWarmHi = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 5: TempColdLo = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 6: TempColdHi = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 7: FlowMeasuredAtHiTempPipe = strValue.Equals(Strings.yes); return CfgUpdateFlags.None;
|
||||||
|
case 8: DeltaTempWarm = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 9: DeltaTempCold = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 10: ChangeInTimeWarm = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 11: ChangeInTimeCold = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||||
|
case 12: Prompt = strValue; return CfgUpdateFlags.None;
|
||||||
|
default: return CfgUpdateFlags.None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ValidateParam(int i, string strValue, out string message)
|
||||||
|
{
|
||||||
|
message = string.Empty;
|
||||||
|
float dummy;
|
||||||
|
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
if (Utils.TryParseSFloat(strValue, out dummy)) return true;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 7:
|
||||||
|
if (strValue.Equals(Strings.yes) || strValue.Equals(Strings.no)) return true;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
case 9:
|
||||||
|
case 10:
|
||||||
|
case 11:
|
||||||
|
if (Utils.TryParseUFloat(strValue, out dummy)) return true;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
message = "Invalid index";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
message = ParamName(i) + " is invalid";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CopyContentTo(TestParams prms)
|
||||||
|
{
|
||||||
|
prms.ErrorLimitLo = ErrorLimitLo;
|
||||||
|
prms.ErrorLimitHi = ErrorLimitHi;
|
||||||
|
prms.EvaluateVolume = EvaluateVolume;
|
||||||
|
prms.TempWarmLo = TempWarmLo;
|
||||||
|
prms.TempWarmHi = TempWarmHi;
|
||||||
|
prms.TempColdLo = TempColdLo;
|
||||||
|
prms.TempColdHi = TempColdHi;
|
||||||
|
prms.FlowMeasuredAtHiTempPipe = FlowMeasuredAtHiTempPipe;
|
||||||
|
prms.DeltaTempWarm = DeltaTempWarm;
|
||||||
|
prms.DeltaTempCold = DeltaTempCold;
|
||||||
|
prms.ChangeInTimeWarm = ChangeInTimeWarm;
|
||||||
|
prms.ChangeInTimeCold = ChangeInTimeCold;
|
||||||
|
prms.Prompt = Prompt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IParamsProvider Clone()
|
||||||
|
{
|
||||||
|
TestParams pars = new TestParams();
|
||||||
|
CopyContentTo(pars);
|
||||||
|
return pars;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateFromDbEntity(ComponentTest dbEntity)
|
||||||
|
{
|
||||||
|
if (dbEntity == null) return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TestParams tmp = Serializer.Deserialize(new StringReader(dbEntity.Parameters)) as TestParams;
|
||||||
|
|
||||||
|
testParamsEntity = dbEntity;
|
||||||
|
componentName = dbEntity.CmpntName;
|
||||||
|
test = dbEntity.Test;
|
||||||
|
|
||||||
|
if (tmp != null) tmp.CopyContentTo(this);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Parameterless constructor initializes the parameters
|
||||||
|
/// </summary>
|
||||||
|
public TestParams()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public TestParams(bool initialize)
|
||||||
|
{
|
||||||
|
if (initialize) InitializeAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public TestParams(ComponentTest testParamsEntity, string componentName, Test test)
|
||||||
|
{
|
||||||
|
this.testParamsEntity = testParamsEntity;
|
||||||
|
this.componentName = componentName;
|
||||||
|
this.test = test;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using log4net;
|
||||||
|
using Config.Entities;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.Single
|
||||||
|
{
|
||||||
|
public class Component : ComponentBase, GenericDevices.ITestMethod
|
||||||
|
{
|
||||||
|
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
||||||
|
public bool DoTransitions() { return true; }
|
||||||
|
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
||||||
|
{
|
||||||
|
return FixedStartMassCollAdvancedSeq.CheckDeviceCaps(test, devices, out message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Component() { }
|
||||||
|
///
|
||||||
|
public Component(Generic.IComponentCfg cfg)
|
||||||
|
: base(cfg)
|
||||||
|
{
|
||||||
|
log.Debug(this.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||||
|
{
|
||||||
|
return (new FixedStartMassCollAdvancedSeq()).Execute(test, repetNr, isLastRepetition, false, null, DebugLevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TBF.BenchControl.Generic;
|
||||||
|
using TBF.BenchControl.Configs.NameOnly;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FixedStartMassCollAdvanced.Single
|
||||||
|
{
|
||||||
|
public class Factory : IComponentFactory
|
||||||
|
{
|
||||||
|
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||||
|
|
||||||
|
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
|
||||||
|
|
||||||
|
public IComponent DummyComponent() { return new Component(); }
|
||||||
|
|
||||||
|
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||||
|
|
||||||
|
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(29).Replace(".Single", ""), this); }
|
||||||
|
|
||||||
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||||
|
{
|
||||||
|
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
-14
@@ -134,21 +134,21 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if (eldeRR != null && eldeRR.Position >= 1 && eldeRR.Position <= 8)
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if (eldeRR != null && eldeRR.Position >= 1 && eldeRR.Position <= 8)
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -699,7 +699,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
||||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||||
|
|||||||
+21
-32
@@ -110,21 +110,21 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -653,33 +653,23 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
StartTime = (double)StateMachine.Time;
|
||||||
|
TestStartTime = DateTime.Now;
|
||||||
|
|
||||||
|
State.Create(string.Format("{0}({1}) : Start the test, open the start/stop valve", test.Method, test.Name))
|
||||||
.AddOperation(checkUiOp)
|
.AddOperation(checkUiOp)
|
||||||
.AddOperations(readTempPressOps)
|
.AddOperations(readTempPressOps)
|
||||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||||
.AddOperation(cBrd.StartTestOp(test))
|
.AddOperation(cBrd.StartTestOp(test))
|
||||||
|
.AddOperation(cBrd.OpenStartValveOp())
|
||||||
.EnterState();
|
.EnterState();
|
||||||
do {
|
do
|
||||||
|
{
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
}
|
}
|
||||||
while (!e.Contains(Event.MeasurementStarted));
|
while (!e.Contains(Event.ValvesSet) && !e.Contains(Event.MeasurementStarted));
|
||||||
|
|
||||||
StartTime = (double)StateMachine.Time;
|
|
||||||
TestStartTime = DateTime.Now;
|
|
||||||
|
|
||||||
State.Create(string.Format("{0}({1}) : Opening the start/stop valve at the beginning of the fixed start test", test.Method, test.Name))
|
|
||||||
.AddOperation(checkUiOp)
|
|
||||||
.AddOperations(readTempPressOps)
|
|
||||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
|
||||||
.AddOperation(cBrd.OpenStartValveOp())
|
|
||||||
.EnterState();
|
|
||||||
do {
|
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
|
||||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
|
||||||
}
|
|
||||||
while (!e.Contains(Event.ValvesSet));
|
|
||||||
|
|
||||||
switchTimeStart = 0.001f * cBrd.ValveOpenCloseTime;
|
switchTimeStart = 0.001f * cBrd.ValveOpenCloseTime;
|
||||||
log.WarnFormat("Start valve switch time on test start = {0} ms", cBrd.ValveOpenCloseTime);
|
log.WarnFormat("Start valve switch time on test start = {0} ms", cBrd.ValveOpenCloseTime);
|
||||||
@@ -687,7 +677,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
||||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||||
|
|||||||
+13
-14
@@ -115,21 +115,21 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if (eldeRR != null && eldeRR.Position >= 1 && eldeRR.Position <= 8)
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if (eldeRR != null && eldeRR.Position >= 1 && eldeRR.Position <= 8)
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -514,7 +514,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, Math.Max((int)(test.TstTime / 10), 5));
|
||||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using log4net;
|
||||||
|
using Config.Entities;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FlowAdjustment
|
||||||
|
{
|
||||||
|
public class Component : ComponentBase, GenericDevices.ITestMethod
|
||||||
|
{
|
||||||
|
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
||||||
|
public bool DoTransitions() { return true; }
|
||||||
|
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
||||||
|
{
|
||||||
|
return FlowAdjustmentSeq.CheckDeviceCaps(test, devices, out message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Component() { }
|
||||||
|
///
|
||||||
|
public Component(Generic.IComponentCfg cfg)
|
||||||
|
: base(cfg)
|
||||||
|
{
|
||||||
|
log.Debug(this.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||||
|
{
|
||||||
|
return (new FlowAdjustmentSeq()).Execute(test, repetNr, isLastRepetition, DebugLevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TBF.BenchControl.Generic;
|
||||||
|
using TBF.BenchControl.Configs.NameOnly;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FlowAdjustment
|
||||||
|
{
|
||||||
|
public class Factory : IComponentFactory
|
||||||
|
{
|
||||||
|
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||||
|
|
||||||
|
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
|
||||||
|
|
||||||
|
public IComponent DummyComponent() { return new Component(); }
|
||||||
|
|
||||||
|
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||||
|
|
||||||
|
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(29), this); }
|
||||||
|
|
||||||
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||||
|
{
|
||||||
|
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,453 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using log4net;
|
||||||
|
using TBF.BenchControl;
|
||||||
|
using TBF.Boxes;
|
||||||
|
using TBF.Resources;
|
||||||
|
using TBF.UiBridge;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.TestMethods.FlowAdjustment
|
||||||
|
{
|
||||||
|
public class FlowAdjustmentSeq : Sequences.SequenceBase
|
||||||
|
{
|
||||||
|
private static readonly ILog log = LogManager.GetLogger(typeof(FlowAdjustmentSeq));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Check capabilities of devces in the output path required for this test method
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="devices">Devices</param>
|
||||||
|
/// <returns>true when capabilities of devices are OK</returns>
|
||||||
|
public static bool CheckDeviceCaps(Config.Entities.Test test, OutputPath devices, out string message)
|
||||||
|
{
|
||||||
|
if (!(StateMachine.ControlBoard is ControlBoard.Legacy.ControlBoardDev) &&
|
||||||
|
!(StateMachine.ControlBoard is ControlBoard.Papouch.CBoard) &&
|
||||||
|
!(StateMachine.ControlBoard is ControlBoard.New.CBoard))
|
||||||
|
{
|
||||||
|
/// Control board does not support this method
|
||||||
|
message = string.Format("{0}: {1}", test.Name, Strings.Test_bench_does_not_suport_selected_test_method);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(devices.FlowMeter is TBF.BenchControl.GenericDevices.IFlowMeter))
|
||||||
|
{
|
||||||
|
/// Flow meter is missing
|
||||||
|
message = string.Format("{0}: {1}", test.Name, Strings.Missing_a_flow_meter);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(devices.RegulValve is GenericDevices.IRegulValve))
|
||||||
|
{
|
||||||
|
/// Regulation valve is missing
|
||||||
|
message = string.Format("{0}: {1}", test.Name, Strings.Missing_a_regulation_valve);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
message = string.Empty;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Flying start mass collection method sequence
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="test">Test entity</param>
|
||||||
|
/// <returns>
|
||||||
|
/// Event.Done . . . . . . . OK
|
||||||
|
/// Event.UiCmdStop . . . . Stopped by the user using the on-screen button STOP
|
||||||
|
/// Event.OpArgumentError . Target flow is out of range
|
||||||
|
/// Event.Error . . . . . . Unspecified error
|
||||||
|
/// </returns>
|
||||||
|
public IList<Event> Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, Config.Entities.DebugMode debugLevel)
|
||||||
|
{
|
||||||
|
if (debugLevel == Config.Entities.DebugMode.Simulate)
|
||||||
|
{
|
||||||
|
return Simulate(test, repetitionNr, isLastRepetition, debugLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
ControlBoard.IControlBoard cBrd = StateMachine.ControlBoard;
|
||||||
|
|
||||||
|
int rangeIx = 0; /// Default range, used for non-Elde flowmeters
|
||||||
|
if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter)
|
||||||
|
{
|
||||||
|
Elde.FlowMeter.FlowMeter eldeFM = outPath.FlowMeter as Elde.FlowMeter.FlowMeter;
|
||||||
|
rangeIx = -1; /// Indicates invalid range
|
||||||
|
for (int r = 0; r <= 5; r++)
|
||||||
|
{
|
||||||
|
if (eldeFM.RangeEnabled(r) && eldeFM.GetTempLo(r) <= test.TempLimLo
|
||||||
|
&& eldeFM.GetTempHi(r) >= test.TempLimHi)
|
||||||
|
{
|
||||||
|
rangeIx = r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rangeIx == -1)
|
||||||
|
{
|
||||||
|
Bridge.OnError(this, Strings.Flow_meter_temperature_range_does_not_fit_this_test_conditions);
|
||||||
|
return new List<Event> { Event.ConfigurationError };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
IList<Event> e; /// Events from currently running operations
|
||||||
|
Event retVal = Event.Done;
|
||||||
|
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||||
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
IList<IOperation> readTempPressOps = new List<IOperation>();
|
||||||
|
if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp));
|
||||||
|
if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown));
|
||||||
|
if (benchPath.PressMtrUp != null) readTempPressOps.Add(benchPath.PressMtrUp.ReadPressureOp(ref PressUp));
|
||||||
|
if (benchPath.PressMtrDown != null) readTempPressOps.Add(benchPath.PressMtrDown.ReadPressureOp(ref PressDown));
|
||||||
|
if (benchPath.PressMtrDelta != null) readTempPressOps.Add(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta));
|
||||||
|
if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1));
|
||||||
|
if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2));
|
||||||
|
if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1));
|
||||||
|
if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2));
|
||||||
|
|
||||||
|
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
|
||||||
|
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||||
|
|
||||||
|
//====================================
|
||||||
|
loop:
|
||||||
|
/// Read pressure and temperature once before calling Bridge.OnTestSelected(...)
|
||||||
|
State.Create(string.Format("{0}({1}) : Measuring process data", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
}
|
||||||
|
while (e.Contains(Event.Busy));
|
||||||
|
|
||||||
|
/// Start the test, initialize test results
|
||||||
|
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath));
|
||||||
|
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||||
|
TestStartTime = DateTime.Now;
|
||||||
|
|
||||||
|
//------------------------------------------------
|
||||||
|
Bridge.OnActivity(this, Strings.Starting_the_pump);
|
||||||
|
//------------------------------------------------
|
||||||
|
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||||
|
///
|
||||||
|
State.Create(string.Format("{0}({1}) : Starting the pump", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
//.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||||
|
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||||
|
}
|
||||||
|
while (e.Contains(Event.ValvesBusy) /* || !e.Contains(Event.AllPositionsReached)*/);
|
||||||
|
|
||||||
|
|
||||||
|
if (test.TimePump2StartV > 0)
|
||||||
|
{
|
||||||
|
State.Create(string.Format("{0}({1}) : Waiting after the pump started", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(new Operations.TimerOp(test.TimePump2StartV))
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.TimerExpired));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (benchPath.StopBFValve != null)
|
||||||
|
{
|
||||||
|
State.Create(string.Format("{0}({1}) : Opening the stop backflow valve", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(cBrd.SetValvesOp(benchPath.StopBFValve, null))
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.ValvesSet));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (test.TimeBeforeFlow > 0)
|
||||||
|
{
|
||||||
|
State.Create(string.Format("{0}({1}) : Waiting before flow setting process starts", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(new Operations.TimerOp(test.TimeBeforeFlow))
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.TimerExpired));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//------------------------------------------------
|
||||||
|
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
||||||
|
//------------------------------------------------
|
||||||
|
TestStartTime = DateTime.Now;
|
||||||
|
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(cBrd.SetFlowOp(test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
|
||||||
|
if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; }
|
||||||
|
if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
if (e.Contains(Event.RegulValveTimeOut))
|
||||||
|
{
|
||||||
|
Bridge.OnError(this, Strings.Flow_adjustment_failed);
|
||||||
|
retVal = Event.RecoverableError;
|
||||||
|
goto stopTest;
|
||||||
|
}
|
||||||
|
if (e.Contains(Event.Next)) goto flow_set;
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.FlowReached));
|
||||||
|
|
||||||
|
flow_set:
|
||||||
|
|
||||||
|
TestEndTime = DateTime.Now;
|
||||||
|
double currentFlow = RefFlow.Val;
|
||||||
|
|
||||||
|
if (test.DoControlWaterTemp && benchPath.TempMtrUp != null && benchPath.TempMtrDown != null)
|
||||||
|
{
|
||||||
|
//---------------------------------------------------
|
||||||
|
Bridge.OnActivity(this, Strings.Setting_temperature);
|
||||||
|
//---------------------------------------------------
|
||||||
|
|
||||||
|
State.Create(string.Format("{0}({1}) : Wait until the water temperature is within limits", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
if (e.Contains(Event.Next)) goto temperature_set;
|
||||||
|
|
||||||
|
if ((test.TempLimLo <= TempUp.Val) && (TempUp.Val <= test.TempLimHi) &&
|
||||||
|
(test.TempLimLo <= TempDown.Val) && (TempDown.Val <= test.TempLimHi))
|
||||||
|
{
|
||||||
|
goto temperature_set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (true);
|
||||||
|
}
|
||||||
|
|
||||||
|
temperature_set:
|
||||||
|
|
||||||
|
StopRecordingStatistics();
|
||||||
|
|
||||||
|
//------------------------------------------------
|
||||||
|
Bridge.OnActivity(this, Strings.Test_completed);
|
||||||
|
//------------------------------------------------
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Populate TestResult data entity with data
|
||||||
|
///
|
||||||
|
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
|
||||||
|
|
||||||
|
if (tstRslt != null)
|
||||||
|
{
|
||||||
|
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
|
||||||
|
UpdateTempPressDensAmb(tstRslt);
|
||||||
|
|
||||||
|
/// Main results
|
||||||
|
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||||
|
tstRslt.StartTime = TestStartTime;
|
||||||
|
tstRslt.EndTime = TestEndTime;
|
||||||
|
TimeSpan duration = TestEndTime - TestStartTime;
|
||||||
|
tstRslt.TestTime = duration.TotalSeconds;
|
||||||
|
tstRslt.FlowSetTime = Convert.ToInt32(Math.Round(tstRslt.TestTime)); /// [s] test time = flow set time
|
||||||
|
tstRslt.PulsesMaster = 0;
|
||||||
|
tstRslt.MassStartRaw = 0;
|
||||||
|
tstRslt.MassStart = 0;
|
||||||
|
tstRslt.MassEndRaw = 0;
|
||||||
|
tstRslt.MassEnd = 0;
|
||||||
|
tstRslt.FlowMass = 0;
|
||||||
|
tstRslt.FlowVolume = 0;
|
||||||
|
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
|
||||||
|
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||||
|
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||||
|
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
|
||||||
|
tstRslt.ConstMaster = tstRslt.ConstMasterCorr;
|
||||||
|
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
|
||||||
|
tstRslt.ErrorMaster = 0.0; /// Cannot be determined without a mass measurement
|
||||||
|
|
||||||
|
tstRslt.FlowMean = (float)RefFlowStat.Average;
|
||||||
|
tstRslt.FlowStart = (float)RefFlowStat.First;
|
||||||
|
tstRslt.FlowEnd = (float)RefFlowStat.Last;
|
||||||
|
tstRslt.FlowMin = (float)RefFlowStat.Min;
|
||||||
|
tstRslt.FlowMax = (float)RefFlowStat.Max;
|
||||||
|
|
||||||
|
tstRslt.DiverterStart = 0;
|
||||||
|
tstRslt.DiverterEnd = 0;
|
||||||
|
long infoFlags = 0;
|
||||||
|
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
|
||||||
|
tstRslt.InfoFlags = infoFlags;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Single meters
|
||||||
|
///
|
||||||
|
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||||
|
{
|
||||||
|
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||||
|
|
||||||
|
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||||
|
|
||||||
|
if (meterRslt != null)
|
||||||
|
{
|
||||||
|
meterRslt.Passed = true;
|
||||||
|
meterRslt.TestDone = true;
|
||||||
|
tstRslt.TestDone = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tstRslt.Components = Results.Entities.Components
|
||||||
|
.UpdateList(BatchRslts.ComponentsList,
|
||||||
|
new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1,
|
||||||
|
(BenchInfo != null) ? BenchInfo.TestBenchName : "testbench",
|
||||||
|
inPath.Pump != null ? inPath.Pump.Name : string.Empty,
|
||||||
|
outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty,
|
||||||
|
string.Empty,
|
||||||
|
outPath.RegulValve != null ? outPath.RegulValve.Name : string.Empty,
|
||||||
|
outPath.Diverter != null ? outPath.Diverter.Name : string.Empty));
|
||||||
|
|
||||||
|
/// Update water meter error flags
|
||||||
|
if (ErrorFlagsComp != null)
|
||||||
|
{
|
||||||
|
if (BatchRslts.Batch != null && BatchRslts.Batch.WaterMeters != null)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||||
|
{
|
||||||
|
if (BatchRslts.Batch.WaterMeters[i] != null && !BatchRslts.Batch.WaterMeters[i].Disabled)
|
||||||
|
{
|
||||||
|
long wmInfoFlags;
|
||||||
|
BatchRslts.Batch.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.Batch.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||||
|
BatchRslts.Batch.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Update results
|
||||||
|
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, tstRslt));
|
||||||
|
}
|
||||||
|
|
||||||
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter));
|
||||||
|
|
||||||
|
/// Append the results to the CSV-file
|
||||||
|
allResults.Info(TestResult2CsvLine(testName, test.Part));
|
||||||
|
|
||||||
|
|
||||||
|
stopTest:
|
||||||
|
|
||||||
|
StopRecordingStatistics();
|
||||||
|
|
||||||
|
State.Create(string.Format("{0}({1}) : Stopping flow regulation", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(cBrd.StopFlowRegulationOp())
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
if (e.Contains(Event.Error)) { retVal = Event.Error; break; }
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.FlowRegulationStopped));
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Quit this sequence
|
||||||
|
///
|
||||||
|
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|
||||||
|
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|
||||||
|
{
|
||||||
|
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperation(cBrd.StopPreviousOp())
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { if (retVal == Event.Done) retVal = Event.UiCmdStop; break; }
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.PreviousStopped));
|
||||||
|
}
|
||||||
|
|
||||||
|
stopTestWOStoppingDivGateEtc:
|
||||||
|
|
||||||
|
return new List<Event> { retVal };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
IList<Event> Simulate(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, Config.Entities.DebugMode debugLevel)
|
||||||
|
{
|
||||||
|
///
|
||||||
|
/// Test method simulation
|
||||||
|
///
|
||||||
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||||
|
if (test.Name.ToLower().Contains("q3")) MakeSimulated(test, 1, 0, -0.5f);
|
||||||
|
else if (test.Name.ToLower().Contains("q2")) MakeSimulated(test, 1, 0, 0.5f);
|
||||||
|
else if (test.Name.ToLower().Contains("q1")) MakeSimulated(test, 1, 0, -5.1f);
|
||||||
|
else MakeSimulated(test, 1, 0, 0.9f);
|
||||||
|
|
||||||
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Completed));
|
||||||
|
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||||
|
allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file
|
||||||
|
|
||||||
|
//------------------------------------------------------------------
|
||||||
|
Bridge.OnActivity(this, string.Format("{0} simulation", test.Name));
|
||||||
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
|
State.Create(string.Format("{0}({1}) : Simulating {0}", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.EnterState();
|
||||||
|
IList<Event> e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
|
||||||
|
return new List<Event> { TestAndLogUiCmdStop(test, e) ? Event.UiCmdStop : Event.Done };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
-13
@@ -131,21 +131,21 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-13
@@ -151,21 +151,21 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-13
@@ -126,23 +126,23 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
|||||||
int tMass2 = 0;
|
int tMass2 = 0;
|
||||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-13
@@ -127,21 +127,21 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-13
@@ -134,21 +134,21 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,21 +85,21 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,7 +352,6 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -86,21 +86,21 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,7 +354,6 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
|
|||||||
/// Measurement loop - preparation
|
/// Measurement loop - preparation
|
||||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
|
||||||
|
|
||||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -26,21 +26,21 @@ namespace TBF.BenchControl.TestMethods.RoiDetection
|
|||||||
processDataLoggingOp = null;
|
processDataLoggingOp = null;
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,21 +65,21 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
|||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||||
|
|
||||||
|
|
||||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
||||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
|
||||||
{
|
|
||||||
foreach (var rr in sensPath.RegisterReaders)
|
|
||||||
{
|
|
||||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
|
||||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
|
||||||
{
|
|
||||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
|
||||||
{
|
{
|
||||||
|
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||||
|
{
|
||||||
|
foreach (var rr in sensPath.RegisterReaders)
|
||||||
|
{
|
||||||
|
TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||||
|
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||||
|
{
|
||||||
|
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("3.1.1470.0")]
|
[assembly: AssemblyVersion("3.1.1471.0")]
|
||||||
[assembly: AssemblyFileVersion("3.1.1470.0")]
|
[assembly: AssemblyFileVersion("3.1.1471.0")]
|
||||||
|
|||||||
@@ -1303,6 +1303,21 @@
|
|||||||
<Compile Include="BenchControl\TestMethods\FixedStartDeferredEval\IntermediateData.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStartDeferredEval\IntermediateData.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FixedStartDeferredEval\Single\Component.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStartDeferredEval\Single\Component.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FixedStartDeferredEval\Single\Factory.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStartDeferredEval\Single\Factory.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\Compound\Component.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\Compound\Factory.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\FixedStartMassCollAdvancedSeq.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\HeatMeters\Component.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\HeatMeters\Factory.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\HeatMeters\TestMethodCfg.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\HeatMeters\TestMethodCfgCtrl.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\HeatMeters\TestMethodCfgCtrl.designer.cs">
|
||||||
|
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\HeatMeters\TestParams.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\Single\Component.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\Single\Factory.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FixedStartMassCollDeferredEval\Compound\Component.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollDeferredEval\Compound\Component.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FixedStartMassCollDeferredEval\Compound\Factory.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollDeferredEval\Compound\Factory.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FixedStartMassCollDeferredEval\FixedStartMassCollDeferredEvalSeq.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStartMassCollDeferredEval\FixedStartMassCollDeferredEvalSeq.cs" />
|
||||||
@@ -1369,6 +1384,9 @@
|
|||||||
<Compile Include="BenchControl\TestMethods\FixedStart\HeatMeters\TestParams.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStart\HeatMeters\TestParams.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FixedStart\Single\Component.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStart\Single\Component.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FixedStart\Single\Factory.cs" />
|
<Compile Include="BenchControl\TestMethods\FixedStart\Single\Factory.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FlowAdjustment\Component.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FlowAdjustment\Factory.cs" />
|
||||||
|
<Compile Include="BenchControl\TestMethods\FlowAdjustment\FlowAdjustmentSeq.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FlyingStartFirstRepetWithMassColl\Compound\Component.cs" />
|
<Compile Include="BenchControl\TestMethods\FlyingStartFirstRepetWithMassColl\Compound\Component.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FlyingStartFirstRepetWithMassColl\Compound\Factory.cs" />
|
<Compile Include="BenchControl\TestMethods\FlyingStartFirstRepetWithMassColl\Compound\Factory.cs" />
|
||||||
<Compile Include="BenchControl\TestMethods\FlyingStartFirstRepetWithMassColl\Compound\TestMethodCfg.cs" />
|
<Compile Include="BenchControl\TestMethods\FlyingStartFirstRepetWithMassColl\Compound\TestMethodCfg.cs" />
|
||||||
@@ -3064,6 +3082,9 @@
|
|||||||
<EmbeddedResource Include="BenchControl\TestMethods\FixedStartDeferredEval\HeatMeters\TestMethodCfgCtrl.resx">
|
<EmbeddedResource Include="BenchControl\TestMethods\FixedStartDeferredEval\HeatMeters\TestMethodCfgCtrl.resx">
|
||||||
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
|
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="BenchControl\TestMethods\FixedStartMassCollAdvanced\HeatMeters\TestMethodCfgCtrl.resx">
|
||||||
|
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="BenchControl\TestMethods\FixedStartMassCollDeferredEval\HeatMeters\TestMethodCfgCtrl.resx">
|
<EmbeddedResource Include="BenchControl\TestMethods\FixedStartMassCollDeferredEval\HeatMeters\TestMethodCfgCtrl.resx">
|
||||||
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
|
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
Reference in New Issue
Block a user