BenchControl.Uni.Diverter/FlowMeter/RegReader added, etc. (many changes and refactorization).

This commit is contained in:
Milan Hanajik
2021-02-24 14:15:10 +01:00
parent 5325d7f6ee
commit 4cf4192ebb
163 changed files with 6766 additions and 1041 deletions
@@ -26,8 +26,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
/// <returns>true when capabilities of devices are OK</returns>
public static bool CheckDeviceCaps(Config.Entities.Test test, OutputPath devices, out string message)
{
if (!(StateMachine.ControlBoard is ControlBoard.Legacy.ControlBoardDev) &&
!(StateMachine.ControlBoard is ControlBoard.New.CBoard))
if (!(StateMachine.ControlBoard is ControlBoard.Legacy.CBoard) &&
!(StateMachine.ControlBoard is ControlBoard.Uni.CBoard))
{
/// Control board does not support this method
message = string.Format("{0}: {1}", test.Name, Strings.Test_bench_does_not_suport_selected_test_method);
@@ -118,7 +118,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
if (cBrd is ControlBoard.Legacy.ControlBoardDev)
if (cBrd is ControlBoard.Legacy.CBoard)
{
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
if (sensPath != null && sensPath.RegisterReaders != null)
@@ -133,7 +133,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
}
}
(cBrd as ControlBoard.Legacy.ControlBoardDev).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
(cBrd as ControlBoard.Legacy.CBoard).SetFiltersPidShortPulses(filters, outPath.PidCoef, (test.TolerRed == 0) ? 0 : 1);
}
IList<IOperation> readTempPressOps = new List<IOperation>();
@@ -588,9 +588,9 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
/// Read the diverter switch time
if (StateMachine.ControlBoard is ControlBoard.Legacy.ControlBoardDev)
if (StateMachine.ControlBoard is ControlBoard.Legacy.CBoard)
{
ControlBoard.Legacy.ControlBoardDev eldeCB = StateMachine.ControlBoard as ControlBoard.Legacy.ControlBoardDev;
ControlBoard.Legacy.CBoard eldeCB = StateMachine.ControlBoard as ControlBoard.Legacy.CBoard;
switchTimeStart = 0.001f * (float)eldeCB.DivTime(0);
log.WarnFormat("Diverter switch time on test start = {0} ms", eldeCB.DivTime(0));
}
@@ -677,9 +677,9 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
}
/// Read the diverter switch time
if (StateMachine.ControlBoard is ControlBoard.Legacy.ControlBoardDev)
if (StateMachine.ControlBoard is ControlBoard.Legacy.CBoard)
{
ControlBoard.Legacy.ControlBoardDev eldeCB = StateMachine.ControlBoard as ControlBoard.Legacy.ControlBoardDev;
ControlBoard.Legacy.CBoard eldeCB = StateMachine.ControlBoard as ControlBoard.Legacy.CBoard;
switchTimeEnd = 0.001f * (float)eldeCB.DivTime(0);
log.WarnFormat("Diverter switch time on test end = {0} ms", eldeCB.DivTime(0));
}