Commit 67ccc046 LN

1

1 个父辈 0bcf605c
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,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.lblwidth = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -581,7 +582,7 @@ ...@@ -581,7 +582,7 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red; this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(406, 65); this.lblThisSta.Location = new System.Drawing.Point(406, 110);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(720, 109); this.lblThisSta.Size = new System.Drawing.Size(720, 109);
this.lblThisSta.TabIndex = 246; this.lblThisSta.TabIndex = 246;
...@@ -696,6 +697,7 @@ ...@@ -696,6 +697,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.lblwidth);
this.groupBox6.Controls.Add(this.lblMoveInfo); this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblAgvInfo); this.groupBox6.Controls.Add(this.lblAgvInfo);
this.groupBox6.Controls.Add(this.lblInstoreList); this.groupBox6.Controls.Add(this.lblInstoreList);
...@@ -736,7 +738,7 @@ ...@@ -736,7 +738,7 @@
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green; this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(406, 175); this.lblInstoreList.Location = new System.Drawing.Point(406, 220);
this.lblInstoreList.Name = "lblInstoreList"; this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(720, 109); this.lblInstoreList.Size = new System.Drawing.Size(720, 109);
this.lblInstoreList.TabIndex = 277; this.lblInstoreList.TabIndex = 277;
...@@ -1150,6 +1152,17 @@ ...@@ -1150,6 +1152,17 @@
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);
// //
// lblwidth
//
this.lblwidth.AutoSize = true;
this.lblwidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblwidth.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblwidth.Location = new System.Drawing.Point(248, 78);
this.lblwidth.Name = "lblwidth";
this.lblwidth.Size = new System.Drawing.Size(92, 17);
this.lblwidth.TabIndex = 279;
this.lblwidth.Text = "当前料盘宽度:";
//
// FrmFeedingEquip // FrmFeedingEquip
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -1267,6 +1280,7 @@ ...@@ -1267,6 +1280,7 @@
private System.Windows.Forms.CheckBox chbMoveStop; private System.Windows.Forms.CheckBox chbMoveStop;
private System.Windows.Forms.Button btnOLine; private System.Windows.Forms.Button btnOLine;
private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Label lblwidth;
} }
} }
...@@ -133,6 +133,7 @@ namespace OnlineStore.AssemblyLine ...@@ -133,6 +133,7 @@ namespace OnlineStore.AssemblyLine
lblInstoreList.Text = text; lblInstoreList.Text = text;
} }
lblMoveInfo.Text = equipBean.GetMoveStr(); lblMoveInfo.Text = equipBean.GetMoveStr();
lblwidth.Text = " ";
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -33,20 +33,21 @@ ...@@ -33,20 +33,21 @@
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.lblMoveInfo = new System.Windows.Forms.Label(); this.lblMoveInfo = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblCID = new System.Windows.Forms.Label();
this.chbAutoRun = new System.Windows.Forms.CheckBox(); this.chbAutoRun = new System.Windows.Forms.CheckBox();
this.btnUpdateStatus = new System.Windows.Forms.Button(); this.chkDebug = new System.Windows.Forms.CheckBox();
this.btnClearLog = new System.Windows.Forms.Button();
this.btnCopyLog = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblPosId = new System.Windows.Forms.Label(); this.lblPosId = new System.Windows.Forms.Label();
this.btnUpdateStatus = new System.Windows.Forms.Button();
this.txtPosId = new System.Windows.Forms.TextBox(); this.txtPosId = new System.Windows.Forms.TextBox();
this.cmbBoxIndex = new System.Windows.Forms.ComboBox(); this.cmbBoxIndex = new System.Windows.Forms.ComboBox();
this.btnInStoreTset = new System.Windows.Forms.Button(); this.btnInStoreTset = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.lblCID = new System.Windows.Forms.Label();
this.chkDebug = new System.Windows.Forms.CheckBox();
this.listView1 = new System.Windows.Forms.ListView(); this.listView1 = new System.Windows.Forms.ListView();
this.btnCopyLog = new System.Windows.Forms.Button();
this.btnClearLog = new System.Windows.Forms.Button();
this.logBox = new System.Windows.Forms.RichTextBox(); this.logBox = new System.Windows.Forms.RichTextBox();
this.lblStatus = new System.Windows.Forms.Label(); this.lblStatus = new System.Windows.Forms.Label();
this.lblWarnMsg = new System.Windows.Forms.Label(); this.lblWarnMsg = new System.Windows.Forms.Label();
...@@ -78,13 +79,13 @@ ...@@ -78,13 +79,13 @@
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.btnTrayInfo = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tabControl1 // tabControl1
...@@ -128,6 +129,33 @@ ...@@ -128,6 +129,33 @@
this.lblMoveInfo.TabIndex = 196; this.lblMoveInfo.TabIndex = 196;
this.lblMoveInfo.Text = "CID"; this.lblMoveInfo.Text = "CID";
// //
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.btnTrayInfo);
this.groupBox2.Controls.Add(this.lblCID);
this.groupBox2.Controls.Add(this.chbAutoRun);
this.groupBox2.Controls.Add(this.chkDebug);
this.groupBox2.Controls.Add(this.btnClearLog);
this.groupBox2.Controls.Add(this.btnCopyLog);
this.groupBox2.Location = new System.Drawing.Point(460, 4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(860, 75);
this.groupBox2.TabIndex = 196;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "状态信息";
//
// lblCID
//
this.lblCID.AutoSize = true;
this.lblCID.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCID.Location = new System.Drawing.Point(19, 34);
this.lblCID.Name = "lblCID";
this.lblCID.Size = new System.Drawing.Size(33, 20);
this.lblCID.TabIndex = 95;
this.lblCID.Text = "CID";
//
// chbAutoRun // chbAutoRun
// //
this.chbAutoRun.AutoSize = true; this.chbAutoRun.AutoSize = true;
...@@ -140,18 +168,43 @@ ...@@ -140,18 +168,43 @@
this.chbAutoRun.UseVisualStyleBackColor = true; this.chbAutoRun.UseVisualStyleBackColor = true;
this.chbAutoRun.CheckedChanged += new System.EventHandler(this.chbAutoRun_CheckedChanged); this.chbAutoRun.CheckedChanged += new System.EventHandler(this.chbAutoRun_CheckedChanged);
// //
// btnUpdateStatus // chkDebug
// //
this.btnUpdateStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnUpdateStatus.BackColor = System.Drawing.Color.White; this.chkDebug.AutoSize = true;
this.btnUpdateStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdateStatus.Location = new System.Drawing.Point(629, 28); this.chkDebug.Location = new System.Drawing.Point(755, 32);
this.btnUpdateStatus.Name = "btnUpdateStatus"; this.chkDebug.Name = "chkDebug";
this.btnUpdateStatus.Size = new System.Drawing.Size(222, 35); this.chkDebug.Size = new System.Drawing.Size(76, 24);
this.btnUpdateStatus.TabIndex = 195; this.chkDebug.TabIndex = 194;
this.btnUpdateStatus.Text = "更改为调试状态"; this.chkDebug.Text = "DEBUG";
this.btnUpdateStatus.UseVisualStyleBackColor = false; this.chkDebug.UseVisualStyleBackColor = true;
this.btnUpdateStatus.Click += new System.EventHandler(this.btnUpdateStatus_Click); //
// btnClearLog
//
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearLog.BackColor = System.Drawing.Color.White;
this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearLog.Location = new System.Drawing.Point(635, 27);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 35);
this.btnClearLog.TabIndex = 190;
this.btnClearLog.Text = "清空日志";
this.btnClearLog.UseVisualStyleBackColor = false;
this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click);
//
// btnCopyLog
//
this.btnCopyLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopyLog.BackColor = System.Drawing.Color.White;
this.btnCopyLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyLog.Location = new System.Drawing.Point(515, 27);
this.btnCopyLog.Name = "btnCopyLog";
this.btnCopyLog.Size = new System.Drawing.Size(105, 35);
this.btnCopyLog.TabIndex = 191;
this.btnCopyLog.Text = "复制日志";
this.btnCopyLog.UseVisualStyleBackColor = false;
this.btnCopyLog.Click += new System.EventHandler(this.btnCopyLog_Click);
// //
// groupBox1 // groupBox1
// //
...@@ -180,6 +233,19 @@ ...@@ -180,6 +233,19 @@
this.lblPosId.TabIndex = 197; this.lblPosId.TabIndex = 197;
this.lblPosId.Text = "库位:"; this.lblPosId.Text = "库位:";
// //
// btnUpdateStatus
//
this.btnUpdateStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnUpdateStatus.BackColor = System.Drawing.Color.White;
this.btnUpdateStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdateStatus.Location = new System.Drawing.Point(629, 28);
this.btnUpdateStatus.Name = "btnUpdateStatus";
this.btnUpdateStatus.Size = new System.Drawing.Size(222, 35);
this.btnUpdateStatus.TabIndex = 195;
this.btnUpdateStatus.Text = "更改为调试状态";
this.btnUpdateStatus.UseVisualStyleBackColor = false;
this.btnUpdateStatus.Click += new System.EventHandler(this.btnUpdateStatus_Click);
//
// txtPosId // txtPosId
// //
this.txtPosId.Location = new System.Drawing.Point(426, 32); this.txtPosId.Location = new System.Drawing.Point(426, 32);
...@@ -232,28 +298,6 @@ ...@@ -232,28 +298,6 @@
this.button1.UseVisualStyleBackColor = false; this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click); this.button1.Click += new System.EventHandler(this.button1_Click);
// //
// lblCID
//
this.lblCID.AutoSize = true;
this.lblCID.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCID.Location = new System.Drawing.Point(19, 34);
this.lblCID.Name = "lblCID";
this.lblCID.Size = new System.Drawing.Size(33, 20);
this.lblCID.TabIndex = 95;
this.lblCID.Text = "CID";
//
// chkDebug
//
this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkDebug.AutoSize = true;
this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkDebug.Location = new System.Drawing.Point(755, 32);
this.chkDebug.Name = "chkDebug";
this.chkDebug.Size = new System.Drawing.Size(76, 24);
this.chkDebug.TabIndex = 194;
this.chkDebug.Text = "DEBUG";
this.chkDebug.UseVisualStyleBackColor = true;
//
// listView1 // listView1
// //
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
...@@ -271,32 +315,6 @@ ...@@ -271,32 +315,6 @@
this.listView1.View = System.Windows.Forms.View.Details; this.listView1.View = System.Windows.Forms.View.Details;
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
// //
// btnCopyLog
//
this.btnCopyLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopyLog.BackColor = System.Drawing.Color.White;
this.btnCopyLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyLog.Location = new System.Drawing.Point(515, 27);
this.btnCopyLog.Name = "btnCopyLog";
this.btnCopyLog.Size = new System.Drawing.Size(105, 35);
this.btnCopyLog.TabIndex = 191;
this.btnCopyLog.Text = "复制日志";
this.btnCopyLog.UseVisualStyleBackColor = false;
this.btnCopyLog.Click += new System.EventHandler(this.btnCopyLog_Click);
//
// btnClearLog
//
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearLog.BackColor = System.Drawing.Color.White;
this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearLog.Location = new System.Drawing.Point(635, 27);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 35);
this.btnClearLog.TabIndex = 190;
this.btnClearLog.Text = "清空日志";
this.btnClearLog.UseVisualStyleBackColor = false;
this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click);
//
// logBox // logBox
// //
this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
...@@ -540,21 +558,18 @@ ...@@ -540,21 +558,18 @@
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// groupBox2 // btnTrayInfo
// //
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.btnTrayInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right))); this.btnTrayInfo.BackColor = System.Drawing.Color.White;
this.groupBox2.Controls.Add(this.lblCID); this.btnTrayInfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.groupBox2.Controls.Add(this.chbAutoRun); this.btnTrayInfo.Location = new System.Drawing.Point(401, 26);
this.groupBox2.Controls.Add(this.chkDebug); this.btnTrayInfo.Name = "btnTrayInfo";
this.groupBox2.Controls.Add(this.btnClearLog); this.btnTrayInfo.Size = new System.Drawing.Size(105, 35);
this.groupBox2.Controls.Add(this.btnCopyLog); this.btnTrayInfo.TabIndex = 195;
this.groupBox2.Location = new System.Drawing.Point(460, 4); this.btnTrayInfo.Text = "托盘信息";
this.groupBox2.Name = "groupBox2"; this.btnTrayInfo.UseVisualStyleBackColor = false;
this.groupBox2.Size = new System.Drawing.Size(860, 75); this.btnTrayInfo.Click += new System.EventHandler(this.btnTrayInfo_Click);
this.groupBox2.TabIndex = 196;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "状态信息";
// //
// FrmLineStore // FrmLineStore
// //
...@@ -579,13 +594,13 @@ ...@@ -579,13 +594,13 @@
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout(); this.tabPage1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
...@@ -642,6 +657,7 @@ ...@@ -642,6 +657,7 @@
private System.Windows.Forms.ToolStripMenuItem iO模块状态ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem iO模块状态ToolStripMenuItem;
private System.Windows.Forms.Label lblMoveInfo; private System.Windows.Forms.Label lblMoveInfo;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button btnTrayInfo;
} }
} }
...@@ -718,5 +718,16 @@ namespace OnlineStore.AssemblyLine ...@@ -718,5 +718,16 @@ namespace OnlineStore.AssemblyLine
FrmIOMsg frm = new FrmIOMsg(); FrmIOMsg frm = new FrmIOMsg();
frm.ShowDialog(); frm.ShowDialog();
} }
private void btnTrayInfo_Click(object sender, EventArgs e)
{
List<TrayInfo> tray = TrayManager.getTrayList();
LogUtil.info("-------------------开始打印托盘信息:");
foreach(TrayInfo t in tray)
{
LogUtil.info(t.ToStr());
}
LogUtil.info("-------------------结束打印托盘信息");
}
} }
} }
...@@ -17,8 +17,10 @@ namespace OnlineStore.Common ...@@ -17,8 +17,10 @@ namespace OnlineStore.Common
public string cids = ""; public string cids = "";
public string code = ""; public string code = "";
} }
public class LineOperation public class LineOperation
{ {
// //{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"}
/// <summary> /// <summary>
/// 0=成功 /// 0=成功
/// </summary> /// </summary>
......
...@@ -482,7 +482,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -482,7 +482,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.debug(Name + msg); LogUtil.debug(Name + msg);
} }
protected void InStoreLog(string msg) protected void InLog(string msg)
{ {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
if (String.IsNullOrEmpty( posId)) if (String.IsNullOrEmpty( posId))
...@@ -494,7 +494,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -494,7 +494,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + " " + "[" + posId + "]" + msg); LogUtil.info(Name + " " + "[" + posId + "]" + msg);
} }
} }
protected void OutStoreLog(string msg) protected void OutLog(string msg)
{ {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
if (String.IsNullOrEmpty(posId)) if (String.IsNullOrEmpty(posId))
...@@ -506,7 +506,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -506,7 +506,30 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + " " + "[" + posId + "] " + msg); LogUtil.info(Name + " " + "[" + posId + "] " + msg);
} }
} }
protected void SInLog(string msg)
{
string posId = SecondMoveInfo.MoveParam != null ? SecondMoveInfo.MoveParam.PosId : "";
if (String.IsNullOrEmpty(posId))
{
LogUtil.info(Name + " " + msg);
}
else
{
LogUtil.info(Name + " " + "[" + posId + "]" + msg);
}
}
protected void SOutLog(string msg)
{
string posId = SecondMoveInfo.MoveParam != null ? SecondMoveInfo.MoveParam.PosId : "";
if (String.IsNullOrEmpty(posId))
{
LogUtil.info(Name + " " + msg);
}
else
{
LogUtil.info(Name + " " + "[" + posId + "] " + msg);
}
}
public string GetMoveStr() public string GetMoveStr()
{ {
string msg = ""; string msg = "";
......
...@@ -410,6 +410,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -410,6 +410,7 @@ namespace OnlineStore.DeviceLibrary
private IO_VALUE TargetIoValue = IO_VALUE.HIGH; private IO_VALUE TargetIoValue = IO_VALUE.HIGH;
private bool BatchAxisStartCheck(string targetIo = "", IO_VALUE value = IO_VALUE.HIGH) private bool BatchAxisStartCheck(string targetIo = "", IO_VALUE value = IO_VALUE.HIGH)
{ {
isOk = false;
if (String.IsNullOrEmpty(targetIo)) if (String.IsNullOrEmpty(targetIo))
{ {
targetIo = IO_Type.SL_AxisLocationCheck; targetIo = IO_Type.SL_AxisLocationCheck;
...@@ -430,6 +431,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -430,6 +431,7 @@ namespace OnlineStore.DeviceLibrary
private bool BatchAxisStopCheck() private bool BatchAxisStopCheck()
{ {
isOk = false;
if (!(axisCheckTimer == null)) if (!(axisCheckTimer == null))
{ {
axisCheckTimer.Stop(); axisCheckTimer.Stop();
...@@ -437,16 +439,35 @@ namespace OnlineStore.DeviceLibrary ...@@ -437,16 +439,35 @@ namespace OnlineStore.DeviceLibrary
return true; return true;
} }
private bool IsInProcess = false; private bool IsInProcess = false;
private bool isOk = false;
private DateTime lastOkTime = DateTime.Now;
private void CheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) private void CheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{ {
if (IsInProcess) { return; } if (IsInProcess) { return; }
IsInProcess = true; IsInProcess = true;
if (IOValue(TargetIoType).Equals(TargetIoValue)) if (IOValue(TargetIoType).Equals(TargetIoValue))
{ {
if (!isOk)
{
isOk = true;
lastOkTime = DateTime.Now;
}
else
{
TimeSpan span = DateTime.Now - lastOkTime;
if (span.TotalMilliseconds > 200)
{
LogUtil.info(Name + "上料轴,检测到 " + TargetIoType + "=" + TargetIoValue + ",可以停止运动"); LogUtil.info(Name + "上料轴,检测到 " + TargetIoType + "=" + TargetIoValue + ",可以停止运动");
BatchAxis.SuddenStop(); BatchAxis.SuddenStop();
BatchAxisStopCheck(); BatchAxisStopCheck();
} }
}
}
else
{
isOk = false;
}
IsInProcess = false; IsInProcess = false;
} }
......
...@@ -235,7 +235,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -235,7 +235,7 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_UpDownToP1); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_UpDownToP1);
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + "*************** 托盘号【" + currTrayNum + "】 ,需要出库,开始出库处理,升降伺服到P1点"); LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + "*************** 托盘号【" + currTrayNum + "】 ,需要出库,开始出库处理,升降伺服到P1点");
// InStoreLog(" 紧急出料移栽 " + SecondMoveInfo.SLog + ":升降伺服到P1点"); // InStoreLog("紧急出料移栽 " + SecondMoveInfo.SLog + ":升降伺服到P1点");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
...@@ -261,7 +261,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -261,7 +261,7 @@ namespace OnlineStore.DeviceLibrary
if (Config.SidesWayNum > 0) if (Config.SidesWayNum > 0)
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down);
InStoreLog("托盘放行, " + SecondMoveInfo.SLog + " 托盘开始放行,环形线定位气缸下降"); SInLog("托盘放行, " + SecondMoveInfo.SLog + " 托盘开始放行,环形线定位气缸下降");
CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
} }
else else
...@@ -342,45 +342,45 @@ namespace OnlineStore.DeviceLibrary ...@@ -342,45 +342,45 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_202_MoveCylinder_Give); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_202_MoveCylinder_Give);
InStoreLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到放料端"); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到放料端");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
} }
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_UpDownToP1); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_UpDownToP1);
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到放料端前先上升横移气缸"); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到放料端前先上升横移气缸");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_202_MoveCylinder_Give)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_202_MoveCylinder_Give))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_203_MoveCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_203_MoveCylinder_Down);
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构下降"); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构下降");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_203_MoveCylinder_Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_203_MoveCylinder_Down))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_204_UpdownAxisToP2); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_204_UpdownAxisToP2);
int targetP = Config.GetUpdownPositionP2(SecondMoveInfo.MoveParam.PlateH); int targetP = Config.GetUpdownPositionP2(SecondMoveInfo.MoveParam.PlateH);
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":升降伺服下降到指定位置" + targetP); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":升降伺服下降到指定位置" + targetP);
UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_204_UpdownAxisToP2)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_204_UpdownAxisToP2))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_205_MoveCylinder_Tighten); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_205_MoveCylinder_Tighten);
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料气缸夹紧"); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料气缸夹紧");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_205_MoveCylinder_Tighten)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_205_MoveCylinder_Tighten))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_206_UpdownAxisToP1); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_206_UpdownAxisToP1);
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":升降伺服到P1"); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":升降伺服到P1");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_206_UpdownAxisToP1)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_206_UpdownAxisToP1))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_207_MoveCylinder_Up); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_207_MoveCylinder_Up);
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构上升,更新【" + currTrayNum + "】为空托盘"); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构上升,更新【" + currTrayNum + "】为空托盘");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
//更新此托盘为空托盘 //更新此托盘为空托盘
...@@ -391,21 +391,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -391,21 +391,21 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_208_MoveCylinder_Take); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_208_MoveCylinder_Take);
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到取料端"); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到取料端");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
} }
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_207_MoveCylinder_Up); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_207_MoveCylinder_Up);
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到放料端前先上升横移气缸"); SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到放料端前先上升横移气缸");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_208_MoveCylinder_Take)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_208_MoveCylinder_Take))
{ {
InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + " 托盘开始放行,定位气缸下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down);
SOutLog("紧急出料移栽" + SecondMoveInfo.MoveStep + " 托盘开始放行,定位气缸下降");
CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
} }
#endregion #endregion
...@@ -457,7 +457,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -457,7 +457,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After); MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After);
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
InStoreLog("检测到料架, "+MoveInfo.MoveStep+" :升降盘定位气缸下降"); InLog("检测到料架, "+MoveInfo.MoveStep+" :升降盘定位气缸下降");
} }
return true ; return true ;
} }
...@@ -466,7 +466,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -466,7 +466,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//定位工位有料架,等待1秒后再次检测 //定位工位有料架,等待1秒后再次检测
MoveInfo.NextMoveStep(LineMoveStep.FI_04_WaitTime); MoveInfo.NextMoveStep(LineMoveStep.FI_04_WaitTime);
InStoreLog(" 定位工位检测到料架: " + MoveInfo.SLog + " 等待1秒再次检测"); InLog("定位工位检测到料架: " + MoveInfo.SLog + " 等待1秒再次检测");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
} }
...@@ -483,7 +483,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -483,7 +483,7 @@ namespace OnlineStore.DeviceLibrary
else if (IOValue(IO_Type.SL_Stop_Check).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.SL_Stop_Check).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_03_LineStart); MoveInfo.NextMoveStep(LineMoveStep.FI_03_LineStart);
InStoreLog(" 入料检测: " + MoveInfo.SLog + " 阻挡工位检测有料架,进料阻挡上升,缓冲阻挡下降,流水线转动 1000"); InLog("入料检测: " + MoveInfo.SLog + " 阻挡工位检测有料架,进料阻挡上升,缓冲阻挡下降,流水线转动 1000");
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.HIGH);//进料阻挡上升 IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.HIGH);//进料阻挡上升
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降 IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH);
...@@ -493,7 +493,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -493,7 +493,7 @@ namespace OnlineStore.DeviceLibrary
}else if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.HIGH)) }else if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_03_LineStart); MoveInfo.NextMoveStep(LineMoveStep.FI_03_LineStart);
InStoreLog(" 入料检测: " + MoveInfo.SLog + " 进料口检测有料架,进料阻挡下降,缓冲阻挡上升,流水线转动 1000"); InLog("入料检测: " + MoveInfo.SLog + " 进料口检测有料架,进料阻挡下降,缓冲阻挡上升,流水线转动 1000");
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);//进料阻挡上升 IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);//进料阻挡上升
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.HIGH);//缓冲阻挡下降 IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.HIGH);//缓冲阻挡下降
IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH);
...@@ -523,13 +523,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -523,13 +523,13 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveStep.Equals(LineMoveStep.Wait)) if (MoveInfo.MoveStep.Equals(LineMoveStep.Wait))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After); MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After);
InStoreLog(" 料架入库" + MoveInfo.SLog + " :升降盘定位气缸下降"); InLog("料架入库" + MoveInfo.SLog + " :升降盘定位气缸下降");
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_01_TrayLocation_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_01_TrayLocation_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_02_LocationCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FI_02_LocationCylinder_Down);
InStoreLog(" 料架入库" + MoveInfo.SLog + ":定位气缸下降,提升伺服移动到P1"); InLog("料架入库" + MoveInfo.SLog + ":定位气缸下降,提升伺服移动到P1");
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
} }
...@@ -547,7 +547,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -547,7 +547,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//定位工位有料架,直接开始入料 //定位工位有料架,直接开始入料
MoveInfo.NextMoveStep(LineMoveStep.FI_07_LocationCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_07_LocationCylinder_Up);
InStoreLog(" 定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡上升, 定位气缸上升"); InLog("定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡上升, 定位气缸上升");
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降 IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
} }
...@@ -562,14 +562,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -562,14 +562,14 @@ namespace OnlineStore.DeviceLibrary
{ {
//定位工位有料架,直接开始入料 //定位工位有料架,直接开始入料
MoveInfo.NextMoveStep(LineMoveStep.FI_07_LocationCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_07_LocationCylinder_Up);
InStoreLog(" 定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡上升, 定位气缸上升"); InLog("定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡上升, 定位气缸上升");
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降 IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_07_LocationCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_07_LocationCylinder_Up))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_08_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FI_08_BatchAxisToP2);
InStoreLog(" 料架入库" + MoveInfo.SLog + ":提升轴下降到位P2,定位气缸上升"); InLog("料架入库" + MoveInfo.SLog + ":提升轴下降到位P2,定位气缸上升");
IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SL_LocationCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SL_LocationCylinder_Up);
...@@ -577,13 +577,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -577,13 +577,13 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_08_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_08_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_09_TrayLocation_Before); MoveInfo.NextMoveStep(LineMoveStep.FI_09_TrayLocation_Before);
InStoreLog(" 料架入库" + MoveInfo.SLog + ":升降盘定位气缸前进"); InLog("料架入库" + MoveInfo.SLog + ":升降盘定位气缸前进");
TrayLCylinderBefore(MoveInfo); TrayLCylinderBefore(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_09_TrayLocation_Before)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_09_TrayLocation_Before))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_10_AxisUpMove); MoveInfo.NextMoveStep(LineMoveStep.FI_10_AxisUpMove);
InStoreLog(" 料架入库" + MoveInfo.SLog + ":上料轴开始慢速上升到P3点,等待检测到料盘"); InLog("料架入库" + MoveInfo.SLog + ":上料轴开始慢速上升到P3点,等待检测到料盘");
BatchAxisToP3(); BatchAxisToP3();
} }
#endregion #endregion
...@@ -603,7 +603,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -603,7 +603,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_13_ScanCode); MoveInfo.NextMoveStep(LineMoveStep.FI_13_ScanCode);
bool isScan = ConfigAppSettings.GetIntValue(Setting_Init.NeedScanCode).Equals(1); bool isScan = ConfigAppSettings.GetIntValue(Setting_Init.NeedScanCode).Equals(1);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":开始扫码:是否需要扫码【" + isScan + "】"); InLog("料盘移栽" + MoveInfo.SLog + ":开始扫码:是否需要扫码【" + isScan + "】");
LastCodeList = new List<string>(); LastCodeList = new List<string>();
if (isScan) if (isScan)
...@@ -638,32 +638,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -638,32 +638,32 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_13_ScanCode)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_13_ScanCode))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_14_MoveCylinder_Take); MoveInfo.NextMoveStep(LineMoveStep.FI_14_MoveCylinder_Take);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移取料端"); InLog("料盘移栽" + MoveInfo.SLog + ":上料横移取料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_14_MoveCylinder_Take)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_14_MoveCylinder_Take))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_15_UpdownAxisToP3); MoveInfo.NextMoveStep(LineMoveStep.FI_15_UpdownAxisToP3);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":升降轴到P3"); InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P3");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP3, Config.UpdownAxis_P3Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP3, Config.UpdownAxis_P3Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_15_UpdownAxisToP3)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_15_UpdownAxisToP3))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_16_MoveCylinder_Tighten); MoveInfo.NextMoveStep(LineMoveStep.FI_16_MoveCylinder_Tighten);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移机构夹紧"); InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构夹紧");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_16_MoveCylinder_Tighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_16_MoveCylinder_Tighten))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_17_UpdownAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FI_17_UpdownAxisToP1);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":升降伺服到P1点"); InLog("料盘移栽" + MoveInfo.SLog + ":升降伺服到P1点");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_17_UpdownAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_17_UpdownAxisToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_17_BatchAxisToP3); MoveInfo.NextMoveStep(LineMoveStep.FI_17_BatchAxisToP3);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":提升伺服运动到P3"); InLog("料盘移栽" + MoveInfo.SLog + ":提升伺服运动到P3");
BatchAxisToP3(); BatchAxisToP3();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_17_BatchAxisToP3)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_17_BatchAxisToP3))
...@@ -676,13 +676,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -676,13 +676,13 @@ namespace OnlineStore.DeviceLibrary
//判断是否还有料盘 //判断是否还有料盘
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW))
{ {
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":记录高度尺寸 高度【" + LastHeight + "】宽度【" + LastWidth + "】,已经没有料盘,提升轴开始回下降待机点P2"); InLog("料盘移栽" + MoveInfo.SLog + ":记录高度尺寸 高度【" + LastHeight + "】宽度【" + LastWidth + "】,已经没有料盘,提升轴开始回下降待机点P2");
MoveInfo.ShelfNoTray = true; MoveInfo.ShelfNoTray = true;
BatchAxis.AbsMove(Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(Config.BatchAxisP2, Config.BatchAxis_P2Speed);
} }
else else
{ {
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":记录高度尺寸 高度【" + LastHeight + "】宽度【" + LastWidth + "】"); InLog("料盘移栽" + MoveInfo.SLog + ":记录高度尺寸 高度【" + LastHeight + "】宽度【" + LastWidth + "】");
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_18_SaveSize)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_18_SaveSize))
...@@ -690,20 +690,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -690,20 +690,20 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_19_MoveCylinder_Emptying); MoveInfo.NextMoveStep(LineMoveStep.FI_19_MoveCylinder_Emptying);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL"); InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
} }
else else
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_18_SaveSize); MoveInfo.NextMoveStep(LineMoveStep.FI_18_SaveSize);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL前先上升横移气缸"); InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_MoveCylinder_Emptying)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_MoveCylinder_Emptying))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_20_WaitTray); MoveInfo.NextMoveStep(LineMoveStep.FI_20_WaitTray);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":等待空托盘到达"); InLog("料盘移栽" + MoveInfo.SLog + ":等待空托盘到达");
//TODO 此处需要等待空托盘 //TODO 此处需要等待空托盘
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_20_WaitTray))//TODO else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_20_WaitTray))//TODO
...@@ -711,7 +711,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -711,7 +711,7 @@ namespace OnlineStore.DeviceLibrary
if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember)) if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_21_MoveCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FI_21_MoveCylinder_Down);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料机构下降"); InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
else else
...@@ -729,25 +729,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -729,25 +729,25 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_22_UpdownAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FI_22_UpdownAxisToP2);
int targetPositon = Config.GetUpdownPositionP2(LastHeight); int targetPositon = Config.GetUpdownPositionP2(LastHeight);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到指定位置:" + targetPositon); InLog("料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到指定位置:" + targetPositon);
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_UpdownAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_UpdownAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_23_MoveCylinder_Slack); MoveInfo.NextMoveStep(LineMoveStep.FI_23_MoveCylinder_Slack);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料气缸放松"); InLog("料盘移栽" + MoveInfo.SLog + ":上料气缸放松");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_23_MoveCylinder_Slack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_23_MoveCylinder_Slack))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_24_UpDownAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FI_24_UpDownAxisToP1);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":升降伺服到P1点"); InLog("料盘移栽" + MoveInfo.SLog + ":升降伺服到P1点");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_24_UpDownAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_24_UpDownAxisToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_25_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_25_MoveCylinder_Up);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移机构上升,记录托盘尺寸, 托盘开始放行"); InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构上升,记录托盘尺寸, 托盘开始放行");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
...@@ -756,14 +756,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -756,14 +756,14 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateTrayInfo(currTrayNum, true, 1, code, "", LastHeight, LastWidth); TrayManager.UpdateTrayInfo(currTrayNum, true, 1, code, "", LastHeight, LastWidth);
if (code.Equals("")) if (code.Equals(""))
{ {
TrayManager.UpdateInStoreNG(currTrayNum, true); TrayManager.UpdateInStoreNG(currTrayNum, true,"扫码失败");
} }
//从服务器获取库位号 //从服务器获取库位号
string result = StoreServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth); string result = StoreServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth);
if (!result.Equals("")) if (!result.Equals(""))
{ {
TrayManager.UpdateInStoreNG(currTrayNum, true); TrayManager.UpdateInStoreNG(currTrayNum, true,result);
LogUtil.error(result); LogUtil.error(Name+"托盘【"+currTrayNum+"】"+ result);
} }
}); });
...@@ -780,20 +780,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -780,20 +780,20 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_31_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_31_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_32_TrayLocationCylinder_After); MoveInfo.NextMoveStep(LineMoveStep.FI_32_TrayLocationCylinder_After);
InStoreLog(" 上料完成" + MoveInfo.SLog + ": 升降盘定位气缸后退"); InLog("上料完成" + MoveInfo.SLog + ": 升降盘定位气缸后退");
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_32_TrayLocationCylinder_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_32_TrayLocationCylinder_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_33_BatchAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FI_33_BatchAxisToP1);
InStoreLog(" 上料完成" + MoveInfo.SLog + ":提升伺服到P1点,定位气缸下降"); InLog("上料完成" + MoveInfo.SLog + ":提升伺服到P1点,定位气缸下降");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_33_BatchAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_33_BatchAxisToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_35_OutTopCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_35_OutTopCylinder_Up);
InStoreLog(" 上料完成" + MoveInfo.SLog + ",出口顶升气缸上升,出料缓冲阻挡上升"); InLog("上料完成" + MoveInfo.SLog + ",出口顶升气缸上升,出料缓冲阻挡上升");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up);
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW); IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
} }
...@@ -802,7 +802,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -802,7 +802,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//TODO //TODO
MoveInfo.NextMoveStep(LineMoveStep.FI_36_SideWayLineRun); MoveInfo.NextMoveStep(LineMoveStep.FI_36_SideWayLineRun);
InStoreLog(" 上料完成" + MoveInfo.SLog + ", 线体横移电机运转,等待料架离开上料工位"); InLog("上料完成" + MoveInfo.SLog + ", 线体横移电机运转,等待料架离开上料工位");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Location_Check, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Location_Check, IO_VALUE.LOW));
...@@ -810,7 +810,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -810,7 +810,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_36_SideWayLineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_36_SideWayLineRun))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_37_WaitShelfGo); MoveInfo.NextMoveStep(LineMoveStep.FI_37_WaitShelfGo);
InStoreLog(" 上料完成" + MoveInfo.SLog + ", 线体横移电机运转,等待料架到达出口"); InLog("上料完成" + MoveInfo.SLog + ", 线体横移电机运转,等待料架到达出口");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
//MoveInfo.OneWaitCanEndStep = true; //MoveInfo.OneWaitCanEndStep = true;
...@@ -821,7 +821,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -821,7 +821,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_37_LineStop); MoveInfo.NextMoveStep(LineMoveStep.FI_37_LineStop);
InStoreLog(" 上料完成" + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 "); InLog("上料完成" + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 ");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
...@@ -829,7 +829,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -829,7 +829,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_37_LineStop)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_37_LineStop))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_38_TopCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.FI_38_TopCylinderDown);
InStoreLog(" 上料完成" + MoveInfo.SLog + ", 料架到达出口,出口顶升下降 , "); InLog("上料完成" + MoveInfo.SLog + ", 料架到达出口,出口顶升下降 , ");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
...@@ -838,7 +838,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -838,7 +838,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove(); MoveInfo.EndMove();
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
// MoveInfo.NextMoveStep(LineMoveStep.FI_39_OutLineRun); // MoveInfo.NextMoveStep(LineMoveStep.FI_39_OutLineRun);
InStoreLog("上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束"); InLog("上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束");
AgvClient.ReadyEmpty(Config.AgvOutName); AgvClient.ReadyEmpty(Config.AgvOutName);
} }
...@@ -850,14 +850,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -850,14 +850,14 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_12_MoveCylinder_Give); MoveInfo.NextMoveStep(LineMoveStep.FI_12_MoveCylinder_Give);
InStoreLog("料盘移栽" + MoveInfo.SLog + ":上料机构检测到料盘,横移机构到放料端"); InLog("料盘移栽" + MoveInfo.SLog + ":上料机构检测到料盘,横移机构到放料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
} }
else else
{ {
//有料盘 //有料盘
MoveInfo.NextMoveStep(LineMoveStep.FI_11_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_11_MoveCylinder_Up);
InStoreLog("料盘移栽" + MoveInfo.SLog + ":上料机构检测到料盘,横移机构上升"); InLog("料盘移栽" + MoveInfo.SLog + ":上料机构检测到料盘,横移机构上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
...@@ -873,7 +873,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -873,7 +873,8 @@ namespace OnlineStore.DeviceLibrary
//无料盘 //无料盘
MoveInfo.ShelfNoTray = true; MoveInfo.ShelfNoTray = true;
MoveInfo.NextMoveStep(LineMoveStep.FI_31_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FI_31_BatchAxisToP2);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":未检测到料盘,提升伺服到P2点"); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
InLog("料盘移栽" + MoveInfo.SLog + ":未检测到料盘,提升伺服到P2点");
BatchAxis.SuddenStop(); BatchAxis.SuddenStop();
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
} }
...@@ -919,7 +920,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -919,7 +920,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(msg + ",归类为" + LastHeight); LogUtil.info(msg + ",归类为" + LastHeight);
return LastHeight; return LastHeight;
} }
private int GetWidth() public int GetWidth()
{ {
int width = 15; int width = 15;
if (IOValue(IO_Type.SL_TrayCheck4).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SL_TrayCheck4).Equals(IO_VALUE.HIGH))
...@@ -937,6 +938,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -937,6 +938,9 @@ namespace OnlineStore.DeviceLibrary
else if (IOValue(IO_Type.SL_TrayCheck1).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.SL_TrayCheck1).Equals(IO_VALUE.HIGH))
{ {
width = 7; width = 7;
}else
{
width = 7;
} }
return width; return width;
} }
......
...@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam = new InOutParam(); MoveInfo.MoveParam = new InOutParam();
MoveInfo.NextMoveStep(LineMoveStep.FO_01_TrayLocation_After); MoveInfo.NextMoveStep(LineMoveStep.FO_01_TrayLocation_After);
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
InStoreLog("检测到料架, FO_01_TrayLocation_After :升降盘定位气缸后退"); OutLog("检测到料架, FO_01_TrayLocation_After :升降盘定位气缸后退");
return true; return true;
} }
private void LineOutStoreProcess() private void LineOutStoreProcess()
...@@ -33,7 +33,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -33,7 +33,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//定位工位有料架,直接开始入料 //定位工位有料架,直接开始入料
MoveInfo.NextMoveStep(LineMoveStep.FO_07_LocationCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FO_07_LocationCylinder_Up);
OutStoreLog("定位工位检测到料架" + MoveInfo.MoveStep + ":缓冲阻挡上升, 定位气缸上升"); OutLog("定位工位检测到料架" + MoveInfo.MoveStep + ":缓冲阻挡上升, 定位气缸上升");
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降 IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
} }
...@@ -46,7 +46,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,7 +46,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH);
//等待指定时间 //等待指定时间
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
OutStoreLog("出料检测" + MoveInfo.SLog + ":阻挡工位有料架,进料阻挡上升,缓冲阻挡下降,流水线转动2000"); OutLog("出料检测" + MoveInfo.SLog + ":阻挡工位有料架,进料阻挡上升,缓冲阻挡下降,流水线转动2000");
} }
else if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.HIGH))
{ {
...@@ -56,7 +56,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -56,7 +56,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH);
//等待指定时间 //等待指定时间
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
OutStoreLog("出料检测" + MoveInfo.SLog + ":入料工位有料架,进料阻挡下降,缓冲阻挡上升,流水线转动2000"); OutLog("出料检测" + MoveInfo.SLog + ":入料工位有料架,进料阻挡下降,缓冲阻挡上升,流水线转动2000");
} }
else else
{ {
...@@ -79,12 +79,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -79,12 +79,12 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_01_TrayLocation_After); MoveInfo.NextMoveStep(LineMoveStep.FO_01_TrayLocation_After);
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
OutStoreLog("出料检测" + MoveInfo.SLog + ":升降盘定位气缸后退"); OutLog("出料检测" + MoveInfo.SLog + ":升降盘定位气缸后退");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_01_TrayLocation_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_01_TrayLocation_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_02_LocationCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FO_02_LocationCylinder_Down);
OutStoreLog("出库: " + MoveInfo.SLog + " 开始:定位气缸下降,提升轴移动到P1"); OutLog("出库: " + MoveInfo.SLog + " 开始:定位气缸下降,提升轴移动到P1");
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
} }
...@@ -100,26 +100,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -100,26 +100,26 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_07_LocationCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_07_LocationCylinder_Up))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_08_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FO_08_BatchAxisToP2);
OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + " :提升轴下降到位P2"); OutLog("出库移栽 " + MoveInfo.SLog + " :提升轴下降到位P2");
IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_08_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_08_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_09_TrayLocation_Before); MoveInfo.NextMoveStep(LineMoveStep.FO_09_TrayLocation_Before);
OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + " :升降盘定位气缸前进"); OutLog("出库移栽 " + MoveInfo.SLog + " :升降盘定位气缸前进");
TrayLCylinderBefore(MoveInfo); TrayLCylinderBefore(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_09_TrayLocation_Before)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_09_TrayLocation_Before))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_10_AxisUpMove); MoveInfo.NextMoveStep(LineMoveStep.FO_10_AxisUpMove);
OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + " :上料轴开始慢速上升到P3点"); OutLog("出库移栽 " + MoveInfo.SLog + " :上料轴开始慢速上升到P3点");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP3, Config.BatchAxis_TargetSpeed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP3, Config.BatchAxis_TargetSpeed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_10_AxisUpMove)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_10_AxisUpMove))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_11_AxisDownMove); MoveInfo.NextMoveStep(LineMoveStep.FO_11_AxisDownMove);
OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + " :提升伺服下降指定的高度"); OutLog("出库移栽 " + MoveInfo.SLog + " :提升伺服下降指定的高度");
int targetPosition = Config.BatchAxisP3 + lastOutParam.PlateH * Config.Height_ChangeValue; int targetPosition = Config.BatchAxisP3 + lastOutParam.PlateH * Config.Height_ChangeValue;
BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_TargetSpeed); BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_TargetSpeed);
...@@ -127,44 +127,44 @@ namespace OnlineStore.DeviceLibrary ...@@ -127,44 +127,44 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_11_AxisDownMove)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_11_AxisDownMove))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_12_MoveCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FO_12_MoveCylinder_Down);
OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + ":出料横移机构下降"); OutLog("出库移栽 " + MoveInfo.SLog + ":出料横移机构下降");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_12_MoveCylinder_Down)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_12_MoveCylinder_Down))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_13_MoveCylinder_Slack); MoveInfo.NextMoveStep(LineMoveStep.FO_13_MoveCylinder_Slack);
OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + ":出料横移机构放松"); OutLog("出库移栽 " + MoveInfo.SLog + ":出料横移机构放松");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_13_MoveCylinder_Slack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_13_MoveCylinder_Slack))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_14_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FO_14_MoveCylinder_Up);
OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + ":上料横移机构上升"); OutLog("出库移栽 " + MoveInfo.SLog + ":上料横移机构上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_14_MoveCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_14_MoveCylinder_Up))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_31_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FO_31_BatchAxisToP2);
OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + ":未检测到料盘,提升伺服到P2点"); OutLog("出库移栽 " + MoveInfo.SLog + ":未检测到料盘,提升伺服到P2点");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_31_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_31_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_32_TrayLocationCylinder_After); MoveInfo.NextMoveStep(LineMoveStep.FO_32_TrayLocationCylinder_After);
OutStoreLog("出料完成 " + MoveInfo.SLog + ": 升降盘定位气缸后退"); OutLog("出料完成 " + MoveInfo.SLog + ": 升降盘定位气缸后退");
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_32_TrayLocationCylinder_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_32_TrayLocationCylinder_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_33_BatchAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FO_33_BatchAxisToP1);
OutStoreLog("出料完成 " + MoveInfo.SLog + ":提升伺服到P1点,定位气缸下降"); OutLog("出料完成 " + MoveInfo.SLog + ":提升伺服到P1点,定位气缸下降");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_33_BatchAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_33_BatchAxisToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_34_OutTopCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FO_34_OutTopCylinder_Up);
OutStoreLog("出料完成 " + MoveInfo.SLog + ",出口顶升气缸上升,出料缓冲阻挡上升"); OutLog("出料完成 " + MoveInfo.SLog + ",出口顶升气缸上升,出料缓冲阻挡上升");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up);
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW); IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
} }
...@@ -172,7 +172,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -172,7 +172,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//TODO //TODO
MoveInfo.NextMoveStep(LineMoveStep.FO_36_SideWayLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_36_SideWayLineRun);
OutStoreLog("出料完成 " + MoveInfo.SLog + ", 线体横移电机运转,等待料架离开定位工位"); OutLog("出料完成 " + MoveInfo.SLog + ", 线体横移电机运转,等待料架离开定位工位");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Location_Check, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Location_Check, IO_VALUE.LOW));
...@@ -181,7 +181,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -181,7 +181,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//TODO //TODO
MoveInfo.NextMoveStep(LineMoveStep.FO_36_SideWayLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_36_SideWayLineRun);
OutStoreLog("出料完成 " + MoveInfo.SLog + ", 线体横移电机运转,等待料架到达出口"); OutLog("出料完成 " + MoveInfo.SLog + ", 线体横移电机运转,等待料架到达出口");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
...@@ -192,7 +192,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -192,7 +192,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_37_LineStop); MoveInfo.NextMoveStep(LineMoveStep.FO_37_LineStop);
OutStoreLog("出料完成 " + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 "); OutLog("出料完成 " + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 ");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
...@@ -200,7 +200,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -200,7 +200,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_37_LineStop)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_37_LineStop))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_38_TopCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.FO_38_TopCylinderDown);
OutStoreLog("出料完成 " + MoveInfo.SLog + ", 料架到达出口,出口顶升下降,定位气缸下降, "); OutLog("出料完成 " + MoveInfo.SLog + ", 料架到达出口,出口顶升下降,定位气缸下降, ");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
...@@ -208,17 +208,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -208,17 +208,17 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_38_TopCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_38_TopCylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun);
OutStoreLog("出料完成 " + MoveInfo.SLog + ", 出口线体运转,料架到达出口处, 通知AGV取空料架, "); OutLog("出料完成 " + MoveInfo.SLog + ", 出口线体运转,料架到达出口处, 通知AGV取空料架, ");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_40_OutLineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_40_OutLineRun))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_40_OutLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_40_OutLineRun);
OutStoreLog("出料完成 " + MoveInfo.SLog + ", AGV到达,继续转动出口线体,送走出料料架, "); OutLog("出料完成 " + MoveInfo.SLog + ", AGV到达,继续转动出口线体,送走出料料架, ");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_40_OutLineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_40_OutLineRun))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_41_OutLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_41_OutLineRun);
OutStoreLog("上料完成 " + MoveInfo.SLog + ", 料架送出, "); OutLog("上料完成 " + MoveInfo.SLog + ", 料架送出, ");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_41_OutLineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_41_OutLineRun))
{ {
......
...@@ -74,16 +74,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -74,16 +74,9 @@ namespace OnlineStore.DeviceLibrary
ProvidingEquipMap = new Dictionary<int, ProvidingEquip>(); ProvidingEquipMap = new Dictionary<int, ProvidingEquip>();
DisLineMap = new Dictionary<int, DischargeLine>(); DisLineMap = new Dictionary<int, DischargeLine>();
List<string> ioList = new List<string>(); List<string> ioList = new List<string>();
ioList = new List<string>(DeviceConfig.ProIOIpMap.Values);
AddDeviceName(ioList, Config.IOIPList); AddDeviceName(ioList, Config.IOIPList);
foreach (MoveEquip_Config config in configList.Values)
{
MoveEquip equip = new MoveEquip(lineConfig.CID, config);
AddDeviceName(ioList, config.IOIPList);
MoveEquipMap.Add(config.Id, equip);
AllEquipMap.Add(config.Id, equip);
}
foreach (FeedingEquip_Config config in feedMap.Values) foreach (FeedingEquip_Config config in feedMap.Values)
{ {
FeedingEquip equip = new FeedingEquip(lineConfig.CID, config); FeedingEquip equip = new FeedingEquip(lineConfig.CID, config);
...@@ -95,6 +88,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -95,6 +88,14 @@ namespace OnlineStore.DeviceLibrary
FeedingEquipMap.Add(config.Id, equip); FeedingEquipMap.Add(config.Id, equip);
AllEquipMap.Add(config.Id, equip); AllEquipMap.Add(config.Id, equip);
} }
foreach (MoveEquip_Config config in configList.Values)
{
MoveEquip equip = new MoveEquip(lineConfig.CID, config);
AddDeviceName(ioList, config.IOIPList);
MoveEquipMap.Add(config.Id, equip);
AllEquipMap.Add(config.Id, equip);
}
foreach (ProvidingEquip_Config config in providMap.Values) foreach (ProvidingEquip_Config config in providMap.Values)
{ {
ProvidingEquip equip = new ProvidingEquip(lineConfig.CID, config); ProvidingEquip equip = new ProvidingEquip(lineConfig.CID, config);
...@@ -922,7 +923,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -922,7 +923,7 @@ namespace OnlineStore.DeviceLibrary
public string GetMoveStr() public string GetMoveStr()
{ {
string msg = ""; string msg = "";
int tLength = 20; // int tLength = 20;
//msg += "preTrayNum:".PadRight(tLength, ' ') + preTrayNum + "\n"; //msg += "preTrayNum:".PadRight(tLength, ' ') + preTrayNum + "\n";
//msg += "currTrayNum:".PadRight(tLength, ' ') + currTrayNum + "\n"; //msg += "currTrayNum:".PadRight(tLength, ' ') + currTrayNum + "\n";
......
...@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
runStatus = LineRunStatus.HomeMoving; runStatus = LineRunStatus.HomeMoving;
LogInfo("开始原点返回: (上下气缸回原点,阻挡1气缸上升 )开始"); LogInfo("开始原点返回: 上下气缸回原点,阻挡1气缸上升 ");
MoveInfo.NewMove(LineMoveType.ReturnHome); MoveInfo.NewMove(LineMoveType.ReturnHome);
StartReset(); StartReset();
if ( isDebug) if ( isDebug)
...@@ -80,7 +80,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,7 +80,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
LogInfo("开始重置:清空托盘号,(上下气缸回原点,阻挡1气缸上升 )开始;"); LogInfo("开始重置: 上下气缸回原点,阻挡1气缸上升 ");
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
...@@ -130,13 +130,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -130,13 +130,13 @@ namespace OnlineStore.DeviceLibrary
{ {
case LineMoveStep.MH_UpDownHomeMove: case LineMoveStep.MH_UpDownHomeMove:
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownCylinder_Up);
LogInfo(MoveInfo.MoveType+ " : (上下轴原点返回完成,上下轴走到待机点 )开始"); DebugInfo(MoveInfo.MoveType+ " : (上下轴原点返回完成,上下轴走到待机点 )开始");
UpdownUpMove(); UpdownUpMove();
break; break;
case LineMoveStep.MH_UpDownCylinder_Up: case LineMoveStep.MH_UpDownCylinder_Up:
MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinder_Back); MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinder_Back);
LogInfo(MoveInfo.MoveType + " : (上升到位,顶升气缸下降,前后气缸回退 )开始"); DebugInfo(MoveInfo.MoveType + " : (上升到位,顶升气缸下降,前后气缸回退 )开始");
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
...@@ -144,7 +144,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -144,7 +144,7 @@ namespace OnlineStore.DeviceLibrary
case LineMoveStep.MH_OtherCylinder_Back: case LineMoveStep.MH_OtherCylinder_Back:
LogInfo(MoveInfo.MoveType + " 完成!"); LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
...@@ -170,7 +170,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -170,7 +170,7 @@ namespace OnlineStore.DeviceLibrary
//如果正在出库中,需要减去托盘号 //如果正在出库中,需要减去托盘号
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore)) if (MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{ {
LogInfo("停止运动时出库执行中,减去托盘数;"); DebugInfo("停止运动时出库执行中,减去托盘数;");
//减去需要的盘数 //减去需要的盘数
TrayManager.DelNeedEmptyTrayNum(); TrayManager.DelNeedEmptyTrayNum();
MoveInfo.EndMove(); MoveInfo.EndMove();
...@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
LogInfo("停止运动:(上下气缸上升端,阻挡气缸输入=0 )开始 "); LogInfo("停止运动:上下气缸上升端,阻挡气缸上升 ,开始 ");
UpdownUpMove(); UpdownUpMove();
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
...@@ -238,12 +238,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -238,12 +238,12 @@ namespace OnlineStore.DeviceLibrary
if (ok) if (ok)
{ {
LogUtil.info(Name + "开始 执行排队中的出库【" + waitOutParma.ToStr() + "】"); LogUtil.info(Name + "执行排队中的出库【" + waitOutParma.ToStr() + "】");
//出库 //出库
bool result = StartOutStoreMove(waitOutParma); bool result = StartOutStoreMove(waitOutParma);
if (!result) if (!result)
{ {
LogUtil.info(Name + " 执行排队中的出库【" + waitOutParma.ToStr() + "】失败,重新加入等待队列"); LogUtil.info(Name + " 执行出库【" + waitOutParma.ToStr() + "】失败,重新加入等待队列");
AddWaitOutInfo(waitOutParma); AddWaitOutInfo(waitOutParma);
} }
} }
......
...@@ -63,32 +63,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -63,32 +63,32 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_50_StartOutProcess)) if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_50_StartOutProcess))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MO_51_BeforeAfterCylinderBefore); MoveInfo.NextMoveStep(LineMoveStep.MO_51_BeforeAfterCylinderBefore);
OutStoreLog("出库 "+MoveInfo.MoveStep+": 前后气缸前进 )"); OutLog("出库 "+MoveInfo.MoveStep+": 前后气缸前进 )");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_51_BeforeAfterCylinderBefore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_51_BeforeAfterCylinderBefore))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MO_52_UpDownCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.MO_52_UpDownCylinderDown);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1下降 )"); OutLog("出库 " + MoveInfo.SLog + ": 上下气缸1下降 )");
UpdownDownBoxMove(MoveInfo.MoveParam.PlateH); UpdownDownBoxMove(MoveInfo.MoveParam.PlateH);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_52_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_52_UpDownCylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MO_53_UpDownCylinderDownWait); MoveInfo.NextMoveStep(LineMoveStep.MO_53_UpDownCylinderDownWait);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1下降 后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作)"); OutLog("出库 " + MoveInfo.SLog + ": 上下气缸1下降 后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作)");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_53_UpDownCylinderDownWait)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_53_UpDownCylinderDownWait))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MO_54_ClampCylinderSlack); MoveInfo.NextMoveStep(LineMoveStep.MO_54_ClampCylinderSlack);
OutStoreLog("出库 " + MoveInfo.SLog + ": 夹料气缸1夹紧)"); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸1夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_54_ClampCylinderSlack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_54_ClampCylinderSlack))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MO_55_UpDownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.MO_55_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1上升)"); OutLog("出库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove(); UpdownUpMove();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
...@@ -96,7 +96,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -96,7 +96,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_55_UpDownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_55_UpDownCylinderUp))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MO_56_BeforeAfterCylinderAfter); MoveInfo.NextMoveStep(LineMoveStep.MO_56_BeforeAfterCylinderAfter);
OutStoreLog("出库 " + MoveInfo.SLog + ": 前后气缸1后退)"); OutLog("出库 " + MoveInfo.SLog + ": 前后气缸1后退)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
} }
#endregion #endregion
...@@ -108,7 +108,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -108,7 +108,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//去掉直接丢盘处理 //去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_58_UpDownCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.MO_58_UpDownCylinderDown);
OutStoreLog("出库 " + MoveInfo.SLog + ": 夹具检测编码完成, 上下气缸1下降 )"); OutLog("出库 " + MoveInfo.SLog + ": 夹具检测编码完成, 上下气缸1下降 )");
if (MoveInfo.MoveParam != null) if (MoveInfo.MoveParam != null)
{ {
MoveInfo.MoveParam.TrayNumber = SecondMoveInfo.MoveParam.TrayNumber; MoveInfo.MoveParam.TrayNumber = SecondMoveInfo.MoveParam.TrayNumber;
...@@ -117,31 +117,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -117,31 +117,12 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.MoveParam = SecondMoveInfo.MoveParam; MoveInfo.MoveParam = SecondMoveInfo.MoveParam;
} }
UpdownDownMove(MoveInfo.MoveParam.PlateH); UpdownDownMove(MoveInfo.MoveParam.PlateH);
////判断盘号,如果是七寸盘,不需要下降,直接放盘
//bool isNeedPush = MoveInfo.MoveParam.PlateW.Equals(TrayManager.CanPushBagWidth);
//if (isNeedPush)
//{
// MoveInfo.NextMoveStep(LineMoveStep.MO_58_UpDownCylinderDown);
// MoveInfo.EndStepWait();
//}
//else
//{
// MoveInfo.NextMoveStep(LineMoveStep.MO_58_UpDownCylinderDown);
// UpdownDownMove(MoveInfo.MoveParam.PlateH);
// // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
//}
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_UpDownCylinderDown))
{ {
OutStoreLog("出库 " + MoveInfo.SLog + ": 夹料气缸1放松 )"); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸1放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" +MoveInfo.MoveParam.ToStr() + "】");
int bagWidth = MoveInfo.MoveParam.PlateW; TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam.WareCode, MoveInfo.MoveParam.PosId, MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
LogInfo("【" + posId + "】出库时,更新盘空满信息 托盘号【" + MoveInfo.MoveParam.TrayNumber + "】,是否有料盘【" + true + "】,出库入库【" + 2 + "】");
TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam.WareCode, MoveInfo.MoveParam.PosId, MoveInfo.MoveParam.PlateH, bagWidth);
//出库全部完成 //出库全部完成
lineStatus = LineStatus.StoreOnline; lineStatus = LineStatus.StoreOnline;
...@@ -151,19 +132,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -151,19 +132,19 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_59_ClampCylinderTighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_59_ClampCylinderTighten))
{ {
this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_UpDownCylinderUp); this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1上升)"); OutLog("出库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove(); UpdownUpMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_60_UpDownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_60_UpDownCylinderUp))
{ {
// 减去需要的盘数 // 减去需要的盘数
TrayManager.DelNeedEmptyTrayNum(); TrayManager.DelNeedEmptyTrayNum();
OutStoreLog("出库 SecondMove:移栽完成,放行托盘"); SOutLog("出库 :移栽完成,放行托盘");
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
LogInfo("【" + posId + "】出库处理结束,!"); OutLog("出库处理结束!");
lineStatus = LineStatus.StoreOnline; lineStatus = LineStatus.StoreOnline;
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
...@@ -225,20 +206,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -225,20 +206,20 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDown)) if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_07_UpDownCylinderDownWait); MoveInfo.NextMoveStep(LineMoveStep.MI_07_UpDownCylinderDownWait);
InStoreLog("入库 " + MoveInfo.SLog + ": 编码与仓位一致,上下气缸1下降后等待0.3秒再夹紧,防止没有下降到位就夹紧"); InLog("入库 " + MoveInfo.SLog + ": 编码与仓位一致,上下气缸1下降后等待0.3秒再夹紧,防止没有下降到位就夹紧");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
//只有当BOX可以进行出入库时,移栽物品,防止卡住 //只有当BOX可以进行出入库时,移栽物品,防止卡住
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDownWait)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDownWait))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_08_ClampCylinderSlack); MoveInfo.NextMoveStep(LineMoveStep.MI_08_ClampCylinderSlack);
InStoreLog("入库 " + MoveInfo.SLog + ": 夹料气缸1夹紧)"); InLog("入库 " + MoveInfo.SLog + ": 夹料气缸1夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_08_ClampCylinderSlack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_08_ClampCylinderSlack))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_09_UpDownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.MI_09_UpDownCylinderUp);
InStoreLog("入库 " + MoveInfo.SLog + ": 上下气缸1上升)"); InLog("入库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove(); UpdownUpMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_UpDownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_UpDownCylinderUp))
...@@ -251,38 +232,38 @@ namespace OnlineStore.DeviceLibrary ...@@ -251,38 +232,38 @@ namespace OnlineStore.DeviceLibrary
//阻挡气缸移动 //阻挡气缸移动
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
InStoreLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降)"); InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_10_WaitBox)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_10_WaitBox))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_10_BeforeAfterCylinderBefore); MoveInfo.NextMoveStep(LineMoveStep.MI_10_BeforeAfterCylinderBefore);
InStoreLog("入库:(MI_10_BeforeAfterCylinderBefore,前后气缸1前进)"); InLog("入库:(MI_10_BeforeAfterCylinderBefore,前后气缸1前进)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_10_BeforeAfterCylinderBefore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_10_BeforeAfterCylinderBefore))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_11_UpDownCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.MI_11_UpDownCylinderDown);
InStoreLog("入库 " + MoveInfo.SLog + " ,上下气缸1下降)"); InLog("入库 " + MoveInfo.SLog + " ,上下气缸1下降)");
UpdownDownBoxMove(MoveInfo.MoveParam.PlateH); UpdownDownBoxMove(MoveInfo.MoveParam.PlateH);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_11_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_11_UpDownCylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_12_ClampCylinderTighten); MoveInfo.NextMoveStep(LineMoveStep.MI_12_ClampCylinderTighten);
InStoreLog("入库 " + MoveInfo.SLog + ",夹料气缸1放松)"); InLog("入库 " + MoveInfo.SLog + ",夹料气缸1放松)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_12_ClampCylinderTighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_12_ClampCylinderTighten))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_13_UpdownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.MI_13_UpdownCylinderUp);
InStoreLog("入库 " + MoveInfo.SLog + ",上下气缸1上升)"); InLog("入库 " + MoveInfo.SLog + ",上下气缸1上升)");
UpdownUpMove(); UpdownUpMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_13_UpdownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_13_UpdownCylinderUp))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_14_BeforeAfterCylinderAfter); MoveInfo.NextMoveStep(LineMoveStep.MI_14_BeforeAfterCylinderAfter);
InStoreLog("入库 " + MoveInfo.SLog + ",前后气缸1后退,等待4000 )"); InLog("入库 " + MoveInfo.SLog + ",前后气缸1后退,等待4000 )");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000));
//此时box就可以入库操作了 //触发事件,BOX入库 //此时box就可以入库操作了 //触发事件,BOX入库
...@@ -294,12 +275,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -294,12 +275,12 @@ namespace OnlineStore.DeviceLibrary
//判断料仓是否在入库中,如果么有在入库中,需要重新发送入库消息 //判断料仓是否在入库中,如果么有在入库中,需要重新发送入库消息
if (!LineServer.IsInStorePro(DeviceID)) if (!LineServer.IsInStorePro(DeviceID))
{ {
InStoreLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令)"); InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令)");
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam); LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
} }
else else
{ {
InStoreLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓已开始入库)"); InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓已开始入库)");
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendEnd)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendEnd))
...@@ -323,8 +304,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -323,8 +304,17 @@ namespace OnlineStore.DeviceLibrary
{ {
if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals(""))) if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals("")))
{ {
//判断是否验证成功,如果验证失败,不入库
if (LineServer.RightInPosId(DeviceID, cc.PosId))
{
return true; return true;
} }
else
{
LogUtil.error(Name + "托盘号【"+currTrayNum+"】入库信息【"+cc.ToStr()+"】料仓未验证成功,不拦截托盘,更新此托盘为NG");
TrayManager.UpdateInStoreNG(currTrayNum, true,"Box验证入库失败");
}
}
} }
} }
} }
...@@ -347,12 +337,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -347,12 +337,6 @@ namespace OnlineStore.DeviceLibrary
LogInfo(" 托盘号【" + preTrayNum + "】,当前托盘号【(isFull=" + isFull + "):" + currTrayNum + "】出库中,拦截 托盘~"); LogInfo(" 托盘号【" + preTrayNum + "】,当前托盘号【(isFull=" + isFull + "):" + currTrayNum + "】出库中,拦截 托盘~");
return true; return true;
} }
//去掉直接丢料盘处理
//else if (MoveInfo.MoveParam.PlateW.Equals(TrayManager.CanPushBagWidth) && TrayManager.IsCanOutPush(currMoveTrayNum))
//{
// LogInfo(" 托盘号【" + preTrayNum + "】,当前托盘号【(isFull=" + isFull + "):" + currMoveTrayNum + "】需要出库," + TrayManager.CanPushBagWidth + "寸小盘可以直接出库累积~");
// return true;
//}
} }
return false; return false;
} }
...@@ -363,11 +347,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -363,11 +347,11 @@ namespace OnlineStore.DeviceLibrary
private bool CheckIsNeedInStore() private bool CheckIsNeedInStore()
{ {
bool isfull = TrayManager.TrayIsFull(currTrayNum); bool isfull = TrayManager.TrayIsFull(currTrayNum);
LogInfo("***************入库*****验证入库编号,托盘号【" + currTrayNum + "】,isfull【" + isfull + "】"); //LogInfo("***************入库*****验证入库编号,托盘号【" + currTrayNum + "】,isfull【" + isfull + "】");
//FixtureCodeInfo code = GetBox().currInOutFixture; //FixtureCodeInfo code = GetBox().currInOutFixture;
if (!isfull) if (!isfull)
{ {
LogInfo("***************入库*****空盘直接放行"); //LogInfo("***************入库*****空盘直接放行");
return false; return false;
} }
InOutParam currCode = null; InOutParam currCode = null;
...@@ -380,11 +364,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -380,11 +364,10 @@ namespace OnlineStore.DeviceLibrary
for (int i = 0; i < waitInStoreList.Count; i++) for (int i = 0; i < waitInStoreList.Count; i++)
{ {
InOutParam cc = waitInStoreList[i]; InOutParam cc = waitInStoreList[i];
if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals(""))) if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals("")) && LineServer.RightInPosId(DeviceID, cc.PosId))
{ {
reIndex = i; reIndex = i;
currCode = cc; currCode = cc;
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽");
SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW); SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW);
break; break;
} }
...@@ -394,11 +377,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -394,11 +377,12 @@ namespace OnlineStore.DeviceLibrary
waitInStoreList.RemoveAt(reIndex); waitInStoreList.RemoveAt(reIndex);
if (!LineServer.BoxCanInStore(DeviceID)) if (!LineServer.BoxCanInStore(DeviceID))
{ {
LogUtil.info(Name + "*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先移栽再等待料仓可入库,开始入库移栽"); LogInfo( "*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先移栽料盘");
return true; return true;
} }
else else
{ {
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽");
return true; return true;
} }
} }
...@@ -557,19 +541,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -557,19 +541,19 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.MoveParam = new InOutParam(currTrayNum); SecondMoveInfo.MoveParam = new InOutParam(currTrayNum);
isNeedMove = true; isNeedMove = true;
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currTrayNum + "】可以放出库托盘,正在出库中,移栽料盘"); LogInfo(SecondMoveInfo.MoveNum + "*************** 空托盘【" + currTrayNum + "】,正在出库中,移栽料盘");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait(); SecondMoveInfo.EndStepWait();
} }
else if (CheckIsNeedInStore()) else if (CheckIsNeedInStore())
{ {
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currTrayNum + "】不是空盘,有对应的入库任务,等待移栽"); LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,有对应的入库任务,等待移栽");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_08_WaitInStore); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_08_WaitInStore);
isNeedMove = true; isNeedMove = true;
} }
else else
{ {
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】不需要出入库, 放盘通过"); LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】不需要出入库, 放盘通过");
} }
if (!isNeedMove) if (!isNeedMove)
......
...@@ -256,20 +256,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -256,20 +256,20 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_UpDownCylinderDown)) if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_UpDownCylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_02_UpDownCylinderDownWait); MoveInfo.NextMoveStep(LineMoveStep.PO_02_UpDownCylinderDownWait);
OutStoreLog("出库 "+MoveInfo.SLog+" : 上下气缸1下降后等待0.3秒再夹紧"); OutLog("出库 "+MoveInfo.SLog+" : 上下气缸1下降后等待0.3秒再夹紧");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
//只有当BOX可以进行出出料时,移栽物品,防止卡住 //只有当BOX可以进行出出料时,移栽物品,防止卡住
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_UpDownCylinderDownWait)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_UpDownCylinderDownWait))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_03_ClampCylinderSlack); MoveInfo.NextMoveStep(LineMoveStep.PO_03_ClampCylinderSlack);
OutStoreLog("出库 " + MoveInfo.SLog + " : 夹料气缸夹紧)"); OutLog("出库 " + MoveInfo.SLog + " : 夹料气缸夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_03_ClampCylinderSlack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_03_ClampCylinderSlack))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_04_UpDownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.PO_04_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + " : 上下气缸上升)"); OutLog("出库 " + MoveInfo.SLog + " : 上下气缸上升)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownUpMove(); UpdownUpMove();
} }
...@@ -283,7 +283,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -283,7 +283,7 @@ namespace OnlineStore.DeviceLibrary
//阻挡气缸移动 //阻挡气缸移动
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
InStoreLog("放托盘(放开阻挡)"+SecondMoveInfo.SLog+" 物品已移走,顶升气缸1下降)"); OutLog("放托盘(放开阻挡)"+ MoveInfo.SLog+" 物品已移走,顶升气缸1下降)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down);
if (Config.SidesWayNum <= 0) if (Config.SidesWayNum <= 0)
{ {
...@@ -293,33 +293,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -293,33 +293,33 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_05_WaitBox)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_05_WaitBox))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_06_BeforeAfterCylinderBefore); MoveInfo.NextMoveStep(LineMoveStep.PO_06_BeforeAfterCylinderBefore);
OutStoreLog("出库:PO_06_BeforeAfterCylinderBefore,前后气缸前进)"); OutLog("出库:" + MoveInfo.SLog + " ,前后气缸前进)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_BeforeAfterCylinderBefore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_BeforeAfterCylinderBefore))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_07_UpDownCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.PO_07_UpDownCylinderDown);
OutStoreLog("出库:" + SecondMoveInfo.SLog + " ,上下气缸下降)"); OutLog("出库:" + MoveInfo.SLog + " ,上下气缸下降)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH); UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_UpDownCylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_08_ClampCylinderTighten); MoveInfo.NextMoveStep(LineMoveStep.PO_08_ClampCylinderTighten);
InStoreLog("出料:" + SecondMoveInfo.SLog + ",夹料气缸放松)"); OutLog("出料:" + MoveInfo.SLog + ",夹料气缸放松)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_08_ClampCylinderTighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_08_ClampCylinderTighten))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_09_UpdownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.PO_09_UpdownCylinderUp);
OutStoreLog("出库:" + SecondMoveInfo.SLog + ",上下气缸上升)"); OutLog("出库:" + MoveInfo.SLog + ",上下气缸上升)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownUpMove(); UpdownUpMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_09_UpdownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_09_UpdownCylinderUp))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_10_BeforeAfterCylinderAfter); MoveInfo.NextMoveStep(LineMoveStep.PO_10_BeforeAfterCylinderAfter);
OutStoreLog("出库:" + SecondMoveInfo.SLog + ",前后气缸后退,等待4000 )"); OutLog("出库:" + MoveInfo.SLog + ",前后气缸后退,等待4000 )");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000));
......
...@@ -30,7 +30,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,7 +30,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (String.IsNullOrEmpty(codeStr)) if (String.IsNullOrEmpty(codeStr))
{ {
return msg = deviceName + "托盘【" + trayNum + "】 没有扫码到条码"; return msg = deviceName + "未扫到条码";
} }
//if (LineManager.Line.runStatus.Equals(LineRunStatus.Wait)) //if (LineManager.Line.runStatus.Equals(LineRunStatus.Wait))
...@@ -43,17 +43,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -43,17 +43,19 @@ namespace OnlineStore.DeviceLibrary
//code: 条码内容 //code: 条码内容
string server = ConfigAppSettings.GetValue(Setting_Init.http_server) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr; string server = ConfigAppSettings.GetValue(Setting_Init.http_server) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr;
LogUtil.info(deviceName + "托盘【" + trayNum + "】 收到条码<< " + codeStr + ",获取入库PosID:" + server); LogUtil.info(deviceName + "托盘【" + trayNum + "】 条码<< " + codeStr + ",获取入库PosID:" + server);
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Post(server, "");
LogUtil.info("HttpHelper.Post结果:"+resultStr);
//{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"}
LineOperation serverResult = JsonHelper.DeserializeJsonToObject<LineOperation>(resultStr); LineOperation serverResult = JsonHelper.DeserializeJsonToObject<LineOperation>(resultStr);
if (serverResult == null) if (serverResult == null)
{ {
return msg = deviceName + "托盘【" + trayNum + "】 条码【" + codeStr + "】没有收到服务器反馈"; return msg = deviceName + " 条码【" + codeStr + "】没有收到服务器反馈";
} }
else if ((!string.IsNullOrEmpty(serverResult.msg)) || serverResult.result.Equals(0).Equals(false)) else if ((!string.IsNullOrEmpty(serverResult.msg)) || serverResult.result.Equals(0).Equals(false))
{ {
return msg = deviceName + "托盘【" + trayNum + "】 条码【" + codeStr + "】 :" + serverResult.msg; return msg = deviceName + " 条码【" + codeStr + "】 :" + serverResult.msg;
} }
if (!serverResult.pos.Equals("")) if (!serverResult.pos.Equals(""))
...@@ -64,7 +66,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -64,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
string[] posArray = posId.Split('#'); string[] posArray = posId.Split('#');
if (!(posArray.Length == 2)) if (!(posArray.Length == 2))
{ {
return msg = deviceName + "托盘【" + trayNum + "】 入库库位格式错误:条码【" + codeStr + "】库位【" + posId + "】"; return msg = deviceName + " 入库库位格式错误:条码【" + codeStr + "】库位【" + posId + "】";
} }
int storeId = int.Parse(posArray[0]); int storeId = int.Parse(posArray[0]);
string wareNum = serverResult.barcode; string wareNum = serverResult.barcode;
...@@ -78,7 +80,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -78,7 +80,7 @@ namespace OnlineStore.DeviceLibrary
moveEquip.SetWarnMsg( "入库库位重复: " + param.ToStr() + " ,入库失败!"); moveEquip.SetWarnMsg( "入库库位重复: " + param.ToStr() + " ,入库失败!");
return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!"); return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!");
} }
LogUtil.info("更新盘空满信息,托盘号【" + trayNum + "】,是否有料盘【" + true + "】,出库入库【" + 1 + "】"); LogUtil.info("收到入库命令: " + param.ToStr() + " ,更新盘空满信息,托盘号【" + trayNum + "】,有料," + ReelType.InStore + "");
TrayManager.UpdateTrayInfo(trayNum, true, ReelType.InStore, wareNum, posId, plateH, plateW); TrayManager.UpdateTrayInfo(trayNum, true, ReelType.InStore, wareNum, posId, plateH, plateW);
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器; //TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
...@@ -86,6 +88,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -86,6 +88,12 @@ namespace OnlineStore.DeviceLibrary
{ {
LineServer.CheckInStorePos(storeId, param); LineServer.CheckInStorePos(storeId, param);
} }
lock (moveEquip.waitInListLock)
{
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(moveEquip.Name + " 入库命令: " + " + param.ToStr() + "+ "加入等待列表中!");
moveEquip.waitInStoreList.Add(param);
}
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -18,7 +18,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,7 +18,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 放在公共地方,方便存取,夹料编码盘列表,key=编码(1-6),value=是否有物品,true=有物品 /// 放在公共地方,方便存取,夹料编码盘列表,key=编码(1-6),value=是否有物品,true=有物品
/// </summary> /// </summary>
private static ConcurrentDictionary<int, TrayInfo> fixtureCodeFullMap = new ConcurrentDictionary<int, TrayInfo>(); private static ConcurrentDictionary<int, TrayInfo> TrayInfoMap = new ConcurrentDictionary<int, TrayInfo>();
/// <summary> /// <summary>
/// 流水线需要的空盘数量 /// 流水线需要的空盘数量
...@@ -42,6 +42,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -42,6 +42,10 @@ namespace OnlineStore.DeviceLibrary
{ {
LineRunTest = ConfigAppSettings.GetIntValue(Setting_Init.LineRunTest).Equals(1); LineRunTest = ConfigAppSettings.GetIntValue(Setting_Init.LineRunTest).Equals(1);
} }
public static List<TrayInfo> getTrayList()
{
return new List<TrayInfo>(TrayInfoMap.Values);
}
internal static void AddNeedEmptyTrayNum() internal static void AddNeedEmptyTrayNum()
{ {
Interlocked.Increment(ref LineNeedEmptyTrayNum); Interlocked.Increment(ref LineNeedEmptyTrayNum);
...@@ -58,18 +62,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -58,18 +62,18 @@ namespace OnlineStore.DeviceLibrary
/// <returns>盘上是否有料盘</returns> /// <returns>盘上是否有料盘</returns>
internal static bool TrayIsFull(int trayNum) internal static bool TrayIsFull(int trayNum)
{ {
if (fixtureCodeFullMap.ContainsKey(trayNum)) if (TrayInfoMap.ContainsKey(trayNum))
{ {
return fixtureCodeFullMap[trayNum].IsFull; return TrayInfoMap[trayNum].IsFull;
} }
return false; return false;
} }
internal static TrayInfo GetTrayInfo(int trayNum) internal static TrayInfo GetTrayInfo(int trayNum)
{ {
if (fixtureCodeFullMap.ContainsKey(trayNum)) if (TrayInfoMap.ContainsKey(trayNum))
{ {
return fixtureCodeFullMap[trayNum]; return TrayInfoMap[trayNum];
} }
TrayInfo tray = new TrayInfo(trayNum,false,0); TrayInfo tray = new TrayInfo(trayNum,false,0);
...@@ -79,56 +83,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -79,56 +83,42 @@ namespace OnlineStore.DeviceLibrary
internal static void UpdateTrayInfo(int trayNum, bool isFull = false, int inOrOut = 0, string wareCode = "", string posId = "", int plateH = 0, int plateW = 0) internal static void UpdateTrayInfo(int trayNum, bool isFull = false, int inOrOut = 0, string wareCode = "", string posId = "", int plateH = 0, int plateW = 0)
{ {
if (fixtureCodeFullMap.ContainsKey(trayNum)) if (TrayInfoMap.ContainsKey(trayNum))
{ {
fixtureCodeFullMap[trayNum].IsFull = isFull; TrayInfoMap[trayNum].IsFull = isFull;
fixtureCodeFullMap[trayNum].InOrOutStore = inOrOut; TrayInfoMap[trayNum].InOrOutStore = inOrOut;
fixtureCodeFullMap[trayNum].WareCode = wareCode; TrayInfoMap[trayNum].WareCode = wareCode;
fixtureCodeFullMap[trayNum].PosId = posId; TrayInfoMap[trayNum].PosId = posId;
fixtureCodeFullMap[trayNum].PlateH = plateH; TrayInfoMap[trayNum].PlateH = plateH;
fixtureCodeFullMap[trayNum].PlateW = plateW; TrayInfoMap[trayNum].PlateW = plateW;
} }
else else
{ {
TrayInfo fixture = new TrayInfo(trayNum, isFull, inOrOut, wareCode, posId, plateH, plateW); TrayInfo fixture = new TrayInfo(trayNum, isFull, inOrOut, wareCode, posId, plateH, plateW);
fixtureCodeFullMap.TryAdd(trayNum, fixture); TrayInfoMap.TryAdd(trayNum, fixture);
} }
} }
internal static void UpdateTrayCode(int trayNum, string wareCode = "") internal static void UpdateInStoreNG(int trayNum, bool isNg ,string msg)
{
LogUtil.info("更新托盘【" + trayNum + "】的条码为【" + wareCode + "】");
if (fixtureCodeFullMap.ContainsKey(trayNum))
{
fixtureCodeFullMap[trayNum].WareCode = wareCode;
}
}
internal static void UpdateInStoreNG(int trayNum, bool isNg = false)
{ {
LogUtil.info("更新托盘【" + trayNum + "】InStoreNG=【" + isNg + "】"); LogUtil.info("更新托盘【" + trayNum + "】InStoreNG=【" + isNg + "】NgMsg=【" + msg + "】");
if (fixtureCodeFullMap.ContainsKey(trayNum)) if (TrayInfoMap.ContainsKey(trayNum))
{ {
fixtureCodeFullMap[trayNum].InStoreNG = isNg; TrayInfoMap[trayNum].InStoreNG = isNg;
TrayInfoMap[trayNum].NgMsg = msg;
} }
} }
internal static void UpdateTrayPosId(int trayNum, string PosId = "")
{
if (fixtureCodeFullMap.ContainsKey(trayNum))
{
fixtureCodeFullMap[trayNum].PosId = PosId;
}
}
/// <summary> /// <summary>
/// 是否还有有料仓的盘 /// 是否还有有料仓的盘
/// </summary> /// </summary>
internal static bool IsHasFullTray() internal static bool IsHasFullTray()
{ {
foreach (int key in fixtureCodeFullMap.Keys) foreach (int key in TrayInfoMap.Keys)
{ {
if (fixtureCodeFullMap[key].IsFull) if (TrayInfoMap[key].IsFull)
{ {
return true; return true;
} }
...@@ -140,9 +130,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -140,9 +130,9 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
internal static bool IsHasFullOutFixture() internal static bool IsHasFullOutFixture()
{ {
foreach (int key in fixtureCodeFullMap.Keys) foreach (int key in TrayInfoMap.Keys)
{ {
if (fixtureCodeFullMap[key].IsFull && fixtureCodeFullMap[key].InOrOutStore.Equals(2)) if (TrayInfoMap[key].IsFull && TrayInfoMap[key].InOrOutStore.Equals(2))
{ {
return true; return true;
} }
......
...@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
{ {
// Create new modbus master and add event functions // Create new modbus master and add event functions
aioBox = new AIOBOX(); aioBox = new AIOBOX();
aioBox.LogPath( Application.StartupPath+@"\logs\aio\"); // aioBox.LogPath( Application.StartupPath+@"\logs\aio\");
aioBox.IP = ioIp; aioBox.IP = ioIp;
// bool rtn = aioBox.AutoIP(ioIp); // bool rtn = aioBox.AutoIP(ioIp);
......
...@@ -357,7 +357,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -357,7 +357,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return IOManager.IOValue(IoType, baseConfig.Id); return IOManager.IOValue(IoType, baseConfig.Id);
} }
public void DebugInfo(string logInfo)
{
LogUtil.debug(Name + logInfo);
}
public void LogInfo(string logInfo) public void LogInfo(string logInfo)
{ {
LogUtil.info(Name + logInfo); LogUtil.info(Name + logInfo);
......
...@@ -12,13 +12,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -12,13 +12,13 @@ namespace OnlineStore.DeviceLibrary
public class TrayInfo public class TrayInfo
{ {
public TrayInfo(int trayNum, bool isFull=false, int inOrOut=0 ) public TrayInfo(int trayNum, bool isFull = false, int inOrOut = 0)
{ {
this.TrayCode = trayNum; this.TrayCode = trayNum;
this.IsFull = isFull; this.IsFull = isFull;
this.InOrOutStore = inOrOut; this.InOrOutStore = inOrOut;
} }
public TrayInfo (int trayNum, bool isFull , int inOrOut ,string wareCode,string posId,int plateH,int plateW) public TrayInfo(int trayNum, bool isFull, int inOrOut, string wareCode, string posId, int plateH, int plateW)
{ {
this.TrayCode = trayNum; this.TrayCode = trayNum;
this.IsFull = isFull; this.IsFull = isFull;
...@@ -27,6 +27,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -27,6 +27,21 @@ namespace OnlineStore.DeviceLibrary
this.PosId = posId; this.PosId = posId;
this.PlateH = plateH; this.PlateH = plateH;
this.PlateW = plateW; this.PlateW = plateW;
InStoreNG = false;
NgMsg = "";
}
public string ToStr()
{
string type = "无操作";
if (InOrOutStore.Equals(1))
{
type = "入库";
}
else
{
type = "出库";
}
return "托盘【" + TrayCode + "】" + (IsFull ? "有料," : "空,") + type + "," + WareCode + "," + PosId + "," + PlateH + "," + PlateW + "," + InStoreNG + "," + NgMsg;
} }
/// <summary> /// <summary>
/// 夹具编码值(1-32?) /// 夹具编码值(1-32?)
...@@ -61,6 +76,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -61,6 +76,7 @@ namespace OnlineStore.DeviceLibrary
/// 入库失败料盘,未扫到码或获取库位号失败 /// 入库失败料盘,未扫到码或获取库位号失败
/// </summary> /// </summary>
public bool InStoreNG = false; public bool InStoreNG = false;
public string NgMsg = "";
public bool EmergencyOut = false; public bool EmergencyOut = false;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!