FlyingStartCollectionMethod timing modified, start valve used, ver.2.3.245.

This commit is contained in:
Milan Hanajik 2016-03-17 12:05:30 +08:00
parent 16ef6bde34
commit 2392bfa2a7
14 changed files with 282 additions and 141 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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<IOperation> measureOperations = new List<IOperation>();
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<IOperation> measureOperations = new List<IOperation>();
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");

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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")]

View File

@ -420,6 +420,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Checking tank capacity.
/// </summary>
internal static string Checking_tank_capacity {
get {
return ResourceManager.GetString("Checking_tank_capacity", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Clear results.
/// </summary>
@ -465,6 +474,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Closing the tank.
/// </summary>
internal static string Closing_the_tank {
get {
return ResourceManager.GetString("Closing_the_tank", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Closing input valve, switching the pump off.
/// </summary>
@ -2643,15 +2661,6 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to .
/// </summary>
internal static string String1 {
get {
return ResourceManager.GetString("String1", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Supress WM trills.
/// </summary>
@ -2988,6 +2997,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to T before setting flow [s].
/// </summary>
internal static string TimeBeforeSettingFlow {
get {
return ResourceManager.GetString("TimeBeforeSettingFlow", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to T flow stab. - start [s].
/// </summary>
@ -3006,6 +3024,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to T pump - start vlv. [s].
/// </summary>
internal static string TimePump2StartV_chdr {
get {
return ResourceManager.GetString("TimePump2StartV_chdr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Toler. red. [%].
/// </summary>

View File

@ -658,9 +658,6 @@
<data name="Progress" xml:space="preserve">
<value>Progress</value>
</data>
<data name="String1" xml:space="preserve">
<value> </value>
</data>
<data name="Please_select_a_cycle_a_test_or_empty" xml:space="preserve">
<value>Please select a cycle, a test or empty</value>
</data>
@ -1201,4 +1198,16 @@
<data name="Camera" xml:space="preserve">
<value />
</data>
<data name="Closing_the_tank" xml:space="preserve">
<value>Closing the tank</value>
</data>
<data name="Checking_tank_capacity" xml:space="preserve">
<value>Checking tank capacity</value>
</data>
<data name="TimeBeforeSettingFlow" xml:space="preserve">
<value>T before setting flow [s]</value>
</data>
<data name="TimePump2StartV_chdr" xml:space="preserve">
<value>T pump - start vlv. [s]</value>
</data>
</root>

View File

@ -397,7 +397,7 @@
<value>错误 修正 - []</value>
</data>
<data name="Err_cor_pos_pct_chdr" xml:space="preserve">
<value>错误 修正 - []</value>
<value>错误 修正 + []</value>
</data>
<data name="Err_limit_neg_pct_chdr" xml:space="preserve">
<value>错误范围 - []</value>
@ -709,7 +709,7 @@
<value>打印机</value>
</data>
<data name="PrinterBtnText" xml:space="preserve">
<value>打印机 Printer</value>
<value>打印机</value>
</data>
<data name="Procedure" xml:space="preserve">
<value>程序</value>
@ -862,7 +862,7 @@
<value>进行中的ROI检测</value>
</data>
<data name="ScreenBtnText" xml:space="preserve">
<value>屏幕 Screen</value>
<value>屏幕</value>
</data>
<data name="sec" xml:space="preserve">
<value>秒</value>
@ -871,7 +871,7 @@
<value>选择组件</value>
</data>
<data name="Selected_results" xml:space="preserve">
<value>已选结果</value>
<value>已选结果 :</value>
</data>
<data name="Sensor_" xml:space="preserve">
<value>传感器</value>
@ -1123,7 +1123,7 @@
<value>水</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>水表 Water Meter</value>
<value>水表</value>
</data>
<data name="Water_meter_data" xml:space="preserve">
<value>水表数据</value>

View File

@ -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);