Commit 3800bd60 LN

皮带线修改,出库参数修改

1 个父辈 43b8e0f3
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
RFID读卡器 RFID读卡器
</summary> </summary>
</member> </member>
<member name="M:Asa.RFID.Reader.#ctor(System.String)">
<summary>
RFID读卡器
</summary>
</member>
<member name="P:Asa.RFID.Reader.IsConn"> <member name="P:Asa.RFID.Reader.IsConn">
<summary> <summary>
是否连接 是否连接
...@@ -34,18 +39,21 @@ ...@@ -34,18 +39,21 @@
错误代码 错误代码
</summary> </summary>
</member> </member>
<member name="P:Asa.RFID.Reader.IP">
<summary>
IP地址
</summary>
</member>
<member name="P:Asa.RFID.Reader.ID"> <member name="P:Asa.RFID.Reader.ID">
<summary> <summary>
ID号码 ID号码
</summary> </summary>
</member> </member>
<member name="M:Asa.RFID.Reader.Connect(System.String,System.Boolean)"> <member name="M:Asa.RFID.Reader.Connect(System.Boolean)">
<summary> <summary>
连接 连接
</summary> </summary>
<param name="ip">设备IP地址</param>
<param name="autoScan">自动扫描</param> <param name="autoScan">自动扫描</param>
<returns></returns>
</member> </member>
<member name="M:Asa.RFID.Reader.Close"> <member name="M:Asa.RFID.Reader.Close">
<summary> <summary>
...@@ -64,14 +72,6 @@ ...@@ -64,14 +72,6 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Asa.RFID.Reader.Read(System.Int32,System.Int32)">
<summary>
读取电子标签
</summary>
<param name="start"></param>
<param name="len"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Write(System.Byte[])"> <member name="M:Asa.RFID.Reader.Write(System.Byte[])">
<summary> <summary>
写入数据到电子标签,扫描模式不能使用 写入数据到电子标签,扫描模式不能使用
...@@ -79,45 +79,6 @@ ...@@ -79,45 +79,6 @@
<param name="buff">数据,必须小于等于112字节</param> <param name="buff">数据,必须小于等于112字节</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Asa.RFID.Reader.Write(System.Byte[],System.Int32)">
<summary>
写入数据到电子标签,扫描模式不能使用
</summary>
<param name="buff"></param>
<param name="start"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Receive">
<summary>
自动扫描接受数据事件
</summary>
</member>
<member name="M:Asa.RFID.Reader.ReadRFID">
<summary>
读取电子标签内所有数据
</summary>
</member>
<member name="M:Asa.RFID.Reader.ReadRFID(System.Int32)">
<summary>
读取电子标签指定块
</summary>
<param name="num"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.WriteRFID(System.Int32)">
<summary>
写入指定块数据到电子标签
</summary>
<param name="num"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.InitBuff(System.Int32,System.Int32)">
<summary>
初始buff为0
</summary>
<param name="start"></param>
<param name="len"></param>
</member>
<member name="T:Asa.RFID.ReaderAll"> <member name="T:Asa.RFID.ReaderAll">
<summary> <summary>
RFID读卡器 RFID读卡器
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.txtSlaveId = new System.Windows.Forms.TextBox(); this.txtSlaveId = new System.Windows.Forms.TextBox();
this.cmbWriteIO = new System.Windows.Forms.ComboBox(); this.cmbWriteIO = new System.Windows.Forms.ComboBox();
this.btnNgMove = new System.Windows.Forms.Button();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
...@@ -283,7 +284,6 @@ ...@@ -283,7 +284,6 @@
this.cmbLineType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbLineType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbLineType.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cmbLineType.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbLineType.FormattingEnabled = true; this.cmbLineType.FormattingEnabled = true;
this.cmbLineType.Location = new System.Drawing.Point(85, 25); this.cmbLineType.Location = new System.Drawing.Point(85, 25);
this.cmbLineType.Name = "cmbLineType"; this.cmbLineType.Name = "cmbLineType";
this.cmbLineType.Size = new System.Drawing.Size(231, 28); this.cmbLineType.Size = new System.Drawing.Size(231, 28);
...@@ -311,9 +311,9 @@ ...@@ -311,9 +311,9 @@
this.groupBox6.Controls.Add(this.lblTrayNum); this.groupBox6.Controls.Add(this.lblTrayNum);
this.groupBox6.Controls.Add(this.lblInstoreList); this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta); this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(498, 158); this.groupBox6.Location = new System.Drawing.Point(498, 199);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(792, 288); this.groupBox6.Size = new System.Drawing.Size(792, 246);
this.groupBox6.TabIndex = 278; this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息"; this.groupBox6.Text = "消息";
...@@ -424,6 +424,7 @@ ...@@ -424,6 +424,7 @@
// //
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.btnNgMove);
this.groupBox5.Controls.Add(this.btnSRun); this.groupBox5.Controls.Add(this.btnSRun);
this.groupBox5.Controls.Add(this.btnRun2); this.groupBox5.Controls.Add(this.btnRun2);
this.groupBox5.Controls.Add(this.btnRun3); this.groupBox5.Controls.Add(this.btnRun3);
...@@ -432,7 +433,7 @@ ...@@ -432,7 +433,7 @@
this.groupBox5.Controls.Add(this.btnStop1Up); this.groupBox5.Controls.Add(this.btnStop1Up);
this.groupBox5.Location = new System.Drawing.Point(897, 6); this.groupBox5.Location = new System.Drawing.Point(897, 6);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(393, 150); this.groupBox5.Size = new System.Drawing.Size(393, 188);
this.groupBox5.TabIndex = 255; this.groupBox5.TabIndex = 255;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "IO操作测试"; this.groupBox5.Text = "IO操作测试";
...@@ -494,7 +495,7 @@ ...@@ -494,7 +495,7 @@
this.btnCloseAll.BackColor = System.Drawing.Color.White; this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(174, 104); this.btnCloseAll.Location = new System.Drawing.Point(174, 144);
this.btnCloseAll.Name = "btnCloseAll"; this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(140, 34); this.btnCloseAll.Size = new System.Drawing.Size(140, 34);
this.btnCloseAll.TabIndex = 259; this.btnCloseAll.TabIndex = 259;
...@@ -507,7 +508,7 @@ ...@@ -507,7 +508,7 @@
this.btnStop1Up.BackColor = System.Drawing.Color.White; this.btnStop1Up.BackColor = System.Drawing.Color.White;
this.btnStop1Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnStop1Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop1Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStop1Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop1Up.Location = new System.Drawing.Point(174, 62); this.btnStop1Up.Location = new System.Drawing.Point(174, 104);
this.btnStop1Up.Name = "btnStop1Up"; this.btnStop1Up.Name = "btnStop1Up";
this.btnStop1Up.Size = new System.Drawing.Size(140, 34); this.btnStop1Up.Size = new System.Drawing.Size(140, 34);
this.btnStop1Up.TabIndex = 256; this.btnStop1Up.TabIndex = 256;
...@@ -530,7 +531,7 @@ ...@@ -530,7 +531,7 @@
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(497, 6); this.groupBox1.Location = new System.Drawing.Point(497, 6);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(394, 150); this.groupBox1.Size = new System.Drawing.Size(394, 188);
this.groupBox1.TabIndex = 105; this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
...@@ -656,6 +657,19 @@ ...@@ -656,6 +657,19 @@
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem); this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged); this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged);
// //
// btnNgMove
//
this.btnNgMove.BackColor = System.Drawing.Color.White;
this.btnNgMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNgMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNgMove.Location = new System.Drawing.Point(174, 63);
this.btnNgMove.Name = "btnNgMove";
this.btnNgMove.Size = new System.Drawing.Size(140, 34);
this.btnNgMove.TabIndex = 264;
this.btnNgMove.Text = "NG气缸前进";
this.btnNgMove.UseVisualStyleBackColor = false;
this.btnNgMove.Click += new System.EventHandler(this.btnNgMove_Click);
//
// FrmDischargeLine // FrmDischargeLine
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -735,6 +749,7 @@ ...@@ -735,6 +749,7 @@
private System.Windows.Forms.Label lblLineInfo; private System.Windows.Forms.Label lblLineInfo;
private System.Windows.Forms.Button btnScan; private System.Windows.Forms.Button btnScan;
private System.Windows.Forms.Button btnLine2Test; private System.Windows.Forms.Button btnLine2Test;
private System.Windows.Forms.Button btnNgMove;
} }
} }
...@@ -215,11 +215,13 @@ namespace OnlineStore.AssemblyLine ...@@ -215,11 +215,13 @@ namespace OnlineStore.AssemblyLine
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus); lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
btnNgMove.Visible = false;
if (equipBean.DeviceID.Equals(302)) if (equipBean.DeviceID.Equals(302))
{ {
line1Name = "皮带线4"; line1Name = "皮带线4";
line2Name = "皮带线5"; line2Name = "皮带线5";
line3Name = "皮带线6"; line3Name = "皮带线6";
btnNgMove.Visible = true;
} }
btnRun1.Text = line1Name + "运转"; btnRun1.Text = line1Name + "运转";
btnRun2.Text = line2Name + "运转"; btnRun2.Text = line2Name + "运转";
...@@ -227,11 +229,11 @@ namespace OnlineStore.AssemblyLine ...@@ -227,11 +229,11 @@ namespace OnlineStore.AssemblyLine
btnLine1Test.Text = line1Name + "出库测试"; btnLine1Test.Text = line1Name + "出库测试";
btnLine2Test.Text = line2Name + "出库测试"; btnLine2Test.Text = line2Name + "出库测试";
this.cmbLineType.Items.AddRange(new object[] { this.cmbLineType.Items.AddRange(new object[] {
line1Name+"运转-入口定位测试", line1Name+"运转-入口定位",
line2Name+"运转-入口定位测试", line2Name+"运转-入口定位",
line3Name+"运转测试", line3Name+"运转测试",
line1Name+"运转-出口定位测试", line1Name+"运转-出口定位",
line2Name+"运转-出口定位测试"}); line2Name+"运转-出口定位"});
cmbLineType.SelectedIndex = 2; cmbLineType.SelectedIndex = 2;
IsLoad = true; IsLoad = true;
} }
...@@ -425,13 +427,18 @@ namespace OnlineStore.AssemblyLine ...@@ -425,13 +427,18 @@ namespace OnlineStore.AssemblyLine
private void btnLine2Test_Click(object sender, EventArgs e) private void btnLine2Test_Click(object sender, EventArgs e)
{ {
bool isNg = true ;
bool result = equipBean.TrayLine2.StartOut(new InOutParam(0, "CodeTest", "2#AC2_2_2", 8, 7)); bool result = equipBean.TrayLine2.StartOut(new InOutParam(0, "CodeTest", "2#AC2_2_2", 8, 7,true));
if (!result) if (!result)
{ {
MessageBox.Show(line2Name+"出库测试失败"); MessageBox.Show(line2Name+"出库测试失败");
} }
} }
private void btnNgMove_Click(object sender, EventArgs e)
{
BtnMove(btnNgMove, "NG气缸前进", "NG气缸后退", IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
} }
} }
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLineStore)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLineStore));
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.logBox = new System.Windows.Forms.RichTextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.chbInStoNG = new System.Windows.Forms.CheckBox(); this.chbInStoNG = new System.Windows.Forms.CheckBox();
...@@ -63,7 +64,6 @@ ...@@ -63,7 +64,6 @@
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.listView1 = new System.Windows.Forms.ListView(); this.listView1 = new System.Windows.Forms.ListView();
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();
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
...@@ -134,6 +134,18 @@ ...@@ -134,6 +134,18 @@
this.tabPage1.Text = "状态信息"; this.tabPage1.Text = "状态信息";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// logBox
//
this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(460, 180);
this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(860, 350);
this.logBox.TabIndex = 106;
this.logBox.Text = "";
//
// groupBox3 // groupBox3
// //
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
...@@ -402,7 +414,6 @@ ...@@ -402,7 +414,6 @@
this.groupBox1.TabIndex = 195; this.groupBox1.TabIndex = 195;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "料仓通信测试"; this.groupBox1.Text = "料仓通信测试";
this.groupBox1.Visible = false;
// //
// lblPosId // lblPosId
// //
...@@ -495,18 +506,6 @@ ...@@ -495,18 +506,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);
// //
// logBox
//
this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(460, 81);
this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(860, 449);
this.logBox.TabIndex = 106;
this.logBox.Text = "";
//
// lblStatus // lblStatus
// //
this.lblStatus.AutoSize = true; this.lblStatus.AutoSize = true;
......
...@@ -782,18 +782,20 @@ namespace OnlineStore.AssemblyLine ...@@ -782,18 +782,20 @@ namespace OnlineStore.AssemblyLine
int pw = FormUtil.GetIntValue(txtTrayW); int pw = FormUtil.GetIntValue(txtTrayW);
bool hasTray = trayType > 0; bool hasTray = trayType > 0;
bool inNg = chbInStoNG.Checked; bool inNg = chbInStoNG.Checked;
if (hasTray) if (hasTray)
{ {
TrayManager.UpdateTrayInfo(num, hasTray, trayType, "CodeTest", posId, ph, pw); InOutParam inoutP = new InOutParam(num, "CodeTest", posId, ph, pw, inNg);
TrayManager.UpdateTrayInfo(num, hasTray, trayType, inoutP, "InStoreNG ");
} }
else else
{ {
TrayManager.UpdateTrayInfo(num, hasTray); TrayManager.UpdateTrayInfo(num, hasTray);
} }
if (trayType.Equals(1) && inNg) //if (trayType.Equals(1) && inNg)
{ //{
TrayManager.UpdateInStoreNG(num, inNg, "InStoreNG "); // TrayManager.UpdateInStoreNG(num, inNg, );
} //}
TrayInfo info = TrayManager.GetTrayInfo(num); TrayInfo info = TrayManager.GetTrayInfo(num);
MessageBox.Show("更新成功:\r" + info.ToStr()); MessageBox.Show("更新成功:\r" + info.ToStr());
LogUtil.info("手动更新托盘信息:" + info.ToStr()); LogUtil.info("手动更新托盘信息:" + info.ToStr());
......
...@@ -77,6 +77,13 @@ D2(上料模块出口) ...@@ -77,6 +77,13 @@ D2(上料模块出口)
皮带线1相机:GigE:MV-CE200-10GC (00D76546944) 皮带线1相机:GigE:MV-CE200-10GC (00D76546944)
皮带线2相机:GigE:MV-CE200-10GC (00D76546876) 皮带线2相机:GigE:MV-CE200-10GC (00D76546876)
5 出库时根据StatusBean返回data中的参数决定料盘流转到哪里

