Implement PowerUp Sequencing

bindings to datagridview
This commit is contained in:
2025-09-19 00:42:19 +02:00
parent 326e0d2d12
commit 46ad1a708c
6 changed files with 85 additions and 128 deletions

View File

@@ -71,15 +71,11 @@ namespace HTOLHAST
this.cbCH3 = new System.Windows.Forms.CheckBox(); this.cbCH3 = new System.Windows.Forms.CheckBox();
this.cbCH2 = new System.Windows.Forms.CheckBox(); this.cbCH2 = new System.Windows.Forms.CheckBox();
this.cbCH1 = new System.Windows.Forms.CheckBox(); this.cbCH1 = new System.Windows.Forms.CheckBox();
this.button12 = new System.Windows.Forms.Button();
this.button13 = new System.Windows.Forms.Button();
this.button11 = new System.Windows.Forms.Button();
this.button10 = new System.Windows.Forms.Button();
this.label15 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label();
this.dataGridView3 = new System.Windows.Forms.DataGridView(); this.dgvPowerDownSequence = new System.Windows.Forms.DataGridView();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridView2 = new System.Windows.Forms.DataGridView(); this.dgvPowerUpSequence = new System.Windows.Forms.DataGridView();
this.Channel = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Channel = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Delay = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Delay = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
@@ -109,8 +105,8 @@ namespace HTOLHAST
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tabPagePSUSettings.SuspendLayout(); this.tabPagePSUSettings.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvPowerDownSequence)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvPowerUpSequence)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvPowerSupplies)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvPowerSupplies)).BeginInit();
this.tabPageHeader.SuspendLayout(); this.tabPageHeader.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvHeaderSettings)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvHeaderSettings)).BeginInit();
@@ -166,7 +162,7 @@ namespace HTOLHAST
// btnInitializeInstruments // btnInitializeInstruments
// //
this.btnInitializeInstruments.Location = new System.Drawing.Point(1033, 539); this.btnInitializeInstruments.Location = new System.Drawing.Point(1033, 539);
this.btnInitializeInstruments.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnInitializeInstruments.Margin = new System.Windows.Forms.Padding(4);
this.btnInitializeInstruments.Name = "btnInitializeInstruments"; this.btnInitializeInstruments.Name = "btnInitializeInstruments";
this.btnInitializeInstruments.Size = new System.Drawing.Size(156, 58); this.btnInitializeInstruments.Size = new System.Drawing.Size(156, 58);
this.btnInitializeInstruments.TabIndex = 23; this.btnInitializeInstruments.TabIndex = 23;
@@ -463,13 +459,9 @@ namespace HTOLHAST
this.tabPagePSUSettings.Controls.Add(this.cbCH3); this.tabPagePSUSettings.Controls.Add(this.cbCH3);
this.tabPagePSUSettings.Controls.Add(this.cbCH2); this.tabPagePSUSettings.Controls.Add(this.cbCH2);
this.tabPagePSUSettings.Controls.Add(this.cbCH1); this.tabPagePSUSettings.Controls.Add(this.cbCH1);
this.tabPagePSUSettings.Controls.Add(this.button12);
this.tabPagePSUSettings.Controls.Add(this.button13);
this.tabPagePSUSettings.Controls.Add(this.button11);
this.tabPagePSUSettings.Controls.Add(this.button10);
this.tabPagePSUSettings.Controls.Add(this.label15); this.tabPagePSUSettings.Controls.Add(this.label15);
this.tabPagePSUSettings.Controls.Add(this.dataGridView3); this.tabPagePSUSettings.Controls.Add(this.dgvPowerDownSequence);
this.tabPagePSUSettings.Controls.Add(this.dataGridView2); this.tabPagePSUSettings.Controls.Add(this.dgvPowerUpSequence);
this.tabPagePSUSettings.Controls.Add(this.label14); this.tabPagePSUSettings.Controls.Add(this.label14);
this.tabPagePSUSettings.Controls.Add(this.dgvPowerSupplies); this.tabPagePSUSettings.Controls.Add(this.dgvPowerSupplies);
this.tabPagePSUSettings.Location = new System.Drawing.Point(4, 25); this.tabPagePSUSettings.Location = new System.Drawing.Point(4, 25);
@@ -484,7 +476,7 @@ namespace HTOLHAST
// btnSendPsuSettings // btnSendPsuSettings
// //
this.btnSendPsuSettings.Location = new System.Drawing.Point(427, 534); this.btnSendPsuSettings.Location = new System.Drawing.Point(427, 534);
this.btnSendPsuSettings.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnSendPsuSettings.Margin = new System.Windows.Forms.Padding(4);
this.btnSendPsuSettings.Name = "btnSendPsuSettings"; this.btnSendPsuSettings.Name = "btnSendPsuSettings";
this.btnSendPsuSettings.Size = new System.Drawing.Size(185, 59); this.btnSendPsuSettings.Size = new System.Drawing.Size(185, 59);
this.btnSendPsuSettings.TabIndex = 42; this.btnSendPsuSettings.TabIndex = 42;
@@ -496,7 +488,7 @@ namespace HTOLHAST
// //
this.cbCH8.Appearance = System.Windows.Forms.Appearance.Button; this.cbCH8.Appearance = System.Windows.Forms.Appearance.Button;
this.cbCH8.Location = new System.Drawing.Point(1209, 126); this.cbCH8.Location = new System.Drawing.Point(1209, 126);
this.cbCH8.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbCH8.Margin = new System.Windows.Forms.Padding(4);
this.cbCH8.Name = "cbCH8"; this.cbCH8.Name = "cbCH8";
this.cbCH8.Size = new System.Drawing.Size(179, 84); this.cbCH8.Size = new System.Drawing.Size(179, 84);
this.cbCH8.TabIndex = 41; this.cbCH8.TabIndex = 41;
@@ -508,7 +500,7 @@ namespace HTOLHAST
// //
this.cbCH7.Appearance = System.Windows.Forms.Appearance.Button; this.cbCH7.Appearance = System.Windows.Forms.Appearance.Button;
this.cbCH7.Location = new System.Drawing.Point(1021, 126); this.cbCH7.Location = new System.Drawing.Point(1021, 126);
this.cbCH7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbCH7.Margin = new System.Windows.Forms.Padding(4);
this.cbCH7.Name = "cbCH7"; this.cbCH7.Name = "cbCH7";
this.cbCH7.Size = new System.Drawing.Size(179, 84); this.cbCH7.Size = new System.Drawing.Size(179, 84);
this.cbCH7.TabIndex = 40; this.cbCH7.TabIndex = 40;
@@ -520,7 +512,7 @@ namespace HTOLHAST
// //
this.cbCH6.Appearance = System.Windows.Forms.Appearance.Button; this.cbCH6.Appearance = System.Windows.Forms.Appearance.Button;
this.cbCH6.Location = new System.Drawing.Point(835, 126); this.cbCH6.Location = new System.Drawing.Point(835, 126);
this.cbCH6.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbCH6.Margin = new System.Windows.Forms.Padding(4);
this.cbCH6.Name = "cbCH6"; this.cbCH6.Name = "cbCH6";
this.cbCH6.Size = new System.Drawing.Size(179, 84); this.cbCH6.Size = new System.Drawing.Size(179, 84);
this.cbCH6.TabIndex = 39; this.cbCH6.TabIndex = 39;
@@ -532,7 +524,7 @@ namespace HTOLHAST
// //
this.cbCH5.Appearance = System.Windows.Forms.Appearance.Button; this.cbCH5.Appearance = System.Windows.Forms.Appearance.Button;
this.cbCH5.Location = new System.Drawing.Point(648, 126); this.cbCH5.Location = new System.Drawing.Point(648, 126);
this.cbCH5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbCH5.Margin = new System.Windows.Forms.Padding(4);
this.cbCH5.Name = "cbCH5"; this.cbCH5.Name = "cbCH5";
this.cbCH5.Size = new System.Drawing.Size(179, 84); this.cbCH5.Size = new System.Drawing.Size(179, 84);
this.cbCH5.TabIndex = 38; this.cbCH5.TabIndex = 38;
@@ -544,7 +536,7 @@ namespace HTOLHAST
// //
this.cbCH4.Appearance = System.Windows.Forms.Appearance.Button; this.cbCH4.Appearance = System.Windows.Forms.Appearance.Button;
this.cbCH4.Location = new System.Drawing.Point(1209, 18); this.cbCH4.Location = new System.Drawing.Point(1209, 18);
this.cbCH4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbCH4.Margin = new System.Windows.Forms.Padding(4);
this.cbCH4.Name = "cbCH4"; this.cbCH4.Name = "cbCH4";
this.cbCH4.Size = new System.Drawing.Size(179, 84); this.cbCH4.Size = new System.Drawing.Size(179, 84);
this.cbCH4.TabIndex = 37; this.cbCH4.TabIndex = 37;
@@ -556,7 +548,7 @@ namespace HTOLHAST
// //
this.cbCH3.Appearance = System.Windows.Forms.Appearance.Button; this.cbCH3.Appearance = System.Windows.Forms.Appearance.Button;
this.cbCH3.Location = new System.Drawing.Point(1021, 18); this.cbCH3.Location = new System.Drawing.Point(1021, 18);
this.cbCH3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbCH3.Margin = new System.Windows.Forms.Padding(4);
this.cbCH3.Name = "cbCH3"; this.cbCH3.Name = "cbCH3";
this.cbCH3.Size = new System.Drawing.Size(179, 84); this.cbCH3.Size = new System.Drawing.Size(179, 84);
this.cbCH3.TabIndex = 36; this.cbCH3.TabIndex = 36;
@@ -568,7 +560,7 @@ namespace HTOLHAST
// //
this.cbCH2.Appearance = System.Windows.Forms.Appearance.Button; this.cbCH2.Appearance = System.Windows.Forms.Appearance.Button;
this.cbCH2.Location = new System.Drawing.Point(835, 18); this.cbCH2.Location = new System.Drawing.Point(835, 18);
this.cbCH2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbCH2.Margin = new System.Windows.Forms.Padding(4);
this.cbCH2.Name = "cbCH2"; this.cbCH2.Name = "cbCH2";
this.cbCH2.Size = new System.Drawing.Size(179, 84); this.cbCH2.Size = new System.Drawing.Size(179, 84);
this.cbCH2.TabIndex = 35; this.cbCH2.TabIndex = 35;
@@ -580,7 +572,7 @@ namespace HTOLHAST
// //
this.cbCH1.Appearance = System.Windows.Forms.Appearance.Button; this.cbCH1.Appearance = System.Windows.Forms.Appearance.Button;
this.cbCH1.Location = new System.Drawing.Point(648, 18); this.cbCH1.Location = new System.Drawing.Point(648, 18);
this.cbCH1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbCH1.Margin = new System.Windows.Forms.Padding(4);
this.cbCH1.Name = "cbCH1"; this.cbCH1.Name = "cbCH1";
this.cbCH1.Size = new System.Drawing.Size(179, 84); this.cbCH1.Size = new System.Drawing.Size(179, 84);
this.cbCH1.TabIndex = 34; this.cbCH1.TabIndex = 34;
@@ -588,46 +580,6 @@ namespace HTOLHAST
this.cbCH1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.cbCH1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.cbCH1.UseVisualStyleBackColor = true; this.cbCH1.UseVisualStyleBackColor = true;
// //
// button12
//
this.button12.Location = new System.Drawing.Point(1393, 473);
this.button12.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button12.Name = "button12";
this.button12.Size = new System.Drawing.Size(65, 37);
this.button12.TabIndex = 33;
this.button12.Text = "Down";
this.button12.UseVisualStyleBackColor = true;
//
// button13
//
this.button13.Location = new System.Drawing.Point(1393, 430);
this.button13.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button13.Name = "button13";
this.button13.Size = new System.Drawing.Size(65, 37);
this.button13.TabIndex = 32;
this.button13.Text = "Up";
this.button13.UseVisualStyleBackColor = true;
//
// button11
//
this.button11.Location = new System.Drawing.Point(959, 473);
this.button11.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(65, 37);
this.button11.TabIndex = 31;
this.button11.Text = "Down";
this.button11.UseVisualStyleBackColor = true;
//
// button10
//
this.button10.Location = new System.Drawing.Point(959, 430);
this.button10.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(65, 37);
this.button10.TabIndex = 30;
this.button10.Text = "Up";
this.button10.UseVisualStyleBackColor = true;
//
// label15 // label15
// //
this.label15.AutoSize = true; this.label15.AutoSize = true;
@@ -637,19 +589,19 @@ namespace HTOLHAST
this.label15.TabIndex = 27; this.label15.TabIndex = 27;
this.label15.Text = "POWER-DOWN SEQUENCE"; this.label15.Text = "POWER-DOWN SEQUENCE";
// //
// dataGridView3 // dgvPowerDownSequence
// //
this.dataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvPowerDownSequence.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView3.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgvPowerDownSequence.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn1,
this.dataGridViewTextBoxColumn2}); this.dataGridViewTextBoxColumn2});
this.dataGridView3.Location = new System.Drawing.Point(1083, 316); this.dgvPowerDownSequence.Location = new System.Drawing.Point(1083, 316);
this.dataGridView3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dgvPowerDownSequence.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.dataGridView3.Name = "dataGridView3"; this.dgvPowerDownSequence.Name = "dgvPowerDownSequence";
this.dataGridView3.RowHeadersWidth = 51; this.dgvPowerDownSequence.RowHeadersWidth = 51;
this.dataGridView3.RowTemplate.Height = 24; this.dgvPowerDownSequence.RowTemplate.Height = 24;
this.dataGridView3.Size = new System.Drawing.Size(305, 193); this.dgvPowerDownSequence.Size = new System.Drawing.Size(305, 193);
this.dataGridView3.TabIndex = 26; this.dgvPowerDownSequence.TabIndex = 26;
// //
// dataGridViewTextBoxColumn1 // dataGridViewTextBoxColumn1
// //
@@ -665,19 +617,19 @@ namespace HTOLHAST
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.Width = 125; this.dataGridViewTextBoxColumn2.Width = 125;
// //
// dataGridView2 // dgvPowerUpSequence
// //
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvPowerUpSequence.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgvPowerUpSequence.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Channel, this.Channel,
this.Delay}); this.Delay});
this.dataGridView2.Location = new System.Drawing.Point(648, 316); this.dgvPowerUpSequence.Location = new System.Drawing.Point(648, 316);
this.dataGridView2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dgvPowerUpSequence.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.dataGridView2.Name = "dataGridView2"; this.dgvPowerUpSequence.Name = "dgvPowerUpSequence";
this.dataGridView2.RowHeadersWidth = 51; this.dgvPowerUpSequence.RowHeadersWidth = 51;
this.dataGridView2.RowTemplate.Height = 24; this.dgvPowerUpSequence.RowTemplate.Height = 24;
this.dataGridView2.Size = new System.Drawing.Size(305, 193); this.dgvPowerUpSequence.Size = new System.Drawing.Size(305, 193);
this.dataGridView2.TabIndex = 25; this.dgvPowerUpSequence.TabIndex = 25;
// //
// Channel // Channel
// //
@@ -790,7 +742,7 @@ namespace HTOLHAST
// btnSelectProject // btnSelectProject
// //
this.btnSelectProject.Location = new System.Drawing.Point(231, 103); this.btnSelectProject.Location = new System.Drawing.Point(231, 103);
this.btnSelectProject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnSelectProject.Margin = new System.Windows.Forms.Padding(4);
this.btnSelectProject.Name = "btnSelectProject"; this.btnSelectProject.Name = "btnSelectProject";
this.btnSelectProject.Size = new System.Drawing.Size(196, 55); this.btnSelectProject.Size = new System.Drawing.Size(196, 55);
this.btnSelectProject.TabIndex = 11; this.btnSelectProject.TabIndex = 11;
@@ -801,7 +753,7 @@ namespace HTOLHAST
// tbCurrentPosition // tbCurrentPosition
// //
this.tbCurrentPosition.Location = new System.Drawing.Point(1433, 4); this.tbCurrentPosition.Location = new System.Drawing.Point(1433, 4);
this.tbCurrentPosition.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.tbCurrentPosition.Margin = new System.Windows.Forms.Padding(4);
this.tbCurrentPosition.Name = "tbCurrentPosition"; this.tbCurrentPosition.Name = "tbCurrentPosition";
this.tbCurrentPosition.Size = new System.Drawing.Size(132, 22); this.tbCurrentPosition.Size = new System.Drawing.Size(132, 22);
this.tbCurrentPosition.TabIndex = 10; this.tbCurrentPosition.TabIndex = 10;
@@ -810,7 +762,7 @@ namespace HTOLHAST
// tbPositionIncrement // tbPositionIncrement
// //
this.tbPositionIncrement.Location = new System.Drawing.Point(1143, 4); this.tbPositionIncrement.Location = new System.Drawing.Point(1143, 4);
this.tbPositionIncrement.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.tbPositionIncrement.Margin = new System.Windows.Forms.Padding(4);
this.tbPositionIncrement.Name = "tbPositionIncrement"; this.tbPositionIncrement.Name = "tbPositionIncrement";
this.tbPositionIncrement.Size = new System.Drawing.Size(132, 22); this.tbPositionIncrement.Size = new System.Drawing.Size(132, 22);
this.tbPositionIncrement.TabIndex = 9; this.tbPositionIncrement.TabIndex = 9;
@@ -839,7 +791,7 @@ namespace HTOLHAST
// btnClear // btnClear
// //
this.btnClear.Location = new System.Drawing.Point(919, 524); this.btnClear.Location = new System.Drawing.Point(919, 524);
this.btnClear.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnClear.Margin = new System.Windows.Forms.Padding(4);
this.btnClear.Name = "btnClear"; this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(219, 97); this.btnClear.Size = new System.Drawing.Size(219, 97);
this.btnClear.TabIndex = 6; this.btnClear.TabIndex = 6;
@@ -920,8 +872,8 @@ namespace HTOLHAST
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tabPagePSUSettings.ResumeLayout(false); this.tabPagePSUSettings.ResumeLayout(false);
this.tabPagePSUSettings.PerformLayout(); this.tabPagePSUSettings.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvPowerDownSequence)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvPowerUpSequence)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvPowerSupplies)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvPowerSupplies)).EndInit();
this.tabPageHeader.ResumeLayout(false); this.tabPageHeader.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvHeaderSettings)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvHeaderSettings)).EndInit();
@@ -968,17 +920,13 @@ namespace HTOLHAST
private System.Windows.Forms.CheckBox cbPAMEnabled; private System.Windows.Forms.CheckBox cbPAMEnabled;
private System.Windows.Forms.CheckBox cbPSU2Enabled; private System.Windows.Forms.CheckBox cbPSU2Enabled;
private System.Windows.Forms.Label label15; private System.Windows.Forms.Label label15;
private System.Windows.Forms.DataGridView dataGridView3; private System.Windows.Forms.DataGridView dgvPowerDownSequence;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridView dataGridView2; private System.Windows.Forms.DataGridView dgvPowerUpSequence;
private System.Windows.Forms.DataGridViewTextBoxColumn Channel; private System.Windows.Forms.DataGridViewTextBoxColumn Channel;
private System.Windows.Forms.DataGridViewTextBoxColumn Delay; private System.Windows.Forms.DataGridViewTextBoxColumn Delay;
private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.TabPage tabPageMeasurement; private System.Windows.Forms.TabPage tabPageMeasurement;
private System.Windows.Forms.Button btnExport; private System.Windows.Forms.Button btnExport;
private System.Windows.Forms.Button btnNextPosition; private System.Windows.Forms.Button btnNextPosition;

