增加料盘中产品搬运功能

master
lhiven 10 months ago
parent 0d1f50bfba
commit b9043b8266

@ -451,6 +451,7 @@ namespace Rs.MotionPlat.Entitys
{
msg = $"StartTest#{sn}#MS001#OP#DXD#GRR_GRR_DXD_202203120320#Production#LF1#MOS#T1#0#0#Paint#0#R1C5#SP0012#1$";
}
LogHelper.Debug(msg);
// string msg = $"StartTest#123#{GlobalVar.MachineID}#op#{GlobalVar.Config}#Lot#Mode#SiteID#ProjectID#RetryMode#{mtcp}#Mtcp#configD#DualMode#R1C1#SubLotName#{noise}$";
//msg = $"StartTest#{Product.SN}#MS001#OP#DXD#GRR_GRR_DXD_202203120320#Production#LF1#MOS#T1#0#0#Paint#0#R1C5#SP0012#1$";
Send(msg);

@ -147,6 +147,7 @@
<Compile Include="Flow\NormalFlow\StockManager.cs" />
<Compile Include="Flow\SubFlow\FixtureTakeFlow.cs" />
<Compile Include="Flow\SubFlow\ProductLocationFlow.cs" />
<Compile Include="Flow\SubFlow\StockLocationFlow.cs" />
<Compile Include="Flow\SubFlow\StockPlaceFlow.cs" />
<Compile Include="Flow\SubFlow\StockTakeFlow.cs" />
<Compile Include="GrrScanFailFrm.cs">

@ -74,6 +74,7 @@
this.cboxEnableTC3 = new System.Windows.Forms.CheckBox();
this.cboxEnableTC2 = new System.Windows.Forms.CheckBox();
this.cboxEnableTC1 = new System.Windows.Forms.CheckBox();
this.cboxEnableBeforePlaceProductGrab = new System.Windows.Forms.CheckBox();
this.cboxDisableBuzzer = new System.Windows.Forms.CheckBox();
this.cboxCheckVisionSwOpened = new System.Windows.Forms.CheckBox();
this.cboxIsSimTest = new System.Windows.Forms.CheckBox();
@ -108,7 +109,7 @@
this.txtControlCenterPort = new System.Windows.Forms.TextBox();
this.cboxEnableExceptionHandlingNozzle = new System.Windows.Forms.CheckBox();
this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox();
this.cboxEnableBeforePlaceProductGrab = new System.Windows.Forms.CheckBox();
this.cboxEnableVirtualBarCode = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox3.SuspendLayout();
@ -324,6 +325,7 @@
this.groupBox1.Controls.Add(this.cboxEnableTC3);
this.groupBox1.Controls.Add(this.cboxEnableTC2);
this.groupBox1.Controls.Add(this.cboxEnableTC1);
this.groupBox1.Controls.Add(this.cboxEnableVirtualBarCode);
this.groupBox1.Controls.Add(this.cboxEnableBeforePlaceProductGrab);
this.groupBox1.Controls.Add(this.cboxDisableBuzzer);
this.groupBox1.Controls.Add(this.cboxCheckVisionSwOpened);
@ -486,6 +488,13 @@
this.cboxEnableTC1.UseVisualStyleBackColor = true;
this.cboxEnableTC1.CheckedChanged += new System.EventHandler(this.cboxFixture_CheckedChanged);
//
// cboxEnableBeforePlaceProductGrab
//
resources.ApplyResources(this.cboxEnableBeforePlaceProductGrab, "cboxEnableBeforePlaceProductGrab");
this.cboxEnableBeforePlaceProductGrab.Name = "cboxEnableBeforePlaceProductGrab";
this.cboxEnableBeforePlaceProductGrab.UseVisualStyleBackColor = true;
this.cboxEnableBeforePlaceProductGrab.CheckedChanged += new System.EventHandler(this.cbox_CheckedChanged);
//
// cboxDisableBuzzer
//
resources.ApplyResources(this.cboxDisableBuzzer, "cboxDisableBuzzer");
@ -730,12 +739,12 @@
this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera";
this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true;
//
// cboxEnableBeforePlaceProductGrab
// cboxEnableVirtualBarCode
//
resources.ApplyResources(this.cboxEnableBeforePlaceProductGrab, "cboxEnableBeforePlaceProductGrab");
this.cboxEnableBeforePlaceProductGrab.Name = "cboxEnableBeforePlaceProductGrab";
this.cboxEnableBeforePlaceProductGrab.UseVisualStyleBackColor = true;
this.cboxEnableBeforePlaceProductGrab.CheckedChanged += new System.EventHandler(this.cbox_CheckedChanged);
resources.ApplyResources(this.cboxEnableVirtualBarCode, "cboxEnableVirtualBarCode");
this.cboxEnableVirtualBarCode.Name = "cboxEnableVirtualBarCode";
this.cboxEnableVirtualBarCode.UseVisualStyleBackColor = true;
this.cboxEnableVirtualBarCode.CheckedChanged += new System.EventHandler(this.cbox_CheckedChanged);
//
// CommonConfig
//
@ -847,5 +856,6 @@
private System.Windows.Forms.TextBox txtProjectID;
private System.Windows.Forms.CheckBox cboxDisableBuzzer;
private System.Windows.Forms.CheckBox cboxEnableBeforePlaceProductGrab;
private System.Windows.Forms.CheckBox cboxEnableVirtualBarCode;
}
}

