StandingStartMassCollectionSeq : Start mass measurement and start state data entry done at the same time, ver. 3.1.1654
This commit is contained in:
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("3.1.1653.0")]
|
[assembly: AssemblyVersion("3.1.1654.0")]
|
||||||
[assembly: AssemblyFileVersion("3.1.1653.0")]
|
[assembly: AssemblyFileVersion("3.1.1654.0")]
|
||||||
|
|||||||
@@ -496,33 +496,11 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|||||||
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "Start mass");
|
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "Start mass");
|
||||||
else LogProcessDataHeaderHeatMeters(processDataLogger, "Start mass");
|
else LogProcessDataHeaderHeatMeters(processDataLogger, "Start mass");
|
||||||
|
|
||||||
State.Create(string.Format("{0}({1}) : Measure the start mass", test.Method, test.Name))
|
|
||||||
.AddOperation(checkUiOp)
|
|
||||||
.AddOperations(readTempPressOps)
|
|
||||||
.AddOperation(testInProgress)
|
|
||||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, test.TimeFlow2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
|
||||||
.EnterState();
|
|
||||||
do
|
|
||||||
{
|
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
|
||||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
|
||||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
||||||
if (e.Contains(Event.ScaleTimeout))
|
|
||||||
{
|
|
||||||
Bridge.OnError(this, Strings.Mass_measurement_timeout);
|
|
||||||
retVal = Event.RecoverableError;
|
|
||||||
goto stopTest;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (!e.Contains(Event.ScaleDone) && !e.Contains(Event.Next));
|
|
||||||
///
|
///
|
||||||
tMass1 = StateMachine.Time;
|
/// Enter water meter begin states and read the start mass at the same time
|
||||||
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Enter watermeter begin states here
|
|
||||||
///
|
///
|
||||||
GenericDevices.IHasWMStatesForm dataEntryCmpnt = TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as GenericDevices.IHasWMStatesForm;
|
GenericDevices.IHasWMStatesForm dataEntryCmpnt = TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as GenericDevices.IHasWMStatesForm;
|
||||||
|
IOperation readStartMassOp = scale.ReadStableMassOp(ref StartMass, test.TimeFlow2Mass, test.MassMethod, test.MassRepeats, test.MassSpread);
|
||||||
|
|
||||||
if (dataEntryCmpnt != null)
|
if (dataEntryCmpnt != null)
|
||||||
{
|
{
|
||||||
@@ -535,6 +513,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|||||||
State state2 = State.Create(string.Format("{0}({1}) : Grab images", test.Method, test.Name))
|
State state2 = State.Create(string.Format("{0}({1}) : Grab images", test.Method, test.Name))
|
||||||
.AddOperation(checkUiOp)
|
.AddOperation(checkUiOp)
|
||||||
.AddOperations(readTempPressOps)
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(readStartMassOp)
|
||||||
.AddOperation(testInProgress);
|
.AddOperation(testInProgress);
|
||||||
|
|
||||||
for (int i = 0; i < sensPath.RegisterReaders.Length; i++)
|
for (int i = 0; i < sensPath.RegisterReaders.Length; i++)
|
||||||
@@ -549,7 +528,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
state2.EnterState();
|
state2.EnterState();
|
||||||
do {
|
do
|
||||||
|
{
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
|
||||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||||
@@ -566,10 +546,12 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|||||||
State.Create(string.Format("{0}({1}) : Enter start states of water meters", test.Method, test.Name))
|
State.Create(string.Format("{0}({1}) : Enter start states of water meters", test.Method, test.Name))
|
||||||
.AddOperation(checkUiOp)
|
.AddOperation(checkUiOp)
|
||||||
.AddOperations(readTempPressOps)
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(readStartMassOp)
|
||||||
.AddOperation(testInProgress)
|
.AddOperation(testInProgress)
|
||||||
.AddOperation((dataEntryCmpnt as GenericDevices.IHasWMStatesForm).ShowTestStartFormOp(sensPath.RegisterReaders))
|
.AddOperation((dataEntryCmpnt as GenericDevices.IHasWMStatesForm).ShowTestStartFormOp(sensPath.RegisterReaders))
|
||||||
.EnterState();
|
.EnterState();
|
||||||
do {
|
do
|
||||||
|
{
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
}
|
}
|
||||||
@@ -632,6 +614,30 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
State.Create(string.Format("{0}({1}) : Measure the start mass", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(testInProgress)
|
||||||
|
.AddOperation(readStartMassOp)
|
||||||
|
.EnterState();
|
||||||
|
do {
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||||
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
if (e.Contains(Event.ScaleTimeout))
|
||||||
|
{
|
||||||
|
Bridge.OnError(this, Strings.Mass_measurement_timeout);
|
||||||
|
retVal = Event.RecoverableError;
|
||||||
|
goto stopTest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.ScaleDone) && !e.Contains(Event.Next));
|
||||||
|
}
|
||||||
|
///
|
||||||
|
tMass1 = StateMachine.Time;
|
||||||
|
|
||||||
|
|
||||||
if (heatMetersPath == null)
|
if (heatMetersPath == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user