Commit 09148522 几米阳光

增加同时放两种料盘的测高。

1 个父辈 60c246fe
......@@ -49,10 +49,11 @@
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtSize = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtHeight = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.txtAIResult3 = new System.Windows.Forms.TextBox();
this.txtAIResult2 = new System.Windows.Forms.TextBox();
this.txtAIResult1 = new System.Windows.Forms.TextBox();
this.txtAI3 = new System.Windows.Forms.TextBox();
......@@ -61,8 +62,10 @@
this.label4 = new System.Windows.Forms.Label();
this.txtAI1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtSize = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtAIResult4 = new System.Windows.Forms.TextBox();
this.txtAI4 = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txtAIResult3 = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -104,9 +107,9 @@
this.groupBox1.Controls.Add(this.btnCloseDoor);
this.groupBox1.Controls.Add(this.btnOpenDoor);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(482, 164);
this.groupBox1.Location = new System.Drawing.Point(482, 197);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(332, 358);
this.groupBox1.Size = new System.Drawing.Size(332, 357);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......@@ -388,7 +391,7 @@
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button1.Location = new System.Drawing.Point(683, 531);
this.button1.Location = new System.Drawing.Point(683, 563);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(126, 37);
this.button1.TabIndex = 254;
......@@ -401,7 +404,7 @@
this.chbAutoRead.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chbAutoRead.AutoSize = true;
this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRead.Location = new System.Drawing.Point(499, 536);
this.chbAutoRead.Location = new System.Drawing.Point(499, 568);
this.chbAutoRead.Name = "chbAutoRead";
this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.chbAutoRead.TabIndex = 244;
......@@ -415,7 +418,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(247, 8);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(229, 562);
this.groupBox4.Size = new System.Drawing.Size(229, 594);
this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
......@@ -432,7 +435,7 @@
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(218, 542);
this.tableLayoutPanel2.Size = new System.Drawing.Size(218, 574);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
......@@ -442,7 +445,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(12, 8);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(229, 562);
this.groupBox3.Size = new System.Drawing.Size(229, 594);
this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
......@@ -459,11 +462,14 @@
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(218, 542);
this.tableLayoutPanel1.Size = new System.Drawing.Size(218, 574);
this.tableLayoutPanel1.TabIndex = 102;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.txtAIResult4);
this.groupBox2.Controls.Add(this.txtAI4);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.txtSize);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.txtHeight);
......@@ -480,16 +486,39 @@
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Location = new System.Drawing.Point(482, 8);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(332, 150);
this.groupBox2.Size = new System.Drawing.Size(332, 189);
this.groupBox2.TabIndex = 245;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "高度传感器";
//
// txtSize
//
this.txtSize.Enabled = false;
this.txtSize.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSize.Location = new System.Drawing.Point(253, 156);
this.txtSize.MaxLength = 10;
this.txtSize.Name = "txtSize";
this.txtSize.Size = new System.Drawing.Size(71, 23);
this.txtSize.TabIndex = 256;
this.txtSize.Text = "0";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label10.Location = new System.Drawing.Point(179, 159);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(68, 17);
this.label10.TabIndex = 255;
this.label10.Text = "料盘尺寸:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtHeight
//
this.txtHeight.Enabled = false;
this.txtHeight.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtHeight.Location = new System.Drawing.Point(89, 116);
this.txtHeight.Location = new System.Drawing.Point(89, 156);
this.txtHeight.MaxLength = 10;
this.txtHeight.Name = "txtHeight";
this.txtHeight.Size = new System.Drawing.Size(71, 23);
......@@ -501,7 +530,7 @@
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label9.Location = new System.Drawing.Point(15, 119);
this.label9.Location = new System.Drawing.Point(15, 159);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(68, 17);
this.label9.TabIndex = 253;
......@@ -520,17 +549,6 @@
this.label8.Text = "->";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAIResult3
//
this.txtAIResult3.Enabled = false;
this.txtAIResult3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAIResult3.Location = new System.Drawing.Point(203, 82);
this.txtAIResult3.MaxLength = 10;
this.txtAIResult3.Name = "txtAIResult3";
this.txtAIResult3.Size = new System.Drawing.Size(121, 23);
this.txtAIResult3.TabIndex = 251;
this.txtAIResult3.Text = "0";
//
// txtAIResult2
//
this.txtAIResult2.Enabled = false;
......@@ -622,34 +640,56 @@
this.label1.Text = "1:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtSize
// txtAIResult4
//
this.txtAIResult4.Enabled = false;
this.txtAIResult4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAIResult4.Location = new System.Drawing.Point(203, 112);
this.txtAIResult4.MaxLength = 10;
this.txtAIResult4.Name = "txtAIResult4";
this.txtAIResult4.Size = new System.Drawing.Size(121, 23);
this.txtAIResult4.TabIndex = 259;
this.txtAIResult4.Text = "0";
//
// txtAI4
//
this.txtAI4.Enabled = false;
this.txtAI4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAI4.Location = new System.Drawing.Point(39, 112);
this.txtAI4.MaxLength = 10;
this.txtAI4.Name = "txtAI4";
this.txtAI4.Size = new System.Drawing.Size(121, 23);
this.txtAI4.TabIndex = 258;
this.txtAI4.Text = "0";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label11.Location = new System.Drawing.Point(15, 115);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(27, 17);
this.label11.TabIndex = 257;
this.label11.Text = "4:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
this.txtSize.Enabled = false;
this.txtSize.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSize.Location = new System.Drawing.Point(253, 116);
this.txtSize.MaxLength = 10;
this.txtSize.Name = "txtSize";
this.txtSize.Size = new System.Drawing.Size(71, 23);
this.txtSize.TabIndex = 256;
this.txtSize.Text = "0";
//
// label10
// txtAIResult3
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label10.Location = new System.Drawing.Point(179, 119);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(68, 17);
this.label10.TabIndex = 255;
this.label10.Text = "料盘尺寸:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.txtAIResult3.Enabled = false;
this.txtAIResult3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAIResult3.Location = new System.Drawing.Point(203, 82);
this.txtAIResult3.MaxLength = 10;
this.txtAIResult3.Name = "txtAIResult3";
this.txtAIResult3.Size = new System.Drawing.Size(121, 23);
this.txtAIResult3.TabIndex = 251;
this.txtAIResult3.Text = "0";
//
// FrmIOStatus
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(829, 580);
this.ClientSize = new System.Drawing.Size(829, 612);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
......@@ -715,7 +755,6 @@
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtAI1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtAIResult3;
private System.Windows.Forms.TextBox txtAIResult2;
private System.Windows.Forms.TextBox txtAIResult1;
private System.Windows.Forms.Label label8;
......@@ -723,6 +762,10 @@
private System.Windows.Forms.TextBox txtHeight;
private System.Windows.Forms.TextBox txtSize;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtAIResult4;
private System.Windows.Forms.TextBox txtAI4;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtAIResult3;
}
}
......@@ -215,14 +215,20 @@ namespace OnlineStore.ACSingleStore
double ai1Value = KNDAIManager.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI1_Addr);
double ai2Value = KNDAIManager.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI2_Addr);
double ai3Value = KNDAIManager.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI3_Addr);
double ai4Value = KNDAIManager.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI4_Addr);
//double ai3Value = KNDAIManager.GetAIValue(boxBean.Config.AIDevice_IP, 3);
txtAI1.Text = ai1Value.ToString();
txtAI2.Text = ai2Value.ToString();
txtAI3.Text = ai3Value.ToString();
txtAI4.Text = ai4Value.ToString();
//txtAI3.Text = ai3Value.ToString();
txtAIResult1.Text = KNDAIManager.ConvertAI(ai1Value,boxBean.Config.AIDI1_DefaultPosition).ToString();
txtAIResult2.Text = KNDAIManager.ConvertAI(ai2Value, boxBean.Config.AIDI2_DefaultPosition).ToString();
txtAIResult3.Text = KNDAIManager.ConvertAI(ai1Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtAIResult4.Text = KNDAIManager.ConvertAI(ai2Value, boxBean.Config.AIDI4_DefaultPosition).ToString();
//txtAIResult3.Text = KNDAIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtHeight.Text = boxBean.GetHeight().ToString();
......
......@@ -71,6 +71,9 @@
this.label49 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox();
......@@ -219,6 +222,7 @@
this.btnStoreHome = new System.Windows.Forms.Button();
this.btnSotreReset = new System.Windows.Forms.Button();
this.btnStoreStop = new System.Windows.Forms.Button();
this.btnStoreStart = new System.Windows.Forms.Button();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.btnAxisOff = new System.Windows.Forms.Button();
this.btnAxisOn = new System.Windows.Forms.Button();
......@@ -230,10 +234,6 @@
this.button4 = new System.Windows.Forms.Button();
this.btnClearL = new System.Windows.Forms.Button();
this.btnLogDebug = new System.Windows.Forms.Button();
this.btnStoreStart = new System.Windows.Forms.Button();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
......@@ -803,7 +803,7 @@
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(7, 9);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(545, 351);
this.richTextBox1.Size = new System.Drawing.Size(545, 337);
this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = "";
//
......@@ -838,6 +838,36 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态";
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(127, 40);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(329, 40);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(224, 40);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// label38
//
this.label38.AutoSize = true;
......@@ -2524,6 +2554,17 @@
this.btnStoreStop.UseVisualStyleBackColor = true;
this.btnStoreStop.Click += new System.EventHandler(this.停止ToolStripMenuItem_Click);
//
// btnStoreStart
//
this.btnStoreStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStoreStart.Location = new System.Drawing.Point(7, 4);
this.btnStoreStart.Name = "btnStoreStart";
this.btnStoreStart.Size = new System.Drawing.Size(132, 39);
this.btnStoreStart.TabIndex = 0;
this.btnStoreStart.Text = "启动";
this.btnStoreStart.UseVisualStyleBackColor = true;
this.btnStoreStart.Click += new System.EventHandler(this.启动ToolStripMenuItem_Click);
//
// tabPage5
//
this.tabPage5.Controls.Add(this.btnAxisOff);
......@@ -2651,47 +2692,6 @@
this.btnLogDebug.UseVisualStyleBackColor = true;
this.btnLogDebug.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click);
//
// btnStoreStart
//
this.btnStoreStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStoreStart.Location = new System.Drawing.Point(7, 4);
this.btnStoreStart.Name = "btnStoreStart";
this.btnStoreStart.Size = new System.Drawing.Size(132, 39);
this.btnStoreStart.TabIndex = 0;
this.btnStoreStart.Text = "启动";
this.btnStoreStart.UseVisualStyleBackColor = true;
this.btnStoreStart.Click += new System.EventHandler(this.启动ToolStripMenuItem_Click);
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(127, 40);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(329, 40);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(224, 40);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -2706,7 +2706,6 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "FrmStoreBox";
this.Opacity = 0D;
this.Text = "AC_SA_料仓";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
......
......@@ -157,6 +157,7 @@ namespace OnlineStore.ACSingleStore
initValue();
this.ShowInTaskbar = true;
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
notifyIcon1.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
LoadOk = true;
cmbHomeType.SelectedIndex = 1;
......
......@@ -118,6 +118,9 @@ PRO,模拟量IO模块的IP地址,AIDevice_IP,192.168.200.12,,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,2920,,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,2960,,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,2500,,,,,,,
PRO,模拟信号4默认高度,AIDI4_DefaultPosition,2500,,,,,,,
,,,,,,,,, ,
PRO,模拟信号1的地址,AIDI1_Addr,1,,,,,,,
PRO,模拟信号2的地址,AIDI2_Addr,2,,,,,,,
PRO,模拟信号1的地址,AIDI1_Addr,7,,,,,,,
PRO,模拟信号2的地址,AIDI2_Addr,8,,,,,,,
PRO,模拟信号3的地址,AIDI3_Addr,5,,,,,,,
PRO,模拟信号4的地址,AIDI4_Addr,6,,,,,,,
......@@ -1539,17 +1539,69 @@ namespace OnlineStore.DeviceLibrary
#region 高度传感器处理
public int GetSize()
{
if (Get13Height() > 0)
{
return 13;
}
return 7;
}
public int Get7Height()
{
int result = 0;
if (KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
return result;
}
double ai1Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, Config.AIDI1_Addr), Config.AIDI1_DefaultPosition);
double ai2Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, Config.AIDI2_Addr), Config.AIDI2_DefaultPosition);
double Value = Math.Round((ai1Value + ai2Value) / 2, 1);
if (Value > 14)
{
result = 16;
}
else if (Value >= 10)
{
result = 12;
}
else if (Value >= 4)
{
if (ai1Value >= 9 || ai2Value >= 9)
{
result = 12;
}
else
{
result = 8;
}
}
else
{
result = 0;
}
return result;
}
public int GetHeight()
{
int value = Get13Height();
if (value > 0)
{
return value;
}else
{
return Get7Height();
}
}
public int Get13Height()
{
int result = 0;
if (KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
return result;
}
double ai1Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, Config.AIDI1_Addr), Config.AIDI1_DefaultPosition);
double ai2Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, Config.AIDI2_Addr), Config.AIDI2_DefaultPosition);
double ai1Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, Config.AIDI3_Addr), Config.AIDI3_DefaultPosition);
double ai2Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, Config.AIDI4_Addr), Config.AIDI4_DefaultPosition);
double Value = Math.Round((ai1Value + ai2Value ) / 2, 1);
if (Value > 14)
{
......
......@@ -504,11 +504,15 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// PRO,模拟信号3默认高度,AIDI3_DefaultPosition,1,,,,,,,
/// </summary>
[ConfigProAttribute("AIDI3_DefaultPosition", true)]
[ConfigProAttribute("AIDI3_DefaultPosition", false )]
public double AIDI3_DefaultPosition { get; set; }
/// <summary>
/// <summary>
/// PRO,模拟信号4默认高度,AIDI4_DefaultPosition,1,,,,,,,
/// </summary>
[ConfigProAttribute("AIDI4_DefaultPosition", false )]
public double AIDI4_DefaultPosition { get; set; }
/// <summary>
/// PRO 模拟信号1的地址 AIDI1_Addr 7
/// </summary>
[ConfigProAttribute("AIDI1_Addr", true)]
......@@ -518,7 +522,16 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[ConfigProAttribute("AIDI2_Addr", true)]
public int AIDI2_Addr { get; set; }
/// <summary>
/// PRO 模拟信号3的地址 AIDI3_Addr 5
/// </summary>
[ConfigProAttribute("AIDI3_Addr", false )]
public int AIDI3_Addr { get; set; }
/// <summary>
/// PRO 模拟信号4的地址 AIDI4_Addr 6
/// </summary>
[ConfigProAttribute("AIDI4_Addr", false )]
public int AIDI4_Addr { get; set; }
//private List<string> TempAddrList = null;
//public static char TempAddrSpilt = '#';
///// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!