@ -1377,6 +1377,36 @@
<data name="&gt;&gt;cboxEnableTC1.ZOrder" xml:space="preserve">
<value>16</value>
</data>
<data name="cboxEnableVirtualBarCode.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cboxEnableVirtualBarCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cboxEnableVirtualBarCode.Location" type="System.Drawing.Point, System.Drawing">
<value>638, 148</value>
</data>
<data name="cboxEnableVirtualBarCode.Size" type="System.Drawing.Size, System.Drawing">
<value>108, 16</value>
</data>
<data name="cboxEnableVirtualBarCode.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="cboxEnableVirtualBarCode.Text" xml:space="preserve">
<value>启用虚拟二维码</value>
</data>
<data name="&gt;&gt;cboxEnableVirtualBarCode.Name" xml:space="preserve">
<value>cboxEnableVirtualBarCode</value>
</data>
<data name="&gt;&gt;cboxEnableVirtualBarCode.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cboxEnableVirtualBarCode.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxEnableVirtualBarCode.ZOrder" xml:space="preserve">
<value>17</value>
</data>
<data name="cboxEnableBeforePlaceProductGrab.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -1384,7 +1414,7 @@
<value>NoControl</value>
</data>
<data name="cboxEnableBeforePlaceProductGrab.Location" type="System.Drawing.Point, System.Drawing">
<value>638, 183</value>
<value>638, 109</value>
</data>
<data name="cboxEnableBeforePlaceProductGrab.Size" type="System.Drawing.Size, System.Drawing">
<value>96, 16</value>
@ -1405,7 +1435,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxEnableBeforePlaceProductGrab.ZOrder" xml:space="preserve">
<value>17</value>
<value>18</value>
</data>
<data name="cboxDisableBuzzer.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1435,7 +1465,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxDisableBuzzer.ZOrder" xml:space="preserve">
<value>18</value>
<value>19</value>
</data>
<data name="cboxCheckVisionSwOpened.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1465,7 +1495,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxCheckVisionSwOpened.ZOrder" xml:space="preserve">
<value>19</value>
<value>20</value>
</data>
<data name="cboxIsSimTest.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1495,7 +1525,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxIsSimTest.ZOrder" xml:space="preserve">
<value>20</value>
<value>21</value>
</data>
<data name="cboxPrintTC6Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1525,7 +1555,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxPrintTC6Communicate.ZOrder" xml:space="preserve">
<value>21</value>
<value>22</value>
</data>
<data name="cboxPrintTC3Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1555,7 +1585,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxPrintTC3Communicate.ZOrder" xml:space="preserve">
<value>22</value>
<value>23</value>
</data>
<data name="cboxPrintTC5Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1585,7 +1615,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxPrintTC5Communicate.ZOrder" xml:space="preserve">
<value>23</value>
<value>24</value>
</data>
<data name="cboxPrintTC2Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1615,7 +1645,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxPrintTC2Communicate.ZOrder" xml:space="preserve">
<value>24</value>
<value>25</value>
</data>
<data name="cboxPrintTC4Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1645,7 +1675,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxPrintTC4Communicate.ZOrder" xml:space="preserve">
<value>25</value>
<value>26</value>
</data>
<data name="cboxPrintTC1Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1675,7 +1705,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxPrintTC1Communicate.ZOrder" xml:space="preserve">
<value>26</value>
<value>27</value>
</data>
<data name="cboxDisableDoor.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1705,7 +1735,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxDisableDoor.ZOrder" xml:space="preserve">
<value>27</value>
<value>28</value>
</data>
<data name="tbarWholeSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>False</value>
@ -1732,7 +1762,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;tbarWholeSpeed.ZOrder" xml:space="preserve">
<value>28</value>
<value>29</value>
</data>
<data name="label16.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1762,7 +1792,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label16.ZOrder" xml:space="preserve">
<value>29</value>
<value>30</value>
</data>
<data name="lblFlyCameraSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1792,7 +1822,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;lblFlyCameraSpeed.ZOrder" xml:space="preserve">
<value>30</value>
<value>31</value>
</data>
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1822,7 +1852,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>31</value>
<value>32</value>
</data>
<data name="lblTakeTrayFromNg2InputSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1852,7 +1882,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;lblTakeTrayFromNg2InputSpeed.ZOrder" xml:space="preserve">
<value>32</value>
<value>33</value>
</data>
<data name="lblWholeSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1882,7 +1912,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;lblWholeSpeed.ZOrder" xml:space="preserve">
<value>33</value>
<value>34</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1912,7 +1942,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>34</value>
<value>35</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>

