diff --git a/Rs.DeweyTester/Commom/PadBarCode.cs b/Rs.DeweyTester/Commom/PadBarCode.cs
new file mode 100644
index 0000000..1c74c3b
--- /dev/null
+++ b/Rs.DeweyTester/Commom/PadBarCode.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Rs.MotionPlat.Commom
+{
+ public static class PadBarCode
+ {
+ public static string Pad(string sn)
+ {
+ string firstStr = sn.Substring(0, sn.Length - 3);
+ string secondStr = sn.Substring(sn.Length - 3);
+ return $"FGX{firstStr}0000RY9+{secondStr}";
+ }
+ }
+}
diff --git a/Rs.DeweyTester/Entitys/OneGrabSixteenManager.cs b/Rs.DeweyTester/Entitys/OneGrabSixteenManager.cs
index f96aae5..a4d217f 100644
--- a/Rs.DeweyTester/Entitys/OneGrabSixteenManager.cs
+++ b/Rs.DeweyTester/Entitys/OneGrabSixteenManager.cs
@@ -1,4 +1,5 @@
using Rs.Framework;
+using Rs.MotionPlat.Commom;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -78,7 +79,14 @@ namespace Rs.MotionPlat.Entitys
Result = (EOneGrabSixteenResult)Enum.Parse(typeof(EOneGrabSixteenResult), results[1]);
if (Result == EOneGrabSixteenResult.Ok)
{
- SN = results[2];
+ if (results[2].Length==11)
+ {
+ SN = PadBarCode.Pad(results[2]);
+ }
+ else
+ {
+ SN = results[2];
+ }
OffsetX = Convert.ToDouble(results[3]);
OffsetY = Convert.ToDouble(results[4]);
}
@@ -162,7 +170,11 @@ namespace Rs.MotionPlat.Entitys
_Items[index].OffsetY = 0;
if (_Items[index].Result== EOneGrabSixteenResult.Ok)
{
- if (data[2].Length==GlobalVar.BarcodeLength)
+ if (data[2].Length==11)
+ {
+ _Items[index].SN = PadBarCode.Pad(data[2]);
+ }
+ else if (data[2].Length==GlobalVar.BarcodeLength)
{
_Items[index].SN = data[2];
}
diff --git a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
index 3a43646..1ddf160 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
@@ -406,7 +406,7 @@ namespace Rs.MotionPlat.Flow
if (fixtureret !=null && fixtureret.Result == EOneGrabSixteenResult.Ok)
{
LogHelper.Debug(GetClassName() + $"{JsonConvert.SerializeObject(fixtureret)}");
- if (fixtureret.SN.Length == GlobalVar.BarcodeLength)
+ //if (fixtureret.SN.Length == GlobalVar.BarcodeLength)
{
try
{
@@ -424,25 +424,25 @@ namespace Rs.MotionPlat.Flow
Msg.ShowError(ex.Message);
}
}
- else
- {
- try
- {
- LogHelper.Debug(GetClassName() + "检测到二维码长度和设置的长度不一致,弹框报警");
- //报警弹框
- alarmEntity = AlarmCollection.Get(AlarmConstID.二维码长度异常报警).Transform(ret.SlotIndex);
- EButtonType buttonSelect = Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
- if (buttonSelect == EButtonType.Retry)
- {
- logInfo = GetClassName() + "选择了重试";
- MessageQueue.Instance.Insert(logInfo);
- }
- }
- catch (Exception ex)
- {
- Msg.ShowError(ex.Message);
- }
- }
+ //else
+ //{
+ // try
+ // {
+ // LogHelper.Debug(GetClassName() + "检测到二维码长度和设置的长度不一致,弹框报警");
+ // //报警弹框
+ // alarmEntity = AlarmCollection.Get(AlarmConstID.二维码长度异常报警).Transform(ret.SlotIndex);
+ // EButtonType buttonSelect = Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
+ // if (buttonSelect == EButtonType.Retry)
+ // {
+ // logInfo = GetClassName() + "选择了重试";
+ // MessageQueue.Instance.Insert(logInfo);
+ // }
+ // }
+ // catch (Exception ex)
+ // {
+ // Msg.ShowError(ex.Message);
+ // }
+ //}
}
else if (fixtureret != null && fixtureret.Result == EOneGrabSixteenResult.LocationOkScanBarcodeFail)
{
@@ -1102,7 +1102,15 @@ namespace Rs.MotionPlat.Flow
//ABC模式
switch (GlobalVar.TestMethod)
{
-
+ case "ONE":
+ foreach (Nozzle item in NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToTest))
+ {
+ if (item.Product != null)
+ {
+ return item;
+ }
+ }
+ break;
case "A":
foreach (Nozzle item in NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToTest))
{
diff --git a/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs b/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs
index 35fb30a..e75302e 100644
--- a/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs
+++ b/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs
@@ -225,7 +225,10 @@ namespace Rs.MotionPlat.Flow.SubFlow
curNozzle.Product = curFixture.Product;
if(GlobalVar.TestMode!="GRR" && GlobalVar.TestMode!="AUDIT")
{
- if (curFixture.Product.Result == "PASS" || curFixture.Product.TestNum >= 3 ||ScanFailNGHelper.IsScanFailSN( curFixture.Product.SN))// == "SLK11111111PNK60X")
+ if (curFixture.Product.Result == "PASS"
+ || curFixture.Product.TestNum >= 3
+ ||ScanFailNGHelper.IsScanFailSN( curFixture.Product.SN)
+ || GlobalVar.TestMethod=="ONE")
{
curNozzle.Status = ENozzleStatus.ToUnload;
}
diff --git a/Rs.DeweyTester/FormMain.designer.cs b/Rs.DeweyTester/FormMain.designer.cs
index c548847..6d8f473 100644
--- a/Rs.DeweyTester/FormMain.designer.cs
+++ b/Rs.DeweyTester/FormMain.designer.cs
@@ -40,6 +40,7 @@ namespace Rs.MotionPlat
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox36 = new System.Windows.Forms.GroupBox();
+ this.btnDoorStatus = new System.Windows.Forms.Button();
this.btnSelectProduct = new System.Windows.Forms.Button();
this.btnUpCameraGrab = new System.Windows.Forms.Button();
this.btnClearData = new System.Windows.Forms.Button();
@@ -156,7 +157,6 @@ namespace Rs.MotionPlat
this.timertc6 = new System.Windows.Forms.Timer(this.components);
this.timeruph = new System.Windows.Forms.Timer(this.components);
this.timerLight = new System.Windows.Forms.Timer(this.components);
- this.btnDoorStatus = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.groupBox37.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv_errinfo)).BeginInit();
@@ -282,6 +282,20 @@ namespace Rs.MotionPlat
this.groupBox36.TabStop = false;
this.groupBox36.Text = "Quick functions";
//
+ // btnDoorStatus
+ //
+ this.btnDoorStatus.BackColor = System.Drawing.Color.Green;
+ this.btnDoorStatus.FlatAppearance.BorderSize = 0;
+ this.btnDoorStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnDoorStatus.Font = new System.Drawing.Font("宋体", 23F);
+ this.btnDoorStatus.ForeColor = System.Drawing.Color.White;
+ this.btnDoorStatus.Location = new System.Drawing.Point(8, 205);
+ this.btnDoorStatus.Name = "btnDoorStatus";
+ this.btnDoorStatus.Size = new System.Drawing.Size(301, 48);
+ this.btnDoorStatus.TabIndex = 1;
+ this.btnDoorStatus.Text = "Door";
+ this.btnDoorStatus.UseVisualStyleBackColor = false;
+ //
// btnSelectProduct
//
this.btnSelectProduct.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56)))));
@@ -1049,6 +1063,7 @@ namespace Rs.MotionPlat
this.cboxTestMethod.Enabled = false;
this.cboxTestMethod.FormattingEnabled = true;
this.cboxTestMethod.Items.AddRange(new object[] {
+ "ONE",
"A",
"AAB",
"ABC"});
@@ -1796,20 +1811,6 @@ namespace Rs.MotionPlat
this.timerLight.Interval = 500;
this.timerLight.Tick += new System.EventHandler(this.timerLight_Tick);
//
- // btnDoorStatus
- //
- this.btnDoorStatus.BackColor = System.Drawing.Color.Green;
- this.btnDoorStatus.FlatAppearance.BorderSize = 0;
- this.btnDoorStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnDoorStatus.Font = new System.Drawing.Font("宋体", 23F);
- this.btnDoorStatus.ForeColor = System.Drawing.Color.White;
- this.btnDoorStatus.Location = new System.Drawing.Point(8, 205);
- this.btnDoorStatus.Name = "btnDoorStatus";
- this.btnDoorStatus.Size = new System.Drawing.Size(301, 48);
- this.btnDoorStatus.TabIndex = 1;
- this.btnDoorStatus.Text = "Door";
- this.btnDoorStatus.UseVisualStyleBackColor = false;
- //
// FormMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
diff --git a/Rs.DeweyTester/Rs.DeweyTester.csproj b/Rs.DeweyTester/Rs.DeweyTester.csproj
index eda83e7..e4c10cc 100644
--- a/Rs.DeweyTester/Rs.DeweyTester.csproj
+++ b/Rs.DeweyTester/Rs.DeweyTester.csproj
@@ -147,6 +147,7 @@
+