Commit 499d7c53 LN

入料1-3增加托盘检测信号验证。

1 个父辈 bbce9b49
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
this.chbMoveStop = new System.Windows.Forms.CheckBox(); this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.lblName = new System.Windows.Forms.Label(); this.lblName = new System.Windows.Forms.Label();
this.btnScan = new System.Windows.Forms.Button(); this.btnScan = new System.Windows.Forms.Button();
this.chbUseTrayCheck = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -743,6 +744,7 @@ ...@@ -743,6 +744,7 @@
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.chbUseTrayCheck);
this.groupBox6.Controls.Add(this.btnUpdateShelf); this.groupBox6.Controls.Add(this.btnUpdateShelf);
this.groupBox6.Controls.Add(this.txtShelfID); this.groupBox6.Controls.Add(this.txtShelfID);
this.groupBox6.Controls.Add(this.lblwidth); this.groupBox6.Controls.Add(this.lblwidth);
...@@ -1357,6 +1359,18 @@ ...@@ -1357,6 +1359,18 @@
this.btnScan.UseVisualStyleBackColor = false; this.btnScan.UseVisualStyleBackColor = false;
this.btnScan.Click += new System.EventHandler(this.btnScan_Click); this.btnScan.Click += new System.EventHandler(this.btnScan_Click);
// //
// chbUseTrayCheck
//
this.chbUseTrayCheck.AutoSize = true;
this.chbUseTrayCheck.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbUseTrayCheck.Location = new System.Drawing.Point(281, 446);
this.chbUseTrayCheck.Name = "chbUseTrayCheck";
this.chbUseTrayCheck.Size = new System.Drawing.Size(112, 24);
this.chbUseTrayCheck.TabIndex = 283;
this.chbUseTrayCheck.Text = "启用料盘检测";
this.chbUseTrayCheck.UseVisualStyleBackColor = true;
this.chbUseTrayCheck.CheckedChanged += new System.EventHandler(this.chbUseTrayCheck_CheckedChanged);
//
// FrmFeedingEquip // FrmFeedingEquip
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -1491,6 +1505,7 @@ ...@@ -1491,6 +1505,7 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cmbDSize; private System.Windows.Forms.ComboBox cmbDSize;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox chbUseTrayCheck;
} }
} }
...@@ -290,6 +290,7 @@ namespace OnlineStore.AssemblyLine ...@@ -290,6 +290,7 @@ namespace OnlineStore.AssemblyLine
txtBP3.Text = equipBean.Config.BatchAxisP3.ToString(); txtBP3.Text = equipBean.Config.BatchAxisP3.ToString();
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
chbBoxSendShelf.Visible = equipBean.Config.IsCanOut.Equals(1); chbBoxSendShelf.Visible = equipBean.Config.IsCanOut.Equals(1);
chbUseTrayCheck.Visible = equipBean.Config.IsCanOut.Equals(0);
chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut; chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut;
IsLoad = true; IsLoad = true;
} }
...@@ -749,6 +750,32 @@ namespace OnlineStore.AssemblyLine ...@@ -749,6 +750,32 @@ namespace OnlineStore.AssemblyLine
} }
} }
private void chbUseTrayCheck_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
if (chbUseTrayCheck.Checked)
{
DialogResult result = MessageBox.Show("是否启用料盘检测信号?", "是否确认切换", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
if (result.Equals(DialogResult.Yes))
{
LineManager.AddTrayCheck(equipBean.DeviceID);
LogUtil.info(equipBean.Name + "用户启用料盘检测信号 ");
}
}
else
{
DialogResult result = MessageBox.Show("是否禁用料盘检测信号?", "是否确认切换", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
if (result.Equals(DialogResult.Yes))
{
LineManager.DelTrayCheck(equipBean.DeviceID);
LogUtil.info(equipBean.Name + "用户禁用料盘检测信号 ");
}
}
}
} }
} }
......
...@@ -287,20 +287,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -287,20 +287,33 @@ namespace OnlineStore.DeviceLibrary
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopUp)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopUp))
{ {
// SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_07_LocationUp);
// CheckLog("托盘检测: " + SecondMoveInfo.SLog + " , 定位气缸上升 )");
// if (Config.SidesWayNum > 0)
// {
// CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Down, IO_Type.SW_LocationCylinder_Up);
// }
//}
//else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_07_LocationUp))
//{
CheckLog("托盘阻挡*************** 托盘号【" + currTrayNum + "】");
CheckLog("托盘阻挡*************** 托盘号【" + currTrayNum + "】");
//判断盘是空盘,空盘并且编号正确才需要放料盘过去 //判断盘是空盘,空盘并且编号正确才需要放料盘过去
if (MoveInfo.MoveType.Equals(LineMoveType.InStore)) if (MoveInfo.MoveType.Equals(LineMoveType.InStore))
{ {
if (LineManager.useTrayCheck.Contains(DeviceID))
{
if (Config.SidesWayNum <= 0)
{
if (CylinderIsOk(IO_Type.FL_TopCylinder_Down, IO_Type.FL_TopCylinder_Up) && IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.HIGH))
{
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 入库中,需拦截空托盘【 " + currTrayNum + "】,空托盘料盘检测信号亮,禁用托盘,暂时放托盘离开");
TrayDisableManager.AddDisable(currTrayNum, Name, "空托盘料盘检测信号亮");
TrayMoveOk();
return;
}
}
else if (CylinderIsOk(IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up) && IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH))
{
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 入库中,需拦截空托盘【 " + currTrayNum + "】,空托盘料盘检测信号亮,禁用托盘,暂时放托盘离开");
TrayDisableManager.AddDisable(currTrayNum, Name, "空托盘料盘检测信号亮");
TrayMoveOk();
return;
}
}
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + "*************** 托盘号【" + currTrayNum + "】 ,需要入料,移栽料盘"); LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + "*************** 托盘号【" + currTrayNum + "】 ,需要入料,移栽料盘");
SecondMoveInfo.EndStepWait(); SecondMoveInfo.EndStepWait();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!