优化排料流程

master
lhiven 12 months ago
parent 1959675d77
commit 4f3bf55ea4

@ -431,8 +431,9 @@ namespace Rs.MotionPlat.Entitys
string msg = string.Empty; string msg = string.Empty;
if(string.IsNullOrEmpty(sn)) 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}#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 else
{ {

@ -33,6 +33,8 @@ namespace Rs.MotionPlat.Entitys
public string Result { get; set; } public string Result { get; set; }
public string From { get; set; }
public void AddResult(int fixtureIndex,string result) public void AddResult(int fixtureIndex,string result)
{ {

@ -230,6 +230,7 @@ namespace Rs.MotionPlat.Flow
DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty); TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty);
GlobalTray.InputTray.ChangeStatus(ESlotStatus.Have); GlobalTray.InputTray.ChangeStatus(ESlotStatus.Have);
takeSlotIndex = 1;
} }
} }
} }
@ -511,6 +512,8 @@ namespace Rs.MotionPlat.Flow
//这里先方到OK料仓 //这里先方到OK料仓
if(placeNozzle.Product.Result=="true") if(placeNozzle.Product.Result=="true")
{ {
logInfo = GetClassName()+$"检查到吸嘴{placeNozzle.NozzleIndex}号吸嘴产品检测结果{placeNozzle.Product.Result}";
MessageQueue.Instance.Insert(logInfo);
TraySlot waitPlaceSlot = GlobalTray.OkTary.GetSlot(ESlotStatus.NotHave); TraySlot waitPlaceSlot = GlobalTray.OkTary.GetSlot(ESlotStatus.NotHave);
if (waitPlaceSlot != null) if (waitPlaceSlot != null)
{ {
@ -522,11 +525,14 @@ namespace Rs.MotionPlat.Flow
DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
TakeTrayFlow.Instance.Take(ETrayType.Empty, ETrayType.Ok); TakeTrayFlow.Instance.Take(ETrayType.Empty, ETrayType.Ok);
GlobalTray.OkTary.ChangeStatus(ESlotStatus.NotHave); GlobalTray.OkTary.ChangeStatus(ESlotStatus.NotHave);
ThreePointLocationFlow.Instance.Location(ETrayType.Ok);
//料盘已满 //料盘已满
} }
} }
else else
{ {
logInfo = GetClassName() + $"检查到吸嘴{placeNozzle.NozzleIndex}号吸嘴产品检测结果{placeNozzle.Product.Result}";
MessageQueue.Instance.Insert(logInfo);
TraySlot waitPlaceSlot = GlobalTray.NgTray.GetSlot(ESlotStatus.NotHave); TraySlot waitPlaceSlot = GlobalTray.NgTray.GetSlot(ESlotStatus.NotHave);
if (waitPlaceSlot != null) if (waitPlaceSlot != null)
{ {

@ -339,6 +339,10 @@ namespace Rs.MotionPlat.Flow
step = ETakeTrayFlowStep.; step = ETakeTrayFlowStep.;
} }
} }
else
{
step = ETakeTrayFlowStep.;
}
break; break;
case ETakeTrayFlowStep.: case ETakeTrayFlowStep.:

@ -167,7 +167,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
if (curNozzle.HasProduct()|| GlobalVar.RunSpace) if (curNozzle.HasProduct()|| GlobalVar.RunSpace)
{ {
//curNozzle.Product = new TestProduct() { SN = VirtualBarCode.Code, TestNum = 0 }; //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.ToTest;
//curNozzle.Status = ENozzleStatus.ToUnload; //curNozzle.Status = ENozzleStatus.ToUnload;
GlobalTray.NozzleTray.ChangeStatus(curNozzle.NozzleIndex, ESlotStatus.Have); GlobalTray.NozzleTray.ChangeStatus(curNozzle.NozzleIndex, ESlotStatus.Have);

@ -601,14 +601,20 @@ namespace Rs.MotionPlat
private void btnLight_Click(object sender, EventArgs e) private void btnLight_Click(object sender, EventArgs e)
{ {
if(Ops.IsOutOn("照明")) if(Ops.IsOutOn("照明"))
{ {
Ops.Off("照明"); Ops.Off("照明");
} }
else else
{ {
Ops.On("照明"); Ops.On("照明");
} }
} }
private void btnSelectProduct_Click(object sender, EventArgs e)
{
SelectProductFrm selectPro = new SelectProductFrm();
selectPro.ShowDialog();
}
} }
} }

