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> /// <summary>

@ -267,9 +267,12 @@ namespace Rs.MotionPlat.Flow
} }
break; break;
case EGrrFlowStep.: case EGrrFlowStep.:
VisionHelper.oneGrabOneVision.ClearQueue(); if(VisionHelper.oneGrabOneVision.ClearQueue())
{
UpCameraHelper.Grab(); UpCameraHelper.Grab();
string msg = VisionHelper.OneGrabOne();//.Grab(EVisionScene.SingleScanBarcode); string msg = VisionHelper.OneGrabOne();//.Grab(EVisionScene.SingleScanBarcode);
if(!string.IsNullOrEmpty(msg))
{
vProductResult.Parse(msg); vProductResult.Parse(msg);
if ((vProductResult != null && vProductResult.Result == EOneGrabSixteenResult.Ok) || GlobalVar.RunSpace) if ((vProductResult != null && vProductResult.Result == EOneGrabSixteenResult.Ok) || GlobalVar.RunSpace)
{ {
@ -293,6 +296,19 @@ namespace Rs.MotionPlat.Flow
alarmEntity = AlarmCollection.Get(AlarmConstID.); alarmEntity = AlarmCollection.Get(AlarmConstID.);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry); 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);
}
break; break;
case EGrrFlowStep.: case EGrrFlowStep.:
//获取空闲吸嘴 //获取空闲吸嘴

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

@ -292,7 +292,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
{ {
PlaceFinishedEvent?.Invoke(curNozzle.Product); 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); MessageQueue.Instance.Insert(logInfo);
tray.ChangeStatus(curPlaceSlot.Index, ESlotStatus.Have); tray.ChangeStatus(curPlaceSlot.Index, ESlotStatus.Have);
curNozzle.Product.Save(trayType); 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: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]

@ -114,10 +114,13 @@
this.groupBox13 = new System.Windows.Forms.GroupBox(); this.groupBox13 = new System.Windows.Forms.GroupBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtColletOpenDelaytime = new System.Windows.Forms.TextBox(); this.txtColletOpenDelaytime = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label();
this.label26 = new System.Windows.Forms.Label(); this.label26 = new System.Windows.Forms.Label();
this.label24 = 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.label25 = new System.Windows.Forms.Label();
this.txtFixtureTakePicDelaytime = new System.Windows.Forms.TextBox();
this.txtColletCloseDelaytime = new System.Windows.Forms.TextBox(); this.txtColletCloseDelaytime = new System.Windows.Forms.TextBox();
this.groupBox15 = new System.Windows.Forms.GroupBox(); this.groupBox15 = new System.Windows.Forms.GroupBox();
this.button26 = new System.Windows.Forms.Button(); this.button26 = new System.Windows.Forms.Button();
@ -1023,10 +1026,13 @@
// //
resources.ApplyResources(this.groupBox1, "groupBox1"); resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.txtColletOpenDelaytime); this.groupBox1.Controls.Add(this.txtColletOpenDelaytime);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label21); this.groupBox1.Controls.Add(this.label21);
this.groupBox1.Controls.Add(this.label26); this.groupBox1.Controls.Add(this.label26);
this.groupBox1.Controls.Add(this.label24); this.groupBox1.Controls.Add(this.label24);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.label25); this.groupBox1.Controls.Add(this.label25);
this.groupBox1.Controls.Add(this.txtFixtureTakePicDelaytime);
this.groupBox1.Controls.Add(this.txtColletCloseDelaytime); this.groupBox1.Controls.Add(this.txtColletCloseDelaytime);
this.groupBox1.ForeColor = System.Drawing.Color.White; this.groupBox1.ForeColor = System.Drawing.Color.White;
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
@ -1042,6 +1048,11 @@
this.txtColletOpenDelaytime.Tag = "TurnoverY"; this.txtColletOpenDelaytime.Tag = "TurnoverY";
this.txtColletOpenDelaytime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp); this.txtColletOpenDelaytime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
// //
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label21 // label21
// //
resources.ApplyResources(this.label21, "label21"); resources.ApplyResources(this.label21, "label21");
@ -1057,11 +1068,26 @@
resources.ApplyResources(this.label24, "label24"); resources.ApplyResources(this.label24, "label24");
this.label24.Name = "label24"; this.label24.Name = "label24";
// //
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// label25 // label25
// //
resources.ApplyResources(this.label25, "label25"); resources.ApplyResources(this.label25, "label25");
this.label25.Name = "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 // txtColletCloseDelaytime
// //
resources.ApplyResources(this.txtColletCloseDelaytime, "txtColletCloseDelaytime"); resources.ApplyResources(this.txtColletCloseDelaytime, "txtColletCloseDelaytime");
@ -1538,5 +1564,8 @@
private System.Windows.Forms.RadioButton rbtnNozzle3; private System.Windows.Forms.RadioButton rbtnNozzle3;
private System.Windows.Forms.RadioButton rbtnNozzle2; private System.Windows.Forms.RadioButton rbtnNozzle2;
private System.Windows.Forms.RadioButton rbtnNozzle1; 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"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </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"> <data name="btnMoveFixture6GrabImageY2.Text" xml:space="preserve">
<value>Move here</value> <value>Move here</value>
</data> </data>
@ -135,8 +129,8 @@
<data name="btnTeachFixture6GrabImageX.Text" xml:space="preserve"> <data name="btnTeachFixture6GrabImageX.Text" xml:space="preserve">
<value>Teach</value> <value>Teach</value>
</data> </data>
<data name="groupBox26.Text" xml:space="preserve"> <data name="groupBox27.Text" xml:space="preserve">
<value>Fixture5</value> <value>Fixture6</value>
</data> </data>
<data name="btnMoveFixture5GrabImageY2.Text" xml:space="preserve"> <data name="btnMoveFixture5GrabImageY2.Text" xml:space="preserve">
<value>Move here</value> <value>Move here</value>
@ -150,8 +144,8 @@
<data name="btnTeachFixture5GrabImageX.Text" xml:space="preserve"> <data name="btnTeachFixture5GrabImageX.Text" xml:space="preserve">
<value>Teach</value> <value>Teach</value>
</data> </data>
<data name="groupBox25.Text" xml:space="preserve"> <data name="groupBox26.Text" xml:space="preserve">
<value>Fixture4</value> <value>Fixture5</value>
</data> </data>
<data name="btnMoveFixture4GrabImageY2.Text" xml:space="preserve"> <data name="btnMoveFixture4GrabImageY2.Text" xml:space="preserve">
<value>Move here</value> <value>Move here</value>
@ -165,8 +159,8 @@
<data name="btnTeachFixture4GrabImageX.Text" xml:space="preserve"> <data name="btnTeachFixture4GrabImageX.Text" xml:space="preserve">
<value>Teach</value> <value>Teach</value>
</data> </data>
<data name="groupBox24.Text" xml:space="preserve"> <data name="groupBox25.Text" xml:space="preserve">
<value>Fixture3</value> <value>Fixture4</value>
</data> </data>
<data name="btnMoveFixture3GrabImageY2.Text" xml:space="preserve"> <data name="btnMoveFixture3GrabImageY2.Text" xml:space="preserve">
<value>Move here</value> <value>Move here</value>
@ -180,8 +174,8 @@
<data name="btnTeachFixture3GrabImageX.Text" xml:space="preserve"> <data name="btnTeachFixture3GrabImageX.Text" xml:space="preserve">
<value>Teach</value> <value>Teach</value>
</data> </data>
<data name="groupBox23.Text" xml:space="preserve"> <data name="groupBox24.Text" xml:space="preserve">
<value>Fixture2</value> <value>Fixture3</value>
</data> </data>
<data name="btnMoveFixture2GrabImageY2.Text" xml:space="preserve"> <data name="btnMoveFixture2GrabImageY2.Text" xml:space="preserve">
<value>Move here</value> <value>Move here</value>
@ -195,8 +189,8 @@
<data name="btnTeachFixture2GrabImageX.Text" xml:space="preserve"> <data name="btnTeachFixture2GrabImageX.Text" xml:space="preserve">
<value>Teach</value> <value>Teach</value>
</data> </data>
<data name="groupBox28.Text" xml:space="preserve"> <data name="groupBox23.Text" xml:space="preserve">
<value>Fixture1</value> <value>Fixture2</value>
</data> </data>
<data name="btnMoveFixture1GrabImageY2.Text" xml:space="preserve"> <data name="btnMoveFixture1GrabImageY2.Text" xml:space="preserve">
<value>Move here</value> <value>Move here</value>
@ -210,8 +204,11 @@
<data name="btnTeachFixture1GrabImageX.Text" xml:space="preserve"> <data name="btnTeachFixture1GrabImageX.Text" xml:space="preserve">
<value>Teach</value> <value>Teach</value>
</data> </data>
<data name="groupBox13.Text" xml:space="preserve"> <data name="groupBox28.Text" xml:space="preserve">
<value>Collet</value> <value>Fixture1</value>
</data>
<data name="groupBox22.Text" xml:space="preserve">
<value>fixture photo postion</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <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"> <data name="label26.Size" type="System.Drawing.Size, System.Drawing">
@ -220,6 +217,15 @@
<data name="label26.Text" xml:space="preserve"> <data name="label26.Text" xml:space="preserve">
<value>loose delay:</value> <value>loose delay:</value>
</data> </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"> <data name="label25.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value> <value>77, 12</value>
</data> </data>
@ -229,8 +235,8 @@
<data name="groupBox15.Text" xml:space="preserve"> <data name="groupBox15.Text" xml:space="preserve">
<value>Vac</value> <value>Vac</value>
</data> </data>
<data name="groupBox2.Text" xml:space="preserve"> <data name="groupBox13.Text" xml:space="preserve">
<value>test</value> <value>Collet</value>
</data> </data>
<data name="button34.Location" type="System.Drawing.Point, System.Drawing"> <data name="button34.Location" type="System.Drawing.Point, System.Drawing">
<value>213, 403</value> <value>213, 403</value>
@ -322,4 +328,7 @@
<data name="button1.Text" xml:space="preserve"> <data name="button1.Text" xml:space="preserve">
<value>Fixture1 take</value> <value>Fixture1 take</value>
</data> </data>
<data name="groupBox2.Text" xml:space="preserve">
<value>test</value>
</data>
</root> </root>

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