urgentReel: true 表示紧急料,需要出到料串上
cutReel: true 表示分盘料,需要出到料串上
smallReel: true 小料(7x8),放置到小料架上
rfid: 分配的料架RFID
rfidLoc: 料架的架位,值为-1时,可以自由分配皮带线, 小料时,架位为1-46优先走1/2号皮带线,47-92优先走3/4号皮带线, 70,71,72时只能分配到3/4号皮带线;大料时,架位1-6优先走1/2号皮带线, 7-12优先走3/4号皮带线
......
...@@ -226,5 +226,29 @@ namespace OnlineStore.Common ...@@ -226,5 +226,29 @@ namespace OnlineStore.Common
/// 温度报警值 /// 温度报警值
/// </summary> /// </summary>
public static string maxTemperature = "temp"; public static string maxTemperature = "temp";
/// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
public static string urgentReel = "urgentReel";
/// <summary>
/// cutReel: true 表示分盘料,需要出到料串上
/// </summary>
public static string cutReel = "cutReel";
/// <summary>
/// smallReel: true 小料(7x8),放置到小料架上
/// </summary>
public static string smallReel = "smallReel";
/// <summary>
/// rfid: 分配的料架RFID
/// </summary>
public static string rfid = "rfid";
/// <summary>
/// rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线, 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线,
/// 70,71,72时只能分配到3 / 4号皮带线; 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3 / 4号皮带线
/// </summary>
public static string rfidLoc = "rfidLoc";
public static string barcode = "barcode";
} }
} }
...@@ -16,7 +16,7 @@ DI,0,皮带线6中间位置料盘检测,MiddleTray_Check3,10,PRO_AOI_IP_3,0,皮带线6中间位置 ...@@ -16,7 +16,7 @@ DI,0,皮带线6中间位置料盘检测,MiddleTray_Check3,10,PRO_AOI_IP_3,0,皮带线6中间位置
DI,0,皮带线6出口料盘检测,ExitTray_Check3,11,PRO_AOI_IP_3,0,皮带线6出口料盘检测,X052,X052 DI,0,皮带线6出口料盘检测,ExitTray_Check3,11,PRO_AOI_IP_3,0,皮带线6出口料盘检测,X052,X052
DI,0,分盘装置2定位气缸上升端,SeparateDevice_Up,12,PRO_AOI_IP_3,0,分盘装置2定位气缸上升端,X053,X053 DI,0,分盘装置2定位气缸上升端,SeparateDevice_Up,12,PRO_AOI_IP_3,0,分盘装置2定位气缸上升端,X053,X053
DI,0,分盘装置2定位气缸下降端,SeparateDevice_Down,13,PRO_AOI_IP_3,0,分盘装置2定位气缸下降端,X054,X054 DI,0,分盘装置2定位气缸下降端,SeparateDevice_Down,13,PRO_AOI_IP_3,0,分盘装置2定位气缸下降端,X054,X054
DI,0,分盘装置1料盘检测,SeparateDevice_Check,14,PRO_AOI_IP_3,0,分盘装置1料盘检测,X055,X055 DI,0,分盘装置2料盘检测,SeparateDevice_Check,14,PRO_AOI_IP_3,0,分盘装置2料盘检测,X055,X055
,0,,,15,PRO_AOI_IP_3,0,,X056,X056 ,0,,,15,PRO_AOI_IP_3,0,,X056,X056
,,,,,,,,, ,,,,,,,,,
DO,0,出料皮带线体2运行状态,DLine_RunStatus,0,PRO_AOI_IP_3,0,出料皮带线体2运行状态,Y041,Y041 DO,0,出料皮带线体2运行状态,DLine_RunStatus,0,PRO_AOI_IP_3,0,出料皮带线体2运行状态,Y041,Y041
...@@ -25,8 +25,8 @@ DO,0,出料皮带线4运转,DLine_Run1,2,PRO_AOI_IP_3,0,出料皮带线4运转,Y043,Y043 ...@@ -25,8 +25,8 @@ DO,0,出料皮带线4运转,DLine_Run1,2,PRO_AOI_IP_3,0,出料皮带线4运转,Y043,Y043
DO,0,出料皮带线5运转,DLine_Run2,3,PRO_AOI_IP_3,0,出料皮带线5运转,Y044,Y044 DO,0,出料皮带线5运转,DLine_Run2,3,PRO_AOI_IP_3,0,出料皮带线5运转,Y044,Y044
DO,0,出料皮带线6运转,DLine_Run3,4,PRO_AOI_IP_3,0,出料皮带线6运转,Y045,Y045 DO,0,出料皮带线6运转,DLine_Run3,4,PRO_AOI_IP_3,0,出料皮带线6运转,Y045,Y045
DO,0,分盘装置电机2驱动,SeparateDevice_Run,5,PRO_AOI_IP_3,0,分盘装置电机2驱动,Y046,Y046 DO,0,分盘装置电机2驱动,SeparateDevice_Run,5,PRO_AOI_IP_3,0,分盘装置电机2驱动,Y046,Y046
DO,0,分盘装置1定位气缸上升SOL,SeparateDevice_Up,6,PRO_AOI_IP_3,0,分盘装置1定位气缸上升SOL,Y047,Y047 DO,0,分盘装置2定位气缸上升SOL,SeparateDevice_Up,6,PRO_AOI_IP_3,0,分盘装置2定位气缸上升SOL,Y047,Y047
DO,0,分盘装置1定位气缸下降SOL,SeparateDevice_Down,7,PRO_AOI_IP_3,0,分盘装置1定位气缸下降SOL,Y048,Y048 DO,0,分盘装置2定位气缸下降SOL,SeparateDevice_Down,7,PRO_AOI_IP_3,0,分盘装置2定位气缸下降SOL,Y048,Y048
,0,,,8,PRO_AOI_IP_3,0,,Y049,Y049 ,0,,,8,PRO_AOI_IP_3,0,,Y049,Y049
,0,,,9,PRO_AOI_IP_3,0,,Y050,Y050 ,0,,,9,PRO_AOI_IP_3,0,,Y050,Y050
,0,,,10,PRO_AOI_IP_3,0,,Y051,Y051 ,0,,,10,PRO_AOI_IP_3,0,,Y051,Y051
......
...@@ -22,6 +22,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,6 +22,7 @@ namespace OnlineStore.DeviceLibrary
internal LineTurnBean Line3Turn = null; internal LineTurnBean Line3Turn = null;
//皮带线3最后一盘料的位置 //皮带线3最后一盘料的位置
public int Line3LastTrayP = 0; public int Line3LastTrayP = 0;
private string hengyiName = "横移皮带线1";
public DischargeLine(string cid, DischargeLine_Config config) public DischargeLine(string cid, DischargeLine_Config config)
{ {
baseConfig = config; baseConfig = config;
...@@ -29,14 +30,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -29,14 +30,15 @@ namespace OnlineStore.DeviceLibrary
this.Config = config; this.Config = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
baseConfig = config; baseConfig = config;
Name = (" " + "_出料皮带线_" + DeviceID % 100 + " ").ToUpper(); Name = (" " + "_出料皮带线_" +( DeviceID.Equals(301)?"123":"456") + " ").ToUpper();
Init(); Init();
UseAxis = false; UseAxis = false;
MoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + DeviceID + "-MoveInfo"); MoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + (DeviceID.Equals(301) ? "123" : "456") + "-MoveInfo");
SecondMoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + DeviceID + "-SecondMoveInfo"); SecondMoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + (DeviceID.Equals(301) ? "123" : "456") + "-SecondMoveInfo");
int id = DeviceID % 100; int id = DeviceID % 100;
TrayLine1 = new OutTrayLineBean("皮带线" + id + "-" + (id - 1) * 3 + 1, IO_Type.EntryLocation_Check1, IO_Type.ExitLocation_Check1, IO_Type.ExitTray_Check1, IO_Type.DLine_Run1, IO_Type.EntryTray_Check3, this.DeviceID); hengyiName = "横移皮带线-"+ ((id - 1) * 3 + 3)+" ";
TrayLine2 = new OutTrayLineBean("皮带线" + id + "-" + (id - 1) * 3 + 2, IO_Type.EntryLocation_Check2, IO_Type.ExitLocation_Check2, IO_Type.ExitTray_Check2, IO_Type.DLine_Run2, IO_Type.MiddleTray_Check3, this.DeviceID); TrayLine1 = new OutTrayLineBean("移栽皮带线" + "-" +( (id - 1) * 3 + 1)+" ", IO_Type.EntryLocation_Check1, IO_Type.ExitLocation_Check1, IO_Type.ExitTray_Check1, IO_Type.DLine_Run1, IO_Type.EntryTray_Check3, this.DeviceID);
TrayLine2 = new OutTrayLineBean("移栽皮带线" + "-" +( (id - 1) * 3 + 2)+" ", IO_Type.EntryLocation_Check2, IO_Type.ExitLocation_Check2, IO_Type.ExitTray_Check2, IO_Type.DLine_Run2, IO_Type.MiddleTray_Check3, this.DeviceID);
Line3Turn = new LineTurnBean(DeviceID); Line3Turn = new LineTurnBean(DeviceID);
if((DeviceID%100).Equals(1)) if((DeviceID%100).Equals(1))
{ {
...@@ -80,7 +82,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,7 +82,7 @@ namespace OnlineStore.DeviceLibrary
public override bool Reset() public override bool Reset()
{ {
StopMove(); StopMove();
LogInfo("开始重置: (重置灯状态,关闭所有皮带线,定位气缸下降 开始;"); LogInfo("开始重置: (重置灯状态,关闭所有皮带线,定位气缸下降 开始;");
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
MoveInfo.NewMove(LineMoveType.Reset); MoveInfo.NewMove(LineMoveType.Reset);
StartReset(); StartReset();
...@@ -104,6 +106,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -104,6 +106,10 @@ namespace OnlineStore.DeviceLibrary
CheckAndMove(IO_Type.DLine_Run2, IO_VALUE.LOW); CheckAndMove(IO_Type.DLine_Run2, IO_VALUE.LOW);
CheckAndMove(IO_Type.DLine_Run3, IO_VALUE.LOW); CheckAndMove(IO_Type.DLine_Run3, IO_VALUE.LOW);
CheckAndMove(IO_Type.SeparateDevice_Run, IO_VALUE.LOW); CheckAndMove(IO_Type.SeparateDevice_Run, IO_VALUE.LOW);
if (DeviceID.Equals(302))
{
CylinderMove(MoveInfo, IO_Type.NGCylinder_After, IO_Type.NGCylinder_Before);
}
if (IsDebug) if (IsDebug)
{ {
mainTimer.Start(); mainTimer.Start();
...@@ -281,7 +287,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,7 +287,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//判断皮带三还有料盘,需要转动一个工位 //判断皮带三还有料盘,需要转动一个工位
UpdateLastP(); UpdateLastP();
LogUtil.debug("皮带线3空闲,且流水线还有料盘,转动一个工位"); LogUtil.debug(hengyiName+"空闲,且流水线还有料盘,转动一个工位");
Line3Turn.StartLineRun(IO_Type.DLine_Run3, IO_Type.Location_Check3, Line3EndProcess); Line3Turn.StartLineRun(IO_Type.DLine_Run3, IO_Type.Location_Check3, Line3EndProcess);
} }
......
...@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
MoveInfo.MoveParam = param; MoveInfo.MoveParam = param;
MoveInfo.NewMove(LineMoveType.OutStore); MoveInfo.NewMove(LineMoveType.OutStore);
LogInfo("皮带3出口有料,等待1000后扫码"); LogInfo(hengyiName+ "出口有料,等待1000后扫码");
MoveInfo.NextMoveStep(LineMoveStep.DO_01_WaitTime); MoveInfo.NextMoveStep(LineMoveStep.DO_01_WaitTime);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LastCodeList = new List<string>(); LastCodeList = new List<string>();
...@@ -114,7 +114,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -114,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
List<string> cameraList = Config.GetCameraList(); List<string> cameraList = Config.GetCameraList();
if (cameraList.Count > 0) if (cameraList.Count > 0)
{ {
LogInfo("皮带3出口有料,开始扫码"); LogInfo(hengyiName+ "出口有料,开始扫码");
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitDLineScanCode()); MoveInfo.WaitList.Add(WaitResultInfo.WaitDLineScanCode());
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(6000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(6000));
...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogInfo("皮带3出口有料,未取到相机名称,不扫码,等待1000后继续"); LogInfo(hengyiName+ "出口有料,未取到相机名称,不扫码,等待1000后继续");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(6000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(6000));
} }
} }
...@@ -158,7 +158,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -158,7 +158,7 @@ namespace OnlineStore.DeviceLibrary
robotIndex = 2; robotIndex = 2;
} }
SServerManager.GetTraySize(Name, robotIndex, LastCodeList, out LastWidth); SServerManager.GetTraySize(Name, robotIndex, LastCodeList, out LastWidth);
LogInfo("皮带3出口有料,二维码[" + lastCode + "] 获取料盘尺寸【" + LastWidth + "】"); LogInfo(hengyiName+ "出口有料,二维码[" + lastCode + "] 获取料盘尺寸【" + LastWidth + "】");
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_03_GetTraySize)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_03_GetTraySize))
...@@ -166,12 +166,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -166,12 +166,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.DO_04_SeparateDeviceMove); MoveInfo.NextMoveStep(LineMoveStep.DO_04_SeparateDeviceMove);
if (LastWidth.Equals(7)) if (LastWidth.Equals(7))
{ {
LogInfo("皮带3出口有料,料盘尺寸【" + LastWidth + "】上升分盘定位气缸"); LogInfo(hengyiName+ "出口有料,料盘尺寸【" + LastWidth + "】上升分盘定位气缸");
CylinderMove(MoveInfo, IO_Type.SeparateDevice_Down, IO_Type.SeparateDevice_Up); CylinderMove(MoveInfo, IO_Type.SeparateDevice_Down, IO_Type.SeparateDevice_Up);
} }
else else
{ {
LogInfo("皮带3出口有料,料盘尺寸【" + LastWidth + "】下降分盘定位气缸"); LogInfo(hengyiName+ "出口有料,料盘尺寸【" + LastWidth + "】下降分盘定位气缸");
CylinderMove(MoveInfo, IO_Type.SeparateDevice_Up, IO_Type.SeparateDevice_Down); CylinderMove(MoveInfo, IO_Type.SeparateDevice_Up, IO_Type.SeparateDevice_Down);
} }
} }
...@@ -180,7 +180,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -180,7 +180,7 @@ namespace OnlineStore.DeviceLibrary
if (TrayLine2.Line3CanRun && TrayLine1.Line3CanRun) if (TrayLine2.Line3CanRun && TrayLine1.Line3CanRun)
{ {
MoveInfo.NextMoveStep(LineMoveStep.DO_05_LineRun); MoveInfo.NextMoveStep(LineMoveStep.DO_05_LineRun);
LogInfo("皮带3出口有料,转动皮带线,同时转动分盘装置"); LogInfo(hengyiName+ "出口有料,转动皮带线,同时转动分盘装置");
IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.HIGH); IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.HIGH);
Line3Turn.StartLineRun(IO_Type.DLine_Run3, IO_Type.Location_Check3, Line3EndProcess); Line3Turn.StartLineRun(IO_Type.DLine_Run3, IO_Type.Location_Check3, Line3EndProcess);
...@@ -192,14 +192,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -192,14 +192,14 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.DO_06_Wait_SeparateDevice_Check); MoveInfo.NextMoveStep(LineMoveStep.DO_06_Wait_SeparateDevice_Check);
Line3LastTrayP++; Line3LastTrayP++;
LogInfo("皮带3出口有料,等待料盘到达分盘装置位置"); LogInfo(hengyiName+ "出口有料,等待料盘到达分盘装置位置");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Location_Check3, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Location_Check3, IO_VALUE.HIGH));
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_06_Wait_SeparateDevice_Check)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_06_Wait_SeparateDevice_Check))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DO_07_CRun); MoveInfo.NextMoveStep(LineMoveStep.DO_07_CRun);
LogInfo("皮带3出口有料,最多等待2000"); LogInfo(hengyiName+ "出口有料,最多等待2000");
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.HIGH); IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
...@@ -209,7 +209,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -209,7 +209,7 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.LOW); IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.LOW);
LogInfo("皮带3出口有料,送料结束,停止皮带线"); LogInfo(hengyiName+ "出口有料,送料结束,停止皮带线");
} }
} }
#endregion #endregion
......
...@@ -706,16 +706,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -706,16 +706,19 @@ namespace OnlineStore.DeviceLibrary
{ {
//更新托盘条码信息 //更新托盘条码信息
string code = CodeManager.ProcessCode(LastCodeList); string code = CodeManager.ProcessCode(LastCodeList);
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, "扫码失败"); InOutParam param = new InOutParam(currTrayNum, code, "", LastHeight, LastWidth, true );
TrayManager.UpdateTrayInfo(currTrayNum, true,ReelType.InStore, param, "扫码失败");
} }
//从服务器获取库位号 //从服务器获取库位号
string result = SServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth); string result = SServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth);
if (!result.Equals("")) if (!result.Equals(""))
{ {
TrayManager.UpdateInStoreNG(currTrayNum, true, result); InOutParam param = new InOutParam(currTrayNum, code, "", LastHeight, LastWidth, true);
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, param, result);
// TrayManager.UpdateInStoreNG(currTrayNum, true, result);
LogUtil.error(Name + "托盘【" + currTrayNum + "】" + result); LogUtil.error(Name + "托盘【" + currTrayNum + "】" + result);
} }
}); });
...@@ -980,21 +983,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -980,21 +983,22 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
TrayInfo info = TrayManager.GetTrayInfo(trayNum); TrayInfo info = TrayManager.GetTrayInfo(trayNum);
InOutParam param = new InOutParam(trayNum, info.WareCode, info.PosId, info.PlateH, info.PlateW,info.InStoreNG); InOutParam param = info.InoutPar;
//是出料的模块 //是出料的模块
if (Config.IsCanOut.Equals(1)) if (Config.IsCanOut.Equals(1))
{ {
//此托盘是紧急出料盘,需要通过料架出库 //此托盘是紧急出料盘,需要通过料架出库
bool debugNeed = (runStatus >= LineRunStatus.Runing) && info.IsFull && info.InOrOutStore.Equals(2); bool debugNeed = (runStatus >= LineRunStatus.Runing) && info.IsFull && info.InOrOutStore.Equals(2);
if (info.PosId.Equals("")) debugNeed = false;
{ //if (param.PosId.Equals(""))
param = new InOutParam(trayNum, "紧急出料测试", "1#AC1_3_2", 12, 7); //{
} // param = new InOutParam(trayNum, "紧急出料测试", "1#AC1_3_2", 12, 7);
bool isJinji = info.EmergencyOut && info.IsFull && runStatus >= LineRunStatus.Runing; //}
bool isJinji = (param.urgentReel || param.cutReel) && info.InOrOutStore.Equals(2) && info.IsFull && runStatus >= LineRunStatus.Runing;
//入料失败的盘也从此处出库 //入料失败的盘也从此处出库
bool instoeEnd = (runStatus >= LineRunStatus.Runing) && info.IsFull && info.InStoreNG; // bool instoeEnd = (runStatus >= LineRunStatus.Runing) && info.IsFull && info.InStoreNG;
if (debugNeed || isJinji || instoeEnd) if (debugNeed || isJinji)
{ {
//判断是否有料架,是否可以出库 //判断是否有料架,是否可以出库
......
...@@ -303,6 +303,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -303,6 +303,7 @@ namespace OnlineStore.DeviceLibrary
{ {
bool result = moveEquip.StartRun(); bool result = moveEquip.StartRun();
}); });
Thread.Sleep(60);
} }
} }
...@@ -403,6 +404,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -403,6 +404,7 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate { Task.Factory.StartNew(delegate {
equip.Reset(); equip.Reset();
}); });
Thread.Sleep(60);
} }
else else
{ {
......
...@@ -130,7 +130,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -130,7 +130,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_UpDownCylinderDown))
{ {
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸1放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" +MoveInfo.MoveParam.ToStr() + "】"); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸1放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" +MoveInfo.MoveParam.ToStr() + "】");
TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam.WareCode, MoveInfo.MoveParam.PosId, MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW); TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam);
//出库全部完成 //出库全部完成
lineStatus = LineStatus.StoreOnline; lineStatus = LineStatus.StoreOnline;
...@@ -271,15 +271,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -271,15 +271,24 @@ namespace OnlineStore.DeviceLibrary
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);
InLog("入库 " + MoveInfo.SLog + ",前后气缸1后退,等待4000 )"); InLog("入库 " + MoveInfo.SLog + ",前后气缸1后退,等待1000 )");
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(1000));
//此时box就可以入库操作了 //触发事件,BOX入库 //此时box就可以入库操作了 //触发事件,BOX入库
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam); // LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_14_BeforeAfterCylinderAfter)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_14_BeforeAfterCylinderAfter))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendEnd); MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",通知BOX开始入库,等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
//此时box就可以入库操作了 //触发事件,BOX入库
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendPosToStore))
{
MoveInfo.NextMoveStep(LineMoveStep.MI_16_SendEnd);
//判断料仓是否在入库中,如果么有在入库中,需要重新发送入库消息 //判断料仓是否在入库中,如果么有在入库中,需要重新发送入库消息
if (!LineServer.IsInStorePro(DeviceID)) if (!LineServer.IsInStorePro(DeviceID))
{ {
...@@ -291,7 +300,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -291,7 +300,7 @@ namespace OnlineStore.DeviceLibrary
InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓已开始入库)"); InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓已开始入库)");
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendEnd)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_16_SendEnd))
{ {
LogInfo("入库【" + posId + "】处理(移栽)全部完成!"); LogInfo("入库【" + posId + "】处理(移栽)全部完成!");
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
......
...@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
if (lineRun.InTurn.Equals(false)) if (lineRun.InTurn.Equals(false))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_04_CanReviceTray); MoveInfo.NextMoveStep(LineMoveStep.DLO_04_CanReviceTray);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "可以放入料盘,------------等待移栽放下料盘--------"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "------------等待移栽放下料盘--------");
if (equipBean.IsDebug) if (equipBean.IsDebug)
{ MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); } { MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); }
} }
...@@ -128,7 +128,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,7 +128,6 @@ namespace OnlineStore.DeviceLibrary
{ {
if (equipBean.IsDebug) if (equipBean.IsDebug)
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_05_TrayIsOk); MoveInfo.NextMoveStep(LineMoveStep.DLO_05_TrayIsOk);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "移栽放下料盘后更新为已放料盘"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "移栽放下料盘后更新为已放料盘");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
...@@ -137,7 +136,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -137,7 +136,8 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_05_TrayIsOk)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_05_TrayIsOk))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_06_LineRun_OutLocation_Check); MoveInfo.NextMoveStep(LineMoveStep.DLO_06_LineRun_OutLocation_Check);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "------------料盘已放下--------皮带线转动到出口定位信号亮"); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "------------料盘已放下--------转动到出口定位");
LastTrayPosition = 1; LastTrayPosition = 1;
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, null); lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, null);
} }
...@@ -155,8 +155,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -155,8 +155,9 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveParam.InStoreNg) if (MoveInfo.MoveParam.InStoreNg)
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_08_NGCylinder_Before); MoveInfo.NextMoveStep(LineMoveStep.DLO_08_NGCylinder_Before);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "NG气缸前进"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "NG气缸前进,等待2000");
equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_After, IO_Type.NGCylinder_Before); equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_After, IO_Type.NGCylinder_Before);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
else else
{ {
...@@ -172,12 +173,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -172,12 +173,6 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_09_NGCylinder_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_09_NGCylinder_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_08_NGCylinder_Before);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "NG气缸后退");
equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_09_NGCylinder_After))
{
CheckIsNeedRun(); CheckIsNeedRun();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_10_LineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_10_LineRun))
...@@ -230,7 +225,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -230,7 +225,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
MoveInfo.NextMoveStep(nextStep); MoveInfo.NextMoveStep(nextStep);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "最后一盘料位置【" + LastTrayPosition + "】,出口有料盘,继续转动一个工位"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "最后一盘料位置【" + LastTrayPosition + "】,继续转动一个工位");
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, LineEndProcess); lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, LineEndProcess);
} }
......
...@@ -80,15 +80,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,15 +80,37 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
} }
} }
private bool CheckIsNeedOutStore() private InOutParam CheckIsNeedOutStore()
{ {
TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum); TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum);
if (trayInfo.InStoreNG && this.Config.SidesWayNum.Equals(4)) if (!trayInfo.IsFull)
{ {
return true; return null;
}
InOutParam inoup = trayInfo.InoutPar;
//入料失败料
if (trayInfo.IsFull&&trayInfo.InoutPar.InStoreNg && this.Config.SidesWayNum.Equals(4))
{
return inoup;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel.Equals(false) && inoup.cutReel.Equals(false))
{
//是否是小盘
if (inoup.smallReel && inoup.rfidLoc >= 70 && inoup.rfidLoc <= 72)
{
if (DeviceID.Equals(203) || DeviceID.Equals(204))
{
return inoup;
}
} }
else
{
return inoup;
}
}
//TODO 判断是否是需要移栽出料的料盘 //TODO 判断是否是需要移栽出料的料盘
return false; return null;
} }
protected override void CheckFixtureProcess() protected override void CheckFixtureProcess()
{ {
...@@ -152,11 +174,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -152,11 +174,9 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateTrayNumError(-1, ""); TrayManager.UpdateTrayNumError(-1, "");
} }
//出料中,需要拦盘 //出料中,需要拦盘
if (CheckIsNeedOutStore()) InOutParam param = CheckIsNeedOutStore();
if(param != null)
{ {
TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum);
InOutParam param = new InOutParam(currTrayNum, trayInfo.WareCode, trayInfo.PosId, trayInfo.PlateH, trayInfo.PlateW,trayInfo.InStoreNG);
SecondMoveInfo.MoveParam = param; SecondMoveInfo.MoveParam = param;
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime);
CheckLog("托盘阻挡需要出库" + SecondMoveInfo.SLog + ":" + param.ToStr() + " 等待1秒后顶升上升 )"); CheckLog("托盘阻挡需要出库" + SecondMoveInfo.SLog + ":" + param.ToStr() + " 等待1秒后顶升上升 )");
......
...@@ -121,7 +121,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -121,7 +121,8 @@ namespace OnlineStore.DeviceLibrary
return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!"); return msg = ("收到服务器入库命令 " + "入库库位重复: " + param.ToStr() + " ,入库失败!");
} }
LogUtil.info("收到入库命令: " + param.ToStr() + " ,更新盘空满信息,托盘号【" + trayNum + "】,有料," + ReelType.InStore + ""); LogUtil.info("收到入库命令: " + param.ToStr() + " ,更新盘空满信息,托盘号【" + trayNum + "】,有料," + ReelType.InStore + "");
TrayManager.UpdateTrayInfo(trayNum, true, ReelType.InStore, wareNum, posId, plateH, plateW);
TrayManager.UpdateTrayInfo(trayNum, true, ReelType.InStore,new InOutParam(trayNum, wareNum, posId, plateH, plateW,false));
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器; //TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if (LineServer.BoxCanInStore(moveEquip.DeviceID)) if (LineServer.BoxCanInStore(moveEquip.DeviceID))
......
...@@ -79,21 +79,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -79,21 +79,27 @@ namespace OnlineStore.DeviceLibrary
} }
public static void UpdateTrayInfo(int trayNum, bool isFull = false, int inOrOut = 0, string wareCode = "", string posId = "", int plateH = 0, int plateW = 0) public static void UpdateTrayInfo(int trayNum, bool isFull = false, int inOrOut = 0, InOutParam param=null,string ngMsg="")
{ {
if (TrayInfoMap.ContainsKey(trayNum)) if (TrayInfoMap.ContainsKey(trayNum))
{ {
TrayInfoMap[trayNum].IsFull = isFull; TrayInfoMap[trayNum].IsFull = isFull;
TrayInfoMap[trayNum].InOrOutStore = inOrOut; TrayInfoMap[trayNum].InOrOutStore = inOrOut;
TrayInfoMap[trayNum].WareCode = wareCode; //TrayInfoMap[trayNum].WareCode = wareCode;
TrayInfoMap[trayNum].PosId = posId; //TrayInfoMap[trayNum].PosId = posId;
TrayInfoMap[trayNum].PlateH = plateH; //TrayInfoMap[trayNum].PlateH = plateH;
TrayInfoMap[trayNum].PlateW = plateW; //TrayInfoMap[trayNum].PlateW = plateW;
if (param == null)
{
param = new InOutParam();
}
TrayInfoMap[trayNum].InoutPar = param;
TrayInfoMap[trayNum].ShowMsg = ngMsg;
} }
else else
{ {
TrayInfo fixture = new TrayInfo(trayNum, isFull, inOrOut, wareCode, posId, plateH, plateW); TrayInfo fixture = new TrayInfo(trayNum, isFull, inOrOut, param);
TrayInfoMap.TryAdd(trayNum, fixture); TrayInfoMap.TryAdd(trayNum, fixture);
} }
} }
...@@ -103,18 +109,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -103,18 +109,18 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("更新托盘【" + trayNum + "】InStoreNG=【" + isNg + "】NgMsg=【" + msg + "】"); LogUtil.info("更新托盘【" + trayNum + "】InStoreNG=【" + isNg + "】NgMsg=【" + msg + "】");
if (TrayInfoMap.ContainsKey(trayNum)) if (TrayInfoMap.ContainsKey(trayNum))
{ {
TrayInfoMap[trayNum].InStoreNG = isNg; TrayInfoMap[trayNum].InoutPar.InStoreNg = isNg;
TrayInfoMap[trayNum].NgMsg = msg; TrayInfoMap[trayNum].ShowMsg = msg;
}
}
internal static void UpdateEmergencyOut(int trayNum, bool isEmp)
{
LogUtil.info("更新托盘【" + trayNum + "】EmergencyOut=【" + isEmp + "】 ");
if (TrayInfoMap.ContainsKey(trayNum))
{
TrayInfoMap[trayNum].EmergencyOut = isEmp;
} }
} }
//internal static void UpdateEmergencyOut(int trayNum, bool isEmp)
//{
// LogUtil.info("更新托盘【" + trayNum + "】EmergencyOut=【" + isEmp + "】 ");
// if (TrayInfoMap.ContainsKey(trayNum))
// {
// TrayInfoMap[trayNum].EmergencyOut = isEmp;
// }
//}
/// <summary> /// <summary>
......
...@@ -16,26 +16,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -16,26 +16,22 @@ namespace OnlineStore.DeviceLibrary
public class InOutParam public class InOutParam
{ {
public InOutParam()
{ public InOutParam(int trayCode=0, string barcode="", string posId="", int plateH=0, int plateW=0,bool instoreNg=false,
this.WareCode = ""; bool urgentReel = false , bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0)
}
public InOutParam(int trayCode)
{
WareCode = "";
PosId = "";
PlateH = 12;
PlateW =7;
TrayNumber = trayCode;
}
public InOutParam(int trayCode, string wareNum, string posId, int plateH, int plateW,bool instoreNg=false)
{ {
WareCode = wareNum; WareCode = barcode;
PosId = posId; PosId = posId;
this.PlateW = plateW; this.PlateW = plateW;
this.PlateH = plateH; this.PlateH = plateH;
this.TrayNumber = trayCode; this.TrayNumber = trayCode;
this.InStoreNg = instoreNg; this.InStoreNg = instoreNg;
this.urgentReel = urgentReel;
this.cutReel = cutReel;
this.smallReel = smallReel;
this.rfid = rfid;
this.rfidLoc = rfidLoc;
} }
/// <summary> /// <summary>
...@@ -67,7 +63,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -67,7 +63,8 @@ namespace OnlineStore.DeviceLibrary
public string ToStr() public string ToStr()
{ {
return "TrayNumber[" + TrayNumber + "],WareCode[" + WareCode + "],PosId[" + PosId + "],plateW[" + PlateW + "],plateH[" + PlateH + "],InStoreNg["+InStoreNg+"]"; return "TrayNumber[" + TrayNumber + "],WareCode[" + WareCode + "],PosId[" + PosId + "],plateW[" + PlateW + "],plateH[" + PlateH + "],InStoreNg[" + InStoreNg +
"]urgentReel [" + urgentReel + "],cutReel [" + cutReel + "],smallReel [" + smallReel + "],rfid [" + rfid + "],rfidLoc [" + rfidLoc + "]";
} }
/// <summary> /// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1 /// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
...@@ -92,5 +89,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -92,5 +89,32 @@ namespace OnlineStore.DeviceLibrary
} }
return -1; return -1;
} }
/// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
public bool urgentReel { get; set; }
/// <summary>
/// cutReel: true 表示分盘料,需要出到料串上
/// </summary>
public bool cutReel { get; set; }
/// <summary>
/// smallReel: true 小料(7x8),放置到小料架上
/// </summary>
public bool smallReel { get; set; }
/// <summary>
/// rfid: 分配的料架RFID
/// </summary>
public string rfid { get; set; }
/// <summary>
/// rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线,
/// 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线,
/// 70,71,72时只能分配到3 / 4号皮带线;
/// 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3/ 4号皮带线
/// </summary>
public int rfidLoc { get; set; }
} }
} }
...@@ -239,9 +239,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -239,9 +239,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
MI_14_BeforeAfterCylinderAfter = 3014, MI_14_BeforeAfterCylinderAfter = 3014,
/// <summary> /// <summary>
///移载装置入库处理,,前后气缸已后退,通知料仓入库
/// </summary>
MI_15_SendPosToStore = 3015,
/// <summary>
///移载装置入库处理,检测到X102-1=1送料流程完成 ///移载装置入库处理,检测到X102-1=1送料流程完成
/// </summary> /// </summary>
MI_15_SendEnd = 3015, MI_16_SendEnd = 3016,
/// <summary> /// <summary>
///移载装置入库处理,编码不一致,顶升气缸1下降 ///移载装置入库处理,编码不一致,顶升气缸1下降
/// </summary> /// </summary>
......
...@@ -12,39 +12,45 @@ namespace OnlineStore.DeviceLibrary ...@@ -12,39 +12,45 @@ 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.IsFull = isFull;
// this.InOrOutStore = inOrOut;
//}
public TrayInfo(int trayNum, bool isFull, int inOrOut = 0, InOutParam inoutParam = null)
{ {
this.TrayCode = trayNum; this.TrayCode = trayNum;
this.IsFull = isFull; this.IsFull = isFull;
this.InOrOutStore = inOrOut; this.InOrOutStore = inOrOut;
} //this.WareCode = wareCode;
public TrayInfo(int trayNum, bool isFull, int inOrOut, string wareCode, string posId, int plateH, int plateW) //this.PosId = posId;
//this.PlateH = plateH;
//this.PlateW = plateW;
if (inoutParam == null)
{ {
this.TrayCode = trayNum; inoutParam = new InOutParam();
this.IsFull = isFull; }
this.InOrOutStore = inOrOut; this.inoutPar = inoutParam;
this.WareCode = wareCode; // InStoreNG = false;
this.PosId = posId; ShowMsg = "";
this.PlateH = plateH;
this.PlateW = plateW;
InStoreNG = false;
NgMsg = "";
} }
public string ToStr() public string ToStr()
{ {
string type = "无操作"; string type = "无操作";
if (InOrOutStore.Equals(1)) if (InOrOutStore.Equals(1))
{ {
type = "入库"; type = inoutPar.InStoreNg ? "[入料失败:" + ShowMsg + "]" : "入料" + "[" + inoutPar.ToStr() + "]";
} }
else if(InOrOutStore.Equals(2)) else if (InOrOutStore.Equals(2))
{ {
type = "出库"; type = inoutPar.urgentReel ? "[紧急出料]" : "出料[ " + inoutPar.ToStr() + " ]";
} }
string err =InStoreNG? "[入库失败:"+NgMsg+"]":"";
string jinji = EmergencyOut ? "[紧急出料]" : ""; //return "托盘 [" + TrayCode + "] [" + (IsFull ? "有料" : "空") +"] ["+ type +
return "托盘 [" + TrayCode + "] [" + (IsFull ? "有料" : "空") +"] ["+ type + // "]二维码[" + WareCode + "]库位号[" + PosId + "] [" + PlateW + "X" + PlateH+ "] " + err + " "+ jinji + "" ;
"]二维码[" + WareCode + "]库位号[" + PosId + "] [" + PlateW + "X" + PlateH+ "] " + err + " "+ jinji + "" ; return "托盘 [" + TrayCode + "] [" + (IsFull ? "有料" : "空") + "] [" + type + "]";
} }
/// <summary> /// <summary>
/// 夹具编码值(1-32?) /// 夹具编码值(1-32?)
...@@ -59,29 +65,47 @@ namespace OnlineStore.DeviceLibrary ...@@ -59,29 +65,47 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public int InOrOutStore = 0; public int InOrOutStore = 0;
/// <summary> ///// <summary>
/// 物品二维码信息 ///// 物品二维码信息
/// </summary> ///// </summary>
public string WareCode = ""; //public string WareCode = "";
/// <summary> ///// <summary>
/// 位置名(对应配置表的位置) ///// 位置名(对应配置表的位置)
/// </summary> ///// </summary>
public string PosId = ""; //public string PosId = "";
/// <summary> ///// <summary>
/// 料盘高度 ///// 料盘高度
/// </summary> ///// </summary>
public int PlateH = 0; //public int PlateH = 0;
/// <summary> ///// <summary>
/// 料盘宽度 ///// 料盘宽度
/// </summary> ///// </summary>
public int PlateW = 0; //public int PlateW = 0;
/// <summary> /// <summary>
/// 入库失败料盘,未扫到码或获取库位号失败 /// 入库失败料盘,未扫到码或获取库位号失败
/// </summary> /// </summary>
public bool InStoreNG = false; // public bool InStoreNG = false;
public string NgMsg = ""; public string ShowMsg = "";
//public bool EmergencyOut = false;
public bool EmergencyOut = false; private InOutParam inoutPar = null;
public InOutParam InoutPar
{
get
{
if (inoutPar == null)
{
inoutPar = new InOutParam();
}
inoutPar.TrayNumber = TrayCode;
return inoutPar;
}
set
{
this.inoutPar = value;
}
}
} }
/// <summary> /// <summary>
/// 托盘上的物料的类型 /// 托盘上的物料的类型
...@@ -98,14 +122,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -98,14 +122,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
internal static int OutStore = 2; internal static int OutStore = 2;
/// <summary> ///// <summary>
/// 紧急出库料盘 ///// 紧急出库料盘
/// </summary> ///// </summary>
internal static int OutStore_Equip = 3; //internal static int OutStore_Equip = 3;
/// <summary> ///// <summary>
/// 入库失败需要NG气缸退出的料盘 ///// 入库失败需要NG气缸退出的料盘
/// </summary> ///// </summary>
internal static int InStoreNG = 4; //internal static int InStoreNG = 4;
} }
} }
...@@ -366,13 +366,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -366,13 +366,21 @@ namespace OnlineStore.DeviceLibrary
} }
else if (cmd.StartsWith(cmd_outend)) else if (cmd.StartsWith(cmd_outend))
{ {
if (storeSMsg.data == null)
{
LogUtil.info("收到【" + client.AddStr + "】的出库完成消息【" + msg + "】出库信息为空,不处理");
}
else
{
LogUtil.info("收到【" + client.AddStr + "】的出库完成消息【" + msg + "】"); LogUtil.info("收到【" + client.AddStr + "】的出库完成消息【" + msg + "】");
string posId = storeSMsg.PosId; string posId = storeSMsg.data.posId;
int plateH = Convert.ToInt32(storeSMsg.PlateH.Trim()); int plateH = Convert.ToInt32(storeSMsg.data.plateH.Trim());
int plateW = Convert.ToInt32(storeSMsg.PlateW.Trim()); int plateW = Convert.ToInt32(storeSMsg.data.plateW.Trim());
InOutParam param = new InOutParam(0, "", posId, plateH, plateW); InOutParam param = new InOutParam(0, storeSMsg.data.barcode, posId, plateH, plateW,false,
storeSMsg.data.urgentReel,storeSMsg.data.cutReel,storeSMsg.data.smallReel,storeSMsg.data.rfid,storeSMsg.data.rfidLoc);
LineManager.Line.boxBean_OutStoreEnd(id, param); LineManager.Line.boxBean_OutStoreEnd(id, param);
} }
}
//给客户端返回消息 //给客户端返回消息
int canOutStore = LineManager.Line.CanOutStore(id) ? 1 : 0; int canOutStore = LineManager.Line.CanOutStore(id) ? 1 : 0;
...@@ -438,14 +446,48 @@ namespace OnlineStore.DeviceLibrary ...@@ -438,14 +446,48 @@ namespace OnlineStore.DeviceLibrary
public int SRunStatus = 0; public int SRunStatus = 0;
public int DoorHasTray = 0; public int DoorHasTray = 0;
public int AlarmType = 0; public int AlarmType = 0;
public string PosId = ""; //public string PosId = "";
public string PlateH = "0"; //public string PlateH = "0";
public string PlateW = "0"; //public string PlateW = "0";
///// <summary>
///// 目标料架
///// </summary>
//public string tShelfI = "";
public List<string> WaitInStoreList = new List<string>();
public InOutData data = null;
}
public class InOutData
{
public string posId = "";
public string plateW = "0";
public string plateH = "0";
/// <summary> /// <summary>
/// 目标料架 /// urgentReel: true 表示紧急料,需要出到料串上
/// </summary> /// </summary>
public string tShelfI = ""; public bool urgentReel = false;
public List<string> WaitInStoreList = new List<string>(); /// <summary>
/// cutReel: true 表示分盘料,需要出到料串上
/// </summary>
public bool cutReel = false;
/// <summary>
/// smallReel: true 小料(7x8),放置到小料架上
/// </summary>
public bool smallReel = false;
/// <summary>
/// rfid: 分配的料架RFID
/// </summary>
public string rfid = "";
/// <summary>
/// rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线,
/// 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线,
/// 70,71,72时只能分配到3 / 4号皮带线;
/// 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3/ 4号皮带线
/// </summary>
public int rfidLoc = 0;
public string barcode = "";
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!