@ -76,6 +76,7 @@ namespace Rs.MotionPlat
this.panel12 = new System.Windows.Forms.Panel(); this.panel12 = new System.Windows.Forms.Panel();
this.btnClearData = new System.Windows.Forms.Button(); this.btnClearData = new System.Windows.Forms.Button();
this.panel13 = new System.Windows.Forms.Panel(); this.panel13 = new System.Windows.Forms.Panel();
this.btnLight = new System.Windows.Forms.Button();
this.panel14 = new System.Windows.Forms.Panel(); this.panel14 = new System.Windows.Forms.Panel();
this.panel15 = new System.Windows.Forms.Panel(); this.panel15 = new System.Windows.Forms.Panel();
this.cboxTestMode = new System.Windows.Forms.ComboBox(); this.cboxTestMode = new System.Windows.Forms.ComboBox();
@ -149,7 +150,7 @@ namespace Rs.MotionPlat
this.timertc4 = new System.Windows.Forms.Timer(this.components); this.timertc4 = new System.Windows.Forms.Timer(this.components);
this.timertc5 = 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.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.panel1.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout();
this.panel3.SuspendLayout(); this.panel3.SuspendLayout();
@ -175,6 +176,7 @@ namespace Rs.MotionPlat
this.panel11.SuspendLayout(); this.panel11.SuspendLayout();
this.panel12.SuspendLayout(); this.panel12.SuspendLayout();
this.panel13.SuspendLayout(); this.panel13.SuspendLayout();
this.panel14.SuspendLayout();
this.panel15.SuspendLayout(); this.panel15.SuspendLayout();
this.panel6.SuspendLayout(); this.panel6.SuspendLayout();
this.tableLayoutPanel6.SuspendLayout(); this.tableLayoutPanel6.SuspendLayout();
@ -768,8 +770,22 @@ namespace Rs.MotionPlat
this.panel13.Size = new System.Drawing.Size(119, 36); this.panel13.Size = new System.Drawing.Size(119, 36);
this.panel13.TabIndex = 3; 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 // panel14
// //
this.panel14.Controls.Add(this.btnSelectProduct);
this.panel14.Dock = System.Windows.Forms.DockStyle.Fill; this.panel14.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel14.Location = new System.Drawing.Point(88, 219); this.panel14.Location = new System.Drawing.Point(88, 219);
this.panel14.Name = "panel14"; this.panel14.Name = "panel14";
@ -1703,18 +1719,18 @@ namespace Rs.MotionPlat
this.timertc6.Interval = 500; this.timertc6.Interval = 500;
this.timertc6.Tick += new System.EventHandler(this.timertc6_Tick); 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.btnSelectProduct.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56)))));
this.btnLight.FlatAppearance.BorderSize = 0; this.btnSelectProduct.FlatAppearance.BorderSize = 0;
this.btnLight.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSelectProduct.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLight.Location = new System.Drawing.Point(16, 1); this.btnSelectProduct.Location = new System.Drawing.Point(16, 3);
this.btnLight.Name = "btnLight"; this.btnSelectProduct.Name = "btnSelectProduct";
this.btnLight.Size = new System.Drawing.Size(88, 32); this.btnSelectProduct.Size = new System.Drawing.Size(88, 32);
this.btnLight.TabIndex = 0; this.btnSelectProduct.TabIndex = 0;
this.btnLight.Text = "Light"; this.btnSelectProduct.Text = "挑料";
this.btnLight.UseVisualStyleBackColor = false; this.btnSelectProduct.UseVisualStyleBackColor = false;
this.btnLight.Click += new System.EventHandler(this.btnLight_Click); this.btnSelectProduct.Click += new System.EventHandler(this.btnSelectProduct_Click);
// //
// FormMain // FormMain
// //
@ -1755,6 +1771,7 @@ namespace Rs.MotionPlat
this.panel11.ResumeLayout(false); this.panel11.ResumeLayout(false);
this.panel12.ResumeLayout(false); this.panel12.ResumeLayout(false);
this.panel13.ResumeLayout(false); this.panel13.ResumeLayout(false);
this.panel14.ResumeLayout(false);
this.panel15.ResumeLayout(false); this.panel15.ResumeLayout(false);
this.panel6.ResumeLayout(false); this.panel6.ResumeLayout(false);
this.tableLayoutPanel6.ResumeLayout(false); this.tableLayoutPanel6.ResumeLayout(false);
@ -1891,5 +1908,6 @@ namespace Rs.MotionPlat
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button btnClearData; private System.Windows.Forms.Button btnClearData;
private System.Windows.Forms.Button btnLight; private System.Windows.Forms.Button btnLight;
private System.Windows.Forms.Button btnSelectProduct;
} }
} }
Loading…
Cancel
Save