diff --git a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfg.cs b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfg.cs
index cba204163..6b8a86913 100644
--- a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfg.cs
+++ b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfg.cs
@@ -22,6 +22,27 @@ namespace TBF.BenchControl.Keithley.TempMeter
public double b7;
public double c7;
+ /// Calibration info serialized parameters displayed in Metrology tab page
+ string calibCertificateNr;
+ DateTime calibDate;
+ DateTime calibValidDate;
+ public string CalibCertificateNr
+ {
+ get { return calibCertificateNr; }
+ set { calibCertificateNr = value; }
+ }
+ public DateTime CalibDate
+ {
+ get { return calibDate; }
+ set { calibDate = value; }
+ }
+ public DateTime CalibValidDate
+ {
+ get { return calibValidDate; }
+ set { calibValidDate = value; }
+ }
+
+
/// Private parameterless constructor invoked by all other (public) constructors
TempMeterCfg()
{
diff --git a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfgCtrl.Designer.cs b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfgCtrl.Designer.cs
index 00c85773c..629b24471 100644
--- a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfgCtrl.Designer.cs
+++ b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfgCtrl.Designer.cs
@@ -31,187 +31,92 @@ namespace TBF.BenchControl.Keithley.TempMeter
///
private void InitializeComponent()
{
- this.channelTextBox = new System.Windows.Forms.TextBox();
- this.channelLabel = new System.Windows.Forms.Label();
- this.parentNameLabel = new System.Windows.Forms.Label();
- this.nameTextBox = new System.Windows.Forms.TextBox();
- this.nameLabel = new System.Windows.Forms.Label();
- this.classNameLabel = new System.Windows.Forms.Label();
- this.parentNameComboBox = new System.Windows.Forms.ComboBox();
- this.r0TextBox = new System.Windows.Forms.TextBox();
- this.a7TextBox = new System.Windows.Forms.TextBox();
- this.b7TextBox = new System.Windows.Forms.TextBox();
- this.c7TextBox = new System.Windows.Forms.TextBox();
- this.label1 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.its90Label = new System.Windows.Forms.Label();
- this.label4 = new System.Windows.Forms.Label();
- this.SuspendLayout();
- //
- // channelTextBox
- //
- this.channelTextBox.Enabled = false;
- this.channelTextBox.Location = new System.Drawing.Point(125, 82);
- this.channelTextBox.Name = "channelTextBox";
- this.channelTextBox.Size = new System.Drawing.Size(46, 20);
- this.channelTextBox.TabIndex = 6;
- //
- // channelLabel
- //
- this.channelLabel.AutoSize = true;
- this.channelLabel.Location = new System.Drawing.Point(30, 85);
- this.channelLabel.Name = "channelLabel";
- this.channelLabel.Size = new System.Drawing.Size(73, 13);
- this.channelLabel.TabIndex = 5;
- this.channelLabel.Text = "Channel (1..5)";
- //
- // parentNameLabel
- //
- this.parentNameLabel.AutoSize = true;
- this.parentNameLabel.Location = new System.Drawing.Point(30, 61);
- this.parentNameLabel.Name = "parentNameLabel";
- this.parentNameLabel.Size = new System.Drawing.Size(69, 13);
- this.parentNameLabel.TabIndex = 3;
- this.parentNameLabel.Text = "Parent Name";
- //
- // nameTextBox
- //
- this.nameTextBox.Enabled = false;
- this.nameTextBox.Location = new System.Drawing.Point(125, 34);
- this.nameTextBox.Name = "nameTextBox";
- this.nameTextBox.Size = new System.Drawing.Size(130, 20);
- this.nameTextBox.TabIndex = 2;
- //
- // nameLabel
- //
- this.nameLabel.AutoSize = true;
- this.nameLabel.Location = new System.Drawing.Point(30, 37);
- this.nameLabel.Name = "nameLabel";
- this.nameLabel.Size = new System.Drawing.Size(35, 13);
- this.nameLabel.TabIndex = 1;
- this.nameLabel.Text = "Name";
- //
- // classNameLabel
- //
- this.classNameLabel.AutoSize = true;
- this.classNameLabel.Location = new System.Drawing.Point(122, 10);
- this.classNameLabel.Name = "classNameLabel";
- this.classNameLabel.Size = new System.Drawing.Size(83, 13);
- this.classNameLabel.TabIndex = 0;
- this.classNameLabel.Text = "ComonentName";
- //
- // parentNameComboBox
- //
- this.parentNameComboBox.Enabled = false;
- this.parentNameComboBox.FormattingEnabled = true;
- this.parentNameComboBox.Location = new System.Drawing.Point(125, 58);
- this.parentNameComboBox.Name = "parentNameComboBox";
- this.parentNameComboBox.Size = new System.Drawing.Size(130, 21);
- this.parentNameComboBox.TabIndex = 4;
- //
- // r0TextBox
- //
- this.r0TextBox.Enabled = false;
- this.r0TextBox.Location = new System.Drawing.Point(125, 137);
- this.r0TextBox.Name = "r0TextBox";
- this.r0TextBox.Size = new System.Drawing.Size(130, 20);
- this.r0TextBox.TabIndex = 7;
- //
- // a7TextBox
- //
- this.a7TextBox.Enabled = false;
- this.a7TextBox.Location = new System.Drawing.Point(125, 160);
- this.a7TextBox.Name = "a7TextBox";
- this.a7TextBox.Size = new System.Drawing.Size(130, 20);
- this.a7TextBox.TabIndex = 8;
- //
- // b7TextBox
- //
- this.b7TextBox.Enabled = false;
- this.b7TextBox.Location = new System.Drawing.Point(125, 183);
- this.b7TextBox.Name = "b7TextBox";
- this.b7TextBox.Size = new System.Drawing.Size(130, 20);
- this.b7TextBox.TabIndex = 9;
- //
- // c7TextBox
- //
- this.c7TextBox.Enabled = false;
- this.c7TextBox.Location = new System.Drawing.Point(125, 206);
- this.c7TextBox.Name = "c7TextBox";
- this.c7TextBox.Size = new System.Drawing.Size(130, 20);
- this.c7TextBox.TabIndex = 10;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(30, 140);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(53, 13);
- this.label1.TabIndex = 11;
- this.label1.Text = "R(0.01°C)";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(30, 163);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(19, 13);
- this.label2.TabIndex = 12;
- this.label2.Text = "a7";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(30, 186);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(19, 13);
- this.label3.TabIndex = 13;
- this.label3.Text = "b7";
- //
- // its90Label
- //
- this.its90Label.AutoSize = true;
- this.its90Label.Location = new System.Drawing.Point(30, 117);
- this.its90Label.Name = "its90Label";
- this.its90Label.Size = new System.Drawing.Size(217, 13);
- this.its90Label.TabIndex = 14;
- this.its90Label.Text = "Calibration coefficients as defined in ITS-90 :";
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(30, 209);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(19, 13);
- this.label4.TabIndex = 15;
- this.label4.Text = "c7";
- //
- // TempMeterCfgCtrl
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.label4);
- this.Controls.Add(this.its90Label);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.c7TextBox);
- this.Controls.Add(this.b7TextBox);
- this.Controls.Add(this.a7TextBox);
- this.Controls.Add(this.r0TextBox);
- this.Controls.Add(this.parentNameComboBox);
- this.Controls.Add(this.channelTextBox);
- this.Controls.Add(this.channelLabel);
- this.Controls.Add(this.parentNameLabel);
- this.Controls.Add(this.nameTextBox);
- this.Controls.Add(this.nameLabel);
- this.Controls.Add(this.classNameLabel);
- this.Name = "TempMeterCfgCtrl";
- this.Size = new System.Drawing.Size(300, 240);
- this.Load += new System.EventHandler(this.TempMeterCfgCtrl_Load);
- this.ResumeLayout(false);
- this.PerformLayout();
+ this.channelTextBox = new System.Windows.Forms.TextBox();
+ this.channelLabel = new System.Windows.Forms.Label();
+ this.parentNameLabel = new System.Windows.Forms.Label();
+ this.nameTextBox = new System.Windows.Forms.TextBox();
+ this.nameLabel = new System.Windows.Forms.Label();
+ this.classNameLabel = new System.Windows.Forms.Label();
+ this.parentNameComboBox = new System.Windows.Forms.ComboBox();
+ this.SuspendLayout();
+ //
+ // channelTextBox
+ //
+ this.channelTextBox.Enabled = false;
+ this.channelTextBox.Location = new System.Drawing.Point(125, 88);
+ this.channelTextBox.Name = "channelTextBox";
+ this.channelTextBox.Size = new System.Drawing.Size(46, 20);
+ this.channelTextBox.TabIndex = 6;
+ //
+ // channelLabel
+ //
+ this.channelLabel.AutoSize = true;
+ this.channelLabel.Location = new System.Drawing.Point(30, 91);
+ this.channelLabel.Name = "channelLabel";
+ this.channelLabel.Size = new System.Drawing.Size(73, 13);
+ this.channelLabel.TabIndex = 5;
+ this.channelLabel.Text = "Channel (1..5)";
+ //
+ // parentNameLabel
+ //
+ this.parentNameLabel.AutoSize = true;
+ this.parentNameLabel.Location = new System.Drawing.Point(30, 67);
+ this.parentNameLabel.Name = "parentNameLabel";
+ this.parentNameLabel.Size = new System.Drawing.Size(69, 13);
+ this.parentNameLabel.TabIndex = 3;
+ this.parentNameLabel.Text = "Parent Name";
+ //
+ // nameTextBox
+ //
+ this.nameTextBox.Enabled = false;
+ this.nameTextBox.Location = new System.Drawing.Point(125, 40);
+ this.nameTextBox.Name = "nameTextBox";
+ this.nameTextBox.Size = new System.Drawing.Size(130, 20);
+ this.nameTextBox.TabIndex = 2;
+ //
+ // nameLabel
+ //
+ this.nameLabel.AutoSize = true;
+ this.nameLabel.Location = new System.Drawing.Point(30, 43);
+ this.nameLabel.Name = "nameLabel";
+ this.nameLabel.Size = new System.Drawing.Size(35, 13);
+ this.nameLabel.TabIndex = 1;
+ this.nameLabel.Text = "Name";
+ //
+ // classNameLabel
+ //
+ this.classNameLabel.AutoSize = true;
+ this.classNameLabel.Location = new System.Drawing.Point(122, 16);
+ this.classNameLabel.Name = "classNameLabel";
+ this.classNameLabel.Size = new System.Drawing.Size(83, 13);
+ this.classNameLabel.TabIndex = 0;
+ this.classNameLabel.Text = "ComonentName";
+ //
+ // parentNameComboBox
+ //
+ this.parentNameComboBox.Enabled = false;
+ this.parentNameComboBox.FormattingEnabled = true;
+ this.parentNameComboBox.Location = new System.Drawing.Point(125, 64);
+ this.parentNameComboBox.Name = "parentNameComboBox";
+ this.parentNameComboBox.Size = new System.Drawing.Size(130, 21);
+ this.parentNameComboBox.TabIndex = 4;
+ //
+ // TempMeterCfgCtrl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.parentNameComboBox);
+ this.Controls.Add(this.channelTextBox);
+ this.Controls.Add(this.channelLabel);
+ this.Controls.Add(this.parentNameLabel);
+ this.Controls.Add(this.nameTextBox);
+ this.Controls.Add(this.nameLabel);
+ this.Controls.Add(this.classNameLabel);
+ this.Name = "TempMeterCfgCtrl";
+ this.Size = new System.Drawing.Size(300, 240);
+ this.Load += new System.EventHandler(this.TempMeterCfgCtrl_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
@@ -223,15 +128,6 @@ namespace TBF.BenchControl.Keithley.TempMeter
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
- private System.Windows.Forms.ComboBox parentNameComboBox;
- private System.Windows.Forms.TextBox r0TextBox;
- private System.Windows.Forms.TextBox a7TextBox;
- private System.Windows.Forms.TextBox b7TextBox;
- private System.Windows.Forms.TextBox c7TextBox;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label its90Label;
- private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.ComboBox parentNameComboBox;
}
}
diff --git a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfgCtrl.cs b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfgCtrl.cs
index b05049c7b..128f46ed0 100644
--- a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfgCtrl.cs
+++ b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfgCtrl.cs
@@ -75,10 +75,6 @@ namespace TBF.BenchControl.Keithley.TempMeter
nameTextBox.Text = config.Name;
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
channelTextBox.Text = config.Channel.ToString();
- r0TextBox.Text = config.R001C.ToString();
- a7TextBox.Text = config.a7.ToString();
- b7TextBox.Text = config.b7.ToString();
- c7TextBox.Text = config.c7.ToString();
}
public void Unlock()
@@ -86,10 +82,6 @@ namespace TBF.BenchControl.Keithley.TempMeter
nameTextBox.Enabled = true;
parentNameComboBox.Enabled = true;
channelTextBox.Enabled = true;
- r0TextBox.Enabled = true;
- a7TextBox.Enabled = true;
- b7TextBox.Enabled = true;
- c7TextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
@@ -107,27 +99,6 @@ namespace TBF.BenchControl.Keithley.TempMeter
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Channel' should be in the range 1 .. 5";
}
- double ddummy;
- if (!Utils.TryParseUDouble(r0TextBox.Text, out ddummy))
- {
- flags |= CfgUpdateFlags.Error;
- message += Environment.NewLine + "Invalid 'R(0.01°C)'";
- }
- if (!Utils.TryParseEDouble(a7TextBox.Text, out ddummy))
- {
- flags |= CfgUpdateFlags.Error;
- message += Environment.NewLine + "Invalid 'a7'";
- }
- if (!Utils.TryParseEDouble(b7TextBox.Text, out ddummy))
- {
- flags |= CfgUpdateFlags.Error;
- message += Environment.NewLine + "Invalid 'b7'";
- }
- if (!Utils.TryParseEDouble(c7TextBox.Text, out ddummy))
- {
- flags |= CfgUpdateFlags.Error;
- message += Environment.NewLine + "Invalid 'c7'";
- }
return flags;
}
@@ -141,10 +112,6 @@ namespace TBF.BenchControl.Keithley.TempMeter
config.Name = nameTextBox.Text;
config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
config.Channel = int.Parse(channelTextBox.Text);
- config.R001C = Utils.ParseUDouble(r0TextBox.Text);
- config.a7 = Utils.ParseEDouble(a7TextBox.Text);
- config.b7 = Utils.ParseEDouble(b7TextBox.Text);
- config.c7 = Utils.ParseEDouble(c7TextBox.Text);
return flags;
}
diff --git a/TestBenchFramework/MetrologyDlg.cs b/TestBenchFramework/MetrologyDlg.cs
index b3bb5b1cb..d70dbe8f7 100644
--- a/TestBenchFramework/MetrologyDlg.cs
+++ b/TestBenchFramework/MetrologyDlg.cs
@@ -49,6 +49,7 @@ namespace TBF
int balancesCount = 0;
int flowMetersCount = 0;
int pressMetersCount = 0;
+ int platinumTempMetersCount = 0;
session = Config.FluentCommon.CreateSession(Config.Entities.DBKind.Config);
cmpntEntities = session.CreateQuery("FROM Component ORDER BY ItemNr")
@@ -108,7 +109,20 @@ namespace TBF
tabPage.Controls.Add(uiControl);
metrologyTabControl.TabPages.Add(tabPage);
}
- }
+ // Pressure meter tab-pages
+ if (factory is BenchControl.Keithley.TempMeter.Factory)
+ {
+ platinumTempMetersCount++;
+ TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
+ MetrologyDlgPlatinumResistanceTMeterTab uiControl = new MetrologyDlgPlatinumResistanceTMeterTab();
+ uiControl.MeterEntity = cmpnt;
+ uiControl.TempMeterCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.Keithley.TempMeter.TempMeterCfg;
+ uiControl.Dock = DockStyle.Fill;
+ tabPage.Tag = uiControl;
+ tabPage.Controls.Add(uiControl);
+ metrologyTabControl.TabPages.Add(tabPage);
+ }
+ }
}
private void unlockButton_Click(object sender, EventArgs e)
diff --git a/TestBenchFramework/Resources/Strings.Designer.cs b/TestBenchFramework/Resources/Strings.Designer.cs
index b5fc168e2..64bc23efb 100644
--- a/TestBenchFramework/Resources/Strings.Designer.cs
+++ b/TestBenchFramework/Resources/Strings.Designer.cs
@@ -1635,6 +1635,24 @@ namespace TBF.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to ITS-90 calibration coefficients.
+ ///
+ internal static string ITS90_calibration_coefficients {
+ get {
+ return ResourceManager.GetString("ITS90_calibration_coefficients", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to ITS-90 test.
+ ///
+ internal static string ITS90_test {
+ get {
+ return ResourceManager.GetString("ITS90_test", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Length.
///
@@ -3102,6 +3120,15 @@ namespace TBF.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Resistance.
+ ///
+ internal static string Resistance {
+ get {
+ return ResourceManager.GetString("Resistance", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to You must restart to apply these changes.
///
@@ -3750,6 +3777,15 @@ namespace TBF.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Temperature.
+ ///
+ internal static string Temperature {
+ get {
+ return ResourceManager.GetString("Temperature", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Temperature class.
///
diff --git a/TestBenchFramework/Resources/Strings.resx b/TestBenchFramework/Resources/Strings.resx
index 6957ca07d..ac962174e 100644
--- a/TestBenchFramework/Resources/Strings.resx
+++ b/TestBenchFramework/Resources/Strings.resx
@@ -1564,4 +1564,16 @@
Component {0} crashed. Results not saved.
+
+ ITS-90 calibration coefficients
+
+
+ ITS-90 test
+
+
+ Resistance
+
+
+ Temperature
+
\ No newline at end of file
diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj
index e01226fdd..079bae9f1 100644
--- a/TestBenchFramework/TBF.csproj
+++ b/TestBenchFramework/TBF.csproj
@@ -1438,6 +1438,12 @@
MetrologyDlgBalanceTab.cs
+
+ UserControl
+
+
+ MetrologyDlgPlatinumResistanceTMeterTab.cs
+
UserControl
@@ -1989,6 +1995,9 @@
MetrologyDlgBalanceTab.cs
+
+ MetrologyDlgPlatinumResistanceTMeterTab.cs
+
MetrologyDlgPressMeterTab.cs
diff --git a/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.Designer.cs b/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.Designer.cs
new file mode 100644
index 000000000..2386b00e3
--- /dev/null
+++ b/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.Designer.cs
@@ -0,0 +1,352 @@
+///
+/// Copyright (c) 2013-2015 Sensus Metering Systems
+///
+namespace TBF.UiControls
+{
+ partial class MetrologyDlgPlatinumResistanceTMeterTab
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.cmpntNameLabel = new System.Windows.Forms.Label();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
+ this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
+ this.calibValidDateLabel = new System.Windows.Forms.Label();
+ this.calibDateTextBox = new System.Windows.Forms.TextBox();
+ this.calibDateLabel = new System.Windows.Forms.Label();
+ this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
+ this.calibCertificateNrLabel = new System.Windows.Forms.Label();
+ this.its90CalibrationCoefficientsGroupBox = new System.Windows.Forms.GroupBox();
+ this.c7TextBox = new System.Windows.Forms.TextBox();
+ this.c7Label = new System.Windows.Forms.Label();
+ this.b7TextBox = new System.Windows.Forms.TextBox();
+ this.a7TextBox = new System.Windows.Forms.TextBox();
+ this.r0TextBox = new System.Windows.Forms.TextBox();
+ this.b7Label = new System.Windows.Forms.Label();
+ this.a7Label = new System.Windows.Forms.Label();
+ this.r0Label = new System.Windows.Forms.Label();
+ this.nameGroupBox = new System.Windows.Forms.GroupBox();
+ this.testGroupBox = new System.Windows.Forms.GroupBox();
+ this.temperatureTextBox = new System.Windows.Forms.TextBox();
+ this.resistanceTextBox = new System.Windows.Forms.TextBox();
+ this.temperatureLabel = new System.Windows.Forms.Label();
+ this.resistanceLabel = new System.Windows.Forms.Label();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ this.calibrationGroupBox.SuspendLayout();
+ this.its90CalibrationCoefficientsGroupBox.SuspendLayout();
+ this.nameGroupBox.SuspendLayout();
+ this.testGroupBox.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // cmpntNameLabel
+ //
+ this.cmpntNameLabel.AutoSize = true;
+ this.cmpntNameLabel.Location = new System.Drawing.Point(69, 16);
+ this.cmpntNameLabel.Name = "cmpntNameLabel";
+ this.cmpntNameLabel.Size = new System.Drawing.Size(64, 13);
+ this.cmpntNameLabel.TabIndex = 0;
+ this.cmpntNameLabel.Text = "cmpntName";
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+ this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+ this.splitContainer1.Name = "splitContainer1";
+ this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.calibrationGroupBox);
+ this.splitContainer1.Panel1.Controls.Add(this.its90CalibrationCoefficientsGroupBox);
+ this.splitContainer1.Panel1.Controls.Add(this.nameGroupBox);
+ this.splitContainer1.Panel1.Controls.Add(this.testGroupBox);
+ this.splitContainer1.Size = new System.Drawing.Size(668, 400);
+ this.splitContainer1.SplitterDistance = 150;
+ this.splitContainer1.TabIndex = 1;
+ //
+ // calibrationGroupBox
+ //
+ this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
+ this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
+ this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
+ this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
+ this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
+ this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
+ this.calibrationGroupBox.Location = new System.Drawing.Point(16, 54);
+ this.calibrationGroupBox.Name = "calibrationGroupBox";
+ this.calibrationGroupBox.Size = new System.Drawing.Size(208, 86);
+ this.calibrationGroupBox.TabIndex = 6;
+ this.calibrationGroupBox.TabStop = false;
+ this.calibrationGroupBox.Text = "Calibration";
+ //
+ // calibValidDateTextBox
+ //
+ this.calibValidDateTextBox.Enabled = false;
+ this.calibValidDateTextBox.Location = new System.Drawing.Point(107, 59);
+ this.calibValidDateTextBox.Name = "calibValidDateTextBox";
+ this.calibValidDateTextBox.Size = new System.Drawing.Size(95, 20);
+ this.calibValidDateTextBox.TabIndex = 15;
+ //
+ // calibValidDateLabel
+ //
+ this.calibValidDateLabel.AutoSize = true;
+ this.calibValidDateLabel.Location = new System.Drawing.Point(17, 62);
+ this.calibValidDateLabel.Name = "calibValidDateLabel";
+ this.calibValidDateLabel.Size = new System.Drawing.Size(52, 13);
+ this.calibValidDateLabel.TabIndex = 14;
+ this.calibValidDateLabel.Text = "Valid until";
+ //
+ // calibDateTextBox
+ //
+ this.calibDateTextBox.Enabled = false;
+ this.calibDateTextBox.Location = new System.Drawing.Point(107, 37);
+ this.calibDateTextBox.Name = "calibDateTextBox";
+ this.calibDateTextBox.Size = new System.Drawing.Size(95, 20);
+ this.calibDateTextBox.TabIndex = 13;
+ //
+ // calibDateLabel
+ //
+ this.calibDateLabel.AutoSize = true;
+ this.calibDateLabel.Location = new System.Drawing.Point(17, 40);
+ this.calibDateLabel.Name = "calibDateLabel";
+ this.calibDateLabel.Size = new System.Drawing.Size(30, 13);
+ this.calibDateLabel.TabIndex = 12;
+ this.calibDateLabel.Text = "Date";
+ //
+ // calibCertificateNrTextBox
+ //
+ this.calibCertificateNrTextBox.Enabled = false;
+ this.calibCertificateNrTextBox.Location = new System.Drawing.Point(107, 15);
+ this.calibCertificateNrTextBox.Name = "calibCertificateNrTextBox";
+ this.calibCertificateNrTextBox.Size = new System.Drawing.Size(95, 20);
+ this.calibCertificateNrTextBox.TabIndex = 11;
+ //
+ // calibCertificateNrLabel
+ //
+ this.calibCertificateNrLabel.AutoSize = true;
+ this.calibCertificateNrLabel.Location = new System.Drawing.Point(17, 18);
+ this.calibCertificateNrLabel.Name = "calibCertificateNrLabel";
+ this.calibCertificateNrLabel.Size = new System.Drawing.Size(54, 13);
+ this.calibCertificateNrLabel.TabIndex = 10;
+ this.calibCertificateNrLabel.Text = "Certificate";
+ //
+ // its90CalibrationCoefficientsGroupBox
+ //
+ this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.c7TextBox);
+ this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.c7Label);
+ this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.b7TextBox);
+ this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.a7TextBox);
+ this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.r0TextBox);
+ this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.b7Label);
+ this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.a7Label);
+ this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.r0Label);
+ this.its90CalibrationCoefficientsGroupBox.Location = new System.Drawing.Point(233, 10);
+ this.its90CalibrationCoefficientsGroupBox.Name = "its90CalibrationCoefficientsGroupBox";
+ this.its90CalibrationCoefficientsGroupBox.Size = new System.Drawing.Size(230, 130);
+ this.its90CalibrationCoefficientsGroupBox.TabIndex = 5;
+ this.its90CalibrationCoefficientsGroupBox.TabStop = false;
+ this.its90CalibrationCoefficientsGroupBox.Text = "ITS-90 calibration coefficients";
+ //
+ // c7TextBox
+ //
+ this.c7TextBox.Enabled = false;
+ this.c7TextBox.Location = new System.Drawing.Point(95, 101);
+ this.c7TextBox.Name = "c7TextBox";
+ this.c7TextBox.Size = new System.Drawing.Size(124, 20);
+ this.c7TextBox.TabIndex = 7;
+ //
+ // c7Label
+ //
+ this.c7Label.AutoSize = true;
+ this.c7Label.Location = new System.Drawing.Point(23, 104);
+ this.c7Label.Name = "c7Label";
+ this.c7Label.Size = new System.Drawing.Size(19, 13);
+ this.c7Label.TabIndex = 6;
+ this.c7Label.Text = "c7";
+ //
+ // b7TextBox
+ //
+ this.b7TextBox.Enabled = false;
+ this.b7TextBox.Location = new System.Drawing.Point(95, 76);
+ this.b7TextBox.Name = "b7TextBox";
+ this.b7TextBox.Size = new System.Drawing.Size(124, 20);
+ this.b7TextBox.TabIndex = 5;
+ //
+ // a7TextBox
+ //
+ this.a7TextBox.Enabled = false;
+ this.a7TextBox.Location = new System.Drawing.Point(95, 51);
+ this.a7TextBox.Name = "a7TextBox";
+ this.a7TextBox.Size = new System.Drawing.Size(124, 20);
+ this.a7TextBox.TabIndex = 4;
+ //
+ // r0TextBox
+ //
+ this.r0TextBox.Enabled = false;
+ this.r0TextBox.Location = new System.Drawing.Point(95, 26);
+ this.r0TextBox.Name = "r0TextBox";
+ this.r0TextBox.Size = new System.Drawing.Size(124, 20);
+ this.r0TextBox.TabIndex = 3;
+ //
+ // b7Label
+ //
+ this.b7Label.AutoSize = true;
+ this.b7Label.Location = new System.Drawing.Point(23, 79);
+ this.b7Label.Name = "b7Label";
+ this.b7Label.Size = new System.Drawing.Size(19, 13);
+ this.b7Label.TabIndex = 2;
+ this.b7Label.Text = "b7";
+ //
+ // a7Label
+ //
+ this.a7Label.AutoSize = true;
+ this.a7Label.Location = new System.Drawing.Point(23, 54);
+ this.a7Label.Name = "a7Label";
+ this.a7Label.Size = new System.Drawing.Size(19, 13);
+ this.a7Label.TabIndex = 1;
+ this.a7Label.Text = "a7";
+ //
+ // r0Label
+ //
+ this.r0Label.AutoSize = true;
+ this.r0Label.Location = new System.Drawing.Point(23, 29);
+ this.r0Label.Name = "r0Label";
+ this.r0Label.Size = new System.Drawing.Size(53, 13);
+ this.r0Label.TabIndex = 0;
+ this.r0Label.Text = "R(0.01°C)";
+ //
+ // nameGroupBox
+ //
+ this.nameGroupBox.Controls.Add(this.cmpntNameLabel);
+ this.nameGroupBox.Location = new System.Drawing.Point(16, 10);
+ this.nameGroupBox.Name = "nameGroupBox";
+ this.nameGroupBox.Size = new System.Drawing.Size(208, 40);
+ this.nameGroupBox.TabIndex = 4;
+ this.nameGroupBox.TabStop = false;
+ this.nameGroupBox.Text = "Component";
+ //
+ // testGroupBox
+ //
+ this.testGroupBox.Controls.Add(this.temperatureTextBox);
+ this.testGroupBox.Controls.Add(this.resistanceTextBox);
+ this.testGroupBox.Controls.Add(this.temperatureLabel);
+ this.testGroupBox.Controls.Add(this.resistanceLabel);
+ this.testGroupBox.Location = new System.Drawing.Point(472, 10);
+ this.testGroupBox.Name = "testGroupBox";
+ this.testGroupBox.Size = new System.Drawing.Size(180, 130);
+ this.testGroupBox.TabIndex = 3;
+ this.testGroupBox.TabStop = false;
+ this.testGroupBox.Text = "ITS-90 test";
+ //
+ // temperatureTextBox
+ //
+ this.temperatureTextBox.Location = new System.Drawing.Point(101, 51);
+ this.temperatureTextBox.Name = "temperatureTextBox";
+ this.temperatureTextBox.ReadOnly = true;
+ this.temperatureTextBox.Size = new System.Drawing.Size(63, 20);
+ this.temperatureTextBox.TabIndex = 5;
+ //
+ // resistanceTextBox
+ //
+ this.resistanceTextBox.Location = new System.Drawing.Point(101, 26);
+ this.resistanceTextBox.Name = "resistanceTextBox";
+ this.resistanceTextBox.Size = new System.Drawing.Size(63, 20);
+ this.resistanceTextBox.TabIndex = 4;
+ this.resistanceTextBox.TextChanged += new System.EventHandler(this.measuredTextBox_TextChanged);
+ //
+ // temperatureLabel
+ //
+ this.temperatureLabel.AutoSize = true;
+ this.temperatureLabel.Location = new System.Drawing.Point(8, 54);
+ this.temperatureLabel.Name = "temperatureLabel";
+ this.temperatureLabel.Size = new System.Drawing.Size(87, 13);
+ this.temperatureLabel.TabIndex = 3;
+ this.temperatureLabel.Text = "Temperature [°C]";
+ //
+ // resistanceLabel
+ //
+ this.resistanceLabel.AutoSize = true;
+ this.resistanceLabel.Location = new System.Drawing.Point(8, 29);
+ this.resistanceLabel.Name = "resistanceLabel";
+ this.resistanceLabel.Size = new System.Drawing.Size(78, 13);
+ this.resistanceLabel.TabIndex = 2;
+ this.resistanceLabel.Text = "Resistance [Ω]";
+ //
+ // MetrologyDlgPlatinumResistanceTMeterTab
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.splitContainer1);
+ this.Name = "MetrologyDlgPlatinumResistanceTMeterTab";
+ this.Size = new System.Drawing.Size(668, 400);
+ this.Load += new System.EventHandler(this.MetrologyDlgBalanceTab_Load);
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
+ this.splitContainer1.ResumeLayout(false);
+ this.calibrationGroupBox.ResumeLayout(false);
+ this.calibrationGroupBox.PerformLayout();
+ this.its90CalibrationCoefficientsGroupBox.ResumeLayout(false);
+ this.its90CalibrationCoefficientsGroupBox.PerformLayout();
+ this.nameGroupBox.ResumeLayout(false);
+ this.nameGroupBox.PerformLayout();
+ this.testGroupBox.ResumeLayout(false);
+ this.testGroupBox.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label cmpntNameLabel;
+ private System.Windows.Forms.SplitContainer splitContainer1;
+ private System.Windows.Forms.Label resistanceLabel;
+ private System.Windows.Forms.GroupBox testGroupBox;
+ private System.Windows.Forms.TextBox temperatureTextBox;
+ private System.Windows.Forms.TextBox resistanceTextBox;
+ private System.Windows.Forms.Label temperatureLabel;
+ private System.Windows.Forms.GroupBox its90CalibrationCoefficientsGroupBox;
+ private System.Windows.Forms.GroupBox nameGroupBox;
+ private System.Windows.Forms.TextBox b7TextBox;
+ private System.Windows.Forms.TextBox a7TextBox;
+ private System.Windows.Forms.TextBox r0TextBox;
+ private System.Windows.Forms.Label b7Label;
+ private System.Windows.Forms.Label a7Label;
+ private System.Windows.Forms.Label r0Label;
+ private System.Windows.Forms.TextBox c7TextBox;
+ private System.Windows.Forms.Label c7Label;
+ private System.Windows.Forms.GroupBox calibrationGroupBox;
+ private System.Windows.Forms.TextBox calibValidDateTextBox;
+ private System.Windows.Forms.Label calibValidDateLabel;
+ private System.Windows.Forms.TextBox calibDateTextBox;
+ private System.Windows.Forms.Label calibDateLabel;
+ private System.Windows.Forms.TextBox calibCertificateNrTextBox;
+ private System.Windows.Forms.Label calibCertificateNrLabel;
+ }
+}
diff --git a/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.cs b/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.cs
new file mode 100644
index 000000000..36e9a7138
--- /dev/null
+++ b/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.cs
@@ -0,0 +1,174 @@
+///
+/// Copyright (c) 2016 Sensus Metering Systems
+///
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Windows.Forms;
+using log4net;
+using Config.Entities;
+using TBF.Resources;
+
+namespace TBF.UiControls
+{
+ public partial class MetrologyDlgPlatinumResistanceTMeterTab : UserControl, IMetrologyDlgTab
+ {
+ static readonly ILog log = LogManager.GetLogger(typeof(MetrologyDlgPlatinumResistanceTMeterTab));
+
+ ///
+ /// Component entity that has a list of 'measurement-correction' pairs
+ /// to be updated in the database on OK.
+ ///
+ public Component MeterEntity
+ {
+ get { return meterEntity; }
+ set { meterEntity = value; }
+ }
+ Component meterEntity;
+
+ ///
+ /// Balance configuration (with buoyancy parameters)
+ ///
+ public BenchControl.Keithley.TempMeter.TempMeterCfg TempMeterCfg;
+
+ ///
+ /// A list of 'measurement-correction' pairs to be deleted from the database on OK.
+ ///
+ public IList ToBeRemoved
+ {
+ get { return toBeRemoved; }
+ set { toBeRemoved = value; }
+ }
+ IList toBeRemoved;
+
+ MetrologyDlg parent;
+ bool unlocked;
+
+ public MetrologyDlgPlatinumResistanceTMeterTab()
+ {
+ InitializeComponent();
+ toBeRemoved = new List();
+ unlocked = false;
+ }
+
+ private void MetrologyDlgBalanceTab_Load(object sender, System.EventArgs e)
+ {
+ if (meterEntity == null) return;
+
+ parent = ParentForm as MetrologyDlg;
+
+ Localize();
+
+ /// Panel1
+ cmpntNameLabel.Text = TempMeterCfg.Name;
+ resistanceTextBox.Text = string.Empty;
+ temperatureTextBox.Text = string.Empty;
+
+ RefreshAll();
+ }
+
+ void Localize()
+ {
+ nameGroupBox.Text = Strings.Component;
+
+ calibrationGroupBox.Text = Strings.Calibration;
+ calibCertificateNrLabel.Text = Strings.Certificate;
+ calibDateLabel.Text = Strings.Date;
+ calibValidDateLabel.Text = Strings.Valid_until;
+
+ its90CalibrationCoefficientsGroupBox.Text = Strings.ITS90_calibration_coefficients;
+ // r0Label.Text a7Label.Text b7Label.Text c7Label.Text are not translated
+
+ testGroupBox.Text = Strings.ITS90_test;
+ resistanceLabel.Text = string.Format("{0} [Ω]", Strings.Resistance);
+ temperatureLabel.Text = string.Format("{0} [°C]", Strings.Temperature);
+ }
+
+ void RefreshAll()
+ {
+ if (TempMeterCfg != null)
+ {
+ calibCertificateNrTextBox.Text = TempMeterCfg.CalibCertificateNr;
+ calibDateTextBox.Text = TempMeterCfg.CalibDate.ToShortDateString();
+ calibValidDateTextBox.Text = TempMeterCfg.CalibValidDate.ToShortDateString();
+
+ r0TextBox.Text = TempMeterCfg.R001C.ToString();
+ a7TextBox.Text = TempMeterCfg.a7.ToString();
+ b7TextBox.Text = TempMeterCfg.b7.ToString();
+ c7TextBox.Text = TempMeterCfg.c7.ToString();
+ }
+ }
+
+ public void Unlock()
+ {
+ unlocked = true;
+
+ calibCertificateNrTextBox.Enabled = true;
+ calibDateTextBox.Enabled = true;
+ calibValidDateTextBox.Enabled = true;
+
+ r0TextBox.Enabled = true;
+ a7TextBox.Enabled = true;
+ b7TextBox.Enabled = true;
+ c7TextBox.Enabled = true;
+ }
+
+ public void OkBtnClicked()
+ {
+ if (TempMeterCfg != null)
+ {
+ try
+ {
+ TempMeterCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
+ TempMeterCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
+ TempMeterCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
+
+ TempMeterCfg.R001C = Utils.ParseUDouble(r0TextBox.Text);
+ TempMeterCfg.a7 = Utils.ParseEDouble(a7TextBox.Text);
+ TempMeterCfg.b7 = Utils.ParseEDouble(b7TextBox.Text);
+ TempMeterCfg.c7 = Utils.ParseEDouble(c7TextBox.Text);
+
+ Component modified = TempMeterCfg.CreateDbEntity();
+ MeterEntity.Parameters = modified.Parameters;
+ }
+ catch
+ {
+ MessageBox.Show(string.Format(Strings.Invalid_0, Strings.ITS90_calibration_coefficients),
+ Strings.Error,
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Exclamation);
+ }
+ }
+ }
+
+ private void measuredTextBox_TextChanged(object sender, EventArgs e)
+ {
+ double resistance;
+ if (Utils.TryParseUDouble(resistanceTextBox.Text, out resistance))
+ {
+ double temperature = BenchControl.Formulas.PlatinumResistanceTM_ITS90_R2T(resistance, TempMeterCfg.R001C, TempMeterCfg.a7, TempMeterCfg.b7, TempMeterCfg.c7);
+ temperatureTextBox.Text = temperature.ToString();
+ }
+ }
+
+ public void CancelBtnClicked()
+ {
+ }
+
+ public void AddOne()
+ {
+ }
+
+ public void RemoveSelected()
+ {
+ }
+
+ public void MoveUpSelected()
+ {
+ }
+
+ public void MoveDownSelected()
+ {
+ }
+ }
+}
diff --git a/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.resx b/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/TestBenchFramework/UiControls/MetrologyDlgPlatinumResistanceTMeterTab.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file