|
|
@ -1,5 +1,6 @@
|
|
|
|
using Rs.Controls;
|
|
|
|
using Rs.Controls;
|
|
|
|
using Rs.Framework;
|
|
|
|
using Rs.Framework;
|
|
|
|
|
|
|
|
using Rs.Motion.Base;
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
using Rs.MotionPlat.Entitys;
|
|
|
|
using Rs.MotionPlat.Entitys;
|
|
|
|
using Rs.MotionPlat.Flow.Common;
|
|
|
|
using Rs.MotionPlat.Flow.Common;
|
|
|
@ -36,6 +37,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public class StockTakeFlow
|
|
|
|
public class StockTakeFlow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
int takeNum = 1;
|
|
|
|
bool finished = true;
|
|
|
|
bool finished = true;
|
|
|
|
Nozzle curNozzle = null;
|
|
|
|
Nozzle curNozzle = null;
|
|
|
|
TraySlot waitTakeProductSlot = null;
|
|
|
|
TraySlot waitTakeProductSlot = null;
|
|
|
@ -68,7 +70,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
/// <param name="className"></param>
|
|
|
|
/// <param name="className"></param>
|
|
|
|
public void Take(ETrayType trayType, int slotIndex,int nozzleIndex, EStockScanBarcodeMode scanBarCodeMode= EStockScanBarcodeMode.Multi, ProductLocationResult locaResult=null,bool needStop=true)
|
|
|
|
public void Take(ETrayType trayType, int slotIndex,int nozzleIndex, EStockScanBarcodeMode scanBarCodeMode= EStockScanBarcodeMode.Multi, ProductLocationResult locaResult=null,bool needStop=true)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
takeNum = 1;
|
|
|
|
if (finished)
|
|
|
|
if (finished)
|
|
|
|
finished = false;
|
|
|
|
finished = false;
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -252,6 +254,28 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if(takeNum<2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
takeNum++;
|
|
|
|
|
|
|
|
IAxis homeAxis = AxisControl.GetAxis($"NozzleZ{curNozzle.NozzleIndex}");
|
|
|
|
|
|
|
|
if (homeAxis != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
homeAxis.Home();
|
|
|
|
|
|
|
|
Thread.Sleep(500);
|
|
|
|
|
|
|
|
while (true)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (homeAxis.HomeStatus == Motion.EHomeStatus.Finished)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Thread.Sleep(100);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
flowStep = EStockTakeFlowStep.到料仓取料位上方;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (GlobalVar.BinTakeFailSkip && trayType == ETrayType.Input)
|
|
|
|
if (GlobalVar.BinTakeFailSkip && trayType == ETrayType.Input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logInfo = GetClassName() + $"{trayType} bin {waitTakeProductSlot.Index} take fail auto skip";
|
|
|
|
logInfo = GetClassName() + $"{trayType} bin {waitTakeProductSlot.Index} take fail auto skip";
|
|
|
@ -301,6 +325,8 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|