|
|
|
@ -88,6 +88,14 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AddTestRecordToProduct()
|
|
|
|
|
{
|
|
|
|
|
if (Product != null && !string.IsNullOrEmpty(Result))
|
|
|
|
|
{
|
|
|
|
|
Product.AddResult(this.Index, "", "");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Clear()
|
|
|
|
|
{
|
|
|
|
|
this.Product = null;
|
|
|
|
@ -545,13 +553,13 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
if(Status == ETestFixtureStatus.Testing ||(Status== ETestFixtureStatus.IDLE && Product!=null &&String.IsNullOrEmpty(Result)))
|
|
|
|
|
{
|
|
|
|
|
Send("Result$");
|
|
|
|
|
LogHelper.Debug($"<<< TC{Index} Result$");
|
|
|
|
|
if (CheckPrintLog())
|
|
|
|
|
{
|
|
|
|
|
//lock (this)
|
|
|
|
|
//{
|
|
|
|
|
// File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} Result$\r\n");
|
|
|
|
|
//}
|
|
|
|
|
LogHelper.Debug($"<<< TC{Index} Result$");
|
|
|
|
|
logs.Enqueue($"<<< TC{Index} Result$");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -567,7 +575,7 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
break;
|
|
|
|
|
case "3":
|
|
|
|
|
//侧相机测试失败
|
|
|
|
|
EButtonType sideCameraSelect = Msgbox.ShowTipDialog(EButtonType.Retry | EButtonType.Cancel, "请检查DUT是否放好,如果已放好,继续测试选择Retry,终止测试选择Cancel");
|
|
|
|
|
EButtonType sideCameraSelect = Msgbox.ShowTipDialog(EButtonType.Retry | EButtonType.Cancel, $"请检查DUT{Index}是否放好,如果已放好,继续测试选择Retry,终止测试选择Cancel","warn",true);
|
|
|
|
|
if(sideCameraSelect== EButtonType.Retry)
|
|
|
|
|
{
|
|
|
|
|
string msg = "ContinueTest#1$";
|
|
|
|
@ -593,44 +601,34 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
dataEvent.Set();
|
|
|
|
|
break;
|
|
|
|
|
case "Result":
|
|
|
|
|
//if (writeLogs.Contains(Index))
|
|
|
|
|
//{
|
|
|
|
|
// LogHelper.Info($">>> 治具{Index} Result");
|
|
|
|
|
//}
|
|
|
|
|
if(Product!=null)
|
|
|
|
|
//if(items!=null && items.Length>=6)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (items[2] == "1")
|
|
|
|
|
{
|
|
|
|
|
Result = "PASS";
|
|
|
|
|
PassCount++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if (Product != null)
|
|
|
|
|
{
|
|
|
|
|
Result = "NG";
|
|
|
|
|
|
|
|
|
|
if (items[2] == "1")
|
|
|
|
|
{
|
|
|
|
|
Result = "PASS";
|
|
|
|
|
PassCount++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Result = "NG";
|
|
|
|
|
}
|
|
|
|
|
Product.Result = Result;
|
|
|
|
|
Product.Bin = items[6];
|
|
|
|
|
//this.Product.AddResult(this.Index, Result, items[6]);
|
|
|
|
|
}
|
|
|
|
|
this.Product.AddResult(this.Index, Result, items[6]);
|
|
|
|
|
string csvContent = string.Join(",", items[3], items[4], items[5]);
|
|
|
|
|
LogHelper.Debug($"Result:{items[3]}");
|
|
|
|
|
DevLog.Summary(CsvTitle, csvContent);
|
|
|
|
|
this.EndTestTime = DateTime.Now;
|
|
|
|
|
this.LastCT = (EndTestTime - StartTestTime).TotalSeconds;
|
|
|
|
|
TotalCount++;
|
|
|
|
|
Yield = (double)((double)PassCount / TotalCount);
|
|
|
|
|
Status = ETestFixtureStatus.IDLE;
|
|
|
|
|
dataEvent.Set();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//string summaryPath = $"D:\\Summary\\{DateTime.Now.ToString("yyyyMMdd")}\\summary.csv";
|
|
|
|
|
//if (!Directory.Exists(Path.GetDirectoryName(summaryPath)))
|
|
|
|
|
//{
|
|
|
|
|
// Directory.CreateDirectory(Path.GetDirectoryName(summaryPath));
|
|
|
|
|
//}
|
|
|
|
|
//if (!File.Exists(summaryPath))
|
|
|
|
|
//{
|
|
|
|
|
// File.AppendAllText(summaryPath, CsvTitle);
|
|
|
|
|
//}
|
|
|
|
|
//File.AppendAllText(summaryPath, items[3]);
|
|
|
|
|
string csvContent = string.Join(",", items[3], items[4], items[5]);
|
|
|
|
|
DevLog.Summary(CsvTitle, csvContent);
|
|
|
|
|
this.EndTestTime = DateTime.Now;
|
|
|
|
|
this.LastCT = (EndTestTime - StartTestTime).TotalSeconds;
|
|
|
|
|
TotalCount++;
|
|
|
|
|
Yield = (double)((double)PassCount / TotalCount);
|
|
|
|
|
Status = ETestFixtureStatus.IDLE;
|
|
|
|
|
dataEvent.Set();
|
|
|
|
|
break;
|
|
|
|
|
case "ErrorCode":
|
|
|
|
|
//if (writeLogs.Contains(Index))
|
|
|
|
|