1、增加治具拍照前延时设置

2、优化GRR流程扫码时如果视觉未打开则报警
Eight
lhiven 6 months ago
parent 498eeaca4d
commit d2063e5e9e

@ -460,7 +460,17 @@ namespace Rs.Framework
/// <summary>
/// 治具拍照延时
/// </summary>
[ParameterInit("int", "100", "system", "治具拍照延时")]
public static int FixtureTakePicDelaytime
{
get
{
return SysConfigParam.GetValue<int>(nameof(FixtureTakePicDelaytime));
}
}
/// <summary>

@ -267,32 +267,48 @@ namespace Rs.MotionPlat.Flow
}
break;
case EGrrFlowStep.:
VisionHelper.oneGrabOneVision.ClearQueue();
UpCameraHelper.Grab();
string msg = VisionHelper.OneGrabOne();//.Grab(EVisionScene.SingleScanBarcode);
vProductResult.Parse(msg);
if((vProductResult != null && vProductResult.Result== EOneGrabSixteenResult.Ok) || GlobalVar.RunSpace)
if(VisionHelper.oneGrabOneVision.ClearQueue())
{
flowStep = EGrrFlowStep.;
}
else if(vProductResult != null && vProductResult.Result == EOneGrabSixteenResult.LocationOkScanBarcodeFail)
{
GrrScanFailFrm scanFail = new GrrScanFailFrm((act,qrcode) => {
if(act==1)
UpCameraHelper.Grab();
string msg = VisionHelper.OneGrabOne();//.Grab(EVisionScene.SingleScanBarcode);
if(!string.IsNullOrEmpty(msg))
{
vProductResult.Parse(msg);
if ((vProductResult != null && vProductResult.Result == EOneGrabSixteenResult.Ok) || GlobalVar.RunSpace)
{
vProductResult.SN = qrcode;
flowStep = EGrrFlowStep.;
}
});
scanFail.ShowDialog();
//vProductResult.SN = VirtualBarCode.Code;
else if (vProductResult != null && vProductResult.Result == EOneGrabSixteenResult.LocationOkScanBarcodeFail)
{
GrrScanFailFrm scanFail = new GrrScanFailFrm((act, qrcode) => {
if (act == 1)
{
vProductResult.SN = qrcode;
flowStep = EGrrFlowStep.;
}
});
scanFail.ShowDialog();
//vProductResult.SN = VirtualBarCode.Code;
}
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
}
}
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
}
}
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.);
Msgbox.ShowDialog(alarmEntity,EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
}
break;
case EGrrFlowStep.:
//获取空闲吸嘴

@ -114,6 +114,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
case EFixturePlaceFlowStep.:
logInfo = $"{GetClassName()} 通知相机拍照";
MessageQueue.Instance.Insert(logInfo);
Thread.Sleep(GlobalVar.FixtureTakePicDelaytime);
VisionHelper.fixtureDumpProductVision.ClearQueue();
UpCameraHelper.Grab();
//AxisControl.LoadY2.ComparePulse(1, false);//开始拍照

@ -292,7 +292,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
{
PlaceFinishedEvent?.Invoke(curNozzle.Product);
}
logInfo = $"{GetClassName()}检测到吸嘴{curNozzle.NozzleIndex}无粘料,吸嘴{curNozzle.NozzleIndex}把产品SN:{curNozzle.Product.SN}放入OK料盘{curPlaceSlot.Index}穴位";
logInfo = $"{GetClassName()}检测到吸嘴{curNozzle.NozzleIndex}无粘料,吸嘴{curNozzle.NozzleIndex}把产品SN:{curNozzle.Product.SN}放入{trayType}料盘{curPlaceSlot.Index}穴位";
MessageQueue.Instance.Insert(logInfo);
tray.ChangeStatus(curPlaceSlot.Index, ESlotStatus.Have);
curNozzle.Product.Save(trayType);

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

