From 2b8676599a286a3b4775d35e9867223933854192 Mon Sep 17 00:00:00 2001
From: lhiven <236881222@qq.com>
Date: Wed, 3 Jan 2024 15:23:21 +0900
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0NG=E6=96=99=E7=9B=98=E6=90=AC?=
=?UTF-8?q?=E8=BF=90=E5=88=B0INPUT=E6=96=99=E4=BB=93=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Flow/SubFlow/NgTrayToInputTrayFlow.cs | 66 +++++++++++++++++++
Rs.SkyLine/Rs.SkyLine.csproj | 1 +
Rs.SkyLine/TestFrm.Designer.cs | 13 ++++
Rs.SkyLine/TestFrm.cs | 7 ++
4 files changed, 87 insertions(+)
create mode 100644 Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs
diff --git a/Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs b/Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs
new file mode 100644
index 0000000..0a500c2
--- /dev/null
+++ b/Rs.SkyLine/Flow/SubFlow/NgTrayToInputTrayFlow.cs
@@ -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
+ {
+
+ }
+
+ ///
+ /// 重测NG时把Ng料盘搬运到Input料仓
+ ///
+ 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);
+ });
+ }
+ }
+ }
+}
diff --git a/Rs.SkyLine/Rs.SkyLine.csproj b/Rs.SkyLine/Rs.SkyLine.csproj
index 2835ad3..52ee3d6 100644
--- a/Rs.SkyLine/Rs.SkyLine.csproj
+++ b/Rs.SkyLine/Rs.SkyLine.csproj
@@ -212,6 +212,7 @@
+
diff --git a/Rs.SkyLine/TestFrm.Designer.cs b/Rs.SkyLine/TestFrm.Designer.cs
index bb3194a..76a9b76 100644
--- a/Rs.SkyLine/TestFrm.Designer.cs
+++ b/Rs.SkyLine/TestFrm.Designer.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;
}
}
\ No newline at end of file
diff --git a/Rs.SkyLine/TestFrm.cs b/Rs.SkyLine/TestFrm.cs
index 1fb6259..de83089 100644
--- a/Rs.SkyLine/TestFrm.cs
+++ b/Rs.SkyLine/TestFrm.cs
@@ -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();
+ });
+ }
}
}