修复上相机定位相机不返回卡死

master
lhiven 1 year ago
parent 635ca5351a
commit 83628dc289

@ -1928,12 +1928,12 @@ namespace Rs.MotionPlat.Flow
else else
{ {
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), vr.SlotIndex); alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), vr.SlotIndex);
box = MsgBox.ShowDialog(AlarmConstID., alarmInfo, ETipButton.Retry | ETipButton.Cancel); box = MsgBox.ShowDialog(AlarmConstID., alarmInfo, ETipButton.Retry | ETipButton.Skip);
if (box.Button == ETipButton.Retry) if (box.Button == ETipButton.Retry)
{ {
failNum = 1; failNum = 1;
} }
else else if(box.Button== ETipButton.Skip)
{ {
//OnShowGrabResult?.Invoke(vrsigle, true); //OnShowGrabResult?.Invoke(vrsigle, true);
//复制二维码 //复制二维码
@ -2031,7 +2031,7 @@ namespace Rs.MotionPlat.Flow
{ {
//box = MsgBox.ShowDialog(AlarmConstID.ScanBarCodeFailAlarm, $"{vr.SlotIndex}穴位扫码失败", ETipButton.Retry | ETipButton.Skip); //box = MsgBox.ShowDialog(AlarmConstID.ScanBarCodeFailAlarm, $"{vr.SlotIndex}穴位扫码失败", ETipButton.Retry | ETipButton.Skip);
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), vr.SlotIndex); alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), vr.SlotIndex);
box = MsgBox.ShowDialog(AlarmConstID., alarmInfo, ETipButton.Retry | ETipButton.Cancel); box = MsgBox.ShowDialog(AlarmConstID., alarmInfo, ETipButton.Retry | ETipButton.Skip);
if (box.Button == ETipButton.Retry) if (box.Button == ETipButton.Retry)
{ {
failNum = 1; failNum = 1;

@ -60,7 +60,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
HObject[] grabImages= null; HObject[] grabImages= null;
Stopwatch timeout = new Stopwatch(); Stopwatch timeout = new Stopwatch();
string logInfo = string.Empty; string logInfo = string.Empty;
Stopwatch scanBarCodeWait= new Stopwatch();
bool exit = true; bool exit = true;
//ManualResetEvent grabFinishedEvent = new ManualResetEvent(true); //ManualResetEvent grabFinishedEvent = new ManualResetEvent(true);
@ -325,16 +325,25 @@ namespace Rs.MotionPlat.Flow.SubFlow
AxisControl.LoadX.ComparePulse(2, false); AxisControl.LoadX.ComparePulse(2, false);
logInfo = GetClassName() + $"已运动到扫码起始位"; logInfo = GetClassName() + $"已运动到扫码起始位";
MessageQueue.Instance.Insert(logInfo); MessageQueue.Instance.Insert(logInfo);
scanBarCodeWait.Restart();
fixedStep = EUpCameraFixedScanBarCodeFlowStep.; fixedStep = EUpCameraFixedScanBarCodeFlowStep.;
} }
break; break;
case EUpCameraFixedScanBarCodeFlowStep.: case EUpCameraFixedScanBarCodeFlowStep.:
if(scanBarCodeWait.ElapsedMilliseconds<3000)
{
HObject image = ImageProcess.GetManualImage(); HObject image = ImageProcess.GetManualImage();
if(image!=null) if (image != null)
{ {
imageSingle = ImageRotate.Rotate(image, "upCamera"); imageSingle = ImageRotate.Rotate(image, "upCamera");
fixedStep = EUpCameraFixedScanBarCodeFlowStep.; fixedStep = EUpCameraFixedScanBarCodeFlowStep.;
} }
}
else
{
fixedStep = EUpCameraFixedScanBarCodeFlowStep.;
}
break; break;
case EUpCameraFixedScanBarCodeFlowStep.: case EUpCameraFixedScanBarCodeFlowStep.:
singleResult = VisionManager.TurnoverTrayDumpProductOK(imageSingle, bNeedLocate, bNeedScanBarcode, SlotIndex); singleResult = VisionManager.TurnoverTrayDumpProductOK(imageSingle, bNeedLocate, bNeedScanBarcode, SlotIndex);

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

Loading…
Cancel
Save