|
|
@ -7,6 +7,7 @@ using Rs.MotionPlat.Flow.SafePosFlow;
|
|
|
|
using Rs.MotionPlat.Vision;
|
|
|
|
using Rs.MotionPlat.Vision;
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.IO;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading;
|
|
|
@ -161,7 +162,21 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
VisionResult vr = VisionHelper.Grab(Vision.EVisionScene.TrayLocation);
|
|
|
|
VisionResult vr = VisionHelper.Grab(Vision.EVisionScene.TrayLocation);
|
|
|
|
if(vr!=null && vr.Result)
|
|
|
|
if(vr!=null && vr.Result)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
slotOffsetX = vr.OffsetX; slotOffsetY=vr.OffsetY;
|
|
|
|
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";
|
|
|
|
|
|
|
|
if(!Directory.Exists(dataDir))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Directory.CreateDirectory(dataDir);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
string dataFilePath = $"{dataDir}//{DateTime.Now.ToString("yyyy-MM-dd")}.csv";
|
|
|
|
|
|
|
|
if(!File.Exists(dataFilePath))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
File.AppendAllText(dataFilePath, title);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
File.AppendAllText(dataFilePath, content);
|
|
|
|
flowStep = EStockPlaceFlowStep.到料仓放料位上方;
|
|
|
|
flowStep = EStockPlaceFlowStep.到料仓放料位上方;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|