diff --git a/Rs.DeweyTester/Entitys/TestFixtureManager.cs b/Rs.DeweyTester/Entitys/TestFixtureManager.cs
index 18d3b44..6f7f1b4 100644
--- a/Rs.DeweyTester/Entitys/TestFixtureManager.cs
+++ b/Rs.DeweyTester/Entitys/TestFixtureManager.cs
@@ -642,9 +642,9 @@ namespace Rs.MotionPlat.Entitys
TotalCount++;
Yield = (double)((double)PassCount / TotalCount);
AddTestRecordToProduct();
- Status = ETestFixtureStatus.IDLE;
//this.Product.AddResult(this.Index, Result, items[6]);
}
+ Status = ETestFixtureStatus.IDLE;
string csvContent = string.Join(",", items[3], items[4], items[5]);
LogHelper.Debug($"Result:{items[2]},{items[3]}");
DevLog.Summary(CsvTitle, csvContent);
diff --git a/Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs b/Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs
index dc8bf2f..f133362 100644
--- a/Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs
+++ b/Rs.DeweyTester/Flow/SubFlow/StockPlaceFlow.cs
@@ -67,7 +67,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
/// 需要放入的料盘
/// 哪个吸嘴放
///
- public void Place(ETrayType trayType,int slotIndex,int nozzleIndex,bool needStop=true)
+ public void Place(ETrayType trayType,int slotIndex,int nozzleIndex,bool needStop=true,bool bNeedGrab=false)
{
RsTray tray = null;
if (finished)
@@ -112,7 +112,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
case EStockPlaceFlowStep.待触发:
slotOffsetX = 0;
slotOffsetY = 0;
- if (GlobalVar.EnableBeforePlaceProductGrab)
+ if (GlobalVar.EnableBeforePlaceProductGrab || bNeedGrab)
{
flowStep = EStockPlaceFlowStep.到料仓拍照位上方;
}
diff --git a/Rs.DeweyTester/GrrScanFailFrm.cs b/Rs.DeweyTester/GrrScanFailFrm.cs
index 85de605..e266c5e 100644
--- a/Rs.DeweyTester/GrrScanFailFrm.cs
+++ b/Rs.DeweyTester/GrrScanFailFrm.cs
@@ -1,4 +1,5 @@
-using System;
+using Rs.Framework;
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -27,8 +28,18 @@ namespace Rs.MotionPlat
private void btnFillQrcode_Click(object sender, EventArgs e)
{
- action?.Invoke(1,txtQrcode.Text);
- this.Close();
+ if(string.IsNullOrEmpty(txtQrcode.Text.Trim()))
+ {
+ Msg.ShowError("SN cann't be empty");
+ txtQrcode.Text = "";
+ txtQrcode.Focus();
+ }
+ else
+ {
+ action?.Invoke(1, txtQrcode.Text);
+ this.Close();
+ }
+
}
}
}
diff --git a/Rs.DeweyTester/Properties/AssemblyInfo.cs b/Rs.DeweyTester/Properties/AssemblyInfo.cs
index fd93634..29e92b6 100644
--- a/Rs.DeweyTester/Properties/AssemblyInfo.cs
+++ b/Rs.DeweyTester/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
- [assembly: AssemblyVersion("1.20.25.02")]
+ [assembly: AssemblyVersion("1.20.25.03")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs
index cb970b5..14b201c 100644
--- a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs
+++ b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs
@@ -3,9 +3,11 @@ using Rs.DataAccess;
using Rs.Framework;
using Rs.Motion;
using Rs.MotionPlat.Commom;
+using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Flow;
using Rs.MotionPlat.Flow.NormalFlow;
using Rs.MotionPlat.Flow.SafePosFlow;
+using Rs.MotionPlat.Flow.SubFlow;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -324,6 +326,7 @@ namespace Rs.MotionPlat.Recipe
///
private void TakeProduct(int slotIndex, int nozzleIndex)
{
+ Enum.TryParse(dt.Rows[0]["trayname"].ToString(), out ETrayType trayType);
ErrorCode errCode = ErrorCode.Ok;
Task.Run(() => {
while (true)
@@ -335,25 +338,34 @@ namespace Rs.MotionPlat.Recipe
DialogResult dr = Msg.ShowQuestion("Are you sure to take product?", MessageBoxButtons.OKCancel);
if (dr == DialogResult.OK)
{
- Nozzle takeNozzle=NozzleManager.GetNozzle(nozzleIndex);
- if(Enum.TryParse(m_trayName, out ETrayType takeTray))
+ ProductLocationResult fixtureret = FixedGrabProductFlow.Instance.TakePicture(trayType, slotIndex, 1);
+ if(fixtureret != null)
{
- double pos = NozzleManager.GetNozzleToTrayTakeProductPos(takeTray, nozzleIndex);
- errCode = AxisControl.GetAxis($"NozzleZ{nozzleIndex}").MovePos(pos, GlobalVar.WholeSpeed);
- if (errCode > ErrorCode.Ok) return;
- while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
+ if(fixtureret.Result== EOneGrabSixteenResult.Ok || fixtureret.Result== EOneGrabSixteenResult.LocationOkScanBarcodeFail)
{
- Thread.Sleep(10);
- }
- takeNozzle.VacSuction(EIoOperate.Open,nameof(StockTrayLocationRecipe));
- if (NozzleManager.GotoSafePos(nozzleIndex))
- {
- while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
- {
- Thread.Sleep(10);
- }
+ StockTakeFlow.Instance.Take(trayType, slotIndex, nozzleIndex, EStockScanBarcodeMode.Single,fixtureret,false);
}
}
+
+ //Nozzle takeNozzle=NozzleManager.GetNozzle(nozzleIndex);
+ //if(Enum.TryParse(m_trayName, out ETrayType takeTray))
+ //{
+ // double pos = NozzleManager.GetNozzleToTrayTakeProductPos(takeTray, nozzleIndex);
+ // errCode = AxisControl.GetAxis($"NozzleZ{nozzleIndex}").MovePos(pos, GlobalVar.WholeSpeed);
+ // if (errCode > ErrorCode.Ok) return;
+ // while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
+ // {
+ // Thread.Sleep(10);
+ // }
+ // takeNozzle.VacSuction(EIoOperate.Open,nameof(StockTrayLocationRecipe));
+ // if (NozzleManager.GotoSafePos(nozzleIndex))
+ // {
+ // while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
+ // {
+ // Thread.Sleep(10);
+ // }
+ // }
+ //}
}
});
}
@@ -362,6 +374,7 @@ namespace Rs.MotionPlat.Recipe
///
private void DumpProduct(int slotIndex, int nozzleIndex)
{
+ Enum.TryParse(dt.Rows[0]["trayname"].ToString(), out ETrayType trayType);
ErrorCode errCode = ErrorCode.Ok;
Task.Run(() => {
while (true)
@@ -373,27 +386,28 @@ namespace Rs.MotionPlat.Recipe
DialogResult dr = Msg.ShowQuestion("Are you sure to dump product?", MessageBoxButtons.OKCancel);
if (dr == DialogResult.OK)
{
- Nozzle takeNozzle = NozzleManager.GetNozzle(nozzleIndex);
- if (Enum.TryParse(m_trayName, out ETrayType takeTray))
- {
- double pos = NozzleManager.GetNozzleToTrayTakeProductPos(takeTray, nozzleIndex);
- errCode = AxisControl.GetAxis($"NozzleZ{nozzleIndex}").MovePos(pos, GlobalVar.WholeSpeed);
- if (errCode > ErrorCode.Ok) return;
- while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
- {
- Thread.Sleep(10);
- }
- takeNozzle.VacSuction(EIoOperate.Close,nameof(StockTrayLocationRecipe));
- takeNozzle.VacBreak(EIoOperate.Open,nameof(StockTrayLocationRecipe));
- takeNozzle.VacBreak(EIoOperate.Close, nameof(StockTrayLocationRecipe));
- if (NozzleManager.GotoSafePos(nozzleIndex))
- {
- while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
- {
- Thread.Sleep(10);
- }
- }
- }
+ StockPlaceFlow.Instance.Place(trayType, slotIndex, nozzleIndex, false,true);
+ //Nozzle takeNozzle = NozzleManager.GetNozzle(nozzleIndex);
+ //if (Enum.TryParse(m_trayName, out ETrayType takeTray))
+ //{
+ // double pos = NozzleManager.GetNozzleToTrayTakeProductPos(takeTray, nozzleIndex);
+ // errCode = AxisControl.GetAxis($"NozzleZ{nozzleIndex}").MovePos(pos, GlobalVar.WholeSpeed);
+ // if (errCode > ErrorCode.Ok) return;
+ // while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
+ // {
+ // Thread.Sleep(10);
+ // }
+ // takeNozzle.VacSuction(EIoOperate.Close,nameof(StockTrayLocationRecipe));
+ // takeNozzle.VacBreak(EIoOperate.Open,nameof(StockTrayLocationRecipe));
+ // takeNozzle.VacBreak(EIoOperate.Close, nameof(StockTrayLocationRecipe));
+ // if (NozzleManager.GotoSafePos(nozzleIndex))
+ // {
+ // while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
+ // {
+ // Thread.Sleep(10);
+ // }
+ // }
+ //}
}
});