TBF : (1) Elde.RegisterReader has a new proc. parameter int Filter, (2) Filters 'int[]' are passed everywhere in the TBF application istead of test.TolerRed.
This commit is contained in:
parent
58df07300e
commit
bf69524fd8
@ -168,7 +168,7 @@ namespace TBF.BenchControl.Elde
|
||||
int totalRefPulses;
|
||||
int massRefPulses;
|
||||
TestMethods testMethods;
|
||||
float filterConstant;
|
||||
int[] filters;
|
||||
float[] FMFreq;
|
||||
int regConst;
|
||||
int shortImp;
|
||||
@ -420,7 +420,7 @@ namespace TBF.BenchControl.Elde
|
||||
this.testMethods = 0;
|
||||
this.stopDevs = 0;
|
||||
}
|
||||
this.filterConstant = 0;
|
||||
this.filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, };
|
||||
this.regConst = 0;
|
||||
this.shortImp = 0;
|
||||
}
|
||||
@ -430,13 +430,18 @@ namespace TBF.BenchControl.Elde
|
||||
{
|
||||
if (DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
uint filter = Convert.ToUInt32(filterConstant);
|
||||
uint[] uintFilters = new uint[8];
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
uintFilters[i] = (filters.Length > i) ? (uint)filters[i] : uintFilters[i - 1];
|
||||
}
|
||||
|
||||
///
|
||||
if (sendCommandFlag)
|
||||
{
|
||||
controlCom.SendCommand(cmd, refNr, (benchModelRoute & routeMask),
|
||||
totalRefPulses, massRefPulses, testMethods,
|
||||
new uint[] { filter, filter, filter, filter, filter, filter, filter, filter },
|
||||
uintFilters,
|
||||
FMFreq, regConst, shortImp, stopDevs);
|
||||
}
|
||||
|
||||
@ -470,7 +475,7 @@ namespace TBF.BenchControl.Elde
|
||||
/// <param name="stopDevs">What to stop</param>
|
||||
public void SendCommand(Command cmd, int refFlowmtrNr, UInt128 route,
|
||||
int totalRefPulses, int massRefPulses, TestMethods testMethods,
|
||||
float filterConstant, int regConst, int shortImp, StopDevs stopDevs)
|
||||
int[] filters, int regConst, int shortImp, StopDevs stopDevs)
|
||||
{
|
||||
this.cmd = cmd;
|
||||
this.refNr = refFlowmtrNr;
|
||||
@ -478,7 +483,7 @@ namespace TBF.BenchControl.Elde
|
||||
this.totalRefPulses = totalRefPulses;
|
||||
this.massRefPulses = massRefPulses;
|
||||
this.testMethods = testMethods;
|
||||
this.filterConstant = filterConstant;
|
||||
this.filters = filters;
|
||||
this.regConst = regConst;
|
||||
this.shortImp = shortImp;
|
||||
this.stopDevs = stopDevs;
|
||||
@ -561,7 +566,7 @@ namespace TBF.BenchControl.Elde
|
||||
/// <returns>Created operation</returns>
|
||||
public IOperation StartMeasurementOp(OutputPath outputPath, TestMethods method,
|
||||
float requiredFlowLo, float requiredFlowHi,
|
||||
int refPulses, float filterConstant)
|
||||
int refPulses, int[] filterConstants)
|
||||
{
|
||||
if (controlBoardCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
@ -570,7 +575,7 @@ namespace TBF.BenchControl.Elde
|
||||
else
|
||||
{
|
||||
return new StartMeasurementOp(this, outputPath, method, requiredFlowLo, requiredFlowHi,
|
||||
refPulses, filterConstant);
|
||||
refPulses, filterConstants);
|
||||
}
|
||||
}
|
||||
|
||||
@ -584,7 +589,7 @@ namespace TBF.BenchControl.Elde
|
||||
/// <returns>Created operation</returns>
|
||||
public IOperation StartProlongedMeasurementOp(OutputPath outputPath, TestMethods method,
|
||||
float requiredFlowLo, float requiredFlowHi,
|
||||
int totalRefPulses, int massRefPulses, float filterConstant)
|
||||
int totalRefPulses, int massRefPulses, int[] filters)
|
||||
{
|
||||
if (controlBoardCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
@ -593,7 +598,7 @@ namespace TBF.BenchControl.Elde
|
||||
else
|
||||
{
|
||||
return new StartMeasurementOp(this, outputPath, method, requiredFlowLo, requiredFlowHi,
|
||||
totalRefPulses, massRefPulses, filterConstant);
|
||||
totalRefPulses, massRefPulses, filters);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ namespace TBF.BenchControl.Elde
|
||||
public void Start()
|
||||
{
|
||||
controlBoard.SyncRoute();
|
||||
controlBoard.SendCommand(commandOnStartOp, 0, controlBoard.Route, 0, 0, testMethod, 0, 20, 0, StopDevs.None);
|
||||
controlBoard.SendCommand(commandOnStartOp, 0, controlBoard.Route, 0, 0, testMethod, new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, 20, 0, StopDevs.None);
|
||||
opState = OpState.StartingCommand;
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ namespace TBF.BenchControl.Elde
|
||||
if (commandOnStopOp != Command.None)
|
||||
{
|
||||
controlBoard.SyncRoute();
|
||||
controlBoard.SendCommand(commandOnStopOp, 0, controlBoard.Route, 0, 0, testMethod, 0, 20, 0, StopDevs.None);
|
||||
controlBoard.SendCommand(commandOnStopOp, 0, controlBoard.Route, 0, 0, testMethod, new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, 20, 0, StopDevs.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ namespace TBF.BenchControl.Elde
|
||||
void SendCommand()
|
||||
{
|
||||
controlBoard.SyncRoute();
|
||||
controlBoard.SendCommand(Command.ReadDivTransition, 0, controlBoard.Route, 0, 0, 0, 0, 0, 0, StopDevs.None);
|
||||
controlBoard.SendCommand(Command.ReadDivTransition, 0, controlBoard.Route, 0, 0, 0, new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 0, StopDevs.None);
|
||||
cmdSent = true;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
@ -17,15 +17,18 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public double PulsesPerLtr; /// [l^-1]
|
||||
public int Filter;
|
||||
|
||||
public override void InitializeAll()
|
||||
{
|
||||
PulsesPerLtr = 1.0;
|
||||
Filter = 0;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
Strings.PulsesPerLtr,
|
||||
Strings.Filter,
|
||||
};
|
||||
public override string ParamName(int i) { return paramNames[i]; }
|
||||
public override int ParamsCount() { return paramNames.Length; }
|
||||
@ -35,6 +38,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
switch (i)
|
||||
{
|
||||
case 0: return PulsesPerLtr.ToString();
|
||||
case 1: return Filter.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@ -45,6 +49,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
switch (i)
|
||||
{
|
||||
case 0: PulsesPerLtr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.None;
|
||||
case 1: Filter = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
@ -55,11 +60,17 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
message = string.Empty;
|
||||
|
||||
double dummy;
|
||||
int idummy;
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
if (Utils.TryParseUDouble(strValue, out dummy)) return true;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
|
||||
break;
|
||||
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
@ -72,6 +83,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
void CopyContentTo(RRProcedureParams prms)
|
||||
{
|
||||
prms.PulsesPerLtr = this.PulsesPerLtr;
|
||||
prms.Filter = this.Filter;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
|
||||
@ -20,6 +20,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
public Config.Entities.RegisterReaderType RegisterReaderType { get { return Config.Entities.RegisterReaderType.Pulses; } }
|
||||
public double PulsesPerLtr { get { return registerReaderCfg.ProcParams.PulsesPerLtr; } }
|
||||
public double LtrsPerPulse { get { return (PulsesPerLtr <= float.Epsilon) ? 1.0 : (1 / PulsesPerLtr); ; } }
|
||||
public int Filter { get { return registerReaderCfg.ProcParams.Filter; } }
|
||||
|
||||
public int WMPulses { get { return wmPulses; } }
|
||||
public int WMRefPulses { get { return wmRefPulses; } }
|
||||
|
||||
@ -202,7 +202,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
// '_regulValve.RegulValveCfg.PidCoef' replaced by a casted operation parameter 'pidCoef'
|
||||
controlBoard.SendCommand(Command.Start, flowMeter.Idx1, controlBoard.Route,
|
||||
int.MaxValue, int.MaxValue, tm,
|
||||
0.0f, (int)pidCoef, 0, sd);
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
@ -251,7 +251,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
// '_regulValve.RegulValveCfg.PidCoef' replaced by a casted operation parameter 'pidCoef'
|
||||
controlBoard.SendCommand(Command.Start, flowMeter.Idx1, controlBoard.Route,
|
||||
int.MaxValue, int.MaxValue, tm,
|
||||
0.0f, (int)pidCoef, 0, sd);
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd);
|
||||
return Event.None;
|
||||
}
|
||||
else if (opState == OpState.ValveMoveToPosition1)
|
||||
@ -453,7 +453,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
StopDevs sd = StopDevs.RegValveRegulation;
|
||||
controlBoard.SendCommand(Command.Stop, flowMeter.Idx1, controlBoard.Route,
|
||||
50000, 50000, tm,
|
||||
0.0f, (int)pidCoef, 0, sd);
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ namespace TBF.BenchControl.Elde.RegulValveCoax
|
||||
// '_regulValve.RegulValveCfg.PidCoef' replaced by a casted operation parameter 'pidCoef'
|
||||
controlBoard.SendCommand(Command.Start, flowMeterNr, controlBoard.Route,
|
||||
int.MaxValue, int.MaxValue, tm,
|
||||
0.0f, (int)pidCoef, 0, sd);
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
@ -265,7 +265,7 @@ namespace TBF.BenchControl.Elde.RegulValveCoax
|
||||
// '_regulValve.RegulValveCfg.PidCoef' replaced by a casted operation parameter 'pidCoef'
|
||||
controlBoard.SendCommand(Command.Start, flowMeterNr, controlBoard.Route,
|
||||
int.MaxValue, int.MaxValue, tm,
|
||||
0.0f, (int)pidCoef, 0, sd);
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd);
|
||||
log.DebugFormat(" return Event.None");
|
||||
return Event.None;
|
||||
}
|
||||
@ -483,7 +483,7 @@ namespace TBF.BenchControl.Elde.RegulValveCoax
|
||||
StopDevs sd = StopDevs.RegValveRegulation;
|
||||
controlBoard.SendCommand(Command.Stop, flowMeterNr, controlBoard.Route,
|
||||
50000, 50000, tm,
|
||||
0.0f, (int)pidCoef, 0, sd);
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd);
|
||||
|
||||
log.WarnFormat("Stop() SendCommand(Stop, {0}, ...)", flowMeterNr);
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
// '_regulValve.RegulValveTandemCfg.PidCoef' replaced by a casted operation parameter 'pidCoef'
|
||||
controlBoard.SendCommand(Command.Start, flowMeterNr, controlBoard.Route,
|
||||
int.MaxValue, int.MaxValue, tm,
|
||||
0.0f, (int)pidCoef, 0, sd);
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
@ -374,7 +374,7 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
StopDevs sd = StopDevs.RegValveRegulation;
|
||||
controlBoard.SendCommand(Command.Stop, flowMeterNr, controlBoard.Route,
|
||||
50000, 50000, tm,
|
||||
0.0f, 20, 0, sd);
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, 20, 0, sd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ namespace TBF.BenchControl.Elde
|
||||
readonly int totalRefPulses; /// Number of reference pulses for a complete test
|
||||
readonly int massRefPulses; /// Number of reference pulses for mass collection
|
||||
readonly TestMethods testMethod;
|
||||
readonly float filterConstant;
|
||||
readonly int[] filters;
|
||||
readonly int diverterNr;
|
||||
|
||||
bool started = false;
|
||||
@ -55,8 +55,8 @@ namespace TBF.BenchControl.Elde
|
||||
/// <param name="filterConstant">Specifies filter for watermeter pulses</param>
|
||||
public StartMeasurementOp(ControlBoardDev controlBoard, OutputPath outputPath, TestMethods method,
|
||||
float requiredFlowLo, float requiredFlowHi,
|
||||
int refPulses, float filterConstant)
|
||||
: this(controlBoard, outputPath, method, requiredFlowLo, requiredFlowHi, refPulses, refPulses, filterConstant)
|
||||
int refPulses, int[] filters)
|
||||
: this(controlBoard, outputPath, method, requiredFlowLo, requiredFlowHi, refPulses, refPulses, filters)
|
||||
{
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ namespace TBF.BenchControl.Elde
|
||||
/// <param name="filterConstant">Specifies filter for watermeter pulses</param>
|
||||
public StartMeasurementOp(ControlBoardDev controlBoard, OutputPath outputPath, TestMethods method,
|
||||
float requiredFlowLo, float requiredFlowHi,
|
||||
int totalRefPulses, int massRefPulses, float filterConstant)
|
||||
int totalRefPulses, int massRefPulses, int[] filters)
|
||||
{
|
||||
if (controlBoard == null) throw new ArgumentNullException("controlBoardDev");
|
||||
this.controlBoard = controlBoard;
|
||||
@ -111,7 +111,7 @@ namespace TBF.BenchControl.Elde
|
||||
this.totalRefPulses = totalRefPulses;
|
||||
this.massRefPulses = massRefPulses;
|
||||
this.testMethod = method;
|
||||
this.filterConstant = filterConstant;
|
||||
this.filters = filters;
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
@ -127,11 +127,11 @@ namespace TBF.BenchControl.Elde
|
||||
int flowMeterIdxAndDiv = flowMeterNr;
|
||||
#endif
|
||||
log.InfoFormat("Start() : SendCommand(Cmd.Start, {0}, route, {1}, {1}, {2}, {3}, {4}, 0, Stop.None)",
|
||||
flowMeterIdxAndDiv, totalRefPulses, testMethod, filterConstant, (int)pidCoef);
|
||||
flowMeterIdxAndDiv, totalRefPulses, testMethod, filters[0], (int)pidCoef);
|
||||
|
||||
controlBoard.SendCommand(Command.Start, flowMeterIdxAndDiv, controlBoard.Route,
|
||||
totalRefPulses, massRefPulses, testMethod,
|
||||
filterConstant, (int)pidCoef, 0, StopDevs.None);
|
||||
filters, (int)pidCoef, 0, StopDevs.None);
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
|
||||
@ -48,7 +48,7 @@ namespace TBF.BenchControl.Elde
|
||||
controlBoard.Route, /// route
|
||||
0, 0, /// ref. pulses
|
||||
TestMethods.Diverter,
|
||||
0.0f,
|
||||
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
20,
|
||||
0,
|
||||
StopDevs.Diverter | StopDevs.GatePulse | StopDevs.Reference | StopDevs.RegValveRegulation);
|
||||
|
||||
@ -254,9 +254,16 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
///
|
||||
|
||||
/// Find ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -311,7 +318,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, totalPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -189,9 +189,16 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
///
|
||||
|
||||
/// Find ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -511,7 +518,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
qfrom_detected, qto_detected, totalPulses, (float)test.TolerRed))
|
||||
qfrom_detected, qto_detected, totalPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -191,9 +191,16 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
///
|
||||
|
||||
/// Find ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -242,7 +249,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(enduranceDataLoggingOp)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, totalPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -560,7 +560,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, 2 * totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, 2 * totalPulses, new int[] { (int)test.TolerRed, }))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -223,9 +223,16 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
///
|
||||
|
||||
/// Find ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -318,7 +325,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, 2 * totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, 2 * totalPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -619,7 +619,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, 2 * totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, 2 * totalPulses, new int[] { (int)test.TolerRed, }))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -606,7 +606,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, 2 * totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, 2 * totalPulses, new int[] { (int)test.TolerRed, }))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -341,9 +341,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
///
|
||||
|
||||
/// Find ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -391,7 +398,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, totalPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -418,9 +418,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
///
|
||||
|
||||
/// Find successfully detected ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -575,7 +582,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, (repetitionNr == 1) ? Elde.TestMethods.Diverter | Elde.TestMethods.Synchro : Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, totalPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -425,9 +425,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
///
|
||||
|
||||
/// Find successfully detected ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -580,7 +587,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(cBrd.StartProlongedMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro | Elde.TestMethods.MassAndContinue,
|
||||
test.Qfrom, test.Qto, targetTotalPulses, targetMassPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, targetTotalPulses, targetMassPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -475,9 +475,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
///
|
||||
|
||||
/// Find successfully detected ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -630,7 +637,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, totalPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -254,9 +254,16 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
///
|
||||
|
||||
/// Find ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
@ -311,7 +318,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, totalPulses, (float)test.TolerRed))
|
||||
test.Qfrom, test.Qto, totalPulses, filters))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -177,9 +177,16 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
///
|
||||
|
||||
/// Find ROI-s
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader;
|
||||
if (regr != null)
|
||||
{
|
||||
if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; }
|
||||
}
|
||||
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
|
||||
9
TBF/Resources/Strings.Designer.cs
generated
9
TBF/Resources/Strings.Designer.cs
generated
@ -1644,6 +1644,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Filter.
|
||||
/// </summary>
|
||||
internal static string Filter {
|
||||
get {
|
||||
return ResourceManager.GetString("Filter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Finish measurements please.
|
||||
/// </summary>
|
||||
|
||||
@ -1846,4 +1846,7 @@
|
||||
<data name="Value" xml:space="preserve">
|
||||
<value>Value</value>
|
||||
</data>
|
||||
<data name="Filter" xml:space="preserve">
|
||||
<value>Filter</value>
|
||||
</data>
|
||||
</root>
|
||||
Loading…
Reference in New Issue
Block a user