1、修复不经过上料而由测试软件直接测试时,当测试完成后运控会不停的获取测试结果的问题。

2、修复GRR扫码时,当扫码失败时,手动输入二维码可以为空的问题。
3、手动取放料时增加先拍照再取放料功能
Eight
lhiven 5 months ago
parent 489f347846
commit 65f3f77ade

@ -642,9 +642,9 @@ namespace Rs.MotionPlat.Entitys
TotalCount++; TotalCount++;
Yield = (double)((double)PassCount / TotalCount); Yield = (double)((double)PassCount / TotalCount);
AddTestRecordToProduct(); AddTestRecordToProduct();
Status = ETestFixtureStatus.IDLE;
//this.Product.AddResult(this.Index, Result, items[6]); //this.Product.AddResult(this.Index, Result, items[6]);
} }
Status = ETestFixtureStatus.IDLE;
string csvContent = string.Join(",", items[3], items[4], items[5]); string csvContent = string.Join(",", items[3], items[4], items[5]);
LogHelper.Debug($"Result:{items[2]},{items[3]}"); LogHelper.Debug($"Result:{items[2]},{items[3]}");
DevLog.Summary(CsvTitle, csvContent); DevLog.Summary(CsvTitle, csvContent);

@ -67,7 +67,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
/// <param name="tray">需要放入的料盘</param> /// <param name="tray">需要放入的料盘</param>
/// <param name="nozzleIndex">哪个吸嘴放</param> /// <param name="nozzleIndex">哪个吸嘴放</param>
/// <param name="className"></param> /// <param name="className"></param>
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; RsTray tray = null;
if (finished) if (finished)
@ -112,7 +112,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
case EStockPlaceFlowStep.: case EStockPlaceFlowStep.:
slotOffsetX = 0; slotOffsetX = 0;
slotOffsetY = 0; slotOffsetY = 0;
if (GlobalVar.EnableBeforePlaceProductGrab) if (GlobalVar.EnableBeforePlaceProductGrab || bNeedGrab)
{ {
flowStep = EStockPlaceFlowStep.; flowStep = EStockPlaceFlowStep.;
} }

@ -1,4 +1,5 @@
using System; using Rs.Framework;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -26,9 +27,19 @@ namespace Rs.MotionPlat
} }
private void btnFillQrcode_Click(object sender, EventArgs e) private void btnFillQrcode_Click(object sender, EventArgs e)
{
if(string.IsNullOrEmpty(txtQrcode.Text.Trim()))
{
Msg.ShowError("SN cann't be empty");
txtQrcode.Text = "";
txtQrcode.Focus();
}
else
{ {
action?.Invoke(1, txtQrcode.Text); action?.Invoke(1, txtQrcode.Text);
this.Close(); this.Close();
} }
}
} }
} }

@ -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: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]