@ -68,6 +68,7 @@
this.button7 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button();
this.button10 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@ -529,11 +530,22 @@
this.button9.UseVisualStyleBackColor = true;
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// button10
//
this.button10.Location = new System.Drawing.Point(853, 371);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(75, 23);
this.button10.TabIndex = 39;
this.button10.Text = "button10";
this.button10.UseVisualStyleBackColor = true;
this.button10.Click += new System.EventHandler(this.button10_Click);
//
// TestFrm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1336, 854);
this.Controls.Add(this.button10);
this.Controls.Add(this.button9);
this.Controls.Add(this.button8);
this.Controls.Add(this.button7);
@ -602,5 +614,6 @@
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.Button button10;
}
}

@ -311,7 +311,7 @@ namespace Rs.MotionPlat
private void button7_Click(object sender, EventArgs e)
{
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
}
private void button9_Click(object sender, EventArgs e)
@ -322,16 +322,31 @@ namespace Rs.MotionPlat
TraySlot slot = GlobalTray.GrrTray.GetSlot(ESlotStatus.Have);
if(slot==null)
{
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
break;
}
else
{
StockTakeFlow.Instance.Take(ETrayType.Grab, slot.Index, 1);
ProductLocationResult fixtureret = FixedGrabProductFlow.Instance.Grab(ETrayType.Grr, slot.Index, 1);
if(fixtureret!=null && fixtureret.Result== EOneGrabSixteenResult.Ok || fixtureret.Result== EOneGrabSixteenResult.Slant)
{
StockTakeFlow.Instance.Take(ETrayType.Grr, slot.Index, 1,fixtureret,false);
GlobalTray.GrrTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
slot = GlobalTray.RetestTray.GetSlot(ESlotStatus.NotHave);
if(slot!=null)
{
StockPlaceFlow.Instance.Place(ETrayType.ReTest, slot.Index, 1);
}
}
}
}
});
}
private void button10_Click(object sender, EventArgs e)
{
StockLocationFlow.Instance.Grab(ETrayType.Grr, 1);
}
}
}

@ -130,11 +130,19 @@ namespace Rs.MotionPlat.Vision
result.Result = false;
}
else
{
try
{
result.Result = true;
result.OffsetX = double.Parse(results[2]);
result.OffsetY = double.Parse(results[3]);
}
catch (Exception)
{
}
}
NozzleCalibReciveEvent.Set();
}
reciveBuffer.Clear();

Loading…
Cancel
Save