@ -43,7 +43,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
}
public void Grab ( int slotIndex ,string className )
public void Grab ( int slotIndex )
{
if ( finished )
finished = false ;
@ -70,9 +70,9 @@ namespace Rs.MotionPlat.Flow.SubFlow
targetPosition . X = sp . X ;
targetPosition . Y1 = GlobalVar . StockSideY1 ;
targetPosition . Y2 = sp . Y - 30 ;
if ( GroupAxisMove . XY1Y2MovePos ( targetPosition , GlobalVar . FlyCamera Speed) )
if ( GroupAxisMove . XY1Y2MovePos ( targetPosition , GlobalVar . Whole Speed) )
{
AxisPosPrint . PrintXY1Y2TargetPos ( "到料仓拍照位上方" , targetPosition , className ) ;
AxisPosPrint . PrintXY1Y2TargetPos ( "到料仓拍照位上方" , targetPosition , GetClassName( ) ) ;
flowStep = EProductLocationFlowStep . 等 待 到 料 仓 拍 照 起 始 位 ;
}
}
@ -81,7 +81,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
case EProductLocationFlowStep . 等 待 到 料 仓 拍 照 起 始 位 :
if ( Ops . IsStop ( "LoadX" , "LoadY1" , "LoadY2" ) )
{
AxisPosPrint . PrintXY1Y2CurrentPos ( "轴loadx,loady1,loady2已停止运动," , className ) ;
AxisPosPrint . PrintXY1Y2CurrentPos ( "轴loadx,loady1,loady2已停止运动," , GetClassName ( ) ) ;
if ( AxisArrived . LoadXY1Y2IsArrived ( targetPosition . X , targetPosition . Y1 , targetPosition . Y2 ) )
{
SlotPoint sp = TrayPointManager . GetSlotPoint ( ETrayType . Input , grabStartSlot . Index ) ;
@ -92,12 +92,12 @@ namespace Rs.MotionPlat.Flow.SubFlow
triggerPos [ i ] = sp . Y + ( i * 5 ) ;
}
AxisControl . LoadY2 . SetPosCompare ( 1 , triggerPos ) ;
AxisPosPrint . PrintXY1Y2CurrentPos ( "已运动到料仓拍照位上方" , className ) ;
AxisPosPrint . PrintXY1Y2CurrentPos ( "已运动到料仓拍照位上方" , GetClassName( ) ) ;
flowStep = EProductLocationFlowStep . 到 料 仓 拍 照 结 束 位 ;
}
else
{
logInfo = $"{ className } 轴不在目标位置,重新运动一次";
logInfo = $"{ GetClassName() } 轴不在目标位置,重新运动一次";
MessageQueue . Instance . Warn ( logInfo ) ;
flowStep = EProductLocationFlowStep . 到 料 仓 拍 照 起 始 位 ;
}
@ -115,7 +115,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
targetPosition . Y2 = sp . Y + 2 ;
if ( GroupAxisMove . XY1Y2MovePos ( targetPosition , GlobalVar . FlyCameraSpeed ) )
{
AxisPosPrint . PrintXY1Y2TargetPos ( "到料仓拍照结束位," , targetPosition , className ) ;
AxisPosPrint . PrintXY1Y2TargetPos ( "到料仓拍照结束位," , targetPosition , GetClassName( ) ) ;
flowStep = EProductLocationFlowStep . 等 待 到 料 仓 拍 照 结 束 位 ;
}
}
@ -124,15 +124,15 @@ namespace Rs.MotionPlat.Flow.SubFlow
case EProductLocationFlowStep . 等 待 到 料 仓 拍 照 结 束 位 :
if ( Ops . IsStop ( "LoadX" , "LoadY1" , "LoadY2" ) )
{
AxisPosPrint . PrintXY1Y2CurrentPos ( "轴loadx,loady1,loady2已停止运动," , className ) ;
AxisPosPrint . PrintXY1Y2CurrentPos ( "轴loadx,loady1,loady2已停止运动," , GetClassName ( ) ) ;
if ( AxisArrived . LoadXY1Y2IsArrived ( targetPosition . X , targetPosition . Y1 , targetPosition . Y2 ) )
{
AxisPosPrint . PrintXY1Y2CurrentPos ( "已运动到料仓拍照结束位," , className ) ;
AxisPosPrint . PrintXY1Y2CurrentPos ( "已运动到料仓拍照结束位," , GetClassName( ) ) ;
flowStep = EProductLocationFlowStep . 拍 照 结 果 处 理 ;
}
else
{
logInfo = $"{ className } 轴不在目标位置,重新运动一次";
logInfo = $"{ GetClassName() } 轴不在目标位置,重新运动一次";
MessageQueue . Instance . Warn ( logInfo ) ;
flowStep = EProductLocationFlowStep . 到 料 仓 拍 照 结 束 位 ;
}
@ -154,5 +154,10 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
}
}
private string GetClassName ( )
{
return "ProductLocationFlow-" ;
}
}
}