diff --git a/TestBenchFramework/BenchControl/Elde/Common.cs b/TestBenchFramework/BenchControl/Elde/Common.cs index c3a2506eb..0dfd20e11 100644 --- a/TestBenchFramework/BenchControl/Elde/Common.cs +++ b/TestBenchFramework/BenchControl/Elde/Common.cs @@ -41,7 +41,7 @@ namespace TBF.BenchControl.Elde ErrorPressMeter3 = 0x4000000000000, ErrorPressMeter4 = 0x8000000000000, } -#else // DN100 || MUNICH || FUZHOU150 || TORUN_PT50_2015 || CEVAK_PT40_272 +#else // DN100 || MUNICH || FUZHOU150 || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST public enum StatusP : ulong { RefFlowMeterMask = 0x7, diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs index 75c7bebfa..176fdf08f 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs @@ -120,8 +120,8 @@ namespace TBF.BenchControl.Elde // Array length is the reference flowmeters count plus one #if DN100 public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 }; -#elif MUNICH || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 - public float[] EtCalib = new float[5] { 1, 1, 1, 1, 1 }; +#elif MUNICH || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST + public float[] EtCalib = new float[5] { 1, 1, 1, 1, 1 }; #elif FUZHOU150 || FUZHOU300 || PT200IL public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 }; #endif @@ -231,10 +231,10 @@ namespace TBF.BenchControl.Elde ControlComponent_Torino2015.UserControl1 ctrlBrdComponent, #elif BADGER_MALA_TRAT ControlComponent_Torino2015.UserControl1 ctrlBrdComponent, -#elif TORUN_PT50_2015 || CEVAK_PT40_272 +#elif TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST ControlComponent_Torino2015.UserControl1 ctrlBrdComponent, #endif - ulong valvesToInvert, + ulong valvesToInvert, float[] tankCapacities) { this.valvesToInvert = valvesToInvert; diff --git a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs index 4731edfcc..206d1b541 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs @@ -14,7 +14,7 @@ namespace TBF.BenchControl.Elde /// Properties /// public StatusP StatusP { get { return (StatusP)ctrlBrdComponent.StatusP; } } -#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 +#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST /// /// In case of I11, I12 /// referenceFreq[0] = I11 + I12 @@ -25,7 +25,7 @@ namespace TBF.BenchControl.Elde /// public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq[0]; } } /// In [Hz] 0..2500, nom.=2000 #else - public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq; } } /// In [Hz] 0..2500, nom.=2000 + public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq; } } /// In [Hz] 0..2500, nom.=2000 #endif public int EtPulses(int wmNr0) { return (int)ctrlBrdComponent.etPulses[wmNr0]; } public UInt16 WMeterPulses(int wmNr0) { return (UInt16)ctrlBrdComponent.wMeterPuls[wmNr0]; } @@ -37,10 +37,10 @@ namespace TBF.BenchControl.Elde public ulong RRoute { get { return ctrlBrdComponent.rRoute; } } public uint DivTime { get { return ctrlBrdComponent.divTime; } } public float TTime { get { return ctrlBrdComponent.Ttime; } } -#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 +#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST public uint FmState { get { return ctrlBrdComponent.fMState[0]; } } /// TODO: index #else - public uint FmState { get { return ctrlBrdComponent.fMState; } } + public uint FmState { get { return ctrlBrdComponent.fMState; } } #endif public uint BeginState(int wmNr0) { return ctrlBrdComponent.beginSt[wmNr0]; } public float ReferenceFlow { get { return ctrlBrdComponent.referenceFlow; } } @@ -80,11 +80,11 @@ namespace TBF.BenchControl.Elde private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent; #elif BADGER_MALA_TRAT private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent; -#elif TORUN_PT50_2015 || CEVAK_PT40_272 +#elif TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent; #endif - /// + /// /// Constructor that initializes the control board component reference /// /// @@ -102,10 +102,10 @@ namespace TBF.BenchControl.Elde public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent) #elif BADGER_MALA_TRAT public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent) -#elif TORUN_PT50_2015 || CEVAK_PT40_272 +#elif TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent) #endif - { + { this.ctrlBrdComponent = ctrlBrdComponent; } @@ -198,10 +198,10 @@ namespace TBF.BenchControl.Elde // valveValue[0], // valveValue[1])); log.InfoFormat("ValveMove(#={0}, md={1}, [{2}, {3}])", valveNo, valveMode, valveValue[0], valveValue[1]); -#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 +#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue, stableTime); #else - ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue); + ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue); #endif } diff --git a/TestBenchFramework/BenchControl/StateMachine.cs b/TestBenchFramework/BenchControl/StateMachine.cs index 7dbb2e51d..92868be27 100644 --- a/TestBenchFramework/BenchControl/StateMachine.cs +++ b/TestBenchFramework/BenchControl/StateMachine.cs @@ -191,14 +191,10 @@ namespace TBF.BenchControl public static void InitializeBoardEtc(ControlComponent3F300.UserControl1 ctrlBrdComponent) #elif PT200IL public static void InitializeBoardEtc(ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent) -#elif TORINO50 - public static void InitializeBoardEtc(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent) -#elif BADGER_MALA_TRAT - public static void InitializeBoardEtc(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent) -#elif TORUN_PT50_2015 || CEVAK_PT40_272 +#elif TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST public static void InitializeBoardEtc(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent) #endif - { + { /// Load the list of components (entities) from the database. /// Then create the components (derived from IComponent). components = BenchControl.TbfComponents.LoadComponentsFromDB(FluentCommon.CreateSession(Database.Bench)); diff --git a/TestBenchFramework/BenchControl/TestBenchSim.cs b/TestBenchFramework/BenchControl/TestBenchSim.cs index e762bab8f..f93970f12 100644 --- a/TestBenchFramework/BenchControl/TestBenchSim.cs +++ b/TestBenchFramework/BenchControl/TestBenchSim.cs @@ -386,7 +386,7 @@ namespace TBF.BenchControl const ulong Path3 = VI3; const ulong Path3 = VI4; const ulong Path5 = 0; -#elif TORUN_PT50_2015 +#elif TORUN_PT50_2015 || IPERLST const ulong VL11 = (1L << 0); const ulong VL13 = (1L << 1); const ulong VL15 = (1L << 2); @@ -447,7 +447,7 @@ namespace TBF.BenchControl const ulong Path4 = 0; const ulong Path5 = 0; #endif - /// Run this device + /// Run this device public static void RunDevice(int regulValveNo, int refFlowmtrNo, Elde.StatusP statusP) { TestBenchSim.regulValveNo = regulValveNo; @@ -500,7 +500,7 @@ namespace TBF.BenchControl if (Div1sim && (RouteSim & Path1) == Path1) Mass1sim += DiffKg(Flow1sim, time); if (Div1sim && (RouteSim & Path2) == Path2) Mass1sim += DiffKg(Flow2sim, time); if (Div1sim && (RouteSim & Path3) == Path3) Mass1sim += DiffKg(Flow3sim, time); -#elif TORUN_PT50_2015 /// Path1,2,3,4,5 do WT1, Path6 do WT2 +#elif TORUN_PT50_2015 || IPERLST /// Path1,2,3,4,5 do WT1, Path6 do WT2 if (Div1sim && (RouteSim & Path1) == Path1) Mass1sim += DiffKg(Flow1sim, time); if (Div1sim && (RouteSim & Path2) == Path2) Mass1sim += DiffKg(Flow2sim, time); if (Div1sim && (RouteSim & Path3) == Path3) Mass1sim += DiffKg(Flow3sim, time); @@ -512,7 +512,7 @@ namespace TBF.BenchControl if (Div2sim && (RouteSim & Path2) == Path2) Mass2sim += DiffKg(Flow2sim, time); #endif - if ((RouteSim & EmptyValve1) == EmptyValve1) Mass1sim -= DiffKg(100.0f, time); + if ((RouteSim & EmptyValve1) == EmptyValve1) Mass1sim -= DiffKg(100.0f, time); if (Mass1sim < 0) Mass1sim = 0; if ((RouteSim & EmptyValve2) == EmptyValve2) Mass2sim -= DiffKg(10.0f, time); @@ -629,7 +629,7 @@ namespace TBF.BenchControl if (toTank) { throw (new Exception()); } break; } -#elif TORUN_PT50_2015 +#elif TORUN_PT50_2015 || IPERLST switch (regulValveNo) { case 1: @@ -658,7 +658,7 @@ namespace TBF.BenchControl break; } #endif - return; + return; } diff --git a/TestBenchFramework/MainWnd.Designer.cs b/TestBenchFramework/MainWnd.Designer.cs index 3296c470d..228091356 100644 --- a/TestBenchFramework/MainWnd.Designer.cs +++ b/TestBenchFramework/MainWnd.Designer.cs @@ -594,15 +594,12 @@ namespace TBF #elif BADGER_MALA_TRAT private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent; private TBF.Screens.ProcessTabPageCtrl6 processTabPageCtrl; -#elif TORUN_PT50_2015 - private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent; - private TBF.Screens.ProcessTabPageCtrl24 processTabPageCtrl; -#elif CEVAK_PT40_272 +#elif TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent; private TBF.Screens.ProcessTabPageCtrl24 processTabPageCtrl; #endif - private System.Windows.Forms.ToolStripMenuItem benchTSMenuItem; + private System.Windows.Forms.ToolStripMenuItem benchTSMenuItem; private System.Windows.Forms.ToolStripMenuItem homeTSMenuItem; private System.Windows.Forms.ToolStripMenuItem measurementTSMenuItem; private System.Windows.Forms.ToolStripMenuItem resultsTSMenuItem; diff --git a/TestBenchFramework/Program.cs b/TestBenchFramework/Program.cs index 0e07cdf02..a3a0371fa 100644 --- a/TestBenchFramework/Program.cs +++ b/TestBenchFramework/Program.cs @@ -52,9 +52,13 @@ namespace TBF public const int WMsCount = 20; public const int LineSize = 10; public const int CompoundWMsCount = 1; +#elif IPERLST + public const int WMsCount = 40; + public const int LineSize = 20; + public const int CompoundWMsCount = 1; #endif - /// + /// /// Selected procedure data /// - before the main program window is open, objects referenced by this variable /// are loaded from the database. diff --git a/packages/ControlBoard/iPerlST/ControlComponent3U.dll b/packages/ControlBoard/iPerlST/ControlComponent3U.dll new file mode 100644 index 000000000..c29e437a3 Binary files /dev/null and b/packages/ControlBoard/iPerlST/ControlComponent3U.dll differ