增加NG料盘搬运到INPUT料仓流程

master
lhiven 1 year ago
parent cacdcb4f19
commit 2b8676599a

@ -0,0 +1,66 @@
using Rs.AutoDischarge.V3.Flow;
using Rs.MotionPlat.Commom;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Rs.MotionPlat.Flow.SubFlow
{
enum ENgTrayToInputTrayFlowStep
{
}
/// <summary>
/// 重测NG时把Ng料盘搬运到Input料仓
/// </summary>
public class NgTrayToInputTrayFlow
{
private NgTrayToInputTrayFlow() { }
private static NgTrayToInputTrayFlow instance;
public static NgTrayToInputTrayFlow Instance
{
get
{
if(instance==null)
instance = new NgTrayToInputTrayFlow();
return instance;
}
}
public void MoveToInput()
{
if (Ops.IsOn("2号料仓料盘到位光电检测"))
{
TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty1, null, null, () => {
Task.Run(() => {
StockManager.Instance.GetStock(ETrayType.Empty1).Unload(EStockTrayUnLoadMode.Whole, null);
});
});
}
while (true)
{
if(Ops.IsOff("4号料仓料盘到位光电检测"))//如果ng料仓处没有料盘
{
if(Ops.IsOn("4号料仓缺盘光电检测"))//如果还有需要搬运的料盘
{
StockManager.Instance.GetStock(ETrayType.Ng).Load(EStockTrayLoadMode.Whole, null);
}
else
{
//没有料盘需要搬运了
break;
}
}
TakeTrayFlow.Instance.Take(ETrayType.Ng, ETrayType.Input, null, null, () =>{
StockManager.Instance.GetStock(ETrayType.Input).Unload(EStockTrayUnLoadMode.Whole, null);
});
}
}
}
}

@ -212,6 +212,7 @@
<Compile Include="Flow\MachineManage.cs" />
<Compile Include="Flow\MonitorSystemButton.cs" />
<Compile Include="Flow\SubFlow\FiberWarningPressFlow.cs" />
<Compile Include="Flow\SubFlow\NgTrayToInputTrayFlow.cs" />
<Compile Include="Flow\SubFlow\TestFixtureVacSuctionCheckFlow.cs" />
<Compile Include="Flow\SubFlow\TurnoverDumpFlow.cs" />
<Compile Include="Flow\SubFlow\UpCameraScanBarCodeFlow.cs" />

@ -56,6 +56,7 @@
this.button20 = new System.Windows.Forms.Button();
this.button21 = new System.Windows.Forms.Button();
this.button22 = new System.Windows.Forms.Button();
this.button23 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnTurnoverSlotException
@ -338,11 +339,22 @@
this.button22.UseVisualStyleBackColor = true;
this.button22.Click += new System.EventHandler(this.button22_Click);
//
// button23
//
this.button23.Location = new System.Drawing.Point(202, 96);
this.button23.Name = "button23";
this.button23.Size = new System.Drawing.Size(152, 37);
this.button23.TabIndex = 2;
this.button23.Text = "NgToInput";
this.button23.UseVisualStyleBackColor = true;
this.button23.Click += new System.EventHandler(this.button23_Click);
//
// TestFrm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1336, 854);
this.Controls.Add(this.button23);
this.Controls.Add(this.button14);
this.Controls.Add(this.button12);
this.Controls.Add(this.button11);
@ -407,5 +419,6 @@
private System.Windows.Forms.Button button20;
private System.Windows.Forms.Button button21;
private System.Windows.Forms.Button button22;
private System.Windows.Forms.Button button23;
}
}

@ -203,5 +203,12 @@ namespace Rs.MotionPlat
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3");
MsgBox.ShowDialog(AlarmConstID., alarminfo, ETipButton.Retry| ETipButton.Cancel);
}
private void button23_Click(object sender, EventArgs e)
{
Task.Run(() => {
NgTrayToInputTrayFlow.Instance.MoveToInput();
});
}
}
}

Loading…
Cancel
Save