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

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

@ -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);

@ -67,7 +67,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
/// <param name="tray">需要放入的料盘</param>
/// <param name="nozzleIndex">哪个吸嘴放</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;
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.;
}

@ -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);
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();
}
}
}
}

@ -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")]

@ -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
/// </summary>
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<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))
ProductLocationResult fixtureret = FixedGrabProductFlow.Instance.TakePicture(trayType, slotIndex, 1);
if(fixtureret != null)
{
while (!Ops.IsStop($"NozzleZ{nozzleIndex}"))
if(fixtureret.Result== EOneGrabSixteenResult.Ok || fixtureret.Result== EOneGrabSixteenResult.LocationOkScanBarcodeFail)
{
Thread.Sleep(10);
}
StockTakeFlow.Instance.Take(trayType, slotIndex, nozzleIndex, EStockScanBarcodeMode.Single,fixtureret,false);
}
}
//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>
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<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.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<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.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);
// }
// }
//}
}
});

Loading…
Cancel
Save