增加拍照、取放料的动作的统计功能

Eight
lhiven 7 months ago
parent 7be04f5924
commit a716d353ff

@ -350,10 +350,12 @@ namespace Rs.MotionPlat.Flow
}
break;
case EDischargeFlowStep.:
ActionStart();
ProductLocationFlow.Instance.Grab(ETrayType.Input, takeSlotIndex);
productLocationResult = OneGrabSixteenManager.Instance.GetResults();
if (productLocationResult != null || GlobalVar.RunSpace)
{
ActionEnd("PnP 扫描 16 个 DUT 2DBC", "PrP scan 16 DUT 2DBC");
//对结果进行处理
flowStep = EDischargeFlowStep.;
}
@ -468,6 +470,7 @@ namespace Rs.MotionPlat.Flow
//{
// DischargeModuleGoSafePosFlow.Instance.GoSafePostion(ESafePosSide.PlaceToFixture);
//}
ActionStart();
if(GroupAxisMove.XY1Y2MovePos(targetPosition, GlobalVar.WholeSpeed, EGoWhichSide.FixtureSide))
{
AxisPosPrint.PrintXY1Y2TargetPos("到治具放料缓冲位,", targetPosition, GetClassName());
@ -477,6 +480,7 @@ namespace Rs.MotionPlat.Flow
case EDischargeFlowStep.:
if(Ops.IsStop("LoadX","LoadY1","LoadY2"))
{
ActionEnd("拾取器移动到另一个治具", "Picker move to another test cell (2nd)");
AxisPosPrint.PrintXY1Y2CurrentPos("轴loadx,loady1,loady2已停止运动,",GetClassName());
if(AxisArrived.LoadXY1Y2IsArrived(targetPosition.X, targetPosition.Y1, targetPosition.Y2))
{
@ -996,6 +1000,29 @@ namespace Rs.MotionPlat.Flow
}
return null;
}
Stopwatch timeStatistics = new Stopwatch();
public void ActionStart()
{
if (GlobalVar.EnableIndexTimeStatistics)
timeStatistics.Restart();
}
public void ActionEnd(string actionCnName, string actionEnName)
{
if (GlobalVar.EnableIndexTimeStatistics)
{
timeStatistics.Stop();
string dirpath = $"d:\\data\\{DateTime.Now.ToString("yyyyMMdd")}";
if(!Directory.Exists(dirpath))
{
Directory.CreateDirectory(dirpath);
}
string filename = Path.Combine(dirpath, "breakdowntesttime.csv");
File.AppendAllText(filename, $"{actionCnName},{actionEnName},{timeStatistics.ElapsedMilliseconds}\r\n");
}
}
}
}

@ -69,6 +69,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
TargetPosition targetPosition = new TargetPosition();
TestFixture curFixture = TestFixtureManager.Instance.GetTestFixture(fixtureIndex);
Nozzle curNozzle=NozzleManager.GetNozzle(nozzleIndex);
DischargeFlow.Instance.ActionStart();
while (!finished)
{
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
@ -241,7 +242,8 @@ namespace Rs.MotionPlat.Flow.SubFlow
case EFixturePlaceFlowStep.:
if (Ops.IsStop($"NozzleZ{curNozzle.NozzleIndex}"))
{
if(bTest)
DischargeFlow.Instance.ActionEnd("拾取器将新的 DUT 装入治具夹头", "Picker load new DUT to test cell holder");
if (bTest)
{
finished = true;
flowStep = EFixturePlaceFlowStep.;

@ -67,7 +67,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
TargetPosition targetPosition = new TargetPosition();
TestFixture curFixture = TestFixtureManager.Instance.GetTestFixture(fixtureIndex);
Nozzle curNozzle = null;
DischargeFlow.Instance.ActionStart();
while (!finished)
{
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
@ -206,6 +206,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
case EFixtureTakeFlowStep.:
if (curNozzle.HasProduct() || GlobalVar.RunSpace)
{
DischargeFlow.Instance.ActionEnd("拾取器从治具夹头上卸下 DUT", "Picker unload DUT from test cell holder");
if(btest)
{
finished = true;

@ -98,6 +98,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
TargetPosition targetPosition = new TargetPosition();
Nozzle curNozzle = NozzleManager.GetNozzle(nozzleIndex);
TraySlot curPlaceSlot = null;
DischargeFlow.Instance.ActionStart();
while (!finished)
{
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
@ -283,6 +284,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
case EStockPlaceFlowStep.:
if (!curNozzle.HasProduct() || GlobalVar.RunSpace)
{
DischargeFlow.Instance.ActionEnd("拾取器将 1 个 DUT 卸载到output托盘OK/NG", "Picker unload 1 DUT to output trav (OK/NG)");
if(curNozzle.Product!=null)
{
curNozzle.Product.ToSlotIndex = curPlaceSlot.Index;

@ -68,6 +68,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
/// <param name="className"></param>
public void Take(ETrayType trayType, int slotIndex,int nozzleIndex, EStockScanBarcodeMode scanBarCodeMode= EStockScanBarcodeMode.Multi, ProductLocationResult locaResult=null,bool needStop=true)
{
if (finished)
finished = false;
else
@ -75,6 +76,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
flowStep = EStockTakeFlowStep.;
string logInfo = string.Empty;
TargetPosition targetPosition = new TargetPosition();
DischargeFlow.Instance.ActionStart();
while (!finished)
{
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
@ -245,6 +247,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
//flowStep = EStockTakeFlowStep.判断是否需要从料仓取料;
finished = true;
flowStep = EStockTakeFlowStep.;
DischargeFlow.Instance.ActionEnd("PnP 从输入托盘拾取 1 个 DUT", "PhP pick up 1 DUT from input tray");
}
else
{

Loading…
Cancel
Save