1、修复整体回原失败后不能再回原。

2、料盘未抓起确定改为重试
3、取料盘时增加对XY位置的检测,不在位置时重新走位。
4、扫码界面二维码放到图片的下方。
5、修复当治具9-16真空吸报警时,安全位没有移动到9-16的安全位。
master
lhiven 1 year ago
parent 1526715d42
commit 45cefd5ada

@ -1793,5 +1793,9 @@ namespace Rs.Framework
return SysConfigParam.GetValue<bool>(nameof(EnableIndexTimeStatistics));
}
}
/// <summary>
/// 设备是否是自动状态
/// </summary>
public static bool DeviceIsAuto { get; set; } = true;
}
}

@ -260,6 +260,7 @@ namespace Rs.MotionPlat.Commom
|| MachineManage.Instance.MachineStatus == EMachineStatus.NotInit
|| MachineManage.Instance.MachineStatus == EMachineStatus.NotHomed
|| MachineManage.Instance.MachineStatus == EMachineStatus.Stop
|| MachineManage.Instance.MachineStatus== EMachineStatus.HomeFail
)
{
if(SafeDoorCheck.Check())

@ -35,7 +35,7 @@ namespace Rs.MotionPlat.Flow
private void task() {
while (b_IsRun)
{
if(b_IsStop)
if(b_IsStop || !GlobalVar.DeviceIsAuto)
{
Thread.Sleep(stopWaitTime);
continue;

@ -265,7 +265,7 @@ namespace Rs.AutoDischarge.V3.Flow
logInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), m_stockType.ToString());
//TestCenterMessageBox.Show(AlarmConstID.StockLackTrayAlarm +(int)m_stockType, logInfo, ETipButton.Ok);
//msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.StockLackTrayAlarm + (int)m_stockType);
PromptMessageBox.ShowDialog(AlarmConstID., logInfo, ETipButton.Ok);
PromptMessageBox.ShowDialog(AlarmConstID., logInfo, ETipButton.Retry);
}
break;
case EStockTrayLoadFlowStep.:

@ -168,6 +168,8 @@ namespace Rs.MotionPlat.Flow
break;
case ETakeTrayFlowStep.:
if (StockManager.Instance.GetStock(m_fromTray).Status == EStockTrayStatus.Loaded)
{
if (AxisArrived.LoadXYIsArrived(targetX, targetY))
{
logInfo = GetClassName() + $"{m_fromTray}料仓料盘准备就绪";
MessageQueue.Instance.Insert(logInfo);
@ -181,8 +183,15 @@ namespace Rs.MotionPlat.Flow
step = ETakeTrayFlowStep.;
stopwatch.Restart();
}
else
{
step = ETakeTrayFlowStep.;
}
}
break;
case ETakeTrayFlowStep.:
if ((Ops.IsOn("上下气缸动位") && stopwatch.ElapsedMilliseconds < 5000) || (GlobalVar.VirtualAxis))
{
logInfo = GetClassName() + $"检测上下气缸动位OK";
@ -217,7 +226,8 @@ namespace Rs.MotionPlat.Flow
if (alarmEntity != null)
{
LogHelper.Debug(GetClassName() + alarmEntity.CN);
AlarmMessageBox.ShowDialog(alarmEntity, ETipButton.Ok, null);
AlarmMessageBox.ShowDialog(alarmEntity, ETipButton.Retry, null);
step = ETakeTrayFlowStep.;
}
else
{
@ -225,6 +235,7 @@ namespace Rs.MotionPlat.Flow
}
stopwatch.Restart();
}
break;
case ETakeTrayFlowStep.:
Ops.Off("上下气缸电磁阀动位");
@ -299,7 +310,7 @@ namespace Rs.MotionPlat.Flow
alarmEntity = AlarmCollection.Get(AlarmConstID.).Transform(fromTray.ToString());
if(alarmEntity!=null)
{
AlarmMessageBox.ShowDialog(alarmEntity, ETipButton.Ok, null);
AlarmMessageBox.ShowDialog(alarmEntity, ETipButton.Retry, null);
stopwatch.Stop();
stopwatch.Restart();
//打开夹爪

@ -571,7 +571,7 @@ namespace Rs.MotionPlat.Flow
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, true, undealTasks.Select(t => t.FromIndex + 1).ToArray());
/*打开周转盘真空破*/
VacManager.TurnoverTrayVacBreak(EVacOperator.Open, true, undealTasks.Select(t => t.FromIndex + 1).ToArray());
ActionEnd("关闭周转盘真空吸,打开周转盘真空破");
ActionEnd("关闭周转盘真空吸-打开周转盘真空破");
Step = ETurnoverFlowStep.1;
}
else
@ -1036,7 +1036,7 @@ namespace Rs.MotionPlat.Flow
VacManager.TransitNozzleVacBreak(ETurnoverNozzlePosition.Socket, EVacOperator.Close, true, hasProductNozzles.Select(n => n.NozzleIndex).ToArray());
//在这里更新产品状态
//TransitNozzleManager.Instance.Transi
ActionEnd("关闭周转吸头真空吸,打开周转吸头真空破,关闭周转吸头真空破");
ActionEnd("关闭周转吸头真空吸-打开周转吸头真空破-关闭周转吸头真空破");
Step = ETurnoverFlowStep.1;
}
else
@ -1135,8 +1135,8 @@ namespace Rs.MotionPlat.Flow
/*关闭周转吸头真空破*/
//VacManager.TransitNozzleVacBreak(EVacOperator.Close, true, hasProductNozzles.Select(n => n.NozzleIndex).ToArray());
//logInfo = GetClassName() + $"测试位放料完成抬起完成2";
//MessageQueue.Instance.Insert(logInfo);
logInfo = GetClassName() + $"测试位放料完成抬起完成2,cz:{Ops.GetCurPosition(AxisControl.TurnoverZ)}";
MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.;
}
else
@ -1271,10 +1271,12 @@ namespace Rs.MotionPlat.Flow
VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
if (nozzle.NozzleIndex < 9)
{
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}光钎异常");
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
}
else
{
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}光钎异常");
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
}
break;
@ -1299,10 +1301,12 @@ namespace Rs.MotionPlat.Flow
VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
if (nozzle.NozzleIndex < 9)
{
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}光钎异常");
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
}
else
{
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}光钎异常");
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
}
break;
@ -1359,7 +1363,16 @@ namespace Rs.MotionPlat.Flow
break;
case ETipButton.Yes://移动到安全位
VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
if (nozzle.NozzleIndex < 9)
{
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}真空异常");
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
}
else
{
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}真空异常");
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
}
break;
}
}
@ -1379,7 +1392,16 @@ namespace Rs.MotionPlat.Flow
break;
case ETipButton.Yes://移动到安全位
VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
if (nozzle.NozzleIndex < 9)
{
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}真空异常");
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
}
else
{
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}真空异常");
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
}
break;
}
}
@ -2242,7 +2264,7 @@ namespace Rs.MotionPlat.Flow
VacManager.TestTrayVacSuction(EVacOperator.Close, true, undealTasks.Select(t => t.FromIndex + 1).ToArray());
/*打开测试穴位真空破*/
VacManager.TestTrayVacBreak(EVacOperator.Open, true, undealTasks.Select(t => t.FromIndex + 1).ToArray());
ActionEnd("关闭测试穴位真空吸,打开测试穴位真空破");
ActionEnd("关闭测试穴位真空吸-打开测试穴位真空破");
Step = ETurnoverFlowStep.1;
}
else
@ -2669,7 +2691,7 @@ namespace Rs.MotionPlat.Flow
VacManager.TransitNozzleVacBreak(ETurnoverNozzlePosition.TurnoverTray, EVacOperator.Open, true, hasProductNozzles.Select(n => n.FromIndex + 1).ToArray());
/*关闭周转吸头真空破*/
VacManager.TransitNozzleVacBreak(ETurnoverNozzlePosition.TurnoverTray, EVacOperator.Close, true, hasProductNozzles.Select(n => n.FromIndex + 1).ToArray());
ActionEnd("关闭周转吸头真空吸,打开周转吸头真空破,关闭周转吸头真空破");
ActionEnd("关闭周转吸头真空吸-打开周转吸头真空破-关闭周转吸头真空破");
Step = ETurnoverFlowStep.1;
}
else
@ -3178,6 +3200,7 @@ namespace Rs.MotionPlat.Flow
private void ActionStart()
{
if (GlobalVar.EnableIndexTimeStatistics)
timeStatistics.Restart();
}

