(1) DataEntry.iPerl.CycleBeginningForm displays iPerl dir. (2) iPerlCommFrm: CalLNA logged ok (3) FlyStMassCollProlonged and SmryResults modif, ver. 2.18.1067

This commit is contained in:
Milan Hanajik
2018-11-16 14:30:58 +01:00
parent 89eddaa3c2
commit 31a684f03a
16 changed files with 242 additions and 163 deletions
+2 -1
View File
@@ -25,7 +25,8 @@ namespace Results.Entities
public virtual DateTime EndTime { get; set; } /// Date and time of the test end public virtual DateTime EndTime { get; set; } /// Date and time of the test end
public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds
public virtual double TestTime { get; set; } /// [s] Measurement time in seconds public virtual double TestTime { get; set; } /// [s] Measurement time in seconds
public virtual double PulsesMaster { get; set; } public virtual double PulsesMaster { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the water to the tank
public virtual double TotalPulsesMstr { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the complete test (not mapped to DB)
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected. public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected.
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table. public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table.
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement. public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement.
@@ -31,49 +31,59 @@ namespace TBF.BenchControl.DataEntry.iPerl
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
this.okButton = new System.Windows.Forms.Button(); this.okButton = new System.Windows.Forms.Button();
this.orderGroupBox = new System.Windows.Forms.GroupBox(); this.orderGroupBox = new System.Windows.Forms.GroupBox();
this.orderComboBox = new System.Windows.Forms.ComboBox(); this.orderComboBox = new System.Windows.Forms.ComboBox();
this.orderGroupBox.SuspendLayout(); this.pictureBox = new System.Windows.Forms.PictureBox();
this.SuspendLayout(); this.orderGroupBox.SuspendLayout();
// ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
// okButton this.SuspendLayout();
// //
resources.ApplyResources(this.okButton, "okButton"); // okButton
this.okButton.ForeColor = System.Drawing.Color.Black; //
this.okButton.Name = "okButton"; resources.ApplyResources(this.okButton, "okButton");
this.okButton.UseVisualStyleBackColor = true; this.okButton.ForeColor = System.Drawing.Color.Black;
this.okButton.Click += new System.EventHandler(this.okButton_Click); this.okButton.Name = "okButton";
// this.okButton.UseVisualStyleBackColor = true;
// orderGroupBox this.okButton.Click += new System.EventHandler(this.okButton_Click);
// //
this.orderGroupBox.Controls.Add(this.orderComboBox); // orderGroupBox
resources.ApplyResources(this.orderGroupBox, "orderGroupBox"); //
this.orderGroupBox.ForeColor = System.Drawing.Color.Black; this.orderGroupBox.Controls.Add(this.orderComboBox);
this.orderGroupBox.Name = "orderGroupBox"; resources.ApplyResources(this.orderGroupBox, "orderGroupBox");
this.orderGroupBox.TabStop = false; this.orderGroupBox.ForeColor = System.Drawing.Color.Black;
// this.orderGroupBox.Name = "orderGroupBox";
// orderComboBox this.orderGroupBox.TabStop = false;
// //
this.orderComboBox.FormattingEnabled = true; // orderComboBox
resources.ApplyResources(this.orderComboBox, "orderComboBox"); //
this.orderComboBox.Name = "orderComboBox"; this.orderComboBox.FormattingEnabled = true;
// resources.ApplyResources(this.orderComboBox, "orderComboBox");
// CycleBeginningForm this.orderComboBox.Name = "orderComboBox";
// //
resources.ApplyResources(this, "$this"); // pictureBox
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; //
this.BackColor = System.Drawing.Color.DarkGoldenrod; resources.ApplyResources(this.pictureBox, "pictureBox");
this.Controls.Add(this.orderGroupBox); this.pictureBox.Name = "pictureBox";
this.Controls.Add(this.okButton); this.pictureBox.TabStop = false;
this.ForeColor = System.Drawing.Color.Black; //
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; // CycleBeginningForm
this.Name = "CycleBeginningForm"; //
this.TopMost = true; resources.ApplyResources(this, "$this");
this.Load += new System.EventHandler(this.CycleBeginningForm_Load); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.orderGroupBox.ResumeLayout(false); this.BackColor = System.Drawing.Color.DarkGoldenrod;
this.ResumeLayout(false); this.Controls.Add(this.pictureBox);
this.Controls.Add(this.orderGroupBox);
this.Controls.Add(this.okButton);
this.ForeColor = System.Drawing.Color.Black;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "CycleBeginningForm";
this.TopMost = true;
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
this.orderGroupBox.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
this.ResumeLayout(false);
} }
@@ -82,5 +92,6 @@ namespace TBF.BenchControl.DataEntry.iPerl
private System.Windows.Forms.Button okButton; private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox orderGroupBox; private System.Windows.Forms.GroupBox orderGroupBox;
private System.Windows.Forms.ComboBox orderComboBox; private System.Windows.Forms.ComboBox orderComboBox;
private System.Windows.Forms.PictureBox pictureBox;
} }
} }
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using log4net; using log4net;
using TBF.Resources; using TBF.Resources;
using System.Drawing;
namespace TBF.BenchControl.DataEntry.iPerl namespace TBF.BenchControl.DataEntry.iPerl
{ {
@@ -15,6 +16,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
/// <summary> Number of water meters </summary> /// <summary> Number of water meters </summary>
public readonly int WaterMetersCount; public readonly int WaterMetersCount;
public readonly bool reversedDirection;
/// To be retrieved after the form is closed /// To be retrieved after the form is closed
public string PurchaseOrder; public string PurchaseOrder;
@@ -41,10 +43,11 @@ namespace TBF.BenchControl.DataEntry.iPerl
/// Constructor /// Constructor
/// </summary> /// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param> /// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public CycleBeginningForm(int waterMetersCount) public CycleBeginningForm(int waterMetersCount, bool reversedDirection)
: this() : this()
{ {
this.WaterMetersCount = waterMetersCount; this.WaterMetersCount = waterMetersCount;
this.reversedDirection = reversedDirection;
SNText = null; SNText = null;
Disabled = null; Disabled = null;
} }
@@ -56,6 +59,14 @@ namespace TBF.BenchControl.DataEntry.iPerl
orderGroupBox.Text = Strings.Purchase_order; orderGroupBox.Text = Strings.Purchase_order;
okButton.Text = Strings.OkBtnText; okButton.Text = Strings.OkBtnText;
PrepareOrderCombo(orderComboBox); PrepareOrderCombo(orderComboBox);
if (reversedDirection)
{
pictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\reversed_dir.jpg", Program.ExecutableDir, true));
}
else
{
pictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\forward_dir.jpg", Program.ExecutableDir, true));
}
} }
/// <summary> /// <summary>
@@ -144,13 +144,13 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;okButton.ZOrder" xml:space="preserve"> <data name="&gt;&gt;okButton.ZOrder" xml:space="preserve">
<value>1</value> <value>2</value>
</data> </data>
<data name="orderComboBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="orderComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>90, 31</value> <value>90, 32</value>
</data> </data>
<data name="orderComboBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="orderComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>376, 31</value> <value>432, 31</value>
</data> </data>
<data name="orderComboBox.TabIndex" type="System.Int32, mscorlib"> <data name="orderComboBox.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -174,7 +174,7 @@
<value>28, 12</value> <value>28, 12</value>
</data> </data>
<data name="orderGroupBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="orderGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>537, 82</value> <value>565, 82</value>
</data> </data>
<data name="orderGroupBox.TabIndex" type="System.Int32, mscorlib"> <data name="orderGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -192,6 +192,27 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;orderGroupBox.ZOrder" xml:space="preserve"> <data name="&gt;&gt;orderGroupBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="pictureBox.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 118</value>
</data>
<data name="pictureBox.Size" type="System.Drawing.Size, System.Drawing">
<value>711, 497</value>
</data>
<data name="pictureBox.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;pictureBox.Name" xml:space="preserve">
<value>pictureBox</value>
</data>
<data name="&gt;&gt;pictureBox.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pictureBox.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -204,7 +225,7 @@
<value>True</value> <value>True</value>
</data> </data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>801, 119</value> <value>769, 639</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>Batch data</value> <value>Batch data</value>
@@ -124,7 +124,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
/// ///
void OpenBeginningDlg(EntryForm myRef) void OpenBeginningDlg(EntryForm myRef)
{ {
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount); myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount, myRef.entryFormCfg.ReversedDirection);
modelessDlg.Show(); modelessDlg.Show();
} }
/// ///
@@ -1,5 +1,5 @@
/// ///
/// Copyright (c) 2015-2016 Sensus Metering Systems /// Copyright (c) 2015-2018 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -20,6 +20,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
/// Serialized parameters /// Serialized parameters
/// ///
public bool ShowCycleEndForm; public bool ShowCycleEndForm;
public bool ReversedDirection;
/// Private parameterless constructor invoked by all other (public) constructors /// Private parameterless constructor invoked by all other (public) constructors
EntryFormCfg() EntryFormCfg()
@@ -27,6 +28,8 @@ namespace TBF.BenchControl.DataEntry.iPerl
Name = "DataEntry-iPerl"; Name = "DataEntry-iPerl";
ParentName = string.Empty; ParentName = string.Empty;
ShowCycleEndForm = false; ShowCycleEndForm = false;
ReversedDirection = false;
} }
public EntryFormCfg(IComponentFactory factory) public EntryFormCfg(IComponentFactory factory)
@@ -37,7 +40,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
public string ToString(int i) public string ToString(int i)
{ {
return string.Format("Name={0}, ShowEndForm={1}", Name, ShowCycleEndForm); return string.Format("Name={0}, ShowEndForm={1}, ReversedDir={2}", Name, ShowCycleEndForm, ReversedDirection);
} }
} }
} }
@@ -1,5 +1,5 @@
/// ///
/// Copyright (c) 2015 Sensus Metering Systems /// Copyright (c) 2015-2018 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
@@ -50,12 +50,14 @@ namespace TBF.BenchControl.DataEntry.iPerl
classNameLabel.Text = config.Factory.ClassName; classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name; nameTextBox.Text = config.Name;
showCycleEndFormCheckBox.Checked = config.ShowCycleEndForm; showCycleEndFormCheckBox.Checked = config.ShowCycleEndForm;
reversedIperlDirectionCheckBox.Checked = config.ReversedDirection;
} }
public void Unlock() public void Unlock()
{ {
nameTextBox.Enabled = true; nameTextBox.Enabled = true;
showCycleEndFormCheckBox.Enabled = true; showCycleEndFormCheckBox.Enabled = true;
reversedIperlDirectionCheckBox.Enabled = true;
} }
public CfgUpdateFlags VerifyCfg(ref string message) public CfgUpdateFlags VerifyCfg(ref string message)
@@ -72,6 +74,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
config.Name = nameTextBox.Text; config.Name = nameTextBox.Text;
config.ShowCycleEndForm = showCycleEndFormCheckBox.Checked; config.ShowCycleEndForm = showCycleEndFormCheckBox.Checked;
config.ReversedDirection = reversedIperlDirectionCheckBox.Checked;
return flags; return flags;
} }
+70 -56
View File
@@ -31,62 +31,75 @@ namespace TBF.BenchControl.DataEntry.iPerl
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.nameTextBox = new System.Windows.Forms.TextBox(); this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label(); this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label(); this.classNameLabel = new System.Windows.Forms.Label();
this.showCycleEndFormCheckBox = new System.Windows.Forms.CheckBox(); this.showCycleEndFormCheckBox = new System.Windows.Forms.CheckBox();
this.SuspendLayout(); this.reversedIperlDirectionCheckBox = new System.Windows.Forms.CheckBox();
// this.SuspendLayout();
// nameTextBox //
// // nameTextBox
this.nameTextBox.Enabled = false; //
this.nameTextBox.Location = new System.Drawing.Point(131, 57); this.nameTextBox.Enabled = false;
this.nameTextBox.Name = "nameTextBox"; this.nameTextBox.Location = new System.Drawing.Point(131, 57);
this.nameTextBox.Size = new System.Drawing.Size(130, 20); this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.TabIndex = 5; this.nameTextBox.Size = new System.Drawing.Size(130, 20);
// this.nameTextBox.TabIndex = 5;
// nameLabel //
// // nameLabel
this.nameLabel.AutoSize = true; //
this.nameLabel.Location = new System.Drawing.Point(32, 60); this.nameLabel.AutoSize = true;
this.nameLabel.Name = "nameLabel"; this.nameLabel.Location = new System.Drawing.Point(32, 60);
this.nameLabel.Size = new System.Drawing.Size(35, 13); this.nameLabel.Name = "nameLabel";
this.nameLabel.TabIndex = 4; this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.Text = "Name"; this.nameLabel.TabIndex = 4;
// this.nameLabel.Text = "Name";
// classNameLabel //
// // classNameLabel
this.classNameLabel.AutoSize = true; //
this.classNameLabel.Location = new System.Drawing.Point(128, 32); this.classNameLabel.AutoSize = true;
this.classNameLabel.Name = "classNameLabel"; this.classNameLabel.Location = new System.Drawing.Point(128, 32);
this.classNameLabel.Size = new System.Drawing.Size(83, 13); this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.TabIndex = 3; this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.Text = "ComonentName"; this.classNameLabel.TabIndex = 3;
// this.classNameLabel.Text = "ComonentName";
// showCycleEndFormCheckBox //
// // showCycleEndFormCheckBox
this.showCycleEndFormCheckBox.AutoSize = true; //
this.showCycleEndFormCheckBox.Enabled = false; this.showCycleEndFormCheckBox.AutoSize = true;
this.showCycleEndFormCheckBox.Location = new System.Drawing.Point(131, 90); this.showCycleEndFormCheckBox.Enabled = false;
this.showCycleEndFormCheckBox.Name = "showCycleEndFormCheckBox"; this.showCycleEndFormCheckBox.Location = new System.Drawing.Point(131, 90);
this.showCycleEndFormCheckBox.Size = new System.Drawing.Size(125, 17); this.showCycleEndFormCheckBox.Name = "showCycleEndFormCheckBox";
this.showCycleEndFormCheckBox.TabIndex = 13; this.showCycleEndFormCheckBox.Size = new System.Drawing.Size(125, 17);
this.showCycleEndFormCheckBox.Text = "Show cycle end form"; this.showCycleEndFormCheckBox.TabIndex = 13;
this.showCycleEndFormCheckBox.UseVisualStyleBackColor = true; this.showCycleEndFormCheckBox.Text = "Show cycle end form";
// this.showCycleEndFormCheckBox.UseVisualStyleBackColor = true;
// EntryFormCfgCtrl //
// // reversedIperlDirectionCheckBox
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.reversedIperlDirectionCheckBox.AutoSize = true;
this.Controls.Add(this.showCycleEndFormCheckBox); this.reversedIperlDirectionCheckBox.Enabled = false;
this.Controls.Add(this.nameTextBox); this.reversedIperlDirectionCheckBox.Location = new System.Drawing.Point(131, 113);
this.Controls.Add(this.nameLabel); this.reversedIperlDirectionCheckBox.Name = "reversedIperlDirectionCheckBox";
this.Controls.Add(this.classNameLabel); this.reversedIperlDirectionCheckBox.Size = new System.Drawing.Size(158, 17);
this.Name = "EntryFormCfgCtrl"; this.reversedIperlDirectionCheckBox.TabIndex = 14;
this.Size = new System.Drawing.Size(300, 200); this.reversedIperlDirectionCheckBox.Text = "Reversed direction of iPerl-s";
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load); this.reversedIperlDirectionCheckBox.UseVisualStyleBackColor = true;
this.ResumeLayout(false); //
this.PerformLayout(); // EntryFormCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.reversedIperlDirectionCheckBox);
this.Controls.Add(this.showCycleEndFormCheckBox);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "EntryFormCfgCtrl";
this.Size = new System.Drawing.Size(300, 200);
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
} }
@@ -96,5 +109,6 @@ namespace TBF.BenchControl.DataEntry.iPerl
private System.Windows.Forms.Label nameLabel; private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel; private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.CheckBox showCycleEndFormCheckBox; private System.Windows.Forms.CheckBox showCycleEndFormCheckBox;
private System.Windows.Forms.CheckBox reversedIperlDirectionCheckBox;
} }
} }
+8 -6
View File
@@ -1057,7 +1057,7 @@ namespace TBF.BenchControl.Sequences
sb.Append(";"); sb.Append(tstRslt.FlowMin); /// BG Qm [kg/h] sb.Append(";"); sb.Append(tstRslt.FlowMin); /// BG Qm [kg/h]
sb.Append(";"); sb.Append(tstRslt.FlowVolume); /// BH Qv [l/h] sb.Append(";"); sb.Append(tstRslt.FlowVolume); /// BH Qv [l/h]
sb.Append(";"); sb.Append(tstRslt.VolumeCTV); /// BI Vet . . . komercne prava hodnota - podla vahy sb.Append(";"); sb.Append(tstRslt.VolumeCTV); /// BI Vet . . . komercne prava hodnota - podla vahy
sb.Append(";"); sb.Append(tstRslt.VolumeMaster); /// BJ Velm . . . . objem podla etalonu sb.Append(";"); sb.Append(tstRslt.VolumeMaster); /// BJ Velm . . . . objem podla etalonu (Prolonged: objem do vahy podla impulzov do vahy)
sb.Append(";"); sb.Append(" "); /// BK Vmass . . . objem podla druheho etalonu / prietokomeru pred tratou (teraz vynechavame) sb.Append(";"); sb.Append(" "); /// BK Vmass . . . objem podla druheho etalonu / prietokomeru pred tratou (teraz vynechavame)
sb.Append(";"); sb.Append(tstRslt.TestTime); /// BL t sb.Append(";"); sb.Append(tstRslt.TestTime); /// BL t
sb.Append(";"); sb.Append(tstRslt.ErrorMaster); /// BM Eelm . . . chyba etalonu voci komercne pravej hodnote sb.Append(";"); sb.Append(tstRslt.ErrorMaster); /// BM Eelm . . . chyba etalonu voci komercne pravej hodnote
@@ -1074,13 +1074,13 @@ namespace TBF.BenchControl.Sequences
sb.Append(";"); sb.Append(tstRslt.TempDownMax); /// BV [°C] sb.Append(";"); sb.Append(tstRslt.TempDownMax); /// BV [°C]
sb.Append(";"); sb.Append(tstRslt.TempUpMin); /// BW [°C] sb.Append(";"); sb.Append(tstRslt.TempUpMin); /// BW [°C]
sb.Append(";"); sb.Append(tstRslt.TempDownMin); /// BX [°C] sb.Append(";"); sb.Append(tstRslt.TempDownMin); /// BX [°C]
sb.Append(";"); sb.Append(isPMaxTest ? tstRslt.TestTime : 0); /// BY [s] Duration of the pressure test sb.Append(";"); sb.Append(isPMaxTest ? tstRslt.TestTime : 0); /// BY [s] Duration of the pressure test
sb.Append(";"); sb.AppendFormat("{0:F1}", Units.ConvertTo(Unit.C, tstRslt.AmbTempEnd)); /// BZ [°C] sb.Append(";"); sb.AppendFormat("{0:F1}", Units.ConvertTo(Unit.C, tstRslt.AmbTempEnd)); /// BZ [°C]
sb.Append(";"); sb.AppendFormat("{0:F0}", Units.ConvertTo(Unit.mbar, tstRslt.AmbPressEnd)); /// CA [mbar] sb.Append(";"); sb.AppendFormat("{0:F0}", Units.ConvertTo(Unit.mbar, tstRslt.AmbPressEnd)); /// CA [mbar]
sb.Append(";"); sb.AppendFormat("{0:F1}", Units.ConvertTo(Unit.RPct, tstRslt.AmbHumiEnd)); /// CB [R%] sb.Append(";"); sb.AppendFormat("{0:F1}", Units.ConvertTo(Unit.RPct, tstRslt.AmbHumiEnd)); /// CB [R%]
sb.Append(";"); sb.Append(tstRslt.PulsesMaster); /// CC Celkovy pocet et. pulzov skusky sb.Append(";"); sb.Append(tstRslt.PulsesMaster); /// CC Celkovy pocet et. pulzov skusky (Prolonged : do vahy)
sb.Append(";"); sb.Append(" "); /// CD - '' - pre druhy sb.Append(";"); sb.Append((tstRslt.TotalPulsesMstr != 0) ? tstRslt.TotalPulsesMstr.ToString() : " "); /// CD - '' - pre druhy (Prolonged : celkovy pocet)
for (int i = 0; i < ProcessData.BatchRslts.WMPositionsCount; i++) for (int i = 0; i < ProcessData.BatchRslts.WMPositionsCount; i++)
{ {
if (ProcessData.BatchRslts.WaterMeters[i] != null) if (ProcessData.BatchRslts.WaterMeters[i] != null)
@@ -1117,8 +1117,10 @@ namespace TBF.BenchControl.Sequences
#endif #endif
sb.Append(";"); sb.Append(isCamera ? mtrRslt.VolumeStart * mtrRslt.PulsesPerLiter : 0); /// CQ WM Phi_start - pri hodnotach z kamery sb.Append(";"); sb.Append(isCamera ? mtrRslt.VolumeStart * mtrRslt.PulsesPerLiter : 0); /// CQ WM Phi_start - pri hodnotach z kamery
sb.Append(";"); sb.Append(isCamera ? mtrRslt.VolumeEnd * mtrRslt.PulsesPerLiter : 0); /// CR WM Phi_end - ' ' - sb.Append(";"); sb.Append(isCamera ? mtrRslt.VolumeEnd * mtrRslt.PulsesPerLiter : 0); /// CR WM Phi_end - ' ' -
sb.Append(";"); sb.Append(isCamera ? mtrRslt.TimestampStart : 0); /// CS WM Time_start - ' ' -
sb.Append(";"); sb.Append(isCamera ? mtrRslt.TimestampEnd : 0); /// CT WM Time_end - ' ' - sb.Append(";"); sb.Append(mtrRslt.TimestampStart); /// CS WM Time_start - ' ' -
sb.Append(";"); sb.Append(mtrRslt.TimestampEnd); /// CT WM Time_end - ' ' -
sb.Append(";"); sb.Append(isCamera ? mtrRslt.PulsesPerLiter : 0); /// CU WM Degree per liter sb.Append(";"); sb.Append(isCamera ? mtrRslt.PulsesPerLiter : 0); /// CU WM Degree per liter
sb.Append(";"); sb.Append(0); /// CV Analog out 1 (max mA) sb.Append(";"); sb.Append(0); /// CV Analog out 1 (max mA)
@@ -748,33 +748,32 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
double massPulses = Convert.ToDouble(cBrd.EtPulsesK); double massPulses = Convert.ToDouble(cBrd.EtPulsesK);
/// Main results /// Main results
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName; tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
tstRslt.StartTime = TestStartTime; tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime; tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime; tstRslt.FlowSetTime = flowSetTime;
tstRslt.TestTime = cBrd.TTime; /// [s] measurement time tstRslt.TestTime = cBrd.TTime; /// [s] measurement time (TODO: or cBrd.ImpulseTime(0) ???)
tstRslt.PulsesMaster = totalPulses; /// Pulses of the master flow meter (test total) tstRslt.PulsesMaster = massPulses; /// Pulses of the master flow meter (test total)
tstRslt.MassStartRaw = StartMass.Val; tstRslt.TotalPulsesMstr = totalPulses;
tstRslt.MassStart = Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections); tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassEndRaw = EndMass.Val; tstRslt.MassStart = Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections); tstRslt.MassEndRaw = EndMass.Val;
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart) * totalPulses / (tstRslt.TestTime * massPulses); /// [kg/h] tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h] tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart) * totalPulses / (tstRslt.TestTime * massPulses); /// [kg/h]
tstRslt.Buoyancy = Formulas.Buoyancy(); tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * totalPulses / tstRslt.TestTime; /// [m3/h]
double collectedVoluemCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume of collected water tstRslt.Buoyancy = Formulas.Buoyancy();
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume of collected water
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
tstRslt.ConstMaster = (massPulses == 0) ? tstRslt.ConstMasterCorr : (collectedVoluemCTV / massPulses); tstRslt.ConstMaster = (massPulses == 0) ? tstRslt.ConstMasterCorr : (tstRslt.VolumeCTV / massPulses);
/// Calculated master pulses per liter tstRslt.VolumeMaster = LtrPerRefPulse * massPulses; /// [l] volume from the master flow meter
tstRslt.VolumeCTV = tstRslt.ConstMaster * totalPulses; tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.VolumeMaster = LtrPerRefPulse * totalPulses; /// [l] volume from the master flow meter
tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
tstRslt.FlowMean = (float)RefFlowStat.Average; tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First; tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last; tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min; tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max; tstRslt.FlowMax = (float)RefFlowStat.Max;
tstRslt.DiverterStart = switchTimeStart.Val; tstRslt.DiverterStart = switchTimeStart.Val;
tstRslt.DivStart10 = 0; tstRslt.DivStart10 = 0;
@@ -825,7 +824,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
if (meterRslt.PulsesMaster != 0) if (meterRslt.PulsesMaster != 0)
{ {
meterRslt.VolumeMeter *= (tstRslt.PulsesMaster / meterRslt.PulsesMaster); meterRslt.VolumeMeter *= (totalPulses / meterRslt.PulsesMaster);
} }
meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, tstRslt.VolumeCTV); /// Main/Aux meter error is not usedfor evaluation meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, tstRslt.VolumeCTV); /// Main/Aux meter error is not usedfor evaluation
@@ -838,7 +837,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
{ {
compoundMeterRslt.VolumeRef = tstRslt.VolumeCTV; compoundMeterRslt.VolumeRef = tstRslt.VolumeCTV;
compoundMeterRslt.VolumeMeter = mainMeterRslt.VolumeMeter + auxMeterRslt.VolumeMeter; compoundMeterRslt.VolumeMeter = mainMeterRslt.VolumeMeter + auxMeterRslt.VolumeMeter;
compoundMeterRslt.PulsesMaster = tstRslt.PulsesMaster; compoundMeterRslt.PulsesMaster = totalPulses;
compoundMeterRslt.TestTime = tstRslt.TestTime; compoundMeterRslt.TestTime = tstRslt.TestTime;
compoundMeterRslt.Error = Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef); compoundMeterRslt.Error = Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.FlowMean) + test.Uncertainty) compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.FlowMean) + test.Uncertainty)
@@ -908,7 +907,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
energyRslt.PulsesMaster = Convert.ToDouble(energyRegReader.WMRefPulses); energyRslt.PulsesMaster = Convert.ToDouble(energyRegReader.WMRefPulses);
energyRslt.VolumeStart = 0; energyRslt.VolumeStart = 0;
energyRslt.VolumeEnd = 0; energyRslt.VolumeEnd = 0;
energyRslt.VolumeRef = tstRslt.RefEnergy * (energyRslt.PulsesMaster / tstRslt.PulsesMaster); /// [J] energyRslt.VolumeRef = tstRslt.RefEnergy * (energyRslt.PulsesMaster / totalPulses); /// [J]
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Config.Units.ConvertFrom(Config.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J] energyRslt.VolumeMeter = energyRslt.PulsesMeter * Config.Units.ConvertFrom(Config.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
energyRslt.TestTime = cBrd.ImpulseTime(i + 1); /// [s] energyRslt.TestTime = cBrd.ImpulseTime(i + 1); /// [s]
@@ -951,8 +950,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
meterRslt.VolumeStart = dstrReader.VolumeLtrStart; /// liter meterRslt.VolumeStart = dstrReader.VolumeLtrStart; /// liter
meterRslt.VolumeEnd = dstrReader.VolumeLtrEnd; /// liter meterRslt.VolumeEnd = dstrReader.VolumeLtrEnd; /// liter
meterRslt.VolumeMeter = Math.Abs(dstrReader.VolumeLtrEnd - dstrReader.VolumeLtrStart); meterRslt.VolumeMeter = Math.Abs(dstrReader.VolumeLtrEnd - dstrReader.VolumeLtrStart);
meterRslt.VolumeRef = tstRslt.VolumeCTV * meterRslt.TestTime / tstRslt.TestTime; meterRslt.VolumeRef = tstRslt.VolumeCTV * meterRslt.TestTime * totalPulses / (tstRslt.TestTime * massPulses);
meterRslt.PulsesMaster = tstRslt.PulsesMaster * meterRslt.TestTime / tstRslt.TestTime; meterRslt.PulsesMaster = totalPulses * meterRslt.TestTime / tstRslt.TestTime;
if (iPerl != null) if (iPerl != null)
{ {
@@ -969,25 +968,25 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
} }
else if (cameraRoi != null) else if (cameraRoi != null)
{ {
meterRslt.TimestampStart = cameraRoi.TimestampStart; /// second meterRslt.TimestampStart = cameraRoi.TimestampStart; /// second
meterRslt.TimestampEnd = cameraRoi.TimestampEnd; /// second meterRslt.TimestampEnd = cameraRoi.TimestampEnd; /// second
meterRslt.TestTime = cameraRoi.TimestampEnd - cameraRoi.TimestampStart; /// second meterRslt.TestTime = cameraRoi.TimestampEnd - cameraRoi.TimestampStart; /// second
meterRslt.VolumeStart = cameraRoi.VolumeStart; /// liter meterRslt.VolumeStart = cameraRoi.VolumeStart; /// liter
meterRslt.VolumeEnd = cameraRoi.VolumeEnd; /// liter meterRslt.VolumeEnd = cameraRoi.VolumeEnd; /// liter
meterRslt.VolumeMeter = cameraRoi.VolumeEnd - cameraRoi.VolumeStart; /// liter meterRslt.VolumeMeter = cameraRoi.VolumeEnd - cameraRoi.VolumeStart; /// liter
meterRslt.VolumeRef = tstRslt.VolumeCTV * meterRslt.TestTime / tstRslt.TestTime; meterRslt.VolumeRef = tstRslt.VolumeCTV * meterRslt.TestTime * totalPulses / (tstRslt.TestTime * massPulses);
meterRslt.PulsesMaster = tstRslt.PulsesMaster * meterRslt.TestTime / tstRslt.TestTime; meterRslt.PulsesMaster = totalPulses * meterRslt.TestTime / tstRslt.TestTime;
} }
else else
{ {
meterRslt.TestTime = cBrd.ImpulseTime(i + 1); /// TODO: Malo by sa citat z dosky meterRslt.TestTime = cBrd.ImpulseTime(i + 1); /// TODO: Malo by sa citat z dosky
meterRslt.PulsesMaster = Convert.ToDouble(regReader.WMRefPulses); meterRslt.PulsesMaster = Convert.ToDouble(regReader.WMRefPulses);
meterRslt.VolumeStart = 0; /// liter meterRslt.VolumeStart = 0; /// liter
meterRslt.VolumeEnd = 0; /// liter meterRslt.VolumeEnd = 0; /// liter
meterRslt.VolumeMeter = meterRslt.PulsesMeter * regReader.LtrsPerPulse; /// liter meterRslt.VolumeMeter = meterRslt.PulsesMeter * regReader.LtrsPerPulse; /// liter
meterRslt.VolumeRef = meterRslt.PulsesMaster * tstRslt.ConstMaster; /// liter meterRslt.VolumeRef = totalPulses * tstRslt.ConstMaster; /// liter
} }
meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef); meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
@@ -226,9 +226,14 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
if (messageID == MessageID.Calibration && offset == 2) if (messageID == MessageID.Calibration && offset == 2)
{ {
UInt16 calibFactor = (UInt16)(pBuf[0] + 256 * pBuf[1]); UInt16 calibFactor = (UInt16)(pBuf[0] + 256 * pBuf[1]);
rfidDataLogger.InfoFormat("{0}: WriteRequestPort(calibFactor={1}) returned {2} {3}", name, calibFactor, retv, (retv != 0) ? "!" : ""); rfidDataLogger.InfoFormat("{0}: WriteRequestPort(Cal={1}) returned {2} {3}", name, calibFactor, retv, (retv != 0) ? "!" : "");
} }
else else if (messageID == MessageID.Calibration && offset == 34)
{
UInt16 calibFactor = (UInt16)(pBuf[0] + 256 * pBuf[1]);
rfidDataLogger.InfoFormat("{0}: WriteRequestPort(CalLNA={1}) returned {2} {3}", name, calibFactor, retv, (retv != 0) ? "!" : "");
}
else
rfidDataLogger.InfoFormat("{0}: WriteRequestPort({2}, {3}, {4}, {5} {6}) returned {1} {7}", name, retv, messageID, offset, lenght, pBuf[0].ToString("X2"), pBuf[1].ToString("X2"), (retv != 0) ? "!" : ""); rfidDataLogger.InfoFormat("{0}: WriteRequestPort({2}, {3}, {4}, {5} {6}) returned {1} {7}", name, retv, messageID, offset, lenght, pBuf[0].ToString("X2"), pBuf[1].ToString("X2"), (retv != 0) ? "!" : "");
} }
else else
Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+4 -1
View File
@@ -20,6 +20,8 @@ namespace TBF
public const string ImagesDir = "C:\\Tbf\\Images\\"; public const string ImagesDir = "C:\\Tbf\\Images\\";
public const string TempImagesDir = "C:\\Tbf\\Images\\Temp\\"; public const string TempImagesDir = "C:\\Tbf\\Images\\Temp\\";
public static string ExecutableDir;
/// log4net /// log4net
static ILog log; static ILog log;
const string log4netConfigFName = "log4netConfig.xml"; const string log4netConfigFName = "log4netConfig.xml";
@@ -64,7 +66,8 @@ namespace TBF
/// Program version string /// Program version string
System.Reflection.Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly(); System.Reflection.Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
Version ver = thisAssembly.GetName().Version; ExecutableDir = Path.GetDirectoryName(thisAssembly.Location);
Version ver = thisAssembly.GetName().Version;
Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build); Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
BuildDateTime = new System.IO.FileInfo(thisAssembly.Location).LastWriteTime; BuildDateTime = new System.IO.FileInfo(thisAssembly.Location).LastWriteTime;
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number // Build Number
// Revision // Revision
// //
[assembly: AssemblyVersion("2.18.1066.0")] [assembly: AssemblyVersion("2.18.1067.0")]
[assembly: AssemblyFileVersion("2.18.1066.0")] [assembly: AssemblyFileVersion("2.18.1067.0")]
+6
View File
@@ -3043,6 +3043,12 @@
<None Include="Resources\RoiStyle1.bmp" /> <None Include="Resources\RoiStyle1.bmp" />
<None Include="Resources\RoiStyle2.bmp" /> <None Include="Resources\RoiStyle2.bmp" />
<None Include="Resources\RoiStyle3.bmp" /> <None Include="Resources\RoiStyle3.bmp" />
<Content Include="Pictures\forward_dir.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Pictures\reversed_dir.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Resources\empty.png" /> <Content Include="Resources\empty.png" />
<Content Include="Resources\switch-off.png" /> <Content Include="Resources\switch-off.png" />
<Content Include="Resources\switch-on.png" /> <Content Include="Resources\switch-on.png" />