View File

@@ -63,8 +63,11 @@ namespace HTOLHAST
Agilent34970a DAQ; Agilent34970a DAQ;
Project Project; Project Project;
List<SwitchMatrix> switchMatrix; List<SwitchMatrix> switchMatrix;
List<PowerUpSequence> powerUpSequences; BindingList<PowerSequence> powerUpSequences;
List<PowerUpSequence> powerDownSequences; BindingSource bindingSourcePowerUpSequence = new BindingSource();
BindingList<PowerSequence> powerDownSequences;
BindingSource bindingSourcePowerDownSequence = new BindingSource();
BindingList<Measurement> measurements; BindingList<Measurement> measurements;
BindingSource bindingSourceMeasurements = new BindingSource(); BindingSource bindingSourceMeasurements = new BindingSource();
@@ -105,10 +108,21 @@ namespace HTOLHAST
InitDgvPowersupply(); InitDgvPowersupply();
InitDgvHeaderSetting(); InitDgvHeaderSetting();
InitDgvMeasurements(); InitDgvMeasurements();
InitDgvPowerSequences();
InitSwitchMatrix(); InitSwitchMatrix();
InitializePowerupSequence(); InitializePowerupSequence();
} }
private void InitDgvPowerSequences()
{
// Bind powerup sequences to datagridviews
bindingSourcePowerUpSequence.DataSource = powerUpSequences;
dgvPowerUpSequence.DataSource = bindingSourcePowerUpSequence;
bindingSourcePowerDownSequence.DataSource = powerDownSequences;
dgvPowerDownSequence.DataSource = bindingSourcePowerDownSequence;
}
#region INITIALIZATION #region INITIALIZATION
private void InitializeButtons() private void InitializeButtons()
{ {
@@ -202,20 +216,20 @@ namespace HTOLHAST
} }
private void InitializePowerupSequence() private void InitializePowerupSequence()
{ {
powerUpSequences = new List<PowerUpSequence>() powerUpSequences = new BindingList<PowerSequence>()
{ new PowerUpSequence { Channel = 1, Delay = 100}, { new PowerSequence { Channel = 1, Delay = 1},
new PowerUpSequence { Channel = 2, Delay = 100}, new PowerSequence { Channel = 2, Delay = 1},
new PowerUpSequence { Channel = 3, Delay = 100}, new PowerSequence { Channel = 3, Delay = 1},
new PowerUpSequence { Channel = 4, Delay = 100} new PowerSequence { Channel = 4, Delay = 1}
}; };
} }
private void InitializePowerDownSequence() private void InitializePowerDownSequence()
{ {
powerDownSequences = new List<PowerUpSequence>() powerDownSequences = new BindingList<PowerSequence>()
{ new PowerUpSequence { Channel = 1, Delay = 1}, { new PowerSequence { Channel = 4, Delay = 1},
new PowerUpSequence { Channel = 2, Delay = 1}, new PowerSequence { Channel = 3, Delay = 1},
new PowerUpSequence { Channel = 3, Delay = 1}, new PowerSequence { Channel = 2, Delay = 1},
new PowerUpSequence { Channel = 4, Delay = 1} new PowerSequence { Channel = 1, Delay = 1}
}; };
} }
public void InitializeInstruments() public void InitializeInstruments()
@@ -436,12 +450,12 @@ namespace HTOLHAST
// 2025-01-09, 1, AGILENT, HEADER1, 1.0, - // 2025-01-09, 1, AGILENT, HEADER1, 1.0, -
} }
private void PowerUpPSU(List<PowerUpSequence> powerUpsequences) private void PowerUpPSU(BindingList<PowerSequence> powerUpsequences)
{ {
PSU1.PowerUpSequence(powerUpsequences); PSU1.PowerUpSequence(powerUpsequences);
PSU1.SetGeneralOutputState(true); PSU1.SetGeneralOutputState(true);
} }
private void PowerDownPSU(List<PowerUpSequence> powerUpsequences) private void PowerDownPSU(BindingList<PowerSequence> powerUpsequences)
{ {
PSU1.PowerDownSequence(powerUpsequences); PSU1.PowerDownSequence(powerUpsequences);
PSU1.SetGeneralOutputState(false); PSU1.SetGeneralOutputState(false);

View File

@@ -123,12 +123,6 @@
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Channel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Channel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Threading; using System.Threading;
using System.ComponentModel;
namespace HTOLHAST namespace HTOLHAST
{ {
@@ -77,7 +78,7 @@ namespace HTOLHAST
WriteCommand("OUTP:GEN OFF"); WriteCommand("OUTP:GEN OFF");
} }
} }
public void PowerUpSequence(List<PowerUpSequence> powerUpSequence) public void PowerUpSequence(BindingList<PowerSequence> powerUpSequence)
{ {
foreach (var sequence in powerUpSequence) foreach (var sequence in powerUpSequence)
{ {
@@ -85,7 +86,7 @@ namespace HTOLHAST
Thread.Sleep(sequence.Delay); Thread.Sleep(sequence.Delay);
} }
} }
public void PowerDownSequence(List<PowerUpSequence> powerUpSequence) public void PowerDownSequence(BindingList<PowerSequence> powerUpSequence)
{ {
foreach (var sequence in powerUpSequence) foreach (var sequence in powerUpSequence)
{ {
@@ -93,13 +94,13 @@ namespace HTOLHAST
Thread.Sleep(sequence.Delay); Thread.Sleep(sequence.Delay);
} }
} }
public List<PowerUpSequence> GenerateSimulationPowerUpSequence() public BindingList<PowerSequence> GenerateSimulationPowerUpSequence()
{ {
List<PowerUpSequence> powerUpSequence = new List<PowerUpSequence> { BindingList<PowerSequence> powerUpSequence = new BindingList<PowerSequence> {
new PowerUpSequence { Channel = 1, Delay = 1000}, new PowerSequence { Channel = 1, Delay = 1000},
new PowerUpSequence { Channel = 3, Delay = 1000}, new PowerSequence { Channel = 3, Delay = 1000},
new PowerUpSequence { Channel = 4, Delay = 1000}, new PowerSequence { Channel = 4, Delay = 1000},
new PowerUpSequence { Channel = 2, Delay = 1000}, new PowerSequence { Channel = 2, Delay = 1000},
}; };
return powerUpSequence; return powerUpSequence;

View File

@@ -128,7 +128,7 @@
<Compile Include="Keithley6485.cs" /> <Compile Include="Keithley6485.cs" />
<Compile Include="Measurement.cs" /> <Compile Include="Measurement.cs" />
<Compile Include="PowerSupplySetting.cs" /> <Compile Include="PowerSupplySetting.cs" />
<Compile Include="PowerUpSequence.cs" /> <Compile Include="PowerSequence.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Sample.cs" /> <Compile Include="Sample.cs" />

View File

@@ -6,12 +6,12 @@ using System.Threading.Tasks;
namespace HTOLHAST namespace HTOLHAST
{ {
public class PowerUpSequence public class PowerSequence
{ {
public int Channel { get; set; } public int Channel { get; set; }
public int Delay { get; set; } public int Delay { get; set; }
public PowerUpSequence() public PowerSequence()
{ {
} }