@ -117,6 +117,8 @@ namespace Rs.MotionPlat.Flow.SafePosFlow
{
if(AxisArrived.PressZIsInTargetPos(targetPressZ))
{
logInfo = $"轴已抬起,cturnoverz:{Ops.GetCurPosition(AxisControl.TurnoverZ)},cpressz:{Ops.GetCurPosition(AxisControl.PressZ)}";
MessageQueue.Instance.Insert("");
step = ETransitModuleSafePosFlowStep.;
}
else
@ -180,7 +182,7 @@ namespace Rs.MotionPlat.Flow.SafePosFlow
{
Thread.Sleep(GlobalVar.VirtualAxisMoveTime);
}
logInfo = GetClassName() + $"到安全位";
logInfo = GetClassName() + $"到安全位,tx:{targetPosition.X},ty:{targetPosition.Y}";
MessageQueue.Instance.Insert(logInfo);
step = ETransitModuleSafePosFlowStep.;
}
@ -201,11 +203,18 @@ namespace Rs.MotionPlat.Flow.SafePosFlow
case ETransitModuleSafePosFlowStep.:
if (Ops.IsStop("TurnoverX", "TurnoverY") || GlobalVar.VirtualAxis)
{
logInfo = GetClassName()+ $"已运动到安全位";
if(AxisArrived.TurnoverXYIsInTargetPos(targetPosition.X,targetPosition.Y))
{
logInfo = GetClassName() + $"已运动到安全位,cx:{Ops.GetCurPosition(AxisControl.TurnoverX)},cy:{Ops.GetCurPosition(AxisControl.TurnoverY)}";
MessageQueue.Instance.Insert(logInfo);
finished = true;
taskFinishedEvent.Set();
}
else
{
step = ETransitModuleSafePosFlowStep.;
}
}
break;
default:
break;

