|
|
|
@ -136,7 +136,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
|
//}
|
|
|
|
|
if (GroupAxisMove.XY1Y2MovePos(targetPosition, GlobalVar.WholeSpeed, EGoWhichSide.StockSide))
|
|
|
|
|
{
|
|
|
|
|
AxisPosPrint.PrintXY1Y2TargetPos("到料仓拍照位上方,", targetPosition, GetClassName());
|
|
|
|
|
AxisPosPrint.PrintXY1Y2TargetPos($"到{trayType}料仓拍照位上方,", targetPosition, GetClassName());
|
|
|
|
|
flowStep = EStockPlaceFlowStep.等待到料仓拍照位上方;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -148,7 +148,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
|
AxisPosPrint.PrintXY1Y2CurrentPos("轴loadx,loady1,loady2已停止运动,", GetClassName());
|
|
|
|
|
if (AxisArrived.LoadXY1Y2IsArrived(targetPosition.X, targetPosition.Y1, targetPosition.Y2))
|
|
|
|
|
{
|
|
|
|
|
AxisPosPrint.PrintXY1Y2CurrentPos("已运动到料仓拍照位上方,", GetClassName());
|
|
|
|
|
AxisPosPrint.PrintXY1Y2CurrentPos($"已运动到{trayType}料仓拍照位上方,", GetClassName());
|
|
|
|
|
flowStep = EStockPlaceFlowStep.料仓学位拍照;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -162,16 +162,22 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
|
VisionResult vr = VisionHelper.Grab(Vision.EVisionScene.TrayLocation);
|
|
|
|
|
if(vr!=null && vr.Result)
|
|
|
|
|
{
|
|
|
|
|
curNozzle = NozzleManager.GetNozzle(nozzleIndex);
|
|
|
|
|
slotOffsetX = vr.OffsetX;
|
|
|
|
|
slotOffsetY=vr.OffsetY;
|
|
|
|
|
string title = "index,offsetx,offsety\r\n";
|
|
|
|
|
string content = $"{slotIndex},{slotOffsetX},{slotOffsetY}\r\n";
|
|
|
|
|
string dataDir = $"d://data/placestock";
|
|
|
|
|
string sn = "";
|
|
|
|
|
if(curNozzle!=null && curNozzle.Product!=null && !string.IsNullOrEmpty(curNozzle.Product.SN))
|
|
|
|
|
{
|
|
|
|
|
sn = curNozzle.Product.SN;
|
|
|
|
|
}
|
|
|
|
|
string title = "index,sn,offsetx,offsety,time\r\n";
|
|
|
|
|
string content = $"{slotIndex},{sn},{slotOffsetX},{slotOffsetY},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")}\r\n";
|
|
|
|
|
string dataDir = $"d://data/placestock//{DateTime.Now.ToString("yyyy-MM-dd")}";
|
|
|
|
|
if(!Directory.Exists(dataDir))
|
|
|
|
|
{
|
|
|
|
|
Directory.CreateDirectory(dataDir);
|
|
|
|
|
}
|
|
|
|
|
string dataFilePath = $"{dataDir}//{DateTime.Now.ToString("yyyy-MM-dd")}.csv";
|
|
|
|
|
string dataFilePath = $"{dataDir}//{GlobalVar.LotName}_{trayType}.csv";
|
|
|
|
|
if(!File.Exists(dataFilePath))
|
|
|
|
|
{
|
|
|
|
|
File.AppendAllText(dataFilePath, title);
|
|
|
|
|