优化料盘搬运流程

develop
lhiven 1 month ago
parent eea11b1479
commit ad209b9bf5

@ -144,7 +144,28 @@ namespace Rs.MotionPlat.Entitys
Msg.ShowError("Alarm file cann't find 系统异常报警 item"); Msg.ShowError("Alarm file cann't find 系统异常报警 item");
} }
} }
public static void ShowMsg(int alarmID, Action act)
{
while (true)
{
AlarmEntity alarmEntity = AlarmCollection.Get(alarmID);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
act.Invoke();
break;
} }
else
{
Msg.ShowError($"The alarmID = {alarmID} was not found in the translation file.");
AlarmCollection.Load();
}
}
}
}
public class AlarmEntity public class AlarmEntity
{ {
/// <summary> /// <summary>

@ -239,6 +239,7 @@ namespace Rs.MotionPlat.Flow
{ {
TakeTrayModule.CylinderGoDown(GetClassName()); TakeTrayModule.CylinderGoDown(GetClassName());
stopwatch.Restart(); stopwatch.Restart();
step = ETakeTrayFlowStep.;
} }
break; break;
case ETakeTrayFlowStep.: case ETakeTrayFlowStep.:
@ -257,16 +258,17 @@ namespace Rs.MotionPlat.Flow
} }
else if (stopwatch.ElapsedMilliseconds > 5000) else if (stopwatch.ElapsedMilliseconds > 5000)
{ {
alarmEntity = AlarmCollection.Get(AlarmConstID.); AlarmCollection.ShowMsg(AlarmConstID., () => { step = ETakeTrayFlowStep.; });
if (alarmEntity != null) //alarmEntity = AlarmCollection.Get(AlarmConstID.料盘搬运气缸动位异常);
{ //if (alarmEntity != null)
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true); //{
step = ETakeTrayFlowStep.; // Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
} // step = ETakeTrayFlowStep.等待运动到取料位下方;
else //}
{ //else
Msg.ShowError("翻译文件中未找到料盘搬运气缸动位异常"); //{
} // Msg.ShowError("翻译文件中未找到料盘搬运气缸动位异常");
//}
//stopwatch.Restart(); //stopwatch.Restart();
} }
} }

Loading…
Cancel
Save