@ -269,6 +269,7 @@ namespace Rs.MotionPlat
//StockManager.Instance.Start();
LoadStockStatus();
HOperatorSet.ReadImage(out defaultImage, "default.bmp");
switchButton1.Checked = GlobalVar.DeviceIsAuto;
}
/// <summary>
@ -382,19 +383,22 @@ namespace Rs.MotionPlat
{
string SN = matchResult.SN;
hwin.HobjectToHimage(matchResult.SourceImage);
HalconTool.DispMessage(hwin.hWindowControl.HalconWindow, $"sn:{SN}", 20, 20, "green");
HOperatorSet.GetImageSize(matchResult.SourceImage, out HTuple w, out HTuple h);
HalconTool.DispMessage(hwin.hWindowControl.HalconWindow, $"sn:{SN}", h-200, 20, "green");
}
else
{
hwin.HobjectToHimage(matchResult.SourceImage);
HalconTool.DispMessage(hwin.hWindowControl.HalconWindow, "NG", 20, 20, "red");
HOperatorSet.GetImageSize(matchResult.SourceImage, out HTuple w, out HTuple h);
HalconTool.DispMessage(hwin.hWindowControl.HalconWindow, "NG", h-200, 20, "red");
}
}
else
{
//加载默认图片
hwin.HobjectToHimage(defaultImage);
HalconTool.DispMessage(hwin.hWindowControl.HalconWindow, "no product", 20, 20, "red");
HOperatorSet.GetImageSize(defaultImage, out HTuple w, out HTuple h);
HalconTool.DispMessage(hwin.hWindowControl.HalconWindow, "no product", h-200, 20, "red");
}
}
@ -646,5 +650,10 @@ namespace Rs.MotionPlat
}
}
}
private void switchButton1_Click(object sender, EventArgs e)
{
GlobalVar.DeviceIsAuto = switchButton1.Checked;
}
}
}

@ -494,6 +494,7 @@ namespace Rs.MotionPlat
"Manual"};
this.switchButton1.TrueColor = System.Drawing.Color.Blue;
this.switchButton1.TrueTextColr = System.Drawing.Color.White;
this.switchButton1.Click += new System.EventHandler(this.switchButton1_Click);
//
// panelEx3
//

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

Loading…
Cancel
Save