diff --git a/Config/Entities/Test.cs b/Config/Entities/Test.cs index 01b0e2562..1be195998 100644 --- a/Config/Entities/Test.cs +++ b/Config/Entities/Test.cs @@ -28,8 +28,8 @@ namespace Config.Entities public virtual bool Zeroing { get; set; } public virtual float PumpPower { get; set; } /// Power of the pump in [%] in the range 0 .. 100.0f, use values 0% and 100% for non-FM pumps public virtual int TimeBeforeFlow { get; set; } /// Delay time before the start of flow control in [s] - public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s] - public virtual int TimeMass2Start { get; set; } /// Delay time from the 1st mass measurement to the test start in [s] + public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s] + public virtual int TimePump2StartV { get; set; }/// Delay time from the start of the pump to opening the start valve in [s] public virtual int TimeStop2Mass { get; set; } /// Delay time from the test end (diverted) to the 2nd mass measuremen in [s] public virtual string Method { get; set; } public virtual float ErrLimLo { get; set; } /// in [%] (usually < 0) @@ -67,7 +67,7 @@ namespace Config.Entities PumpPower = 60.0f; /// [%] TimeBeforeFlow = 10; /// [s] time before the start of flow control in [s] TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s] - TimeMass2Start = 1; /// [s] time from the 1st mass measurement to the test start in [s] + TimePump2StartV = 1; /// [s] time from the 1st mass measurement to the test start in [s] TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement ErrLimLo = -2.0f; /// [%] lower error limit ErrLimHi = 2.0f; /// [%] upper error limit @@ -105,7 +105,7 @@ namespace Config.Entities result.PumpPower = PumpPower; result.TimeBeforeFlow = TimeBeforeFlow; result.TimeFlow2Mass = TimeFlow2Mass; - result.TimeMass2Start = TimeMass2Start; + result.TimePump2StartV = TimePump2StartV; result.TimeStop2Mass = TimeStop2Mass; result.Method = Method; result.ErrLimLo = ErrLimLo; diff --git a/Config/Mappings/TestMap.cs b/Config/Mappings/TestMap.cs index 439fb8f92..56da987a9 100644 --- a/Config/Mappings/TestMap.cs +++ b/Config/Mappings/TestMap.cs @@ -27,7 +27,8 @@ namespace Config.Mappings Map(x => x.PumpPower); Map(x => x.TimeBeforeFlow); Map(x => x.TimeFlow2Mass); - Map(x => x.TimeMass2Start); + Map(x => x.TimePump2StartV) + .Column("TimeMass2Start"); Map(x => x.TimeStop2Mass); Map(x => x.Method); Map(x => x.ErrLimLo); diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index a2f369e38..db1341f81 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -68,83 +68,133 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + //------------------------------------------------ - Bridge.OnActivity(this, Strings.Starting_the_pump); + Bridge.OnActivity(this, Strings.Checking_tank_capacity); //------------------------------------------------ - if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); + bool tankEmptyingInProgress = test.Emptying; - State.Create("FlyingStartMassCollection : Starting the pump") - .AddOperation(checkUiOp) - .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) - .EnterState(); - do + if (!tankEmptyingInProgress) /// If condition met => skip measuring and force emptying { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + /// + /// Measure the weight and skip emptying if there is enough room in the tank + /// + State.Create("FlyingStartMassCollection : Checking available tank capacity") + .AddOperation(checkUiOp) + .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) + .EnterState(); + do { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.BalanceDone)); - if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + float estimatedEndMass = Mass.Val + test.Volume; + if (estimatedEndMass >= outPath.Balance.Capacity * Constants.TankFullFactor) + { + tankEmptyingInProgress = true; + } } - while (!e.Contains(Event.ValvesSet)); - - State.Create("FlyingStartMassCollection : Starting the pump") - .AddOperation(checkUiOp) - .AddOperation(new Operations.TimerOp(5)) - .EnterState(); - do + /// + if (tankEmptyingInProgress) { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - - if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + State.Create("SequenceBase : Opening the emptying valve") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.EmptyTankValve, null)) + .EnterState(); + do { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); } - while (!e.Contains(Event.TimerExpired)); - if (!test.Emptying) /// If condition met => skip measuring and force emptying - { + if (inPath.Pump != null) + { + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Starting_the_pump); + //------------------------------------------------ + if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); /// - /// Measure the weight and skip emptying if there is enough room in the tank - /// - State.Create("FlyingStartMassCollection : Measuring the mass of water in the tank") - .AddOperation(checkUiOp) - .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); + State.Create("FlyingStartMassCollection : Starting the pump") + .AddOperation(checkUiOp) + .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do { + e = StateMachine.WaitRunDevsRunOps(); Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.BalanceDone)); - float estimatedEndMass = Mass.Val + test.Volume; - if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor) - { - goto set_flow; /// Enough room in the tank -> skip emptying - } - } - - /// - /// Empty the water tank - /// - switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance)) - { - case Event.Error: { retVal = Event.Error; goto stopTest; } - case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); } - set_flow: + + if (test.TimePump2StartV > 0) + { + State.Create("FlyingStartMassCollection : Waiting after the pump started") + .AddOperation(checkUiOp) + .AddOperation(new Operations.TimerOp(test.TimePump2StartV)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } + + + if (outPath.StartValve != null) + { + State.Create("FlyingStartMassCollection : Opening the start/stop valve") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.StartValve, null)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); + } + + + if (test.TimeBeforeFlow > 0) + { + State.Create("FlyingStartMassCollection : Waiting before flow setting process starts") + .AddOperation(checkUiOp) + .AddOperation(new Operations.TimerOp(test.TimeBeforeFlow)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } + + + setting_flow: //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_flow); //------------------------------------------------ State.Create("FlyingStartMassCollection : Setting the flow") .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min. .EnterState(); do @@ -165,43 +215,59 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection } while (!e.Contains(Event.FlowReached)); - flow_set: - int flowSetTime = StateMachine.Time - flowSetTime0; - float currentFlow = RefFlow.Val; - /// Extract cameras from the current sensors path, add operations to the detection state - IList measureOperations = new List(); - for (int i = 0; i < sensPath.RegisterReaders.Length; i++) - { - GenericDevices.ICameraRoi cameraRoi = sensPath.RegisterReaders[i] as GenericDevices.ICameraRoi; - if (cameraRoi != null) measureOperations.Add(cameraRoi.MeasureOp()); - } + flow_set: + + int flowSetTime = StateMachine.Time - flowSetTime0; + float currentFlow = RefFlow.Val; + + /// Extract cameras from the current sensors path, add operations to the detection state + IList measureOperations = new List(); + for (int i = 0; i < sensPath.RegisterReaders.Length; i++) + { + GenericDevices.ICameraRoi cameraRoi = sensPath.RegisterReaders[i] as GenericDevices.ICameraRoi; + if (cameraRoi != null) measureOperations.Add(cameraRoi.MeasureOp()); + } + + + if (tankEmptyingInProgress) + { + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Closing_the_tank); + //------------------------------------------------ + + /// + /// Make sure tank emptying completed + /// + switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance)) + { + case Event.Error: { retVal = Event.Error; goto stopTest; } + case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } + } + + tankEmptyingInProgress = false; + } + + + if (test.TimeFlow2Mass > 0) + { + State.Create("FlyingStartMassCollection : Waiting before 1st mass measurement") + .AddOperation(checkUiOp) + .AddOperation(cBrd.UpdateTankWeightOp()) + .AddOperation(new Operations.TimerOp(test.TimeFlow2Mass)) + .EnterState(); + do{ + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } + //------------------------------------------------ Bridge.OnActivity(this, Strings.Measuring_the_weight); //------------------------------------------------ - State.Create("FlyingStartMassCollection : Waiting before 1st mass measurement") - .AddOperation(checkUiOp) - .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) - .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) - .AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv)) - .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) - .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) - .AddOperation((StateMachine.Ambient != null) - ? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null) - .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) - .AddOperation(cBrd.UpdateTankWeightOp()) - .AddOperation(processDataLoggingOp) - .AddOperation(new Operations.TimerOp(test.TimeFlow2Mass)) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.TimerExpired)); - LogProcessHeader(processDataLogger, "Start mass"); diff --git a/TestBenchFramework/BenchesDlg.Designer.cs b/TestBenchFramework/BenchesDlg.Designer.cs index 0da0e17f3..12188a9f1 100644 --- a/TestBenchFramework/BenchesDlg.Designer.cs +++ b/TestBenchFramework/BenchesDlg.Designer.cs @@ -45,7 +45,7 @@ namespace TBF // okButton // this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.okButton.ImageKey = global::TBF.Resources.Strings.String1; + this.okButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; resources.ApplyResources(this.okButton, "okButton"); this.okButton.Name = "okButton"; this.okButton.UseVisualStyleBackColor = true; @@ -54,7 +54,7 @@ namespace TBF // cancelButton // this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.ImageKey = global::TBF.Resources.Strings.String1; + this.cancelButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; resources.ApplyResources(this.cancelButton, "cancelButton"); this.cancelButton.Name = "cancelButton"; this.cancelButton.UseVisualStyleBackColor = true; @@ -70,7 +70,7 @@ namespace TBF // label1 // resources.ApplyResources(this.label1, "label1"); - this.label1.ImageKey = global::TBF.Resources.Strings.String1; + this.label1.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.label1.Name = "label1"; // // editButton diff --git a/TestBenchFramework/Forms/AboutDlg.Designer.cs b/TestBenchFramework/Forms/AboutDlg.Designer.cs index 91ff8b76a..1d2138c7a 100644 --- a/TestBenchFramework/Forms/AboutDlg.Designer.cs +++ b/TestBenchFramework/Forms/AboutDlg.Designer.cs @@ -44,26 +44,26 @@ namespace TBF.Forms // copyrightLabel // resources.ApplyResources(this.copyrightLabel, "copyrightLabel"); - this.copyrightLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.copyrightLabel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.copyrightLabel.Name = "copyrightLabel"; // // versionLabel // resources.ApplyResources(this.versionLabel, "versionLabel"); - this.versionLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.versionLabel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.versionLabel.Name = "versionLabel"; // // buildDateLabel // resources.ApplyResources(this.buildDateLabel, "buildDateLabel"); - this.buildDateLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.buildDateLabel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.buildDateLabel.Name = "buildDateLabel"; // // closeButton // resources.ApplyResources(this.closeButton, "closeButton"); this.closeButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.closeButton.ImageKey = global::TBF.Resources.Strings.String1; + this.closeButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.closeButton.Name = "closeButton"; this.closeButton.UseVisualStyleBackColor = true; // @@ -77,7 +77,7 @@ namespace TBF.Forms // secureHashLabel // resources.ApplyResources(this.secureHashLabel, "secureHashLabel"); - this.secureHashLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.secureHashLabel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.secureHashLabel.Name = "secureHashLabel"; // // AboutDlg diff --git a/TestBenchFramework/Forms/ErrorDlg.Designer.cs b/TestBenchFramework/Forms/ErrorDlg.Designer.cs index a7201c529..5df33d817 100644 --- a/TestBenchFramework/Forms/ErrorDlg.Designer.cs +++ b/TestBenchFramework/Forms/ErrorDlg.Designer.cs @@ -58,7 +58,7 @@ namespace TBF.Forms // // btnCancel // - this.btnCancel.ImageKey = global::TBF.Resources.Strings.String1; + this.btnCancel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; resources.ApplyResources(this.btnCancel, "btnCancel"); this.btnCancel.Name = "btnCancel"; this.btnCancel.UseVisualStyleBackColor = true; @@ -66,7 +66,7 @@ namespace TBF.Forms // // btnIgnore // - this.btnIgnore.ImageKey = global::TBF.Resources.Strings.String1; + this.btnIgnore.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; resources.ApplyResources(this.btnIgnore, "btnIgnore"); this.btnIgnore.Name = "btnIgnore"; this.btnIgnore.UseVisualStyleBackColor = true; @@ -74,7 +74,7 @@ namespace TBF.Forms // // btnRetry // - this.btnRetry.ImageKey = global::TBF.Resources.Strings.String1; + this.btnRetry.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; resources.ApplyResources(this.btnRetry, "btnRetry"); this.btnRetry.Name = "btnRetry"; this.btnRetry.UseVisualStyleBackColor = true; diff --git a/TestBenchFramework/LoginDlgWithBenchSelection.designer.cs b/TestBenchFramework/LoginDlgWithBenchSelection.designer.cs index 98d5ebe74..2f061cf79 100644 --- a/TestBenchFramework/LoginDlgWithBenchSelection.designer.cs +++ b/TestBenchFramework/LoginDlgWithBenchSelection.designer.cs @@ -45,19 +45,19 @@ namespace TBF // label1 // resources.ApplyResources(this.label1, "label1"); - this.label1.ImageKey = global::TBF.Resources.Strings.String1; + this.label1.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.label1.Name = "label1"; // // label2 // resources.ApplyResources(this.label2, "label2"); - this.label2.ImageKey = global::TBF.Resources.Strings.String1; + this.label2.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.label2.Name = "label2"; // // label3 // resources.ApplyResources(this.label3, "label3"); - this.label3.ImageKey = global::TBF.Resources.Strings.String1; + this.label3.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.label3.Name = "label3"; // // testBenchComboBox @@ -78,7 +78,7 @@ namespace TBF // resources.ApplyResources(this.cancelButton, "cancelButton"); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.ImageKey = global::TBF.Resources.Strings.String1; + this.cancelButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.cancelButton.Name = "cancelButton"; this.cancelButton.UseVisualStyleBackColor = true; this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); @@ -87,7 +87,7 @@ namespace TBF // resources.ApplyResources(this.okButton, "okButton"); this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.okButton.ImageKey = global::TBF.Resources.Strings.String1; + this.okButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.okButton.Name = "okButton"; this.okButton.UseVisualStyleBackColor = true; this.okButton.Click += new System.EventHandler(this.okButton_Click); diff --git a/TestBenchFramework/ProcedureDlg.Designer.cs b/TestBenchFramework/ProcedureDlg.Designer.cs index 32c549a5e..2b2e06bb7 100644 --- a/TestBenchFramework/ProcedureDlg.Designer.cs +++ b/TestBenchFramework/ProcedureDlg.Designer.cs @@ -162,7 +162,7 @@ namespace TBF // protocolTitleLabel // resources.ApplyResources(this.protocolTitleLabel, "protocolTitleLabel"); - this.protocolTitleLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.protocolTitleLabel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.protocolTitleLabel.Name = "protocolTitleLabel"; // // metersKindRadioButton2 diff --git a/TestBenchFramework/ProcedureDlg.cs b/TestBenchFramework/ProcedureDlg.cs index edee88b49..fc0d43a68 100644 --- a/TestBenchFramework/ProcedureDlg.cs +++ b/TestBenchFramework/ProcedureDlg.cs @@ -463,8 +463,6 @@ namespace TBF TestTime, Repeats, Emptying, - Time_Flow2Start, - Time_Stop2Mass, Method, MtrlgyClmnCount } @@ -480,8 +478,6 @@ namespace TBF metrology1ListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Repeats_nr_chdr, Width = 80 }); metrology1ListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Emptying_chdr, Width = 60 }); //metrology1ListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Zeroing_chdr, Width = 50 }); - metrology1ListViewEx.Columns.Add(new ColumnHeader { Text = Strings.TimeFlow2Start_chdr, Width = 70 }); - metrology1ListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Time2MassMsrmt_chdr, Width = 70 }); metrology1ListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Method_chdr, Width = 150 }); ComboBox yesNo1CBox = new ComboBox(); /// control for Emptying @@ -501,8 +497,6 @@ namespace TBF new TextBox(), /// Test time new TextBox(), /// Repeats # yesNo1CBox, /// Emptying - new TextBox(), /// Time_Flow2Start - new TextBox(), /// Time_Stop2Mass methodCBox, /// Method }; @@ -646,6 +640,10 @@ namespace TBF Qfrom, Qto, PumpPower, + Time_Pump2StartV, + Time_BeforeFlow, + Time_Flow2Mass, + Time_Stop2Mass, ParametersClmnCount } @@ -658,6 +656,10 @@ namespace TBF parametersListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Q_from_m3h, Width = 80 }); parametersListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Q_to_m3h, Width = 80 }); parametersListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Pump_power_pct, Width = 90 }); + parametersListViewEx.Columns.Add(new ColumnHeader { Text = Strings.TimePump2StartV_chdr, Width = 70 }); + parametersListViewEx.Columns.Add(new ColumnHeader { Text = Strings.TimeBeforeSettingFlow, Width = 70 }); + parametersListViewEx.Columns.Add(new ColumnHeader { Text = Strings.TimeFlow2Start_chdr, Width = 70 }); + parametersListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Time2MassMsrmt_chdr, Width = 70 }); parametersEditors = new Control[] { @@ -666,6 +668,10 @@ namespace TBF new TextBox(), /// Qfrom new TextBox(), /// Qto new ComboBox(), /// PumpPower + new TextBox(), /// Time_Pump2StartV + new TextBox(), /// Time_BeforeFlow + new TextBox(), /// Time_Flow2Mass + new TextBox(), /// Time_Stop2Mass }; ((ComboBox)parametersEditors[(int)ParametersClmn.PumpPower]).Items.Add("0"); @@ -739,8 +745,6 @@ namespace TBF lviMetrlg1.SubItems.Add(test.Repeats.ToString()); lviMetrlg1.SubItems.Add(test.Emptying ? Strings.yes : Strings.no); //lviMetrlg1.SubItems.Add(test.Zeroing ? Strings.yes : Strings.no); - lviMetrlg1.SubItems.Add(test.TimeFlow2Mass.ToString()); - lviMetrlg1.SubItems.Add(test.TimeStop2Mass.ToString()); lviMetrlg1.SubItems.Add((test.Method != null) ? test.Method.ToString() : string.Empty); metrology1ListViewEx.Items.Add(lviMetrlg1); @@ -773,6 +777,10 @@ namespace TBF /// Process subitems FeedingPath, ... /// lviParameters.SubItems.Add(test.PumpPower.ToString("F1")); + lviParameters.SubItems.Add(test.TimePump2StartV.ToString()); + lviParameters.SubItems.Add(test.TimeBeforeFlow.ToString()); + lviParameters.SubItems.Add(test.TimeFlow2Mass.ToString()); + lviParameters.SubItems.Add(test.TimeStop2Mass.ToString()); parametersListViewEx.Items.Add(lviParameters); } @@ -804,8 +812,6 @@ namespace TBF int itmp; if (int.TryParse(lvi.SubItems[(int)MtrlgyClmn.Repeats].Text, out itmp)) entity.Repeats = itmp; - if (int.TryParse(lvi.SubItems[(int)MtrlgyClmn.Time_Flow2Start].Text, out itmp)) entity.TimeFlow2Mass = itmp; - if (int.TryParse(lvi.SubItems[(int)MtrlgyClmn.Time_Stop2Mass].Text, out itmp)) entity.TimeStop2Mass = itmp; if (lvi.SubItems[(int)MtrlgyClmn.Emptying].Text.Equals(Strings.yes)) entity.Emptying = true; else if (lvi.SubItems[(int)MtrlgyClmn.Emptying].Text.Equals(Strings.no)) entity.Emptying = false; @@ -927,6 +933,12 @@ namespace TBF { entity.PumpPower = powerPct; } + + int itmp; + if (int.TryParse(lvi.SubItems[(int)ParametersClmn.Time_Pump2StartV].Text, out itmp)) entity.TimePump2StartV = itmp; + if (int.TryParse(lvi.SubItems[(int)ParametersClmn.Time_BeforeFlow].Text, out itmp)) entity.TimeBeforeFlow = itmp; + if (int.TryParse(lvi.SubItems[(int)ParametersClmn.Time_Flow2Mass].Text, out itmp)) entity.TimeFlow2Mass = itmp; + if (int.TryParse(lvi.SubItems[(int)ParametersClmn.Time_Stop2Mass].Text, out itmp)) entity.TimeStop2Mass = itmp; } } @@ -1131,6 +1143,32 @@ namespace TBF e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; } + + int itmp; + if ((e.SubItem == (int)ParametersClmn.Time_Pump2StartV) && + (!int.TryParse(e.DisplayText, out itmp) || itmp < 0 || itmp > 300)) + { + e.DisplayText = e.Item.SubItems[e.SubItem].Text; + e.Cancel = true; + } + if ((e.SubItem == (int)ParametersClmn.Time_BeforeFlow) && + (!int.TryParse(e.DisplayText, out itmp) || itmp < 0 || itmp > 300)) + { + e.DisplayText = e.Item.SubItems[e.SubItem].Text; + e.Cancel = true; + } + if ((e.SubItem == (int)ParametersClmn.Time_Flow2Mass) && + (!int.TryParse(e.DisplayText, out itmp) || itmp < 0 || itmp > 300)) + { + e.DisplayText = e.Item.SubItems[e.SubItem].Text; + e.Cancel = true; + } + if ((e.SubItem == (int)ParametersClmn.Time_Stop2Mass) && + (!int.TryParse(e.DisplayText, out itmp) || itmp < 0 || itmp > 300)) + { + e.DisplayText = e.Item.SubItems[e.SubItem].Text; + e.Cancel = true; + } } #endregion diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index e6f1cc2d7..0073c2e8a 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.3.244.1")] -[assembly: AssemblyFileVersion("2.3.244.1")] +[assembly: AssemblyVersion("2.3.245.1")] +[assembly: AssemblyFileVersion("2.3.245.1")] diff --git a/TestBenchFramework/Resources/Strings.Designer.cs b/TestBenchFramework/Resources/Strings.Designer.cs index 34e7432f2..e5f94f9b4 100644 --- a/TestBenchFramework/Resources/Strings.Designer.cs +++ b/TestBenchFramework/Resources/Strings.Designer.cs @@ -420,6 +420,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Checking tank capacity. + /// + internal static string Checking_tank_capacity { + get { + return ResourceManager.GetString("Checking_tank_capacity", resourceCulture); + } + } + /// /// Looks up a localized string similar to Clear results. /// @@ -465,6 +474,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Closing the tank. + /// + internal static string Closing_the_tank { + get { + return ResourceManager.GetString("Closing_the_tank", resourceCulture); + } + } + /// /// Looks up a localized string similar to Closing input valve, switching the pump off. /// @@ -2643,15 +2661,6 @@ namespace TBF.Resources { } } - /// - /// Looks up a localized string similar to . - /// - internal static string String1 { - get { - return ResourceManager.GetString("String1", resourceCulture); - } - } - /// /// Looks up a localized string similar to Supress WM trills. /// @@ -2988,6 +2997,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T before setting flow [s]. + /// + internal static string TimeBeforeSettingFlow { + get { + return ResourceManager.GetString("TimeBeforeSettingFlow", resourceCulture); + } + } + /// /// Looks up a localized string similar to T flow stab. - start [s]. /// @@ -3006,6 +3024,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T pump - start vlv. [s]. + /// + internal static string TimePump2StartV_chdr { + get { + return ResourceManager.GetString("TimePump2StartV_chdr", resourceCulture); + } + } + /// /// Looks up a localized string similar to Toler. red. [%]. /// diff --git a/TestBenchFramework/Resources/Strings.resx b/TestBenchFramework/Resources/Strings.resx index 262395bfd..49e8d01a9 100644 --- a/TestBenchFramework/Resources/Strings.resx +++ b/TestBenchFramework/Resources/Strings.resx @@ -658,9 +658,6 @@ Progress - - - Please select a cycle, a test or empty @@ -1201,4 +1198,16 @@ + + Closing the tank + + + Checking tank capacity + + + T before setting flow [s] + + + T pump - start vlv. [s] + \ No newline at end of file diff --git a/TestBenchFramework/Resources/Strings.zh-CN.resx b/TestBenchFramework/Resources/Strings.zh-CN.resx index 295a9b852..943e3edae 100644 --- a/TestBenchFramework/Resources/Strings.zh-CN.resx +++ b/TestBenchFramework/Resources/Strings.zh-CN.resx @@ -397,7 +397,7 @@ 错误 修正 - [%] - 错误 修正 - [%] + 错误 修正 + [%] 错误范围 - [%] @@ -709,7 +709,7 @@ 打印机 - 打印机 Printer + 打印机 程序 @@ -862,7 +862,7 @@ 进行中的ROI检测 - 屏幕 Screen + 屏幕 @@ -871,7 +871,7 @@ 选择组件 - 已选结果: + 已选结果 : 传感器 @@ -1123,7 +1123,7 @@ - 水表 Water Meter + 水表 水表数据 diff --git a/TestBenchFramework/SelectComponentClassDlg.Designer.cs b/TestBenchFramework/SelectComponentClassDlg.Designer.cs index 4dfcac13f..e9f861020 100644 --- a/TestBenchFramework/SelectComponentClassDlg.Designer.cs +++ b/TestBenchFramework/SelectComponentClassDlg.Designer.cs @@ -48,14 +48,14 @@ namespace TBF // availableComponentsLabel // resources.ApplyResources(this.availableComponentsLabel, "availableComponentsLabel"); - this.availableComponentsLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.availableComponentsLabel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.availableComponentsLabel.Name = "availableComponentsLabel"; // // cancelButton // resources.ApplyResources(this.cancelButton, "cancelButton"); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.ImageKey = global::TBF.Resources.Strings.String1; + this.cancelButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.cancelButton.Name = "cancelButton"; this.cancelButton.UseVisualStyleBackColor = true; this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); @@ -63,7 +63,7 @@ namespace TBF // okButton // resources.ApplyResources(this.okButton, "okButton"); - this.okButton.ImageKey = global::TBF.Resources.Strings.String1; + this.okButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; this.okButton.Name = "okButton"; this.okButton.UseVisualStyleBackColor = true; this.okButton.Click += new System.EventHandler(this.okButton_Click);