@ -114,10 +114,13 @@
this.groupBox13 = new System.Windows.Forms.GroupBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtColletOpenDelaytime = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.label26 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label25 = new System.Windows.Forms.Label();
this.txtFixtureTakePicDelaytime = new System.Windows.Forms.TextBox();
this.txtColletCloseDelaytime = new System.Windows.Forms.TextBox();
this.groupBox15 = new System.Windows.Forms.GroupBox();
this.button26 = new System.Windows.Forms.Button();
@ -1023,10 +1026,13 @@
//
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.txtColletOpenDelaytime);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label21);
this.groupBox1.Controls.Add(this.label26);
this.groupBox1.Controls.Add(this.label24);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.label25);
this.groupBox1.Controls.Add(this.txtFixtureTakePicDelaytime);
this.groupBox1.Controls.Add(this.txtColletCloseDelaytime);
this.groupBox1.ForeColor = System.Drawing.Color.White;
this.groupBox1.Name = "groupBox1";
@ -1042,6 +1048,11 @@
this.txtColletOpenDelaytime.Tag = "TurnoverY";
this.txtColletOpenDelaytime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label21
//
resources.ApplyResources(this.label21, "label21");
@ -1057,11 +1068,26 @@
resources.ApplyResources(this.label24, "label24");
this.label24.Name = "label24";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// label25
//
resources.ApplyResources(this.label25, "label25");
this.label25.Name = "label25";
//
// txtFixtureTakePicDelaytime
//
resources.ApplyResources(this.txtFixtureTakePicDelaytime, "txtFixtureTakePicDelaytime");
this.txtFixtureTakePicDelaytime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtFixtureTakePicDelaytime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtFixtureTakePicDelaytime.ForeColor = System.Drawing.Color.White;
this.txtFixtureTakePicDelaytime.Name = "txtFixtureTakePicDelaytime";
this.txtFixtureTakePicDelaytime.Tag = "";
this.txtFixtureTakePicDelaytime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// txtColletCloseDelaytime
//
resources.ApplyResources(this.txtColletCloseDelaytime, "txtColletCloseDelaytime");
@ -1538,5 +1564,8 @@
private System.Windows.Forms.RadioButton rbtnNozzle3;
private System.Windows.Forms.RadioButton rbtnNozzle2;
private System.Windows.Forms.RadioButton rbtnNozzle1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtFixtureTakePicDelaytime;
}
}

@ -117,12 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="groupBox22.Text" xml:space="preserve">
<value>fixture photo postion</value>
</data>
<data name="groupBox27.Text" xml:space="preserve">
<value>Fixture6</value>
</data>
<data name="btnMoveFixture6GrabImageY2.Text" xml:space="preserve">
<value>Move here</value>
</data>
@ -135,8 +129,8 @@
<data name="btnTeachFixture6GrabImageX.Text" xml:space="preserve">
<value>Teach</value>
</data>
<data name="groupBox26.Text" xml:space="preserve">
<value>Fixture5</value>
<data name="groupBox27.Text" xml:space="preserve">
<value>Fixture6</value>
</data>
<data name="btnMoveFixture5GrabImageY2.Text" xml:space="preserve">
<value>Move here</value>
@ -150,8 +144,8 @@
<data name="btnTeachFixture5GrabImageX.Text" xml:space="preserve">
<value>Teach</value>
</data>
<data name="groupBox25.Text" xml:space="preserve">
<value>Fixture4</value>
<data name="groupBox26.Text" xml:space="preserve">
<value>Fixture5</value>
</data>
<data name="btnMoveFixture4GrabImageY2.Text" xml:space="preserve">
<value>Move here</value>
@ -165,8 +159,8 @@
<data name="btnTeachFixture4GrabImageX.Text" xml:space="preserve">
<value>Teach</value>
</data>
<data name="groupBox24.Text" xml:space="preserve">
<value>Fixture3</value>
<data name="groupBox25.Text" xml:space="preserve">
<value>Fixture4</value>
</data>
<data name="btnMoveFixture3GrabImageY2.Text" xml:space="preserve">
<value>Move here</value>
@ -180,8 +174,8 @@
<data name="btnTeachFixture3GrabImageX.Text" xml:space="preserve">
<value>Teach</value>
</data>
<data name="groupBox23.Text" xml:space="preserve">
<value>Fixture2</value>
<data name="groupBox24.Text" xml:space="preserve">
<value>Fixture3</value>
</data>
<data name="btnMoveFixture2GrabImageY2.Text" xml:space="preserve">
<value>Move here</value>
@ -195,8 +189,8 @@
<data name="btnTeachFixture2GrabImageX.Text" xml:space="preserve">
<value>Teach</value>
</data>
<data name="groupBox28.Text" xml:space="preserve">
<value>Fixture1</value>
<data name="groupBox23.Text" xml:space="preserve">
<value>Fixture2</value>
</data>
<data name="btnMoveFixture1GrabImageY2.Text" xml:space="preserve">
<value>Move here</value>
@ -210,8 +204,11 @@
<data name="btnTeachFixture1GrabImageX.Text" xml:space="preserve">
<value>Teach</value>
</data>
<data name="groupBox13.Text" xml:space="preserve">
<value>Collet</value>
<data name="groupBox28.Text" xml:space="preserve">
<value>Fixture1</value>
</data>
<data name="groupBox22.Text" xml:space="preserve">
<value>fixture photo postion</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label26.Size" type="System.Drawing.Size, System.Drawing">
@ -220,6 +217,15 @@
<data name="label26.Text" xml:space="preserve">
<value>loose delay:</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 65</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>TakePic delay:</value>
</data>
<data name="label25.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
@ -229,8 +235,8 @@
<data name="groupBox15.Text" xml:space="preserve">
<value>Vac</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>test</value>
<data name="groupBox13.Text" xml:space="preserve">
<value>Collet</value>
</data>
<data name="button34.Location" type="System.Drawing.Point, System.Drawing">
<value>213, 403</value>
@ -322,4 +328,7 @@
<data name="button1.Text" xml:space="preserve">
<value>Fixture1 take</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>test</value>
</data>
</root>

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