1、增加扫码NG后用特殊二维码替换规则

2、增加XY运动结束后等待延时的配置项
develop
lhiven 4 weeks ago
parent 16d82c5e25
commit c87baaee68

@ -22,7 +22,18 @@ namespace Rs.Framework
{
#region newpro
/// <summary>
/// XY到位后延时
/// </summary>
[ParameterInit("int", "100", "system", "XY到位后延时")]
public static int XYArrivedDelaytime
{
get
{
return SysConfigParam.GetValue<int>(nameof(XYArrivedDelaytime));
}
}
/// <summary>
/// 扫码失败是否测试
/// </summary>

@ -51,7 +51,7 @@ namespace Rs.MotionPlat.Commom
errCode = AxisControl.LoadY2.MovePos(pos.Y2, speed);
if (errCode == ErrorCode.Ok)
{
Thread.Sleep(100);
Thread.Sleep(GlobalVar.XYArrivedDelaytime);
return true;
}
else

@ -0,0 +1,41 @@
using Rs.Framework;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Rs.MotionPlat.Commom
{
public class ScanFailNGHelper
{
static int sn;
static string filename = "ng-sn.txt";
static ScanFailNGHelper()
{
if(File.Exists(filename))
{
string fc = File.ReadAllText(filename);
if(!int.TryParse(fc, out sn ))
{
sn = 0;
}
}
}
public static string GetSn()
{
sn++;
File.WriteAllText(filename, sn.ToString());
return $"SLK{GlobalVar.MachineID}"+ sn.ToString().PadLeft(9, '0');
}
public static bool IsScanFailSN(string sn)
{
string reg = "SLKADT\\d{11}";
return Regex.IsMatch(sn, reg);
}
}
}

@ -474,7 +474,7 @@ namespace Rs.MotionPlat.Flow
StockTakeFlow.Instance.Take(ETrayType.Input, ret.SlotIndex, idleNozzle.NozzleIndex);
if (NozzleManager.GetNozzle(idleNozzle.NozzleIndex).Product != null)
{
NozzleManager.GetNozzle(idleNozzle.NozzleIndex).Product.SN = "SLK11111111PNK60X";
NozzleManager.GetNozzle(idleNozzle.NozzleIndex).Product.SN = ScanFailNGHelper.GetSn();// "SLK11111111PNK60X";
}
takeSlotIndex++;
exit = true;
@ -840,7 +840,7 @@ namespace Rs.MotionPlat.Flow
}
else
{
if(placeNozzle.Product!=null && placeNozzle.Product.SN== "SLK11111111PNK60X")
if(placeNozzle.Product!=null && ScanFailNGHelper.IsScanFailSN(placeNozzle.Product.SN))//== "SLK11111111PNK60X")
{
TraySlot waitPlaceSlot = GlobalTray.RetestTray.GetSlot(ESlotStatus.NotHave);
if (waitPlaceSlot != null)
@ -1087,7 +1087,7 @@ namespace Rs.MotionPlat.Flow
/// <returns></returns>
Nozzle GetPlaceNozzle(TestFixture fixture)
{
if(fixture!=null && fixture.Product!= null && fixture.Product.SN == "SLK11111111PNK60X")
if(fixture!=null && fixture.Product!= null && ScanFailNGHelper.IsScanFailSN( fixture.Product.SN))// == "SLK11111111PNK60X")
{
foreach (Nozzle item in NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToTest))
{

@ -225,7 +225,7 @@ 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 || curFixture.Product.SN == "SLK11111111PNK60X")
if (curFixture.Product.Result == "PASS" || curFixture.Product.TestNum >= 3 ||ScanFailNGHelper.IsScanFailSN( curFixture.Product.SN))// == "SLK11111111PNK60X")
{
curNozzle.Status = ENozzleStatus.ToUnload;
}

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("20.25.30.1")]
[assembly: AssemblyVersion("20.25.31.2")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

@ -148,6 +148,7 @@
<Compile Include="Commom\Msgbox.cs" />
<Compile Include="Commom\MySqlHelper.cs" />
<Compile Include="Commom\ParameterInitAttribute.cs" />
<Compile Include="Commom\ScanFailNGHelper.cs" />
<Compile Include="Commom\TrayHelper.cs" />
<Compile Include="Commom\TrayRunPointManager.cs" />
<Compile Include="Commom\UpCameraHelper.cs" />

@ -80,16 +80,19 @@
this.cboxNozzle1 = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtLoadNozzleCloseVacSuctionDelaytime = new System.Windows.Forms.TextBox();
this.lblXYArrivedDelaytime = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.label26 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label25 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.txtLoadNozzleCloseVacBreakDelaytime = new System.Windows.Forms.TextBox();
this.txtLoadNozzleOpenVacSuctionDelaytime = new System.Windows.Forms.TextBox();
this.txtXYArrivedDelaytime = new System.Windows.Forms.TextBox();
this.txtLoadNozzleOpenVacBreakDelaytime = new System.Windows.Forms.TextBox();
this.groupBox14 = new System.Windows.Forms.GroupBox();
this.button43 = new System.Windows.Forms.Button();
@ -633,16 +636,19 @@
// groupBox1
//
this.groupBox1.Controls.Add(this.txtLoadNozzleCloseVacSuctionDelaytime);
this.groupBox1.Controls.Add(this.lblXYArrivedDelaytime);
this.groupBox1.Controls.Add(this.label19);
this.groupBox1.Controls.Add(this.label23);
this.groupBox1.Controls.Add(this.label21);
this.groupBox1.Controls.Add(this.label26);
this.groupBox1.Controls.Add(this.label12);
this.groupBox1.Controls.Add(this.label20);
this.groupBox1.Controls.Add(this.label24);
this.groupBox1.Controls.Add(this.label25);
this.groupBox1.Controls.Add(this.label22);
this.groupBox1.Controls.Add(this.txtLoadNozzleCloseVacBreakDelaytime);
this.groupBox1.Controls.Add(this.txtLoadNozzleOpenVacSuctionDelaytime);
this.groupBox1.Controls.Add(this.txtXYArrivedDelaytime);
this.groupBox1.Controls.Add(this.txtLoadNozzleOpenVacBreakDelaytime);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.ForeColor = System.Drawing.Color.White;
@ -659,6 +665,11 @@
this.txtLoadNozzleCloseVacSuctionDelaytime.Tag = "TurnoverY";
this.txtLoadNozzleCloseVacSuctionDelaytime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// lblXYArrivedDelaytime
//
resources.ApplyResources(this.lblXYArrivedDelaytime, "lblXYArrivedDelaytime");
this.lblXYArrivedDelaytime.Name = "lblXYArrivedDelaytime";
//
// label19
//
resources.ApplyResources(this.label19, "label19");
@ -679,6 +690,11 @@
resources.ApplyResources(this.label26, "label26");
this.label26.Name = "label26";
//
// label12
//
resources.ApplyResources(this.label12, "label12");
this.label12.Name = "label12";
//
// label20
//
resources.ApplyResources(this.label20, "label20");
@ -719,6 +735,16 @@
this.txtLoadNozzleOpenVacSuctionDelaytime.Tag = "";
this.txtLoadNozzleOpenVacSuctionDelaytime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// txtXYArrivedDelaytime
//
this.txtXYArrivedDelaytime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtXYArrivedDelaytime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
resources.ApplyResources(this.txtXYArrivedDelaytime, "txtXYArrivedDelaytime");
this.txtXYArrivedDelaytime.ForeColor = System.Drawing.Color.White;
this.txtXYArrivedDelaytime.Name = "txtXYArrivedDelaytime";
this.txtXYArrivedDelaytime.Tag = "TurnoverY";
this.txtXYArrivedDelaytime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// txtLoadNozzleOpenVacBreakDelaytime
//
this.txtLoadNozzleOpenVacBreakDelaytime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
@ -2417,5 +2443,8 @@
private System.Windows.Forms.Button btnMoveFixtureSafePosY;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtFixtureSafePosY;
private System.Windows.Forms.Label lblXYArrivedDelaytime;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtXYArrivedDelaytime;
}
}

@ -122,7 +122,7 @@
<value>545, 0</value>
</data>
<data name="panelEx2.Size" type="System.Drawing.Size, System.Drawing">
<value>1250, 849</value>
<value>1075, 849</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>564, 849</value>
@ -133,15 +133,24 @@
<data name="groupBox13.Text" xml:space="preserve">
<value>Nozzle vacuum</value>
</data>
<data name="groupBox3.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 481</value>
</data>
<data name="groupBox3.Size" type="System.Drawing.Size, System.Drawing">
<value>558, 84</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>558, 84</value>
<value>558, 112</value>
</data>
<data name="txtLoadNozzleCloseVacSuctionDelaytime.Location" type="System.Drawing.Point, System.Drawing">
<value>466, 21</value>
</data>
<data name="lblXYArrivedDelaytime.Size" type="System.Drawing.Size, System.Drawing">
<value>131, 12</value>
</data>
<data name="lblXYArrivedDelaytime.Text" xml:space="preserve">
<value>XYArrived delay time:</value>
</data>
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
<value>131, 12</value>
</data>
@ -169,6 +178,9 @@
<data name="label26.Text" xml:space="preserve">
<value>Delay after closing vacuum suction :</value>
</data>
<data name="label12.Location" type="System.Drawing.Point, System.Drawing">
<value>205, 89</value>
</data>
<data name="label20.Location" type="System.Drawing.Point, System.Drawing">
<value>205, 61</value>
</data>
@ -190,6 +202,9 @@
<data name="txtLoadNozzleOpenVacSuctionDelaytime.Location" type="System.Drawing.Point, System.Drawing">
<value>149, 24</value>
</data>
<data name="textBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>149, 84</value>
</data>
<data name="txtLoadNozzleOpenVacBreakDelaytime.Location" type="System.Drawing.Point, System.Drawing">
<value>149, 56</value>
</data>
@ -310,9 +325,6 @@
<data name="label32.Text" xml:space="preserve">
<value>Fixture side Y1:</value>
</data>
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Fixture Safe X:</value>
</data>
@ -343,30 +355,45 @@
<data name="panelEx1.Size" type="System.Drawing.Size, System.Drawing">
<value>545, 849</value>
</data>
<data name="groupBox12.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 352</value>
</data>
<data name="groupBox12.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 67</value>
</data>
<data name="groupBox12.Text" xml:space="preserve">
<value>Fixture6</value>
</data>
<data name="groupBox11.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 285</value>
</data>
<data name="groupBox11.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 67</value>
</data>
<data name="groupBox11.Text" xml:space="preserve">
<value>Fixture5</value>
</data>
<data name="groupBox10.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 218</value>
</data>
<data name="groupBox10.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 67</value>
</data>
<data name="groupBox10.Text" xml:space="preserve">
<value>Fixture4</value>
</data>
<data name="groupBox9.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 151</value>
</data>
<data name="groupBox9.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 67</value>
</data>
<data name="groupBox9.Text" xml:space="preserve">
<value>Fixture3</value>
</data>
<data name="groupBox8.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 84</value>
</data>
<data name="groupBox8.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 67</value>
</data>
@ -394,6 +421,9 @@
<data name="label28.Text" xml:space="preserve">
<value>place down offset:</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 369</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>545, 480</value>
</data>
@ -472,15 +502,27 @@
<data name="btnTeachFixture1TakeProductZ.Text" xml:space="preserve">
<value>Teach</value>
</data>
<data name="groupBox21.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 249</value>
</data>
<data name="groupBox21.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 58</value>
</data>
<data name="groupBox20.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 191</value>
</data>
<data name="groupBox20.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 58</value>
</data>
<data name="groupBox19.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 133</value>
</data>
<data name="groupBox19.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 58</value>
</data>
<data name="groupBox18.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 75</value>
</data>
<data name="groupBox18.Size" type="System.Drawing.Size, System.Drawing">
<value>539, 58</value>
</data>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save