From 4f3bf55ea46b64ce6c0c6cec5859759aa7d06d4b Mon Sep 17 00:00:00 2001 From: lhiven Date: Sat, 22 Jun 2024 16:41:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=92=E6=96=99=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.DeweyTester/Entitys/TestFixtureManager.cs | 3 +- Rs.DeweyTester/Entitys/TestProduct.cs | 2 + .../Flow/NormalFlow/DischargeFlow.cs | 6 +++ .../Flow/NormalFlow/TakeTrayFlow.cs | 4 ++ Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs | 2 +- Rs.DeweyTester/FormMain.cs | 12 ++++-- Rs.DeweyTester/FormMain.designer.cs | 42 +++++++++++++------ 7 files changed, 54 insertions(+), 17 deletions(-) diff --git a/Rs.DeweyTester/Entitys/TestFixtureManager.cs b/Rs.DeweyTester/Entitys/TestFixtureManager.cs index 7d0b867..998648f 100644 --- a/Rs.DeweyTester/Entitys/TestFixtureManager.cs +++ b/Rs.DeweyTester/Entitys/TestFixtureManager.cs @@ -431,8 +431,9 @@ namespace Rs.MotionPlat.Entitys string msg = string.Empty; if(string.IsNullOrEmpty(sn)) { + //StartTest#SN#Machine#User#Config#Lot#Mode#SiteID#ProjectID#RetryMode#Mes#Mtcp#configD#DualMode#TakeIndex#SubLotName$ //msg = $"StartTest#{Product.SN}#MS001#OP#DXD#GRR_GRR_DXD_202203120320#Production#LF1#MOS#T1#0#0#Paint#0#R1C5#SP0012#1$"; - msg = $"StartTest#{Product.SN}#{GlobalVar.MachineID}#op#{GlobalVar.Config}#{GlobalVar.LotName}#{GlobalVar.TestMode}#{GlobalVar.SiteID}#{GlobalVar.ProjectID}#T1#0#{mtcp}#{GlobalVar.Config}#0#R1C1#{GlobalVar.SubLotName}#{noise}$"; + msg = $"StartTest#{Product.SN}#{GlobalVar.MachineID}#op#{GlobalVar.ConfigName}#{GlobalVar.LotName}#{GlobalVar.TestMode}#{GlobalVar.SiteID}#{GlobalVar.ProjectID}#T1#0#{mtcp}#{GlobalVar.Config}#0#{Product.From}#{GlobalVar.SubLotName}#{noise}$"; } else { diff --git a/Rs.DeweyTester/Entitys/TestProduct.cs b/Rs.DeweyTester/Entitys/TestProduct.cs index 178642a..952186c 100644 --- a/Rs.DeweyTester/Entitys/TestProduct.cs +++ b/Rs.DeweyTester/Entitys/TestProduct.cs @@ -33,6 +33,8 @@ namespace Rs.MotionPlat.Entitys public string Result { get; set; } + public string From { get; set; } + public void AddResult(int fixtureIndex,string result) { diff --git a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs index b944562..ca01f50 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs @@ -230,6 +230,7 @@ namespace Rs.MotionPlat.Flow DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty); GlobalTray.InputTray.ChangeStatus(ESlotStatus.Have); + takeSlotIndex = 1; } } } @@ -511,6 +512,8 @@ namespace Rs.MotionPlat.Flow //这里先方到OK料仓 if(placeNozzle.Product.Result=="true") { + logInfo = GetClassName()+$"检查到吸嘴{placeNozzle.NozzleIndex}号吸嘴产品检测结果{placeNozzle.Product.Result}"; + MessageQueue.Instance.Insert(logInfo); TraySlot waitPlaceSlot = GlobalTray.OkTary.GetSlot(ESlotStatus.NotHave); if (waitPlaceSlot != null) { @@ -522,11 +525,14 @@ namespace Rs.MotionPlat.Flow DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); TakeTrayFlow.Instance.Take(ETrayType.Empty, ETrayType.Ok); GlobalTray.OkTary.ChangeStatus(ESlotStatus.NotHave); + ThreePointLocationFlow.Instance.Location(ETrayType.Ok); //料盘已满 } } else { + logInfo = GetClassName() + $"检查到吸嘴{placeNozzle.NozzleIndex}号吸嘴产品检测结果{placeNozzle.Product.Result}"; + MessageQueue.Instance.Insert(logInfo); TraySlot waitPlaceSlot = GlobalTray.NgTray.GetSlot(ESlotStatus.NotHave); if (waitPlaceSlot != null) { diff --git a/Rs.DeweyTester/Flow/NormalFlow/TakeTrayFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/TakeTrayFlow.cs index 59a0bf0..f157e55 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/TakeTrayFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/TakeTrayFlow.cs @@ -339,6 +339,10 @@ namespace Rs.MotionPlat.Flow step = ETakeTrayFlowStep.到放料盘上方; } } + else + { + step = ETakeTrayFlowStep.到放料盘上方; + } break; case ETakeTrayFlowStep.到放料盘上方: diff --git a/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs b/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs index 06903bc..c061bde 100644 --- a/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs @@ -167,7 +167,7 @@ namespace Rs.MotionPlat.Flow.SubFlow if (curNozzle.HasProduct()|| GlobalVar.RunSpace) { //curNozzle.Product = new TestProduct() { SN = VirtualBarCode.Code, TestNum = 0 }; - curNozzle.Product = new TestProduct() { SN = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex).SN, TestNum = 0 }; + curNozzle.Product = new TestProduct() { SN = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex).SN, TestNum = 0,From= $"R{waitTakeProductSlot.Row+1}C{waitTakeProductSlot.Column+1}" }; curNozzle.Status = ENozzleStatus.ToTest; //curNozzle.Status = ENozzleStatus.ToUnload; GlobalTray.NozzleTray.ChangeStatus(curNozzle.NozzleIndex, ESlotStatus.Have); diff --git a/Rs.DeweyTester/FormMain.cs b/Rs.DeweyTester/FormMain.cs index ad05f42..d021d4e 100644 --- a/Rs.DeweyTester/FormMain.cs +++ b/Rs.DeweyTester/FormMain.cs @@ -601,14 +601,20 @@ namespace Rs.MotionPlat private void btnLight_Click(object sender, EventArgs e) { - if(Ops.IsOutOn("照明")) + if(Ops.IsOutOn("照明灯")) { - Ops.Off("照明"); + Ops.Off("照明灯"); } else { - Ops.On("照明"); + Ops.On("照明灯"); } } + + private void btnSelectProduct_Click(object sender, EventArgs e) + { + SelectProductFrm selectPro = new SelectProductFrm(); + selectPro.ShowDialog(); + } } } diff --git a/Rs.DeweyTester/FormMain.designer.cs b/Rs.DeweyTester/FormMain.designer.cs index 0042b82..67dd7c6 100644 --- a/Rs.DeweyTester/FormMain.designer.cs +++ b/Rs.DeweyTester/FormMain.designer.cs @@ -76,6 +76,7 @@ namespace Rs.MotionPlat this.panel12 = new System.Windows.Forms.Panel(); this.btnClearData = new System.Windows.Forms.Button(); this.panel13 = new System.Windows.Forms.Panel(); + this.btnLight = new System.Windows.Forms.Button(); this.panel14 = new System.Windows.Forms.Panel(); this.panel15 = new System.Windows.Forms.Panel(); this.cboxTestMode = new System.Windows.Forms.ComboBox(); @@ -149,7 +150,7 @@ namespace Rs.MotionPlat this.timertc4 = new System.Windows.Forms.Timer(this.components); this.timertc5 = new System.Windows.Forms.Timer(this.components); this.timertc6 = new System.Windows.Forms.Timer(this.components); - this.btnLight = new System.Windows.Forms.Button(); + this.btnSelectProduct = new System.Windows.Forms.Button(); this.panel1.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); this.panel3.SuspendLayout(); @@ -175,6 +176,7 @@ namespace Rs.MotionPlat this.panel11.SuspendLayout(); this.panel12.SuspendLayout(); this.panel13.SuspendLayout(); + this.panel14.SuspendLayout(); this.panel15.SuspendLayout(); this.panel6.SuspendLayout(); this.tableLayoutPanel6.SuspendLayout(); @@ -768,8 +770,22 @@ namespace Rs.MotionPlat this.panel13.Size = new System.Drawing.Size(119, 36); this.panel13.TabIndex = 3; // + // btnLight + // + this.btnLight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); + this.btnLight.FlatAppearance.BorderSize = 0; + this.btnLight.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnLight.Location = new System.Drawing.Point(16, 1); + this.btnLight.Name = "btnLight"; + this.btnLight.Size = new System.Drawing.Size(88, 32); + this.btnLight.TabIndex = 0; + this.btnLight.Text = "Light"; + this.btnLight.UseVisualStyleBackColor = false; + this.btnLight.Click += new System.EventHandler(this.btnLight_Click); + // // panel14 // + this.panel14.Controls.Add(this.btnSelectProduct); this.panel14.Dock = System.Windows.Forms.DockStyle.Fill; this.panel14.Location = new System.Drawing.Point(88, 219); this.panel14.Name = "panel14"; @@ -1703,18 +1719,18 @@ namespace Rs.MotionPlat this.timertc6.Interval = 500; this.timertc6.Tick += new System.EventHandler(this.timertc6_Tick); // - // btnLight + // btnSelectProduct // - this.btnLight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); - this.btnLight.FlatAppearance.BorderSize = 0; - this.btnLight.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnLight.Location = new System.Drawing.Point(16, 1); - this.btnLight.Name = "btnLight"; - this.btnLight.Size = new System.Drawing.Size(88, 32); - this.btnLight.TabIndex = 0; - this.btnLight.Text = "Light"; - this.btnLight.UseVisualStyleBackColor = false; - this.btnLight.Click += new System.EventHandler(this.btnLight_Click); + this.btnSelectProduct.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); + this.btnSelectProduct.FlatAppearance.BorderSize = 0; + this.btnSelectProduct.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSelectProduct.Location = new System.Drawing.Point(16, 3); + this.btnSelectProduct.Name = "btnSelectProduct"; + this.btnSelectProduct.Size = new System.Drawing.Size(88, 32); + this.btnSelectProduct.TabIndex = 0; + this.btnSelectProduct.Text = "挑料"; + this.btnSelectProduct.UseVisualStyleBackColor = false; + this.btnSelectProduct.Click += new System.EventHandler(this.btnSelectProduct_Click); // // FormMain // @@ -1755,6 +1771,7 @@ namespace Rs.MotionPlat this.panel11.ResumeLayout(false); this.panel12.ResumeLayout(false); this.panel13.ResumeLayout(false); + this.panel14.ResumeLayout(false); this.panel15.ResumeLayout(false); this.panel6.ResumeLayout(false); this.tableLayoutPanel6.ResumeLayout(false); @@ -1891,5 +1908,6 @@ namespace Rs.MotionPlat private System.Windows.Forms.Label label5; private System.Windows.Forms.Button btnClearData; private System.Windows.Forms.Button btnLight; + private System.Windows.Forms.Button btnSelectProduct; } } \ No newline at end of file