iPerl : ConfigStruct erased at the beginning of 'ReadConfiguration', iPerlHead.ClearData() called in MainSeq when procedure selected, ver. 2.17.753

This commit is contained in:
Milan Hanajik
2017-12-01 12:06:24 +01:00
parent 76bef24456
commit cebaab8e8b
5 changed files with 21 additions and 8 deletions
@@ -680,7 +680,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
#if TURA_IPERL || TURA_SPECIAL
#if TEST_MODE
if (!BatchRslts.IsProduction() &&
((test.Name.ToLower().Contains("q2") && Math.Abs(meterRslt.Error) > 2.0 && Math.Abs(meterRslt.Error) <= 4.0) ||
(test.Name.ToLower().Contains("q1") && Math.Abs(meterRslt.Error) > 5.0 && Math.Abs(meterRslt.Error) <= 10.0)))
@@ -1018,7 +1018,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
#if TURA_IPERL || TURA_SPECIAL
#if TEST_MODE
if (!BatchRslts.IsProduction() &&
((test.Name.ToLower().Contains("q2") && Math.Abs(meterRslt.Error) > 2.0 && Math.Abs(meterRslt.Error) <= 4.0) ||
(test.Name.ToLower().Contains("q1") && Math.Abs(meterRslt.Error) > 5.0 && Math.Abs(meterRslt.Error) <= 10.0)))
@@ -1043,7 +1043,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
}
#endif
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.FlowMean) + test.Uncertainty)
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.FlowMean) + test.Uncertainty)
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.FlowMean) - test.Uncertainty)
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
meterRslt.TestDone = true;
@@ -802,7 +802,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
///
/// The activity is "Read configuration" (this enables the watermeter, resets error flag)
/// or "Read configuration if enabled" (this keeps th error flag).
/// or "Read configuration if enabled" (this keeps the error flag).
///
if (!multiTestParams[currentActivityStep].Activity.ToLower().Contains(" if enabled"))
{
@@ -811,6 +811,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
if (ihead.CommFailed) return CommErr.CommFailed;
ihead.ConfigStruct = null; /// Clear previous ConfigStruct, avoid reuse of (not anymore valid) PCB Number
if (OpenPort(threadId, ihead) != 0) return CommErr.OpenPort; /// Open RFID port
CommErr error = CommErr.Read;
@@ -847,7 +849,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
/// <returns>true on success</returns>
static CommErr SetTestMode(int threadId, IperlHead ihead, Results.Entities.WaterMeter wm, ref string resultStr)
{
if (ihead.CommFailed) return CommErr.CommFailed;
if (ihead.CommFailed || ihead.ConfigStruct == null) return CommErr.CommFailed;
Byte testModeConfig = 0xA0; /// Default value
///