Commit 3796e43e LN

修改内容:

1.阻挡1下降2秒自动上升。
2.入料放料盘到托盘,夹爪放松完成,升降轴上升时再更新托盘有料。
3.入料复位时,把当前拦截的托盘放行,防止放两次料盘。
4.进仓界面增加清理入库任务按钮
5.HY16 托盘去出料线后阻挡上升。
1 个父辈 4fc38933
......@@ -258,7 +258,11 @@ namespace OnlineStore.AssemblyLine
string code = txtTrayCode.Text.Trim();
if (hasTray)
{
InOutParam inoutP = new InOutParam(num, "CodeTest", posId, ph, pw, inNg, urg, cutReel, isSmall, "", loc);
if (String.IsNullOrEmpty(code))
{
code = "CodeTest";
}
InOutParam inoutP = new InOutParam(num, code, posId, ph, pw, inNg, urg, cutReel, isSmall, "", loc);
TrayManager.UpdateTrayInfo(num, hasTray, trayType, inoutP, "InStoreNG ");
}
else
......@@ -472,6 +476,6 @@ namespace OnlineStore.AssemblyLine
{
LogUtil.info(Name + "点击:" + btnT3Reset.Text);
LineManager.Line.T3C1_Stop();
}
}
}
}
......@@ -19,17 +19,16 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMoveEquip));
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnCloseAll = new System.Windows.Forms.Button();
this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.btnOpenDo = new System.Windows.Forms.Button();
this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.btnCloseAll = new System.Windows.Forms.Button();
this.lblAddr = new System.Windows.Forms.Label();
this.txtWriteTime = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtSlaveId = new System.Windows.Forms.TextBox();
this.cmbWriteIO = new System.Windows.Forms.ComboBox();
this.btnOpenDo = new System.Windows.Forms.Button();
this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
......@@ -48,6 +47,10 @@
this.lblThisSta = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.label7 = new System.Windows.Forms.Label();
this.txtPosId = new System.Windows.Forms.TextBox();
this.btnClear = new System.Windows.Forms.Button();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.lblInoutInfo = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label();
......@@ -82,6 +85,7 @@
this.groupDO.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupDetial.SuspendLayout();
......@@ -129,117 +133,78 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btnCloseAll);
this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.btnOpenDo);
this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.btnCloseAll);
this.groupBox1.Controls.Add(this.lblAddr);
this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.cmbWriteIO);
this.groupBox1.Controls.Add(this.btnOpenDo);
this.groupBox1.Controls.Add(this.btnWriteSingleDO);
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(496, 411);
this.groupBox1.Location = new System.Drawing.Point(6, 411);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(661, 102);
this.groupBox1.Size = new System.Drawing.Size(485, 102);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
//
// btnCloseAll
//
this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(479, 18);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(110, 34);
this.btnCloseAll.TabIndex = 259;
this.btnCloseAll.Text = "关闭所有DO";
this.btnCloseAll.UseVisualStyleBackColor = false;
this.btnCloseAll.Click += new System.EventHandler(this.btnCloseAll_Click);
//
// txtDOIndex
//
this.txtDOIndex.Enabled = false;
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(150, 64);
this.txtDOIndex.Location = new System.Drawing.Point(433, 73);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(40, 23);
this.txtDOIndex.TabIndex = 276;
this.txtDOIndex.TabIndex = 275;
this.txtDOIndex.Text = "0";
this.txtDOIndex.Visible = false;
//
// txtDoName
//
this.txtDoName.Enabled = false;
this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDoName.Location = new System.Drawing.Point(66, 64);
this.txtDoName.Location = new System.Drawing.Point(433, 54);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(27, 23);
this.txtDoName.TabIndex = 275;
this.txtDoName.Size = new System.Drawing.Size(40, 23);
this.txtDoName.TabIndex = 274;
this.txtDoName.Text = "0";
this.txtDoName.Visible = false;
//
// label17
//
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label17.Location = new System.Drawing.Point(20, 67);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(35, 17);
this.label17.TabIndex = 274;
this.label17.Text = "设备:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(104, 67);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 273;
this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnOpenDo
// btnCloseAll
//
this.btnOpenDo.BackColor = System.Drawing.Color.White;
this.btnOpenDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDo.Location = new System.Drawing.Point(347, 18);
this.btnOpenDo.Name = "btnOpenDo";
this.btnOpenDo.Size = new System.Drawing.Size(110, 34);
this.btnOpenDo.TabIndex = 272;
this.btnOpenDo.Text = "打开";
this.btnOpenDo.UseVisualStyleBackColor = false;
this.btnOpenDo.Click += new System.EventHandler(this.btnOpenDo_Click);
this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(307, 59);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(120, 34);
this.btnCloseAll.TabIndex = 259;
this.btnCloseAll.Text = "关闭所有DO";
this.btnCloseAll.UseVisualStyleBackColor = false;
this.btnCloseAll.Click += new System.EventHandler(this.btnCloseAll_Click);
//
// btnWriteSingleDO
// lblAddr
//
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(348, 58);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(110, 34);
this.btnWriteSingleDO.TabIndex = 269;
this.btnWriteSingleDO.Text = "关闭";
this.btnWriteSingleDO.UseVisualStyleBackColor = false;
this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click);
this.lblAddr.AutoSize = true;
this.lblAddr.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblAddr.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblAddr.Location = new System.Drawing.Point(271, 28);
this.lblAddr.Name = "lblAddr";
this.lblAddr.Size = new System.Drawing.Size(35, 17);
this.lblAddr.TabIndex = 273;
this.lblAddr.Text = "地址:";
this.lblAddr.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtWriteTime
//
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(272, 64);
this.txtWriteTime.Location = new System.Drawing.Point(396, 25);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(40, 23);
this.txtWriteTime.Size = new System.Drawing.Size(63, 23);
this.txtWriteTime.TabIndex = 271;
this.txtWriteTime.Text = "0";
//
......@@ -248,7 +213,7 @@
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(201, 67);
this.label5.Location = new System.Drawing.Point(329, 28);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 270;
......@@ -258,7 +223,7 @@
// txtSlaveId
//
this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSlaveId.Location = new System.Drawing.Point(322, 24);
this.txtSlaveId.Location = new System.Drawing.Point(268, 25);
this.txtSlaveId.MaxLength = 10;
this.txtSlaveId.Name = "txtSlaveId";
this.txtSlaveId.Size = new System.Drawing.Size(12, 23);
......@@ -274,14 +239,40 @@
this.cmbWriteIO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbWriteIO.FormattingEnabled = true;
this.cmbWriteIO.ItemHeight = 22;
this.cmbWriteIO.Location = new System.Drawing.Point(17, 24);
this.cmbWriteIO.Location = new System.Drawing.Point(17, 22);
this.cmbWriteIO.Name = "cmbWriteIO";
this.cmbWriteIO.Size = new System.Drawing.Size(299, 28);
this.cmbWriteIO.Size = new System.Drawing.Size(244, 28);
this.cmbWriteIO.TabIndex = 234;
this.cmbWriteIO.ValueMember = "ProName";
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged);
//
// btnOpenDo
//
this.btnOpenDo.BackColor = System.Drawing.Color.White;
this.btnOpenDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDo.Location = new System.Drawing.Point(29, 59);
this.btnOpenDo.Name = "btnOpenDo";
this.btnOpenDo.Size = new System.Drawing.Size(120, 34);
this.btnOpenDo.TabIndex = 272;
this.btnOpenDo.Text = "打开";
this.btnOpenDo.UseVisualStyleBackColor = false;
this.btnOpenDo.Click += new System.EventHandler(this.btnOpenDo_Click);
//
// btnWriteSingleDO
//
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(168, 59);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(120, 34);
this.btnWriteSingleDO.TabIndex = 269;
this.btnWriteSingleDO.Text = "关闭";
this.btnWriteSingleDO.UseVisualStyleBackColor = false;
this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click);
//
// groupBox4
//
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -289,7 +280,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(251, 6);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(240, 509);
this.groupBox4.Size = new System.Drawing.Size(240, 400);
this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
......@@ -307,7 +298,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(229, 489);
this.tableLayoutPanel2.Size = new System.Drawing.Size(229, 380);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
......@@ -317,7 +308,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(6, 6);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(240, 509);
this.groupBox3.Size = new System.Drawing.Size(240, 400);
this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
......@@ -335,7 +326,7 @@
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(229, 489);
this.tableLayoutPanel1.Size = new System.Drawing.Size(229, 380);
this.tableLayoutPanel1.TabIndex = 102;
//
// groupDO
......@@ -496,9 +487,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(4, 181);
this.lblThisSta.Location = new System.Drawing.Point(4, 186);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(652, 84);
this.lblThisSta.Size = new System.Drawing.Size(652, 78);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -518,6 +509,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox5);
this.tabPage1.Controls.Add(this.groupDO);
this.tabPage1.Controls.Add(this.groupBox6);
this.tabPage1.Controls.Add(this.groupBox3);
......@@ -531,6 +523,48 @@
this.tabPage1.Text = " IO列表 ";
this.tabPage1.UseVisualStyleBackColor = true;
//
// groupBox5
//
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.label7);
this.groupBox5.Controls.Add(this.txtPosId);
this.groupBox5.Controls.Add(this.btnClear);
this.groupBox5.Location = new System.Drawing.Point(496, 411);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(661, 102);
this.groupBox5.TabIndex = 279;
this.groupBox5.TabStop = false;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(14, 28);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(47, 17);
this.label7.TabIndex = 284;
this.label7.Text = "库位号:";
//
// txtPosId
//
this.txtPosId.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPosId.Location = new System.Drawing.Point(72, 23);
this.txtPosId.Name = "txtPosId";
this.txtPosId.Size = new System.Drawing.Size(150, 26);
this.txtPosId.TabIndex = 283;
//
// btnClear
//
this.btnClear.BackColor = System.Drawing.Color.White;
this.btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClear.Location = new System.Drawing.Point(233, 19);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(105, 35);
this.btnClear.TabIndex = 286;
this.btnClear.Text = "清空入库任务";
this.btnClear.UseVisualStyleBackColor = false;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// groupBox6
//
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -552,9 +586,9 @@
this.lblInoutInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblInoutInfo.ForeColor = System.Drawing.Color.Green;
this.lblInoutInfo.Location = new System.Drawing.Point(16, 19);
this.lblInoutInfo.Location = new System.Drawing.Point(8, 15);
this.lblInoutInfo.Name = "lblInoutInfo";
this.lblInoutInfo.Size = new System.Drawing.Size(637, 40);
this.lblInoutInfo.Size = new System.Drawing.Size(648, 44);
this.lblInoutInfo.TabIndex = 281;
this.lblInoutInfo.Text = "当前出入库:";
//
......@@ -576,9 +610,9 @@
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(249, 65);
this.lblInstoreList.Location = new System.Drawing.Point(249, 61);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(407, 96);
this.lblInstoreList.Size = new System.Drawing.Size(407, 123);
this.lblInstoreList.TabIndex = 277;
//
// tabPage2
......@@ -905,6 +939,8 @@
this.groupDO.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.tabPage2.ResumeLayout(false);
......@@ -950,10 +986,7 @@
internal System.Windows.Forms.TextBox txtP3;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label lblAddr;
private System.Windows.Forms.Button btnOpenDo;
private System.Windows.Forms.Button btnWriteSingleDO;
private System.Windows.Forms.TextBox txtWriteTime;
......@@ -976,6 +1009,12 @@
private System.Windows.Forms.Button TopCylinder_Down;
private System.Windows.Forms.Label lblP2;
private System.Windows.Forms.Label lblP3List;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtPosId;
private System.Windows.Forms.Button btnClear;
}
}
......@@ -23,7 +23,7 @@ namespace OnlineStore.AssemblyLine
internal partial class FrmMoveEquip : FrmEquipBase
{
private bool IsLoad = false;
private MoveEquip equipBean;
internal FrmMoveEquip(MoveEquip moveEquip)
{
......@@ -37,14 +37,14 @@ namespace OnlineStore.AssemblyLine
{
chbDebug.Checked = equipBean.IsDebug;
if (equipBean.UseAxis)
{
{
axisMoveControl1.LoadData(equipBean, new AxisBean[] { equipBean.UpdownAxis });
UpDownCylinder_Up.Visible = false;
UpDownCylinder_Up.Visible = false;
}
else
{
tabControl1.TabPages.Remove(tabPage2);
UpDownCylinder_Up.Visible = true;
UpDownCylinder_Up.Visible = true;
}
cmbSizeList.Items.Clear();
cmbSizeList.Items.Add("0=默认位置");
......@@ -54,7 +54,7 @@ namespace OnlineStore.AssemblyLine
}
chbMoveStop.Checked = equipBean.MoveStop;
cmbSizeList.SelectedIndex = 0;
lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus);
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg;
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
lblName.Text = equipBean.Name;
......@@ -194,7 +194,7 @@ namespace OnlineStore.AssemblyLine
catch (Exception ex)
{
MessageBox.Show(ex.StackTrace, "Exception(异常)", MessageBoxButtons.OK, MessageBoxIcon.Error);
LogUtil.error("",ex);
LogUtil.error("", ex);
}
}
private void btnOpenDo_Click(object sender, EventArgs e)
......@@ -209,6 +209,7 @@ namespace OnlineStore.AssemblyLine
{
string deviceName = txtDoName.Text;
int index = FormUtil.GetIntValue(txtDOIndex);
lblAddr.Text = deviceName + "_" + index;
// IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
......@@ -220,7 +221,7 @@ namespace OnlineStore.AssemblyLine
{
IOManager.instance.WriteSingleDO(deviceName, (byte)slaveId, (ushort)index, (IO_VALUE)value);
}
}
}
private ConfigIO GetSelectDO()
{
string text = cmbWriteIO.SelectedValue.ToString();
......@@ -242,6 +243,7 @@ namespace OnlineStore.AssemblyLine
// txtIp.Text = io.DeviceName;
txtDOIndex.Text = io.GetIOAddr().ToString();
txtDoName.Text = io.IO_IP;
lblAddr.Text = io.IO_IP + "_" + io.GetIOAddr().ToString();
txtSlaveId.Text = io.SlaveID.ToString();
IOTextControl newControl = DOControlList[io.ProName];
if (selectControl != null) { selectControl.BackColor = Color.White; }
......@@ -249,7 +251,7 @@ namespace OnlineStore.AssemblyLine
selectControl = newControl;
}
}
}
}
private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e)
{
......@@ -268,11 +270,11 @@ namespace OnlineStore.AssemblyLine
private void btnReadIO_Click(object sender, EventArgs e)
{
ReadIOList();
}
}
private void FrmIOStatus_Shown(object sender, EventArgs e)
{
timer1.Start();
}
}
private void btnStart_Click(object sender, EventArgs e)
{
if (equipBase.runStatus.Equals(LineRunStatus.Wait))
......@@ -290,9 +292,9 @@ namespace OnlineStore.AssemblyLine
{
btnStart.Enabled = true;
btnStop.Enabled = true;
btnInStore.Enabled = isStart;
btnOutStore.Enabled = isStart;
btnOutStore.Enabled = isStart;
btnStop.Enabled = true;
if (isStart)
{
......@@ -308,7 +310,7 @@ namespace OnlineStore.AssemblyLine
{
LogUtil.info(equipBean.Name + "点击:停止");
StopRun();
}
}
private void btnReset_Click(object sender, EventArgs e)
{
LogUtil.info(equipBean.Name + "点击:复位");
......@@ -359,7 +361,7 @@ namespace OnlineStore.AssemblyLine
if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{
InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false);
LogUtil.info(equipBean.Name + "点击:出库测试 "+ param.ToShortStr());
LogUtil.info(equipBean.Name + "点击:出库测试 " + param.ToShortStr());
equipBean.StartOutStoreMove(param);
}
else
......@@ -380,7 +382,7 @@ namespace OnlineStore.AssemblyLine
{
MessageBox.Show("未启动或不在空闲中,无法入库测试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
private void cmbSizeList_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbSizeList.SelectedIndex < 0)
......@@ -401,7 +403,7 @@ namespace OnlineStore.AssemblyLine
{
int position = FormUtil.GetIntValue(txtP2);
int speed = equipBean.Config.UpdownAxis_P2Speed;
LogUtil.info(equipBean.Name+"点击【移栽位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
LogUtil.info(equipBean.Name + "点击【移栽位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
......@@ -411,18 +413,18 @@ namespace OnlineStore.AssemblyLine
this.Enabled = false;
equipBean.RunAxis(false, equipBase.UpdownAxis);
this.Enabled = true;
LogUtil.info(equipBean.Name+"伺服运转ON完成");
LogUtil.info(equipBean.Name + "伺服运转ON完成");
}
private void btnAxisOff_Click(object sender, EventArgs e)
{
equipBean.CloseAxis(equipBase.UpdownAxis);
LogUtil.info(equipBean.Name+"伺服运转OFF完成");
LogUtil.info(equipBean.Name + "伺服运转OFF完成");
}
private void btnCloseAll_Click(object sender, EventArgs e)
{
foreach (Control con in groupDO.Controls)
{
if (con is Button)
......@@ -441,7 +443,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtP1);
int speed = equipBean.Config.UpdownAxis_P1Speed;
LogUtil.info(equipBean.Name+ "点击【P1点测试】, 位置【" + position + "】速度【" + speed + "】");
LogUtil.info(equipBean.Name + "点击【P1点测试】, 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
......@@ -470,7 +472,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtP3);
int speed = equipBean.Config.UpdownAxis_P3Speed;
LogUtil.info(equipBean.Name+"点击【料仓门口下降位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
LogUtil.info(equipBean.Name + "点击【料仓门口下降位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
......@@ -508,7 +510,7 @@ namespace OnlineStore.AssemblyLine
int height = Convert.ToInt32(cmbDHeight.Text);
int position = FormUtil.GetIntValue(txtDP2);
DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存",MessageBoxButtons.OKCancel);
DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
equipBean.Config.UpdateUpdownP2Detial(size, height, position);
......@@ -538,7 +540,7 @@ namespace OnlineStore.AssemblyLine
}
int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text);
int position = equipBean.Config.GetUpdownP2Detial( height, size);
int position = equipBean.Config.GetUpdownP2Detial(height, size);
txtDP2.Text = position.ToString();
}
......@@ -564,11 +566,11 @@ namespace OnlineStore.AssemblyLine
cmbDHeight.Text = height.ToString();
cmbDSize.Text = size.ToString();
txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height,size).ToString();
}
txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height, size).ToString();
}
}
}
catch(Exception ex)
catch (Exception ex)
{
}
......@@ -580,12 +582,12 @@ namespace OnlineStore.AssemblyLine
}
private void StopCheck1_Click(object sender, EventArgs e)
{
{
DoBtnClick(sender);
}
private void StopCheck2_Click(object sender, EventArgs e)
{
{
DoBtnClick(sender);
}
......@@ -618,7 +620,7 @@ namespace OnlineStore.AssemblyLine
LogUtil.info(equipBase.Name + "界面点击:" + UpDownCylinder_Up.Text);
equipBase.CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
private void button4_Click(object sender, EventArgs e)
{
......@@ -650,7 +652,7 @@ namespace OnlineStore.AssemblyLine
LogUtil.info(equipBase.Name + "界面点击:" + ClampCylinder_Work.Text);
equipBase.CylinderMove(null, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
}
private void chbMoveStop_CheckedChanged(object sender, EventArgs e)
{
......@@ -662,6 +664,39 @@ namespace OnlineStore.AssemblyLine
equipBean.MoveStop = chbMoveStop.Checked;
LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop);
}
private void btnClear_Click(object sender, EventArgs e)
{
string posId = txtPosId.Text.Trim();
if (String.IsNullOrEmpty(posId))
{
MessageBox.Show("请输入正确的库位号", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
txtPosId.Focus();
return;
}
LogUtil.info("点击 " + btnClear.Text + " , 库位号[" + posId + "]");
InOutParam param = null;
List<InOutParam> paramList = new List<InOutParam>(equipBean.waitInStoreList);
foreach (InOutParam p in paramList)
{
if (p.PosId.Equals(posId))
{
param = p;
break;
}
}
if (param == null)
{
MessageBox.Show("未找到对应的任务,请输入正确的库位号", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
txtPosId.Focus();
return;
}
else
{
equipBean.RemoveInStore(param, "手动清除入库任务");
txtPosId.Clear();
}
}
}
}
......
20200105
20200203
修改内容:
1.阻挡下降2秒自动上升。
2.入库放料完成,升降轴上升时再更新托盘信息。
3.进仓界面增加清理入库任务按钮
20200105
1.获取入库库位号时需要判断是否是出库料。
2.HY9和HY15,如果是NG料直接横移。
3.入库时需要判断托盘的库位号和入库任务的库位号一致。
......
......@@ -189,6 +189,12 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
break;
case LineMoveStep.FR_05_UpdownAxis_P1:
currTrayNum = -1;
if (LineManager.Line.TrayIsReady(DeviceID, out currTrayNum))
{
LogInfo("复位中,发现托盘准备完成,放托盘离开");
TrayMoveOk();
}
if (UpdownIsInP1())
{
MoveInfo.NextMoveStep(LineMoveStep.FR_06_CylinderGive);
......@@ -279,12 +285,11 @@ namespace OnlineStore.DeviceLibrary
case LineMoveStep.FR_17_BatchAxisToP1:
MoveInfo.NextMoveStep(LineMoveStep.FR_18_ClampCheck);
DebugInfo(MoveInfo.MoveType + " : 等待夹爪料盘检测信号无料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_ClampCylinder_Check, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_ClampCylinder_Check, IO_VALUE.LOW));
break;
case LineMoveStep.FR_18_ClampCheck:
LogInfo("重置完成!");
LogInfo("重置完成!");
MoveEndS();
break;
default: break;
......
......@@ -517,20 +517,7 @@ namespace OnlineStore.DeviceLibrary
int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth);
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
LastPosParam.TrayNumber = currTrayNum;
if (LastResult.Equals(98))
{
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.OutStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P2: [" + targetPositon + "] 更新料盘位置,更新托盘信息【" + tray.ToStr() + "】");
SServerManager.UpdateTrayLoc(Name, LastPosParam.WareCode, LocStatus.INLINE, "E" + currTrayNum.ToString().PadLeft(2, '0'));
}
else
{
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P2: [" + targetPositon + "] 更新托盘信息【" + tray.ToStr() + "】");
SServerManager.SendPosToStoreCheck(Name, LastPosParam.Clone());
}
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P2: [" + targetPositon + "] 暂不更新托盘信息");
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false))
{
InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点,不等待结果");
......@@ -553,8 +540,24 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.FI_35_AxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1点 [" + Config.UpDownAxisP1 + "]");
//InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1点 [" + Config.UpDownAxisP1 + "]");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
if (LastResult.Equals(98))
{
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.OutStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "] 更新料盘位置,更新托盘信息【" + tray.ToStr() + "】");
SServerManager.UpdateTrayLoc(Name, LastPosParam.WareCode, LocStatus.INLINE, "E" + currTrayNum.ToString().PadLeft(2, '0'));
}
else
{
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "] 更新托盘信息【" + tray.ToStr() + "】");
SServerManager.SendPosToStoreCheck(Name, LastPosParam.Clone());
}
}
else if (MoveInfo.IsStep(LineMoveStep.FI_35_AxisToP1))
{
......@@ -563,7 +566,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.FI_35_AxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1点 [" + Config.UpDownAxisP1 + "]");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
}
else
{
......
......@@ -286,7 +286,7 @@ namespace OnlineStore.DeviceLibrary
CheckLog(" 托盘检测:" + MoveInfo.SLog + ",检测到前阻挡托盘,前阻挡下降");
}
ClearTrayRFID();
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH, 1200);
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH, TrayManager.StopDTime);
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_FrontStopCheck, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
......@@ -480,7 +480,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
HY_StopCylinderUp(MoveInfo);
OL_StopCylinderUp(MoveInfo);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
//如果是出库料,才需要更新位置
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
......
......@@ -736,7 +736,7 @@ namespace OnlineStore.DeviceLibrary
CheckLog(" 托盘检测:料盘检测StopCylinder_Check1 " + SecondMoveInfo.SLog + "阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0,清理托盘RFID");
ClearTrayRFID();
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH, 1200);
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH, TrayManager.StopDTime);
SecondMoveInfo.OneWaitCanEndStep = true;
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCheck1, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCheck2, IO_VALUE.HIGH));
......
......@@ -15,6 +15,9 @@ namespace OnlineStore.DeviceLibrary
{
public class TrayManager
{
public static int StopDTime = 2000;
public static bool DisTraySave = ConfigAppSettings.GetIntValue(Setting_Init.DisTraySave).Equals(1);
/// <summary>
/// 托盘集合,key=托盘编号,value=托盘详细信息
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!