Commit 1747cc6c LN

20210207

1,料仓门口有料没入库的问题,
2,增加流水线示意图,
3,扫码更新
1 个父辈 cdf396fc
此文件类型无法预览
此文件类型无法预览
...@@ -277,6 +277,9 @@ ...@@ -277,6 +277,9 @@
<Install>false</Install> <Install>false</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="image\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
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.chbSaveImage = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.chbSaveImage = new System.Windows.Forms.CheckBox();
this.chbShunt2 = new System.Windows.Forms.CheckBox(); this.chbShunt2 = new System.Windows.Forms.CheckBox();
this.btnShunt2Reset = new System.Windows.Forms.Button(); this.btnShunt2Reset = new System.Windows.Forms.Button();
this.btnShuntReset = new System.Windows.Forms.Button(); this.btnShuntReset = new System.Windows.Forms.Button();
...@@ -67,6 +67,8 @@ ...@@ -67,6 +67,8 @@
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.tabPage2 = new System.Windows.Forms.TabPage();
this.picLine = new System.Windows.Forms.PictureBox();
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.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
...@@ -119,6 +121,8 @@ ...@@ -119,6 +121,8 @@
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picLine)).BeginInit();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -129,6 +133,7 @@ ...@@ -129,6 +133,7 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.tabControl1.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabControl1.Location = new System.Drawing.Point(8, 81); this.tabControl1.Location = new System.Drawing.Point(8, 81);
...@@ -156,6 +161,17 @@ ...@@ -156,6 +161,17 @@
this.tabPage1.Text = "状态信息"; this.tabPage1.Text = "状态信息";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// panel1
//
this.panel1.Controls.Add(this.chbSaveImage);
this.panel1.Controls.Add(this.chbShunt2);
this.panel1.Controls.Add(this.btnShunt2Reset);
this.panel1.Controls.Add(this.btnShuntReset);
this.panel1.Location = new System.Drawing.Point(720, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(179, 157);
this.panel1.TabIndex = 199;
//
// chbSaveImage // chbSaveImage
// //
this.chbSaveImage.AutoSize = true; this.chbSaveImage.AutoSize = true;
...@@ -168,17 +184,6 @@ ...@@ -168,17 +184,6 @@
this.chbSaveImage.UseVisualStyleBackColor = true; this.chbSaveImage.UseVisualStyleBackColor = true;
this.chbSaveImage.CheckedChanged += new System.EventHandler(this.chbSaveImage_CheckedChanged); this.chbSaveImage.CheckedChanged += new System.EventHandler(this.chbSaveImage_CheckedChanged);
// //
// panel1
//
this.panel1.Controls.Add(this.chbSaveImage);
this.panel1.Controls.Add(this.chbShunt2);
this.panel1.Controls.Add(this.btnShunt2Reset);
this.panel1.Controls.Add(this.btnShuntReset);
this.panel1.Location = new System.Drawing.Point(720, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(179, 157);
this.panel1.TabIndex = 199;
//
// chbShunt2 // chbShunt2
// //
this.chbShunt2.AutoSize = true; this.chbShunt2.AutoSize = true;
...@@ -568,6 +573,25 @@ ...@@ -568,6 +573,25 @@
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);
// //
// tabPage2
//
this.tabPage2.Controls.Add(this.picLine);
this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(1328, 609);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 示意图 ";
this.tabPage2.UseVisualStyleBackColor = true;
//
// picLine
//
this.picLine.Dock = System.Windows.Forms.DockStyle.Fill;
this.picLine.Location = new System.Drawing.Point(0, 0);
this.picLine.Name = "picLine";
this.picLine.Size = new System.Drawing.Size(1328, 609);
this.picLine.TabIndex = 0;
this.picLine.TabStop = false;
//
// lblStatus // lblStatus
// //
this.lblStatus.AutoSize = true; this.lblStatus.AutoSize = true;
...@@ -944,6 +968,8 @@ ...@@ -944,6 +968,8 @@
this.groupBox3.PerformLayout(); this.groupBox3.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.tabPage2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picLine)).EndInit();
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
...@@ -1037,6 +1063,8 @@ ...@@ -1037,6 +1063,8 @@
private System.Windows.Forms.ToolStripMenuItem aGVCancelStateToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem aGVCancelStateToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator17; private System.Windows.Forms.ToolStripSeparator toolStripSeparator17;
private System.Windows.Forms.CheckBox chbSaveImage; private System.Windows.Forms.CheckBox chbSaveImage;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.PictureBox picLine;
} }
} }
...@@ -145,6 +145,7 @@ namespace OnlineStore.AssemblyLine ...@@ -145,6 +145,7 @@ namespace OnlineStore.AssemblyLine
cmbTrayType.SelectedIndex = 0; cmbTrayType.SelectedIndex = 0;
cmbTray.SelectedIndex = 0; cmbTray.SelectedIndex = 0;
LogUtil.logBox = this.logBox; LogUtil.logBox = this.logBox;
picLine.Image = UserFromControl.ImageManager.imgLine;
LoadOk = true; LoadOk = true;
HideForm(); HideForm();
lastLogTime = DateTime.Now.AddMinutes(-10); lastLogTime = DateTime.Now.AddMinutes(-10);
...@@ -558,11 +559,12 @@ namespace OnlineStore.AssemblyLine ...@@ -558,11 +559,12 @@ namespace OnlineStore.AssemblyLine
} }
} }
} }
lblWarnMsg.Text = warnMsg;
if (!listView1.Visible) if (!listView1.Visible)
{ {
return; return;
} }
lblWarnMsg.Text = warnMsg;
int i = 0; int i = 0;
int item_debug_index = 1; int item_debug_index = 1;
......
20210204.增加一台小料仓 20210207
1,料仓门口有料没入库的问题,
2,增加流水线示意图,
3,扫码更新
20210204.增加一台小料仓
app.config中,移栽数量改为20. app.config中,移栽数量改为20.
......
...@@ -422,21 +422,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -422,21 +422,34 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore); MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",通知BOX开始入库,等待3000"); InLog("入库 " + MoveInfo.SLog + ",通知BOX开始入库,等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
//此时box就可以入库操作了 //触发事件,BOX入库
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam); LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
sendCount = 1;
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendPosToStore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendPosToStore))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_16_SendEnd); if (!LineServer.IsInStorePro(DeviceID, MoveInfo.MoveParam.PosId))
//判断料仓是否在入库中,如果么有在入库中,需要重新发送入库消息
if (!LineServer.IsInStorePro(DeviceID))
{ {
InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令"); //InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令");
//LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",再次通知BOX开始入库,等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam); LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
sendCount++;
if (sendCount >= 3)
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + " 等待BOX开始入库超时 已发送" + sendCount + "次";
LogUtil.error(WarnMsg);
Alarm(LineAlarmType.IoSingleTimeOut);
}
} }
else else
{ {
InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓已开始入库"); sendCount = 0;
LogInfo("入库【" + posId + "】处理(移栽)全部完成!");
MoveEndS();
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_16_SendEnd)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_16_SendEnd))
...@@ -446,6 +459,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -446,6 +459,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private int sendCount = 0;
private void MI_08_WaitBox() private void MI_08_WaitBox()
{ {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
...@@ -748,13 +762,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -748,13 +762,15 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.TimeOutSeconds = 20; SecondMoveInfo.TimeOutSeconds = 20;
} }
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_FixtureCheck)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_FixtureCheck))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 再次等待托盘信号"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 再次等待托盘信号");
// IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down))
......
...@@ -91,7 +91,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -91,7 +91,7 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
public static bool IsInStorePro(int id) public static bool IsInStorePro(int id, string posId)
{ {
BoxInfo box = GetBoxInfo(id); BoxInfo box = GetBoxInfo(id);
TimeSpan span = DateTime.Now - box.LastMsgTime; TimeSpan span = DateTime.Now - box.LastMsgTime;
...@@ -106,6 +106,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -106,6 +106,11 @@ namespace OnlineStore.DeviceLibrary
{ {
if (status.Equals(LineStatus.InStoreEnd) || status.Equals(LineStatus.InStoreExecute)) if (status.Equals(LineStatus.InStoreEnd) || status.Equals(LineStatus.InStoreExecute))
{ {
if (box.WaitInStoreList != null && box.WaitInStoreList.Contains(posId))
{
LogUtil.error("IsInStorePro[" + id + "][" + posId + "],库位还在入库等待列表中,返回false");
return false;
}
return true; return true;
} }
} }
...@@ -281,6 +286,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,6 +286,14 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error("StartInStore【" + id + "】【" + msg + "】失败"); LogUtil.error("StartInStore【" + id + "】【" + msg + "】失败");
} }
else
{
LogUtil.info("StartInStore【" + id + "】【" + msg + "】成功");
}
}
else
{
LogUtil.error("StartInStore【" + id + "】【" + param.ToStr() + "】失败:料仓不在线");
} }
return false; return false;
} }
......
...@@ -12,6 +12,7 @@ namespace UserFromControl ...@@ -12,6 +12,7 @@ namespace UserFromControl
{ {
public static Image imgGrey; public static Image imgGrey;
public static Image imgGreen; public static Image imgGreen;
public static Image imgLine;
/// <summary> /// <summary>
/// 是否已经初始化过了 /// 是否已经初始化过了
/// </summary> /// </summary>
...@@ -23,6 +24,7 @@ namespace UserFromControl ...@@ -23,6 +24,7 @@ namespace UserFromControl
IsInit = true; IsInit = true;
imgGrey = Image.FromFile(Application.StartupPath + "\\image\\gray2.png"); imgGrey = Image.FromFile(Application.StartupPath + "\\image\\gray2.png");
imgGreen = Image.FromFile(Application.StartupPath+"\\image\\green.png"); imgGreen = Image.FromFile(Application.StartupPath+"\\image\\green.png");
imgLine = Image.FromFile(Application.StartupPath + "\\image\\line.png");
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -93,6 +93,9 @@ ...@@ -93,6 +93,9 @@
<Content Include="image\green1.png"> <Content Include="image\green1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="image\line.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!