@ -412,25 +412,40 @@ namespace Rs.MotionPlat.Flow
else if ( fixtureret . Result = = EOneGrabSixteenResult . LocationOkScanBarcodeFail )
{
Nozzle idleNozzle = NozzleManager . GetIdelNozzle ( ) ;
StockTakeFlow . Instance . Take ( ETrayType . Input , ret . SlotIndex , idleNozzle . NozzleIndex ) ;
//放料
TraySlot noProductSlot = GlobalTray . RetestTray . GetSlot ( ESlotStatus . NotHave ) ;
if ( noProductSlot ! = null )
if ( false )
{
StockPlaceFlow . Instance . Place ( ETrayType . ReTest , noProductSlot . Index , idleNozzle . NozzleIndex ) ;
StockTakeFlow . Instance . Take ( ETrayType . Input , ret . SlotIndex , idleNozzle . NozzleIndex ) ;
//放料
TraySlot noProductSlot = GlobalTray . RetestTray . GetSlot ( ESlotStatus . NotHave ) ;
if ( noProductSlot ! = null )
{
StockPlaceFlow . Instance . Place ( ETrayType . ReTest , noProductSlot . Index , idleNozzle . NozzleIndex ) ;
}
else
{
Msgbox . ShowTipDialog ( EButtonType . Ok , "Retest tray full,please change tray and click ok button" , "tip" , true ) ;
GlobalTray . RetestTray . ChangeStatus ( ESlotStatus . NotHave ) ;
ThreePointLocationFlow . Instance . Location ( ETrayType . ReTest ) ;
//放料
noProductSlot = GlobalTray . RetestTray . GetSlot ( ESlotStatus . NotHave ) ;
StockPlaceFlow . Instance . Place ( ETrayType . ReTest , noProductSlot . Index , idleNozzle . NozzleIndex ) ;
}
takeSlotIndex + + ;
flowStep = EDischargeFlowStep . 判 断 是 否 需 要 从 料 仓 取 料 ;
exit = true ;
}
else
{
Msgbox . ShowTipDialog ( EButtonType . Ok , "Retest tray full,please change tray and click ok button" , "tip" , true ) ;
GlobalTray . RetestTray . ChangeStatus ( ESlotStatus . NotHave ) ;
ThreePointLocationFlow . Instance . Location ( ETrayType . ReTest ) ;
//放料
noProductSlot = GlobalTray . RetestTray . GetSlot ( ESlotStatus . NotHave ) ;
StockPlaceFlow . Instance . Place ( ETrayType . ReTest , noProductSlot . Index , idleNozzle . NozzleIndex ) ;
StockTakeFlow . Instance . Take ( ETrayType . Input , ret . SlotIndex , idleNozzle . NozzleIndex ) ;
if ( NozzleManager . GetNozzle ( idleNozzle . NozzleIndex ) . Product ! = null )
{
NozzleManager . GetNozzle ( idleNozzle . NozzleIndex ) . Product . SN = "SLK11111111PNK60X" ;
}
takeSlotIndex + + ;
exit = true ;
flowStep = EDischargeFlowStep . 判 断 是 否 需 要 从 料 仓 取 料 ;
}
takeSlotIndex + + ;
flowStep = EDischargeFlowStep . 判 断 是 否 需 要 从 料 仓 取 料 ;
exit = true ;
}
else if ( fixtureret . Result = = EOneGrabSixteenResult . Slant )
{
@ -776,56 +791,82 @@ namespace Rs.MotionPlat.Flow
}
else
{
if ( GlobalVar. EnableBin )
if ( placeNozzle. Product ! = null & & placeNozzle . Product . SN = = "SLK11111111PNK60X" )
{
#region NG产品, 分BIN存放
int placeSlotIndex = BinManager . GetPlaceSlot ( GlobalVar . CurrentUsedBin , ETrayType . Ng , placeNozzle . Product . Bin ) ;
if ( placeSlotIndex > 0 )
TraySlot waitPlaceSlot = GlobalTray . RetestTray . GetSlot ( ESlotStatus . NotHave ) ;
if ( waitPlaceSlot ! = null )
{
StockPlaceFlow . Instance . Place ( ETrayType . Ng, placeSlot Index, placeNozzleIndex ) ;
StockPlaceFlow . Instance . Place ( ETrayType . ReTest, waitPlaceSlot . Index, placeNozzleIndex ) ;
}
else if ( placeSlotIndex = = 0 ) //此区域已经无穴位放产品
else
{
//料盘放满了,更换料盘
DischargeModuleGoSafePosFlow . Instance . GoSafePostion ( ) ;
if ( GlobalVar . EnableFullAlarm )
if ( GlobalVar . RunSpace & & ! GlobalVar . EnableStock )
{
Msgbox. ShowTipDialog ( EButtonType . Ok , $"{placeNozzle.Product.Bin} area hasn't slot to place product,you can redraw ok tray bin area after click ok button," , "tip" , tru e) ;
GlobalTray . NgTray . ChangeStatus ( ESlotStatus . NotHave ) ;
}
//提示更换料盘
Msgbox . ShowTipDialog ( EButtonType . Ok , "NG tray full,please change tray and click ok button" , "tip" , true ) ;
ThreePointLocationFlow . Instance . Location ( ETrayType . Ng ) ;
GlobalTray . NgTray . ChangeStatus ( ESlotStatus . NotHav e) ;
}
else
{
Msgbox . ShowTipDialog ( EButtonType . Ok , $"cann't find {placeNozzle.Product.Bin} area,you can redraw ok tray area after click ok button" , "tip" , true ) ;
else
{
//提示更换料盘
Msgbox . ShowTipDialog ( EButtonType . Ok , "RetestTray full,please change tray and click ok button" , "tip" , tru e) ;
ThreePointLocationFlow . Instance . Location ( ETrayType . ReTest ) ;
GlobalTray . NgTray . ChangeStatus ( ESlotStatus . NotHave ) ;
}
}
# endregion
}
else
{
//logInfo = GetClassName() + $"检查到吸嘴{placeNozzle.NozzleIndex}号吸嘴产品检测结果{placeNozzle.Product.Result}";
//MessageQueue.Instance.Insert(logInfo);
TraySlot waitPlaceSlot = GlobalTray . NgTray . GetSlot ( ESlotStatus . NotHave ) ;
if ( waitPlaceSlot ! = null )
{
StockPlaceFlow . Instance . Place ( ETrayType . Ng , waitPlaceSlot . Index , placeNozzleIndex ) ;
}
else
if ( GlobalVar . EnableBin )
{
if ( GlobalVar . RunSpace & & ! GlobalVar . EnableStock )
#region NG产品, 分BIN存放
int placeSlotIndex = BinManager . GetPlaceSlot ( GlobalVar . CurrentUsedBin , ETrayType . Ng , placeNozzle . Product . Bin ) ;
if ( placeSlotIndex > 0 )
{
GlobalTray . NgTray . ChangeStatus ( ESlotStatus . NotHave ) ;
StockPlaceFlow . Instance . Place ( ETrayType . Ng , placeSlotIndex , placeNozzleIndex ) ;
}
else
else if ( placeSlotIndex = = 0 ) //此区域已经无穴位放产品
{
//料盘放满了,更换料盘
DischargeModuleGoSafePosFlow . Instance . GoSafePostion ( ) ;
if ( GlobalVar . EnableFullAlarm )
{
Msgbox . ShowTipDialog ( EButtonType . Ok , $"{placeNozzle.Product.Bin} area hasn't slot to place product,you can redraw ok tray bin area after click ok button," , "tip" , true ) ;
}
//提示更换料盘
Msgbox . ShowTipDialog ( EButtonType . Ok , "NG tray full,please change tray and click ok button" , "tip" , true ) ;
ThreePointLocationFlow . Instance . Location ( ETrayType . Ng ) ;
GlobalTray . NgTray . ChangeStatus ( ESlotStatus . NotHave ) ;
}
else
{
Msgbox . ShowTipDialog ( EButtonType . Ok , $"cann't find {placeNozzle.Product.Bin} area,you can redraw ok tray area after click ok button" , "tip" , true ) ;
}
# endregion
}
else
{
//logInfo = GetClassName() + $"检查到吸嘴{placeNozzle.NozzleIndex}号吸嘴产品检测结果{placeNozzle.Product.Result}";
//MessageQueue.Instance.Insert(logInfo);
TraySlot waitPlaceSlot = GlobalTray . NgTray . GetSlot ( ESlotStatus . NotHave ) ;
if ( waitPlaceSlot ! = null )
{
StockPlaceFlow . Instance . Place ( ETrayType . Ng , waitPlaceSlot . Index , placeNozzleIndex ) ;
}
else
{
if ( GlobalVar . RunSpace & & ! GlobalVar . EnableStock )
{
GlobalTray . NgTray . ChangeStatus ( ESlotStatus . NotHave ) ;
}
else
{
//提示更换料盘
Msgbox . ShowTipDialog ( EButtonType . Ok , "NG tray full,please change tray and click ok button" , "tip" , true ) ;
ThreePointLocationFlow . Instance . Location ( ETrayType . Ng ) ;
GlobalTray . NgTray . ChangeStatus ( ESlotStatus . NotHave ) ;
}
}
}
}
}
@ -997,49 +1038,62 @@ namespace Rs.MotionPlat.Flow
/// <returns></returns>
Nozzle GetPlaceNozzle ( TestFixture fixture )
{
//ABC模式
switch ( GlobalVar . TestMethod )
if ( fixture ! = null & & fixture . Product ! = null & & fixture . Product . SN = = "SLK11111111PNK60X" )
{
case "A" :
foreach ( Nozzle item in NozzleManager . GetNozzlesByStatus ( ENozzleStatus . ToTest ) )
{
if ( item . Product ! = null )
{
return item ;
}
}
break ;
case "AAB" :
if ( fixture . Product ! = null & & fixture . Product . TestNum = = 1 & & fixture . Product . Result = = "NG" )
foreach ( Nozzle item in NozzleManager . GetNozzlesByStatus ( ENozzleStatus . ToTest ) )
{
if ( item . Product ! = null )
{
return NozzleManager. GetIdelNozzle ( ) ;
return item ;
}
else
{
}
}
else
{
//ABC模式
switch ( GlobalVar . TestMethod )
{
case "A" :
foreach ( Nozzle item in NozzleManager . GetNozzlesByStatus ( ENozzleStatus . ToTest ) )
{
if ( item . Product ! = null & & ( item . Product . TestedFixtures = = null | | ! item . Product . TestedFixtures . Contains ( curFixture . Index ) ) )
if ( item . Product ! = null )
{
return item ;
}
}
}
break ;
case "ABC" : //必须更换治具
foreach ( Nozzle item in NozzleManager . GetNozzlesByStatus ( ENozzleStatus . ToTest ) )
{
if ( item . Product ! = null )
break ;
case "AAB" :
if ( fixture . Product ! = null & & fixture . Product . TestNum = = 1 & & fixture . Product . Result = = "NG" )
{
if ( item . Product . TestNum = = 0 )
return item ;
if ( ! item . Product . TestedFixtures . Contains ( fixture . Index ) )
return item ;
return NozzleManager . GetIdelNozzle ( ) ;
}
}
break ;
default :
break ;
else
{
foreach ( Nozzle item in NozzleManager . GetNozzlesByStatus ( ENozzleStatus . ToTest ) )
{
if ( item . Product ! = null & & ( item . Product . TestedFixtures = = null | | ! item . Product . TestedFixtures . Contains ( curFixture . Index ) ) )
{
return item ;
}
}
}
break ;
case "ABC" : //必须更换治具
foreach ( Nozzle item in NozzleManager . GetNozzlesByStatus ( ENozzleStatus . ToTest ) )
{
if ( item . Product ! = null )
{
if ( item . Product . TestNum = = 0 )
return item ;
if ( ! item . Product . TestedFixtures . Contains ( fixture . Index ) )
return item ;
}
}
break ;
default :
break ;
}
}
return null ;
}