25092403 注释掉了所有线圈的读取接口
This commit is contained in:
82
C-Windows-1/Form1.Designer.cs
generated
82
C-Windows-1/Form1.Designer.cs
generated
@@ -152,7 +152,7 @@
|
||||
this.bt_CH2yiqiStart = new System.Windows.Forms.Button();
|
||||
this.pb_CH2progressBar = new System.Windows.Forms.ProgressBar();
|
||||
this.label67 = new System.Windows.Forms.Label();
|
||||
this.myGroupBox2 = new C_Windows_1.MyGroupBox(this.components);
|
||||
this.GroupBox_CH2 = new C_Windows_1.MyGroupBox(this.components);
|
||||
this.lb_CH2yiqiPort = new System.Windows.Forms.Label();
|
||||
this.label64 = new System.Windows.Forms.Label();
|
||||
this.bt_CH2Break = new System.Windows.Forms.Button();
|
||||
@@ -218,7 +218,7 @@
|
||||
this.DelayTime1 = new System.Windows.Forms.TextBox();
|
||||
this.label39 = new System.Windows.Forms.Label();
|
||||
this.DelayTime2 = new System.Windows.Forms.TextBox();
|
||||
this.myGroupBox1 = new C_Windows_1.MyGroupBox(this.components);
|
||||
this.GroupBox_CH1 = new C_Windows_1.MyGroupBox(this.components);
|
||||
this.lb_CH1yiqiPort = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.bt_CH1Break = new System.Windows.Forms.Button();
|
||||
@@ -230,10 +230,10 @@
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pb_MESstatus)).BeginInit();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.myGroupBox2.SuspendLayout();
|
||||
this.GroupBox_CH2.SuspendLayout();
|
||||
this.myGroupBox4.SuspendLayout();
|
||||
this.myGroupBox3.SuspendLayout();
|
||||
this.myGroupBox1.SuspendLayout();
|
||||
this.GroupBox_CH1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// SerialPort1
|
||||
@@ -1313,21 +1313,21 @@
|
||||
this.label67.TabIndex = 197;
|
||||
this.label67.Text = "测试进度";
|
||||
//
|
||||
// myGroupBox2
|
||||
// GroupBox_CH2
|
||||
//
|
||||
this.myGroupBox2.Controls.Add(this.lb_CH2yiqiPort);
|
||||
this.myGroupBox2.Controls.Add(this.label64);
|
||||
this.myGroupBox2.Controls.Add(this.bt_CH2Break);
|
||||
this.myGroupBox2.Controls.Add(this.bt_CH2Connect);
|
||||
this.myGroupBox2.Controls.Add(this.label65);
|
||||
this.myGroupBox2.Controls.Add(this.lb_CH2ConnectionStatus);
|
||||
this.myGroupBox2.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.myGroupBox2.Location = new System.Drawing.Point(12, 328);
|
||||
this.myGroupBox2.Name = "myGroupBox2";
|
||||
this.myGroupBox2.Size = new System.Drawing.Size(139, 225);
|
||||
this.myGroupBox2.TabIndex = 201;
|
||||
this.myGroupBox2.TabStop = false;
|
||||
this.myGroupBox2.Text = "串口2设置";
|
||||
this.GroupBox_CH2.Controls.Add(this.lb_CH2yiqiPort);
|
||||
this.GroupBox_CH2.Controls.Add(this.label64);
|
||||
this.GroupBox_CH2.Controls.Add(this.bt_CH2Break);
|
||||
this.GroupBox_CH2.Controls.Add(this.bt_CH2Connect);
|
||||
this.GroupBox_CH2.Controls.Add(this.label65);
|
||||
this.GroupBox_CH2.Controls.Add(this.lb_CH2ConnectionStatus);
|
||||
this.GroupBox_CH2.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.GroupBox_CH2.Location = new System.Drawing.Point(12, 328);
|
||||
this.GroupBox_CH2.Name = "GroupBox_CH2";
|
||||
this.GroupBox_CH2.Size = new System.Drawing.Size(139, 225);
|
||||
this.GroupBox_CH2.TabIndex = 201;
|
||||
this.GroupBox_CH2.TabStop = false;
|
||||
this.GroupBox_CH2.Text = "串口2设置";
|
||||
//
|
||||
// lb_CH2yiqiPort
|
||||
//
|
||||
@@ -1959,21 +1959,21 @@
|
||||
this.DelayTime2.Size = new System.Drawing.Size(51, 21);
|
||||
this.DelayTime2.TabIndex = 97;
|
||||
//
|
||||
// myGroupBox1
|
||||
// GroupBox_CH1
|
||||
//
|
||||
this.myGroupBox1.Controls.Add(this.lb_CH1yiqiPort);
|
||||
this.myGroupBox1.Controls.Add(this.label3);
|
||||
this.myGroupBox1.Controls.Add(this.bt_CH1Break);
|
||||
this.myGroupBox1.Controls.Add(this.bt_CH1Connect);
|
||||
this.myGroupBox1.Controls.Add(this.label1);
|
||||
this.myGroupBox1.Controls.Add(this.lb_CH1ConnectionStatus);
|
||||
this.myGroupBox1.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.myGroupBox1.Location = new System.Drawing.Point(12, 49);
|
||||
this.myGroupBox1.Name = "myGroupBox1";
|
||||
this.myGroupBox1.Size = new System.Drawing.Size(139, 225);
|
||||
this.myGroupBox1.TabIndex = 119;
|
||||
this.myGroupBox1.TabStop = false;
|
||||
this.myGroupBox1.Text = "串口1设置";
|
||||
this.GroupBox_CH1.Controls.Add(this.lb_CH1yiqiPort);
|
||||
this.GroupBox_CH1.Controls.Add(this.label3);
|
||||
this.GroupBox_CH1.Controls.Add(this.bt_CH1Break);
|
||||
this.GroupBox_CH1.Controls.Add(this.bt_CH1Connect);
|
||||
this.GroupBox_CH1.Controls.Add(this.label1);
|
||||
this.GroupBox_CH1.Controls.Add(this.lb_CH1ConnectionStatus);
|
||||
this.GroupBox_CH1.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.GroupBox_CH1.Location = new System.Drawing.Point(12, 49);
|
||||
this.GroupBox_CH1.Name = "GroupBox_CH1";
|
||||
this.GroupBox_CH1.Size = new System.Drawing.Size(139, 225);
|
||||
this.GroupBox_CH1.TabIndex = 119;
|
||||
this.GroupBox_CH1.TabStop = false;
|
||||
this.GroupBox_CH1.Text = "串口1设置";
|
||||
//
|
||||
// lb_CH1yiqiPort
|
||||
//
|
||||
@@ -2056,7 +2056,7 @@
|
||||
this.Controls.Add(this.label62);
|
||||
this.Controls.Add(this.tb_CH2Code);
|
||||
this.Controls.Add(this.bt_CH2yiqiStart);
|
||||
this.Controls.Add(this.myGroupBox2);
|
||||
this.Controls.Add(this.GroupBox_CH2);
|
||||
this.Controls.Add(this.pb_CH2progressBar);
|
||||
this.Controls.Add(this.label67);
|
||||
this.Controls.Add(this.textBox1);
|
||||
@@ -2110,7 +2110,7 @@
|
||||
this.Controls.Add(this.tb_CH1Code);
|
||||
this.Controls.Add(this.bt_CH1yiqiStart);
|
||||
this.Controls.Add(this.myGroupBox3);
|
||||
this.Controls.Add(this.myGroupBox1);
|
||||
this.Controls.Add(this.GroupBox_CH1);
|
||||
this.Controls.Add(this.pb_CH1progressBar);
|
||||
this.Controls.Add(this.label36);
|
||||
this.Controls.Add(this.SendText);
|
||||
@@ -2118,7 +2118,7 @@
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Form1";
|
||||
this.Text = "LL18-V25082601";
|
||||
this.Text = "LL18-V25092403";
|
||||
this.Activated += new System.EventHandler(this.Form1_Activated);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
@@ -2130,14 +2130,14 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.pb_MESstatus)).EndInit();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.myGroupBox2.ResumeLayout(false);
|
||||
this.myGroupBox2.PerformLayout();
|
||||
this.GroupBox_CH2.ResumeLayout(false);
|
||||
this.GroupBox_CH2.PerformLayout();
|
||||
this.myGroupBox4.ResumeLayout(false);
|
||||
this.myGroupBox4.PerformLayout();
|
||||
this.myGroupBox3.ResumeLayout(false);
|
||||
this.myGroupBox3.PerformLayout();
|
||||
this.myGroupBox1.ResumeLayout(false);
|
||||
this.myGroupBox1.PerformLayout();
|
||||
this.GroupBox_CH1.ResumeLayout(false);
|
||||
this.GroupBox_CH1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -2199,7 +2199,7 @@
|
||||
private System.Windows.Forms.Timer Timer9;
|
||||
private System.Windows.Forms.Label lb_CH1PressureUnit;
|
||||
private System.Windows.Forms.Label lb_CH1LeakUnit;
|
||||
private MyGroupBox myGroupBox1;
|
||||
private MyGroupBox GroupBox_CH1;
|
||||
private MyGroupBox myGroupBox3;
|
||||
private MyGroupBox myGroupBox4;
|
||||
private System.Windows.Forms.Label label15;
|
||||
@@ -2330,7 +2330,7 @@
|
||||
private System.Windows.Forms.Label label62;
|
||||
private System.Windows.Forms.TextBox tb_CH2Code;
|
||||
private System.Windows.Forms.Button bt_CH2yiqiStart;
|
||||
private MyGroupBox myGroupBox2;
|
||||
private MyGroupBox GroupBox_CH2;
|
||||
public System.Windows.Forms.Label lb_CH2yiqiPort;
|
||||
private System.Windows.Forms.Label label64;
|
||||
private System.Windows.Forms.Button bt_CH2Break;
|
||||
|
||||
@@ -222,53 +222,53 @@ namespace C_Windows_1
|
||||
public int workstation;
|
||||
public int workstation2;
|
||||
|
||||
public void Booltomath(int sta, UInt16[] shangweiji)
|
||||
{
|
||||
try
|
||||
{
|
||||
OperateResult<bool> reslutget;
|
||||
reslutget = CH1.ReadBool(Convert.ToString(sta));
|
||||
if (reslutget.IsSuccess == true)
|
||||
{
|
||||
if (reslutget.Content == true)
|
||||
{
|
||||
shangweiji[sta] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
shangweiji[sta] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
//public void Booltomath(int sta, UInt16[] shangweiji)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// OperateResult<bool> reslutget;
|
||||
// reslutget = CH1.ReadBool(Convert.ToString(sta));
|
||||
// if (reslutget.IsSuccess == true)
|
||||
// {
|
||||
// if (reslutget.Content == true)
|
||||
// {
|
||||
// shangweiji[sta] = 1;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// shangweiji[sta] = 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
// throw;
|
||||
// }
|
||||
//}
|
||||
|
||||
public void Booltomath2(int sta, UInt16[] shangweiji)
|
||||
{
|
||||
try
|
||||
{
|
||||
OperateResult<bool> reslutget;
|
||||
reslutget = CH2.ReadBool(Convert.ToString(sta));
|
||||
if (reslutget.IsSuccess == true)
|
||||
{
|
||||
if (reslutget.Content == true)
|
||||
{
|
||||
shangweiji[sta] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
shangweiji[sta] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
//public void Booltomath2(int sta, UInt16[] shangweiji)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// OperateResult<bool> reslutget;
|
||||
// reslutget = CH2.ReadBool(Convert.ToString(sta));
|
||||
// if (reslutget.IsSuccess == true)
|
||||
// {
|
||||
// if (reslutget.Content == true)
|
||||
// {
|
||||
// shangweiji[sta] = 1;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// shangweiji[sta] = 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
// throw;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//sta 起始寄存器
|
||||
@@ -715,13 +715,14 @@ namespace C_Windows_1
|
||||
Modbusread(8, 2, ReadData);
|
||||
Modbusread(16, 4, ReadData);
|
||||
Modbusread(25, 24, ReadData);
|
||||
Booltomath(8, ReadData);
|
||||
Booltomath(9, ReadData);
|
||||
//Booltomath(8, ReadData);
|
||||
//Booltomath(9, ReadData);
|
||||
int ba = pb_CH1progressBar.Value + 2;
|
||||
if (ba >= pb_CH1progressBar.Maximum)
|
||||
ba = pb_CH1progressBar.Maximum;
|
||||
pb_CH1progressBar.Value = ba;
|
||||
|
||||
|
||||
|
||||
if (ReadData[8] != 0 && (ReadData[9] == 1 || ReadData[9] == 2))//当仪器状态位不为0且有结果时
|
||||
{
|
||||
workstation = (int)yiqi.finish;
|
||||
@@ -731,7 +732,7 @@ namespace C_Windows_1
|
||||
{
|
||||
System.Threading.Thread.Sleep(300);
|
||||
Modbusread(8, 2, ReadData);
|
||||
Booltomath(9, ReadData);
|
||||
//Booltomath(9, ReadData);
|
||||
if (ReadData[9] == 1 || ReadData[9] == 2)
|
||||
{
|
||||
workstation = (int)yiqi.finish;
|
||||
@@ -746,8 +747,8 @@ namespace C_Windows_1
|
||||
|
||||
case (int)yiqi.standby://读取仪器是否启动
|
||||
Modbusread(8, 2, ReadData);
|
||||
Booltomath(8, ReadData);
|
||||
Booltomath(9, ReadData);
|
||||
//Booltomath(8, ReadData);
|
||||
//Booltomath(9, ReadData);
|
||||
//MachineStatus.Text = "待机中";
|
||||
if (ReadData[8] != 0 && ReadData[9] == 0)
|
||||
{
|
||||
@@ -757,8 +758,8 @@ namespace C_Windows_1
|
||||
|
||||
case (int)yiqi.finish:
|
||||
Modbusread(8, 2, ReadData);
|
||||
Booltomath(8, ReadData);
|
||||
Booltomath(9, ReadData);
|
||||
//Booltomath(8, ReadData);
|
||||
//Booltomath(9, ReadData);
|
||||
Modbusread(16, 4, ReadData);
|
||||
pb_CH1progressBar.Value = pb_CH1progressBar.Maximum;
|
||||
Display(1, tb_CH1Code.Text);
|
||||
@@ -921,8 +922,8 @@ namespace C_Windows_1
|
||||
Modbusread2(8, 2, ReadData2);
|
||||
Modbusread2(16, 4, ReadData2);
|
||||
Modbusread2(25, 24, ReadData2);
|
||||
Booltomath2(8, ReadData2);
|
||||
Booltomath2(9, ReadData2);
|
||||
//Booltomath2(8, ReadData2);
|
||||
//Booltomath2(9, ReadData2);
|
||||
int ba = pb_CH2progressBar.Value + 2;
|
||||
if (ba >= pb_CH2progressBar.Maximum)
|
||||
ba = pb_CH2progressBar.Maximum;
|
||||
@@ -936,7 +937,7 @@ namespace C_Windows_1
|
||||
{
|
||||
System.Threading.Thread.Sleep(300);
|
||||
Modbusread2(8, 2, ReadData2);
|
||||
Booltomath2(9, ReadData2);
|
||||
//Booltomath2(9, ReadData2);
|
||||
if (ReadData2[9] == 1 || ReadData2[9] == 2)
|
||||
{
|
||||
workstation2 = (int)yiqi.finish;
|
||||
@@ -951,8 +952,8 @@ namespace C_Windows_1
|
||||
|
||||
case (int)yiqi.standby://读取仪器是否启动
|
||||
Modbusread2(8, 2, ReadData2);
|
||||
Booltomath2(8, ReadData2);
|
||||
Booltomath2(9, ReadData2);
|
||||
//Booltomath2(8, ReadData2);
|
||||
//Booltomath2(9, ReadData2);
|
||||
//MachineStatus.Text = "待机中";
|
||||
if (ReadData2[8] != 0 && ReadData2[9] == 0)
|
||||
{
|
||||
@@ -962,8 +963,8 @@ namespace C_Windows_1
|
||||
|
||||
case (int)yiqi.finish:
|
||||
Modbusread2(8, 2, ReadData2);
|
||||
Booltomath2(8, ReadData2);
|
||||
Booltomath2(9, ReadData2);
|
||||
//Booltomath2(8, ReadData2);
|
||||
//Booltomath2(9, ReadData2);
|
||||
Modbusread2(16, 4, ReadData2);
|
||||
pb_CH2progressBar.Value = pb_CH2progressBar.Maximum;
|
||||
Display(2, tb_CH2Code.Text);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user