Commit 55bad263 几米阳光

调试修改

1 个父辈 09148522
...@@ -227,8 +227,8 @@ namespace OnlineStore.ACSingleStore ...@@ -227,8 +227,8 @@ namespace OnlineStore.ACSingleStore
txtAIResult1.Text = KNDAIManager.ConvertAI(ai1Value,boxBean.Config.AIDI1_DefaultPosition).ToString(); txtAIResult1.Text = KNDAIManager.ConvertAI(ai1Value,boxBean.Config.AIDI1_DefaultPosition).ToString();
txtAIResult2.Text = KNDAIManager.ConvertAI(ai2Value, boxBean.Config.AIDI2_DefaultPosition).ToString(); txtAIResult2.Text = KNDAIManager.ConvertAI(ai2Value, boxBean.Config.AIDI2_DefaultPosition).ToString();
txtAIResult3.Text = KNDAIManager.ConvertAI(ai1Value, boxBean.Config.AIDI3_DefaultPosition).ToString(); txtAIResult3.Text = KNDAIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtAIResult4.Text = KNDAIManager.ConvertAI(ai2Value, boxBean.Config.AIDI4_DefaultPosition).ToString(); txtAIResult4.Text = KNDAIManager.ConvertAI(ai4Value, boxBean.Config.AIDI4_DefaultPosition).ToString();
//txtAIResult3.Text = KNDAIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString(); //txtAIResult3.Text = KNDAIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtHeight.Text = boxBean.GetHeight().ToString(); txtHeight.Text = boxBean.GetHeight().ToString();
......
...@@ -71,9 +71,6 @@ ...@@ -71,9 +71,6 @@
this.label49 = new System.Windows.Forms.Label(); this.label49 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); 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.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox(); this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox(); this.txtInoutTarget = new System.Windows.Forms.TextBox();
...@@ -234,6 +231,9 @@ ...@@ -234,6 +231,9 @@
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.btnClearL = new System.Windows.Forms.Button(); this.btnClearL = new System.Windows.Forms.Button();
this.btnLogDebug = new System.Windows.Forms.Button(); this.btnLogDebug = 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.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -803,7 +803,7 @@ ...@@ -803,7 +803,7 @@
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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.Location = new System.Drawing.Point(7, 9);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(545, 337); this.richTextBox1.Size = new System.Drawing.Size(545, 295);
this.richTextBox1.TabIndex = 256; this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = ""; this.richTextBox1.Text = "";
// //
...@@ -838,36 +838,6 @@ ...@@ -838,36 +838,6 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态"; 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 // label38
// //
this.label38.AutoSize = true; this.label38.AutoSize = true;
...@@ -2692,6 +2662,36 @@ ...@@ -2692,6 +2662,36 @@
this.btnLogDebug.UseVisualStyleBackColor = true; this.btnLogDebug.UseVisualStyleBackColor = true;
this.btnLogDebug.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click); this.btnLogDebug.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_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 // FrmStoreBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......
...@@ -33,8 +33,15 @@ ...@@ -33,8 +33,15 @@
20190116 20190116
从RC33珠海料仓拉取分支,作为RC29-33项目,即西安料仓三台,苏州博世料仓二台。 从RC33珠海料仓拉取分支,作为RC29-33项目,即西安料仓三台,苏州博世料仓二台。
teamViewer
RC29-1 1169530003
RC29-2
RC29-3 1390263407
RC32-1 1174631483
RC32-2 1170697846
......
...@@ -286,15 +286,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -286,15 +286,29 @@ namespace OnlineStore.DeviceLibrary
{ {
if (StoreManager.Store.KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH)) if (StoreManager.Store.KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH))
{ {
//每次上传后验证下 if (StoreManager.Config.AIDI1_Addr > 0 && StoreManager.Config.AIDI2_Addr > 0)
int v1 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI1_Addr); { //每次上传后验证下
int v2 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI2_Addr); int v1 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI1_Addr);
if (v1.Equals(0) && v2.Equals(0)) int v2 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI2_Addr);
{ if (v1.Equals(0) && v2.Equals(0))
LogUtil.info(msg); {
string value = AcSerialBean.ByteToString(values); LogUtil.info(msg);
LogUtil.error("收到【" + ioIp + "】的数据【" + value + "】,2个高度都为0"); string value = AcSerialBean.ByteToString(values);
// ConnectionIP(ioIp); LogUtil.error("收到【" + ioIp + "】的数据【" + value + "】,2个高度都为0");
// ConnectionIP(ioIp);
}
}
else if(StoreManager.Config.AIDI3_Addr > 0 && StoreManager.Config.AIDI4_Addr > 0)
{ //每次上传后验证下
int v1 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI3_Addr);
int v2 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI4_Addr);
if (v1.Equals(0) && v2.Equals(0))
{
LogUtil.info(msg);
string value = AcSerialBean.ByteToString(values);
LogUtil.error("收到【" + ioIp + "】的数据【" + value + "】,2个高度都为0");
// ConnectionIP(ioIp);
}
} }
} }
} }
......
...@@ -1539,19 +1539,35 @@ namespace OnlineStore.DeviceLibrary ...@@ -1539,19 +1539,35 @@ namespace OnlineStore.DeviceLibrary
#region 高度传感器处理 #region 高度传感器处理
public int GetSize() public int GetSize()
{ {
if (Get13Height() > 0) if (Config.AIDI3_Addr <= 0 || Config.AIDI4_Addr <= 0)
{
return 7;
}
else if (Config.AIDI1_Addr <= 0 || Config.AIDI2_Addr <= 0)
{ {
return 13; return 13;
} }
return 7; else
{
if (Get13Height() > 0)
{
return 13;
}
return 7;
}
} }
public int Get7Height() public int Get7Height()
{ {
if (Config.AIDI1_Addr <= 0 || Config.AIDI2_Addr <= 0)
{
return 0;
}
int result = 0; int result = 0;
if (KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) if (KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
return result; return result;
} }
double ai1Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, Config.AIDI1_Addr), Config.AIDI1_DefaultPosition); 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 ai2Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, Config.AIDI2_Addr), Config.AIDI2_DefaultPosition);
double Value = Math.Round((ai1Value + ai2Value) / 2, 1); double Value = Math.Round((ai1Value + ai2Value) / 2, 1);
...@@ -1584,17 +1600,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -1584,17 +1600,33 @@ namespace OnlineStore.DeviceLibrary
} }
public int GetHeight() public int GetHeight()
{ {
int value = Get13Height(); if (Config.AIDI3_Addr <= 0 || Config.AIDI4_Addr <= 0)
if (value > 0)
{
return value;
}else
{ {
return Get7Height(); return Get7Height();
} }
else if (Config.AIDI1_Addr <= 0 || Config.AIDI2_Addr <= 0)
{
return Get13Height();
}
else
{
int value = Get13Height();
if (value > 0)
{
return value;
}
else
{
return Get7Height();
}
}
} }
public int Get13Height() public int Get13Height()
{ {
if (Config.AIDI3_Addr <= 0 || Config.AIDI4_Addr <= 0)
{
return 0;
}
int result = 0; int result = 0;
if (KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) if (KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
...@@ -1629,6 +1661,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1629,6 +1661,7 @@ namespace OnlineStore.DeviceLibrary
return result; return result;
} }
#endregion #endregion
#region 温湿度处理 #region 温湿度处理
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!