@ -3,9 +3,11 @@ using Rs.DataAccess;
using Rs.Framework; using Rs.Framework;
using Rs.Motion; using Rs.Motion;
using Rs.MotionPlat.Commom; using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Flow; using Rs.MotionPlat.Flow;
using Rs.MotionPlat.Flow.NormalFlow; using Rs.MotionPlat.Flow.NormalFlow;
using Rs.MotionPlat.Flow.SafePosFlow; using Rs.MotionPlat.Flow.SafePosFlow;
using Rs.MotionPlat.Flow.SubFlow;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@ -324,6 +326,7 @@ namespace Rs.MotionPlat.Recipe
/// </summary> /// </summary>
private void TakeProduct(int slotIndex, int nozzleIndex) private void TakeProduct(int slotIndex, int nozzleIndex)
{ {
Enum.TryParse(dt.Rows[0]["trayname"].ToString(), out ETrayType trayType);
ErrorCode errCode = ErrorCode.Ok; ErrorCode errCode = ErrorCode.Ok;
Task.Run(() => { Task.Run(() => {
while (true) while (true)
@ -335,25 +338,34 @@ namespace Rs.MotionPlat.Recipe
DialogResult dr = Msg.ShowQuestion("Are you sure to take product?", MessageBoxButtons.OKCancel); DialogResult dr = Msg.ShowQuestion("Are you sure to take product?", MessageBoxButtons.OKCancel);
if (dr == DialogResult.OK) if (dr == DialogResult.OK)
{ {
Nozzle takeNozzle=NozzleManager.GetNozzle(nozzleIndex); ProductLocationResult fixtureret = FixedGrabProductFlow.Instance.TakePicture(trayType, slotIndex, 1);
if(Enum.TryParse<ETrayType>(m_trayName, out ETrayType takeTray)) if(fixtureret != null)
{ {
double pos = NozzleManager.GetNozzleToTrayTakeProductPos(takeTray, nozzleIndex); if(fixtureret.Result== EOneGrabSixteenResult.Ok || fixtureret.Result== EOneGrabSixteenResult.LocationOkScanBarcodeFail)
errCode = AxisControl.GetAxis($"NozzleZ{nozzleIndex}").MovePos(pos, GlobalVar.WholeSpeed);
if (errCode > ErrorCode.Ok) return;
while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
{ {
Thread.Sleep(10); StockTakeFlow.Instance.Take(trayType, slotIndex, nozzleIndex, EStockScanBarcodeMode.Single,fixtureret,false);
}
takeNozzle.VacSuction(EIoOperate.Open,nameof(StockTrayLocationRecipe));
if (NozzleManager.GotoSafePos(nozzleIndex))
{
while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
{
Thread.Sleep(10);
}
} }
} }
//Nozzle takeNozzle=NozzleManager.GetNozzle(nozzleIndex);
//if(Enum.TryParse<ETrayType>(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
/// </summary> /// </summary>
private void DumpProduct(int slotIndex, int nozzleIndex) private void DumpProduct(int slotIndex, int nozzleIndex)
{ {
Enum.TryParse(dt.Rows[0]["trayname"].ToString(), out ETrayType trayType);
ErrorCode errCode = ErrorCode.Ok; ErrorCode errCode = ErrorCode.Ok;
Task.Run(() => { Task.Run(() => {
while (true) while (true)
@ -373,27 +386,28 @@ namespace Rs.MotionPlat.Recipe
DialogResult dr = Msg.ShowQuestion("Are you sure to dump product?", MessageBoxButtons.OKCancel); DialogResult dr = Msg.ShowQuestion("Are you sure to dump product?", MessageBoxButtons.OKCancel);
if (dr == DialogResult.OK) if (dr == DialogResult.OK)
{ {
Nozzle takeNozzle = NozzleManager.GetNozzle(nozzleIndex); StockPlaceFlow.Instance.Place(trayType, slotIndex, nozzleIndex, false,true);
if (Enum.TryParse<ETrayType>(m_trayName, out ETrayType takeTray)) //Nozzle takeNozzle = NozzleManager.GetNozzle(nozzleIndex);
{ //if (Enum.TryParse<ETrayType>(m_trayName, out ETrayType takeTray))
double pos = NozzleManager.GetNozzleToTrayTakeProductPos(takeTray, nozzleIndex); //{
errCode = AxisControl.GetAxis($"NozzleZ{nozzleIndex}").MovePos(pos, GlobalVar.WholeSpeed); // double pos = NozzleManager.GetNozzleToTrayTakeProductPos(takeTray, nozzleIndex);
if (errCode > ErrorCode.Ok) return; // errCode = AxisControl.GetAxis($"NozzleZ{nozzleIndex}").MovePos(pos, GlobalVar.WholeSpeed);
while (!Ops.IsStop($"NozzleZ{nozzleIndex}")) // if (errCode > ErrorCode.Ok) return;
{ // while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
Thread.Sleep(10); // {
} // Thread.Sleep(10);
takeNozzle.VacSuction(EIoOperate.Close,nameof(StockTrayLocationRecipe)); // }
takeNozzle.VacBreak(EIoOperate.Open,nameof(StockTrayLocationRecipe)); // takeNozzle.VacSuction(EIoOperate.Close,nameof(StockTrayLocationRecipe));
takeNozzle.VacBreak(EIoOperate.Close, nameof(StockTrayLocationRecipe)); // takeNozzle.VacBreak(EIoOperate.Open,nameof(StockTrayLocationRecipe));
if (NozzleManager.GotoSafePos(nozzleIndex)) // takeNozzle.VacBreak(EIoOperate.Close, nameof(StockTrayLocationRecipe));
{ // if (NozzleManager.GotoSafePos(nozzleIndex))
while (!Ops.IsStop($"NozzleZ{nozzleIndex}")) // {
{ // while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
Thread.Sleep(10); // {
} // Thread.Sleep(10);
} // }
} // }
//}
} }
}); });

Loading…
Cancel
Save