|
|
@ -3,6 +3,7 @@ using Rs.DataAccess;
|
|
|
|
using Rs.Framework;
|
|
|
|
using Rs.Framework;
|
|
|
|
using Rs.Motion;
|
|
|
|
using Rs.Motion;
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
|
|
|
|
using Rs.MotionPlat.Entitys;
|
|
|
|
using Rs.MotionPlat.Flow.Common;
|
|
|
|
using Rs.MotionPlat.Flow.Common;
|
|
|
|
using Rs.MotionPlat.Vision;
|
|
|
|
using Rs.MotionPlat.Vision;
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
@ -42,6 +43,8 @@ namespace Rs.MotionPlat.Flow.NormalFlow
|
|
|
|
string logInfo = string.Empty;
|
|
|
|
string logInfo = string.Empty;
|
|
|
|
VisionResult vr = new VisionResult();
|
|
|
|
VisionResult vr = new VisionResult();
|
|
|
|
List<VisionResult> vResult = new List<VisionResult>();
|
|
|
|
List<VisionResult> vResult = new List<VisionResult>();
|
|
|
|
|
|
|
|
AlarmEntity alarmEntity=new AlarmEntity();
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 三点定位(左上/右上/左下)
|
|
|
|
/// 三点定位(左上/右上/左下)
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -59,7 +62,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Task.Run(() => {
|
|
|
|
//Task.Run(() => {
|
|
|
|
while (!finished)
|
|
|
|
while (!finished)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(stop)
|
|
|
|
if(stop)
|
|
|
@ -99,7 +102,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
step = EThreePointLocationFlowStep.到拍照位;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -121,12 +124,21 @@ namespace Rs.MotionPlat.Flow.NormalFlow
|
|
|
|
CalcTrayRunPoint(trayType);
|
|
|
|
CalcTrayRunPoint(trayType);
|
|
|
|
TrayRunPointManager.LoadPoint();
|
|
|
|
TrayRunPointManager.LoadPoint();
|
|
|
|
finished = true;
|
|
|
|
finished = true;
|
|
|
|
|
|
|
|
Msgbox.ShowDialog(EButtonType.Ok, "Three point location finished");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.料盘定位失败);
|
|
|
|
|
|
|
|
if (alarmEntity != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
//});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void PrintXY1Y2CurrentPos(string prefixLog)
|
|
|
|
private void PrintXY1Y2CurrentPos(string prefixLog)
|
|
|
@ -203,8 +215,8 @@ namespace Rs.MotionPlat.Flow.NormalFlow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (int col = 1; col <= 16; col++)
|
|
|
|
for (int col = 1; col <= 16; col++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
double x = y1 + (row - 1) * bigSpaceY + (col - 1) * smallSpaceX;
|
|
|
|
double x = x1 + (row - 1) * bigSpaceX + (col - 1) * smallSpaceX;
|
|
|
|
double y = x1 + (col - 1) * bigSpaceX + (row - 1) * smallSpaceY;
|
|
|
|
double y = y1 + (col - 1) * bigSpaceY + (row - 1) * smallSpaceY;
|
|
|
|
|
|
|
|
|
|
|
|
string insertSql = $"insert into trayrunpoints(trayid,recipename,trayname,slotindex,x,y) values(1,'{GlobalVar.CurRecipe}','{trayType}',{index},{x},{y})";
|
|
|
|
string insertSql = $"insert into trayrunpoints(trayid,recipename,trayname,slotindex,x,y) values(1,'{GlobalVar.CurRecipe}','{trayType}',{index},{x},{y})";
|
|
|
|
rowAffectNum = db.ExecuteNonQuery(insertSql);
|
|
|
|
rowAffectNum = db.ExecuteNonQuery(insertSql);
|
|
|
|