XY运动不到位时,增加报警功能

8Nozzle
lhiven 6 months ago
parent 5d14fa61f9
commit b258f911b3

@ -250,5 +250,10 @@ namespace Rs.MotionPlat.Flow
/// </summary>
public const int InputEmpty = 1050;
/// <summary>
/// 轴未到位异常
/// </summary>
public const int = 1051;
}
}

@ -180,7 +180,12 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if(alarmEntity!=null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
step = ECalibrationFlowStep.;
}
}
}
break;
@ -346,11 +351,16 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
logInfo = $"{GetClassName()}轴不在目标位置";
MessageQueue.Instance.Warn(logInfo);
step = ECalibrationFlowStep.;
}
}
}
break;
case ECalibrationFlowStep.:
@ -516,11 +526,16 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
logInfo = $"{GetClassName()}轴不在目标位置";
MessageQueue.Instance.Warn(logInfo);
checkStep = ECalibrationCheckFlowStep.;
}
}
}
break;
case ECalibrationCheckFlowStep.:

@ -632,9 +632,16 @@ namespace Rs.MotionPlat.Flow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
logInfo = $"{GetClassName()}轴不在目标位置";
MessageQueue.Instance.Warn(logInfo);
flowStep = EDischargeFlowStep.;
}
}
}
break;
case EDischargeFlowStep.:
if (NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToUnload).Count==3)

@ -263,8 +263,16 @@ namespace Rs.MotionPlat.Flow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
logInfo = $"{GetClassName()}轴不在目标位置";
MessageQueue.Instance.Warn(logInfo);
flowStep = EGrrFlowStep.;
}
}
}
break;
case EGrrFlowStep.:

@ -102,9 +102,16 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
logInfo = $"{GetClassName()}轴不在目标位置";
MessageQueue.Instance.Warn(logInfo);
step = EThreePointLocationFlowStep.;
}
}
}
break;
case EThreePointLocationFlowStep.:
if (GlobalVar.RunSpace)

@ -4,6 +4,7 @@ using Rs.Motion;
using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Flow.Common;
using Rs.MotionPlat.Flow.NormalFlow;
using System;
using System.Collections.Generic;
using System.Linq;
@ -177,9 +178,16 @@ namespace Rs.MotionPlat.Flow.SafePosFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
logInfo = $"{GetClassName()}轴不在目标位置";
MessageQueue.Instance.Warn(logInfo);
moveXStep = EDischargeModuleGoSafePosFlowStep.;
}
}
}
break;
default:
break;
@ -230,9 +238,16 @@ namespace Rs.MotionPlat.Flow.SafePosFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
logInfo = $"{GetClassName()}轴不在目标位置";
MessageQueue.Instance.Warn(logInfo);
moveY1Step = EDischargeModuleGoSafePosFlowStep.;
}
}
}
break;
default:
break;

@ -114,9 +114,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
step = EFixedGrabProductFlowStep.;
}
}
}
break;
case EFixedGrabProductFlowStep.:
if(hasProdcutCheck)

@ -109,9 +109,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EFixturePlaceFlowStep.;
}
}
}
break;
case EFixturePlaceFlowStep.:
logInfo = $"{GetClassName()} 通知相机拍照";
@ -187,9 +192,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EFixturePlaceFlowStep.;
}
}
}
break;
case EFixturePlaceFlowStep.1:
targetPosition.NozzleZ = NozzleManager.GetFixtureTakeProductPos(curFixture.Index, curNozzle.NozzleIndex);

@ -120,9 +120,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EFixtureTakeFlowStep.;
}
}
}
break;
case EFixtureTakeFlowStep.1:
targetPosition.NozzleZ = NozzleManager.GetFixtureTakeProductPos(curFixture.Index, curNozzle.NozzleIndex);

@ -118,11 +118,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
logInfo = $"{GetClassName()} 轴不在目标位置,重新运动一次";
MessageQueue.Instance.Warn(logInfo);
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EProductLocationFlowStep.;
}
}
}
break;
case EProductLocationFlowStep.:
if (grabEndSlot != null)
@ -155,11 +158,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
logInfo = $"{GetClassName()} 轴不在目标位置,重新运动一次";
MessageQueue.Instance.Warn(logInfo);
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EProductLocationFlowStep.;
}
}
}
break;
case EProductLocationFlowStep.:
if (GlobalVar.RunSpace)

@ -107,11 +107,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
logInfo = $"{GetClassName()} 轴不在目标位置,重新运动一次";
MessageQueue.Instance.Warn(logInfo);
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EStockLocationFlowStep.;
}
}
}
break;
case EStockLocationFlowStep.:
if (grabEndSlot != null)
@ -143,11 +146,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
logInfo = $"{GetClassName()} 轴不在目标位置,重新运动一次";
MessageQueue.Instance.Warn(logInfo);
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EStockLocationFlowStep.;
}
}
}
break;
case EStockLocationFlowStep.:
//VisionResult vr = VisionHelper.Grab(Vision.EVisionScene.TrayLocation);

@ -160,9 +160,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EStockPlaceFlowStep.;
}
}
}
break;
case EStockPlaceFlowStep.:
if(VisionHelper.trayLocationVision.ClearQueue())
@ -250,9 +255,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EStockPlaceFlowStep.;
}
}
}
break;
case EStockPlaceFlowStep.:
targetPosition.StockZ = NozzleManager.GetNozzleToTrayTakeProductPos(trayType, curNozzle.NozzleIndex)-GlobalVar.PlaceProdcutToStockTrayOffsetHeight;

@ -146,9 +146,14 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Ok, true);
flowStep = EStockTakeFlowStep.;
}
}
}
break;
case EStockTakeFlowStep.:

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

@ -147,6 +147,7 @@ namespace Rs.MotionPlat
MessageQueue.Instance.Insert(logInfo);
step++;
}
//Thread.Sleep(1000);
}

Loading…
Cancel
Save