1、增加和视觉软件通信的日志

Eight
lhiven 11 months ago
parent d8d7f01c97
commit 25c6794d2d

@ -115,17 +115,18 @@ namespace Rs.MotionPlat.Flow.SubFlow
logInfo = $"{GetClassName()} 通知相机拍照";
MessageQueue.Instance.Insert(logInfo);
Thread.Sleep(GlobalVar.FixtureTakePicDelaytime);
VisionHelper.fixtureDumpProductVision.ClearQueue();
if(VisionHelper.fixtureDumpProductVision.ClearQueue())
{
UpCameraHelper.Grab();
//AxisControl.LoadY2.ComparePulse(1, false);//开始拍照
if(GlobalVar.RunSpace)
if (GlobalVar.RunSpace)
{
flowStep = EFixturePlaceFlowStep.;
}
else
{
vr = VisionHelper.Grab(EVisionScene.FixtureDumpProduct,$"M{curFixture.Index};");
if(vr!=null && vr.Result)
vr = VisionHelper.Grab(EVisionScene.FixtureDumpProduct, $"M{curFixture.Index};");
if (vr != null && vr.Result)
{
curFixture.PlaceProductOffsetX = vr.OffsetX;
curFixture.PlaceProductOffsetY = vr.OffsetY;
@ -134,9 +135,9 @@ namespace Rs.MotionPlat.Flow.SubFlow
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.).Transform(curFixture.Index);
if(alarmEntity!=null)
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry,true);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
else
{
@ -144,6 +145,11 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
}
}
}
else
{
Msgbox.Show("send C to vision fail", EButtonType.Recheck);
}
break;
case EFixturePlaceFlowStep.:
if (curNozzle != null)

@ -159,12 +159,13 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
break;
case EStockPlaceFlowStep.:
VisionHelper.trayLocationVision.ClearQueue();
if(VisionHelper.trayLocationVision.ClearQueue())
{
UpCameraHelper.Grab();
VisionResult vr = VisionHelper.Grab(Vision.EVisionScene.TrayLocation);
if((vr!=null && vr.Result) || GlobalVar.RunSpace)
if ((vr != null && vr.Result) || GlobalVar.RunSpace)
{
if(GlobalVar.RunSpace)
if (GlobalVar.RunSpace)
{
flowStep = EStockPlaceFlowStep.;
}
@ -198,6 +199,11 @@ namespace Rs.MotionPlat.Flow.SubFlow
{
Msgbox.ShowTipDialog(EButtonType.Retry, "stock slot location fail", "", true);
}
}
else
{
Msgbox.Show("send C to vision fail", EButtonType.Recheck);
}
break;
case EStockPlaceFlowStep.:
//curNozzle = NozzleManager.GetToUnloadNozzle();

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("1.20.24.33")]
[assembly: AssemblyVersion("1.20.25.01")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

@ -23,7 +23,7 @@ namespace Rs.MotionPlat.Vision
else
{
string data = Encoding.ASCII.GetString(reciveBuffer.ToArray());
MessageQueue.Instance.Insert(data);
MessageQueue.Instance.Insert($" >>> {data}");
if (data == "M,0")
{
MessageQueue.Instance.Insert("视觉收到拍照指令");
@ -31,7 +31,6 @@ namespace Rs.MotionPlat.Vision
else if (data == "C,0")
{
visionGrabEvent.Set();
MessageQueue.Instance.Insert($" >>> {data}");
}
else
{

Loading…
Cancel
Save