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:
parent
76bef24456
commit
cebaab8e8b
@ -313,10 +313,21 @@ namespace TBF.BenchControl.Sequences
|
||||
StateMachine.ControlBoard.ManualUIAllowed = !StateMachine.Procedure.ManualCtrlDisabled;
|
||||
|
||||
Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// Enable STOP button
|
||||
|
||||
|
||||
int newBatchNr = Program.LocalSettings.BatchNr;
|
||||
log.FatalFormat("New measurement session started: batch = {0}, procedure = {1}", newBatchNr, StateMachine.Procedure.Name);
|
||||
|
||||
///
|
||||
/// Clear iperlhead data (including PCB Number, avoid double use)
|
||||
///
|
||||
foreach (var cmpnt in StateMachine.Components)
|
||||
{
|
||||
if (cmpnt is TestMethods.iPerlCommunication.iPerlHead.IperlHead)
|
||||
{
|
||||
(cmpnt as TestMethods.iPerlCommunication.iPerlHead.IperlHead).ClearData();
|
||||
}
|
||||
}
|
||||
|
||||
if (selection == Selection.RestoreBatch)
|
||||
{
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
|
||||
@ -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
|
||||
///
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.17.752.0")]
|
||||
[assembly: AssemblyFileVersion("2.17.752.0")]
|
||||
[assembly: AssemblyVersion("2.17.753.0")]
|
||||
[assembly: AssemblyFileVersion("2.17.753.0")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user