ControlBoards, IControlBoard iface, Devices, test methods.
This commit is contained in:
@@ -30,8 +30,6 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
public const int FlowSettingTimeoutSec = 300; /// Flow setting timeout = 5 min.
|
||||
public const int StableMassMsrmntTimeoutSec = 300; /// Stable mass measurement timeout = 5 min.
|
||||
public const int CountWhenSendingRdDivCmd = 1; /// Passed to cBrd.ReadDiverterTransitionOp()
|
||||
public const int CountWhenReadingDiv = 3; /// Passed to cBrd.ReadDiverterTransitionOp()
|
||||
|
||||
|
||||
///------------------------------------------------------------
|
||||
@@ -127,9 +125,9 @@ namespace TBF.BenchControl.Sequences
|
||||
logger.InfoFormat("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16}",
|
||||
DateTime.Now.ToLongTimeString(),
|
||||
Utils.DoubleToStr(RefFlow.Val, 4), /// flow measured by the reference flow meter in m3/h
|
||||
StateMachine.ControlBoard.TTime.ToString("F3"), /// test time in s
|
||||
StateMachine.ControlBoard.EtPulses(0), /// reference flow meter pulses count
|
||||
Formulas.VolumeFromPulses(StateMachine.ControlBoard.EtPulses(0), 1.0f / LtrPerRefPulse).ToString("F3"), /// volume in l
|
||||
StateMachine.ControlBoard.TestTime.ToString("F3"),/// test time in s
|
||||
StateMachine.ControlBoard.RefPulses, /// reference flow meter pulses count
|
||||
Formulas.VolumeFromPulses(StateMachine.ControlBoard.RefPulses, 1.0f / LtrPerRefPulse).ToString("F3"), /// volume in l
|
||||
TempUp, /// water temperature at the beginning of test line in degree C
|
||||
TempDown, /// water temperature at the end of test line in degree C
|
||||
TempDiv, /// water temperature at the diverter in degree C
|
||||
@@ -157,9 +155,9 @@ namespace TBF.BenchControl.Sequences
|
||||
logger.InfoFormat("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19} {20}",
|
||||
DateTime.Now.ToLongTimeString(),
|
||||
Utils.DoubleToStr(RefFlow.Val, 4),
|
||||
StateMachine.ControlBoard.TTime.ToString("F3"),
|
||||
StateMachine.ControlBoard.EtPulses(0),
|
||||
Formulas.VolumeFromPulses(StateMachine.ControlBoard.EtPulses(0), 1.0f / LtrPerRefPulse).ToString("F3"),
|
||||
StateMachine.ControlBoard.TestTime.ToString("F3"),
|
||||
StateMachine.ControlBoard.RefPulses,
|
||||
Formulas.VolumeFromPulses(StateMachine.ControlBoard.RefPulses, 1.0f / LtrPerRefPulse).ToString("F3"),
|
||||
TempUp,
|
||||
TempDown,
|
||||
TempDiv,
|
||||
@@ -781,8 +779,8 @@ namespace TBF.BenchControl.Sequences
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new MettlerToledo.KeepReadingMassesOp())
|
||||
.AddOperation(StateMachine.ControlBoard
|
||||
.SetValvesOp(GenericDevices.ValveBase.Merge(inPath.ValvesOpen, benchPath.ValvesOpen, outPath.ValvesOpen),
|
||||
GenericDevices.ValveBase.Merge(inPath.ValvesClose, benchPath.ValvesClose, outPath.ValvesClose)))
|
||||
.SetValvesOp(BuiltIn.ValveBase.Merge(inPath.ValvesOpen, benchPath.ValvesOpen, outPath.ValvesOpen),
|
||||
BuiltIn.ValveBase.Merge(inPath.ValvesClose, benchPath.ValvesClose, outPath.ValvesClose)))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -801,8 +799,8 @@ namespace TBF.BenchControl.Sequences
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new MettlerToledo.KeepReadingMassesOp())
|
||||
.AddOperation(StateMachine.ControlBoard
|
||||
.SetValvesOp(GenericDevices.ValveBase.Merge(nextInPath.ValvesOpen, nextBenchPath.ValvesOpen, nextOutPath.ValvesOpen),
|
||||
GenericDevices.ValveBase.Merge(nextInPath.ValvesClose, nextBenchPath.ValvesClose, nextOutPath.ValvesClose)))
|
||||
.SetValvesOp(BuiltIn.ValveBase.Merge(nextInPath.ValvesOpen, nextBenchPath.ValvesOpen, nextOutPath.ValvesOpen),
|
||||
BuiltIn.ValveBase.Merge(nextInPath.ValvesClose, nextBenchPath.ValvesClose, nextOutPath.ValvesClose)))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -813,8 +811,11 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
|
||||
/// Set PID coefficient, etc.
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
StateMachine.ControlBoard.SetFiltersPidShortPulses(filters, nextPidCoef, (nextTolerRed == 0) ? 0 : 1);
|
||||
if (StateMachine.ControlBoard is ControlBoard.Legacy.ControlBoardDev)
|
||||
{
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
(StateMachine.ControlBoard as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, nextPidCoef, (nextTolerRed == 0) ? 0 : 1);
|
||||
}
|
||||
|
||||
/// Set pump power
|
||||
if (nextInPath.Pump is GenericDevices.IPumpFM) (nextInPath.Pump as GenericDevices.IPumpFM).TurnOn(nextPumpPower);
|
||||
@@ -1042,7 +1043,7 @@ namespace TBF.BenchControl.Sequences
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(doNotWait ? regulValve.SetFlowAndMeasureOp(flowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec, 0)
|
||||
: regulValve.SetFlowOp(flowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
: StateMachine.ControlBoard.SetFlowOp(test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperations(extraOperations)
|
||||
.EnterState();
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user