修复真空吸打开错误问题

增加报警信息从excel中读取
master
lhiven 2 years ago
parent 2792f0393e
commit 810f2337d0

@ -125,13 +125,13 @@ namespace Rs.MotionPlat.Commom
if (eOperator == EVacOperator.Open) if (eOperator == EVacOperator.Open)
{ {
if(NeedSleep) if(NeedSleep)
Thread.Sleep(GlobalVar.TurnoverNozzleOpenVacBreakDelaytime); Thread.Sleep(GlobalVar.TurnoverTrayOpenVacSuctionDelaytime);
MessageQueue.Instance.Insert($"打开周转盘{string.Join(",", indexes)}号穴位真空吸"); MessageQueue.Instance.Insert($"打开周转盘{string.Join(",", indexes)}号穴位真空吸");
} }
else else
{ {
if(NeedSleep) if(NeedSleep)
Thread.Sleep(GlobalVar.TurnoverNozzleCloseVacBreakDelaytime); Thread.Sleep(GlobalVar.TurnoverTrayCloseVacSuctionDelaytime);
MessageQueue.Instance.Insert($"关闭周转盘{string.Join(",", indexes)}号穴位真空吸"); MessageQueue.Instance.Insert($"关闭周转盘{string.Join(",", indexes)}号穴位真空吸");
} }
} }

@ -1,5 +1,6 @@
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel; using NPOI.XSSF.UserModel;
using Rs.Framework;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -15,7 +16,7 @@ namespace Rs.MotionPlat.Entitys
static AlarmCollection() static AlarmCollection()
{ {
Load();
} }
public static void Load() public static void Load()
@ -67,10 +68,23 @@ namespace Rs.MotionPlat.Entitys
public static string GetAlarm(int _alarmID) public static string GetAlarm(int _alarmID)
{ {
StringBuilder content = new StringBuilder();
AlarmEntity alarm = Get(_alarmID); AlarmEntity alarm = Get(_alarmID);
if(alarm!=null) if(alarm!=null)
{ {
return alarm.CN + "\r\n\r\n" + alarm.EN + "\r\n\r\n" + alarm.KO; if(GlobalVar.MsgShowCn)
{
content.Append(alarm.CN).Append("\r\n\r\n");
}
if (GlobalVar.MsgShowEn)
{
content.Append(alarm.EN).Append("\r\n\r\n");
}
if (GlobalVar.MsgShowKo)
{
content.Append(alarm.KO);
}
return content.ToString();
} }
return ""; return "";
} }

@ -18,30 +18,93 @@ namespace Rs.MotionPlat.Flow
public const int NotFoundAxisAlarmID = 99999; public const int NotFoundAxisAlarmID = 99999;
/// <summary> /// <summary>
/// Tray盘取料失败报警 /// 料仓tray盘取料报警
/// </summary> /// </summary>
public const int TrayTakeFailAlarm = 1; public const int tray = 1001;
/// <summary> /// <summary>
/// 周转盘取料失败报警 /// 料仓tray盘放料时丢料报警
/// </summary> /// </summary>
public const int TurnoverTakeFailAlarm = 2; public const int tray = 1002;
/// <summary> /// <summary>
/// 测试盘取料失败报警 /// 排料头在周转盘取料失败报警
/// </summary> /// </summary>
public const int TestTakeFailAlarm = 3; public const int = 1003;
/// <summary>
/// 排料投在周转盘放料时丢料报警
/// </summary>
public const int = 1004;
/// <summary>
/// 排料头放料到周转盘后周转盘真空吸报警
/// </summary>
public const int = 1005;
/// <summary>
/// 周转吸头在周转盘取料失败报警
/// </summary>
public const int = 1006;
/// <summary>
/// 周转吸头在周转盘放料时丢料报警
/// </summary>
public const int = 1007;
/// <summary>
/// 周转吸头放料到周转盘后周转盘真空吸报警
/// </summary>
public const int = 1008;
/// <summary>
/// 周转吸头在测试治具取料失败报警
/// </summary>
public const int = 1009;
/// <summary>
/// 周转吸头在测试治具放料时丢料报警
/// </summary>
public const int = 1010;
/// <summary>
/// 周转吸头放料到测试治具后测试治具光纤报警
/// </summary>
public const int = 1011;
/// <summary>
/// 周转吸头放料到测试治具后测试治具真空吸报警
/// </summary>
public const int = 1012;
/// <summary>
/// 料仓满料报警
/// </summary>
public const int = 1013;
/// <summary>
/// 料仓缺料报警
/// </summary>
public const int = 1014;
/// <summary>
/// 取料盘夹爪动位报警
/// </summary>
public const int = 1016;
/// <summary>
/// 取料盘夹爪原位报警
/// </summary>
public const int = 1017;
/// <summary> /// <summary>
/// 周转盘放料失败报警 /// 排料头粘料报警
/// </summary> /// </summary>
public const int TurnoverDumpFailAlarm = 4; public const int = 1018;
/// <summary> /// <summary>
/// 测试盘放料失败报警 /// 周转头粘料报警
/// </summary> /// </summary>
public const int TestDumpFailAlarm = 5; public const int = 1019;
/// <summary> /// <summary>
/// Empty1满料报警 /// Empty1满料报警
@ -90,20 +153,7 @@ namespace Rs.MotionPlat.Flow
/// </summary> /// </summary>
public const int StockLoadAlarm = 15; public const int StockLoadAlarm = 15;
/// <summary>
///吸嘴粘料报警
/// </summary>
public const int NozzleTackinessAlarm = 16;
/// <summary>
/// 吸嘴丢料报警
/// </summary>
public const int NozzlesLoseMaterialAlarm = 17;
/// <summary>
/// 周转吸头取料失败报警
/// </summary>
public const int TransitNozzlelTakeProductFailAlarm = 18;
/// <summary> /// <summary>
/// 上下气缸异常报警 /// 上下气缸异常报警
@ -129,10 +179,7 @@ namespace Rs.MotionPlat.Flow
/// </summary> /// </summary>
public const int NgProductFiberCheckAlarm = 23; public const int NgProductFiberCheckAlarm = 23;
/// <summary>
/// 排料吸嘴丢料报警
/// </summary>
public const int DischargeNozzleLostProductAlarm = 24;
/// <summary> /// <summary>
/// 排料轴X运动异常 /// 排料轴X运动异常
@ -278,10 +325,6 @@ namespace Rs.MotionPlat.Flow
/// </summary> /// </summary>
public const int AxisNotAtHomeAlarm = 56; public const int AxisNotAtHomeAlarm = 56;
/// <summary>
/// 测试治具光前异常报警
/// </summary>
public const int TextFixtureFiberAlarm = 57;
/// <summary> /// <summary>
/// 扫码失败报警 /// 扫码失败报警

@ -5,6 +5,7 @@ using Rs.Controls;
using Rs.Framework; using Rs.Framework;
using Rs.Motion; using Rs.Motion;
using Rs.MotionPlat.Commom; using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Entitys.Trays; using Rs.MotionPlat.Entitys.Trays;
using Rs.MotionPlat.Flow.Camera; using Rs.MotionPlat.Flow.Camera;
using Rs.MotionPlat.Flow.NgFlow; using Rs.MotionPlat.Flow.NgFlow;
@ -426,7 +427,15 @@ namespace Rs.MotionPlat.Flow
if (reFetchNum == 6) if (reFetchNum == 6)
{ {
DischargeDumpFlow.Instance.Start(curTask.FromType, curNozzle.NozzleIndex, curNozzle.FromIndex); DischargeDumpFlow.Instance.Start(curTask.FromType, curNozzle.NozzleIndex, curNozzle.FromIndex);
alarmInfo = $"排料{curNozzle.NozzleIndex}号吸嘴取{curNozzle.FromIndex+1}号穴位产品{reFetchNum}次失败"; //alarmInfo = $"排料{curNozzle.NozzleIndex}号吸嘴取{curNozzle.FromIndex+1}号穴位产品{reFetchNum}次失败";
if(curTask.FromType== TurnoverType.ToBeTested)
{
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.tray), curNozzle.NozzleIndex, curNozzle.FromIndex + 1);
}
else if(curTask.FromType== TurnoverType.Turnover)
{
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), curNozzle.NozzleIndex, curNozzle.FromIndex + 1);
}
flowStep = EDischargeFlowStep.; flowStep = EDischargeFlowStep.;
} }
else else
@ -447,7 +456,12 @@ namespace Rs.MotionPlat.Flow
btnText |= ETipButton.No; btnText |= ETipButton.No;
} }
//TestCenterMessageBox.Show(AlarmConstID.TrayTakeFailAlarm, alarmInfo, btnText, buttonText); //TestCenterMessageBox.Show(AlarmConstID.TrayTakeFailAlarm, alarmInfo, btnText, buttonText);
SchedulingMessageBox box = MsgBox.ShowDialog(AlarmConstID.TrayTakeFailAlarm, alarmInfo, btnText, buttonText);// TestCenterMessageBox.WaitResult(AlarmConstID.TrayTakeFailAlarm); int alarmid = AlarmConstID.;
if (curTask.FromType == TurnoverType.ToBeTested)
{
alarmid = AlarmConstID.tray;
}
SchedulingMessageBox box = MsgBox.ShowDialog(alarmid, alarmInfo, btnText, buttonText);// TestCenterMessageBox.WaitResult(AlarmConstID.TrayTakeFailAlarm);
switch (box.Button) switch (box.Button)
{ {
case ETipButton.Retry: case ETipButton.Retry:
@ -1065,9 +1079,22 @@ namespace Rs.MotionPlat.Flow
while (!exit) while (!exit)
{ {
//弹框报警 //弹框报警
alarmInfo = $"{curNozzle.NozzleIndex}吸嘴真空吸异常,可能丢料,请检查吸嘴的状态"; //alarmInfo = $"{curNozzle.NozzleIndex}吸嘴真空吸异常,可能丢料,请检查吸嘴的状态";
if(curNozzle.ToType== TurnoverType.Turnover)
{
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), curNozzle.NozzleIndex);
}
else
{
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.tray), curNozzle.NozzleIndex,curNozzle.ToType.ToString());
}
alarmid = AlarmConstID.tray;
if (curNozzle.ToType == TurnoverType.Turnover)
{
alarmid = AlarmConstID.;
}
//TestCenterMessageBox.Show(AlarmConstID.DischargeNozzleLostProductAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText()); //TestCenterMessageBox.Show(AlarmConstID.DischargeNozzleLostProductAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
msgBox = MsgBox.ShowDialog(AlarmConstID.DischargeNozzleLostProductAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.DischargeNozzleLostProductAlarm); msgBox = MsgBox.ShowDialog(alarmid, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.DischargeNozzleLostProductAlarm);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Skip: case ETipButton.Skip:
@ -1296,10 +1323,11 @@ namespace Rs.MotionPlat.Flow
while(!skip) while(!skip)
{ {
//粘料报警,提示用户粘料,移动到安全位,或者点击跳过 //粘料报警,提示用户粘料,移动到安全位,或者点击跳过
alarmInfo = $"排料{curNozzle.NozzleIndex}号吸嘴可能粘料,请查看吸嘴状态后处理"; //alarmInfo = $"排料{curNozzle.NozzleIndex}号吸嘴可能粘料,请查看吸嘴状态后处理";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), curNozzle.NozzleIndex);
MessageQueue.Instance.Warn(GetClassName()+ alarmInfo); MessageQueue.Instance.Warn(GetClassName()+ alarmInfo);
//TestCenterMessageBox.Show(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText()); //TestCenterMessageBox.Show(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
msgBox = MsgBox.ShowDialog(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.NozzleTackinessAlarm); msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.NozzleTackinessAlarm);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Skip: case ETipButton.Skip:
@ -1359,10 +1387,11 @@ namespace Rs.MotionPlat.Flow
}; };
while (!exit) while (!exit)
{ {
alarmInfo = $"周转盘{curNozzle.ToIndex + 1}号穴位真空吸异常"; //alarmInfo = $"周转盘{curNozzle.ToIndex + 1}号穴位真空吸异常";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), curNozzle.NozzleIndex, curNozzle.ToIndex + 1);
MessageQueue.Instance.Warn(GetClassName() + alarmInfo); MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
//TestCenterMessageBox.Show(AlarmConstID.TurnoverDumpFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons); //TestCenterMessageBox.Show(AlarmConstID.TurnoverDumpFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons);
msgBox = MsgBox.ShowDialog(AlarmConstID.TurnoverDumpFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons);// TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverDumpFailAlarm); msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons);// TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverDumpFailAlarm);
if (msgBox != null) if (msgBox != null)
{ {
switch (msgBox.Button) switch (msgBox.Button)

@ -2,6 +2,7 @@
using Rs.Controls; using Rs.Controls;
using Rs.Framework; using Rs.Framework;
using Rs.MotionPlat.Commom; using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Entitys.Trays; using Rs.MotionPlat.Entitys.Trays;
using Rs.MotionPlat.Flow.Camera; using Rs.MotionPlat.Flow.Camera;
using Rs.MotionPlat.Flow.NgFlow; using Rs.MotionPlat.Flow.NgFlow;
@ -240,10 +241,11 @@ namespace Rs.MotionPlat.Flow
bool exit = false; bool exit = false;
while (!exit) while (!exit)
{ {
alarmInfo = GetClassName() + $"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位产品未取出,请处理"; //alarmInfo = GetClassName() + $"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位产品未取出,请处理";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), untestSlots.Select(s => s.Index).ToJoinString(), untestSlots.Select(s => s.Index).ToJoinString());
//TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), //TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),
//MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText()); //MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
msgBox = MsgBox.ShowDialog(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm); msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Retry: case ETipButton.Retry:
@ -539,9 +541,10 @@ namespace Rs.MotionPlat.Flow
bool exit = false; bool exit = false;
while (!exit) while (!exit)
{ {
alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常丢料,请处理"; //alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常丢料,请处理";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), loseSlots.ToJoinString());
//TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText()); //TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
msgBox = MsgBox.ShowDialog(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm); msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Skip: case ETipButton.Skip:
@ -774,9 +777,10 @@ namespace Rs.MotionPlat.Flow
if(masticSlots.Count > 0) if(masticSlots.Count > 0)
{ {
//粘料报警 //粘料报警
alarmInfo = $"周转吸头{masticSlots.ToJoinString()}号吸嘴真空异常粘料,请手工处理"; //alarmInfo = $"周转吸头{masticSlots.ToJoinString()}号吸嘴真空异常粘料,请手工处理";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), masticSlots.ToJoinString());
//TestCenterMessageBox.Show(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText()); //TestCenterMessageBox.Show(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
msgBox = MsgBox.ShowDialog(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.NozzleTackinessAlarm); msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.NozzleTackinessAlarm);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Skip: case ETipButton.Skip:
@ -827,10 +831,11 @@ namespace Rs.MotionPlat.Flow
bool exit = false; bool exit = false;
while (!exit) while (!exit)
{ {
alarmInfo = $"测试治具{nozzle.NozzleIndex}号穴位光纤异常,有可能叠料,请处理"; // alarmInfo = $"测试治具{nozzle.NozzleIndex}号穴位光纤异常,有可能叠料,请处理";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), nozzle.NozzleIndex) ;
MessageQueue.Instance.Warn(GetClassName() + alarmInfo); MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
//TestCenterMessageBox.Show(AlarmConstID.TextFixtureFiberAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText()); //TestCenterMessageBox.Show(AlarmConstID.TextFixtureFiberAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
msgBox = MsgBox.ShowDialog(AlarmConstID.TextFixtureFiberAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.TextFixtureFiberAlarm); msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.TextFixtureFiberAlarm);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Retry: case ETipButton.Retry:
@ -872,10 +877,11 @@ namespace Rs.MotionPlat.Flow
bool exit = false; bool exit = false;
while (!exit) while (!exit)
{ {
alarmInfo = $"测试治具{nozzle.NozzleIndex}号真空吸异常"; // alarmInfo = $"测试治具{nozzle.NozzleIndex}号真空吸异常";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), nozzle.NozzleIndex);
MessageQueue.Instance.Warn(GetClassName() + alarmInfo); MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText()); TestCenterMessageBox.Show(AlarmConstID., alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm); msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Retry: case ETipButton.Retry:
@ -1217,9 +1223,10 @@ namespace Rs.MotionPlat.Flow
bool exit = false; bool exit = false;
while (!exit) while (!exit)
{ {
alarmInfo = GetClassName() + $"测试治具{testedSlots.Select(s => s.Index).ToJoinString()}号穴位取料失败"; //alarmInfo = GetClassName() + $"测试治具{testedSlots.Select(s => s.Index).ToJoinString()}号穴位取料失败";
TestCenterMessageBox.Show(AlarmConstID.TransitNozzlelTakeProductFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText()); alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), testedSlots.Select(s => s.Index).ToJoinString());
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.TransitNozzlelTakeProductFailAlarm); TestCenterMessageBox.Show(AlarmConstID., alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Retry: case ETipButton.Retry:
@ -1343,12 +1350,14 @@ namespace Rs.MotionPlat.Flow
if(GlobalVar.EnableTwoSpeed) if(GlobalVar.EnableTwoSpeed)
{ {
targetPos = SysConfigParam.GetValue<double>("PressTakeZ") + GlobalVar.PressLowSpeedOffset; targetPos = SysConfigParam.GetValue<double>("PressTakeZ") + GlobalVar.PressLowSpeedOffset;
errCode = AxisControl.TurnoverZ.MovePos(targetPos, GlobalVar.PressLowSpeed);
} }
else else
{ {
targetPos = SysConfigParam.GetValue<double>("PressSafeZ"); targetPos = SysConfigParam.GetValue<double>("PressSafeZ");
errCode = AxisControl.TurnoverZ.MovePos(targetPos, GlobalVar.WholeSpeed);
} }
errCode = AxisControl.TurnoverZ.MovePos(targetPos, GlobalVar.PressLowSpeed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis) if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
{ {
logInfo = GetClassName()+ $"到测试破关真空位"; logInfo = GetClassName()+ $"到测试破关真空位";
@ -1523,9 +1532,10 @@ namespace Rs.MotionPlat.Flow
bool exit = false; bool exit = false;
while (!exit) while (!exit)
{ {
alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常丢料,请处理"; //alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常丢料,请处理";
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText()); alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), loseSlots.ToJoinString()) ;
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm); TestCenterMessageBox.Show(AlarmConstID., alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Skip: case ETipButton.Skip:
@ -1746,10 +1756,11 @@ namespace Rs.MotionPlat.Flow
bool exit = false; bool exit = false;
while (!exit) while (!exit)
{ {
alarmInfo = $"周转{masticSlots.ToJoinString()}号吸嘴真空异常粘料,请手工处理"; //alarmInfo = $"周转{masticSlots.ToJoinString()}号吸嘴真空异常粘料,请手工处理";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), masticSlots.ToJoinString());
MessageQueue.Instance.Warn(GetClassName()+ alarmInfo); MessageQueue.Instance.Warn(GetClassName()+ alarmInfo);
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText()); TestCenterMessageBox.Show(AlarmConstID., alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm); msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.);
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Skip: case ETipButton.Skip:
@ -1817,8 +1828,9 @@ namespace Rs.MotionPlat.Flow
bool exit = false; bool exit = false;
while (!exit) while (!exit)
{ {
alarmInfo = $"周转盘{slot.Index}号穴位真空吸异常,请选择处理"; //alarmInfo = $"周转盘{slot.Index}号穴位真空吸异常,请选择处理";
msgBox = MsgBox.ShowDialog(AlarmConstID.TurnoverDumpFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText()); alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), slot.Index);
msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
switch (msgBox.Button) switch (msgBox.Button)
{ {
case ETipButton.Retry: case ETipButton.Retry:

@ -245,7 +245,7 @@ namespace Rs.MotionPlat.Flow.NgFlow
{ {
TransitModuleSafePosFlow.Instance.GoSafePostion( EExceptionSafePos.Socket); TransitModuleSafePosFlow.Instance.GoSafePostion( EExceptionSafePos.Socket);
alarmInfo = $"{exceptionTray}盘{exceptionSlotIndex}穴位取料失败{retakeNum}次,请人工处理"; alarmInfo = $"{exceptionTray}盘{exceptionSlotIndex}穴位取料失败{retakeNum}次,请人工处理";
msgBox = MsgBox.ShowDialog(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, ETipButton.Ok); msgBox = MsgBox.ShowDialog(66666, alarmInfo, ETipButton.Ok);
step = EWarningSuckerNgFlowStep.; step = EWarningSuckerNgFlowStep.;
} }
} }

@ -75,23 +75,23 @@ namespace Rs.MotionPlat.SysConfig
private void button9_Click_1(object sender, EventArgs e) private void button9_Click_1(object sender, EventArgs e)
{ {
Dictionary<ETipButton, string> buttonText = new Dictionary<ETipButton, string>(); //Dictionary<ETipButton, string> buttonText = new Dictionary<ETipButton, string>();
buttonText.Add(ETipButton.Yes, "继续|Continue"); //buttonText.Add(ETipButton.Yes, "继续|Continue");
buttonText.Add(ETipButton.Cancel, "跳过|Skip"); //buttonText.Add(ETipButton.Cancel, "跳过|Skip");
buttonText.Add(ETipButton.Retry, "重试|Retry"); //buttonText.Add(ETipButton.Retry, "重试|Retry");
buttonText.Add(ETipButton.No, "结束上料|EndInput"); //buttonText.Add(ETipButton.No, "结束上料|EndInput");
// TestCenterMessageBox.Show(111,"fasdf", (ETipButton.Yes| ETipButton.No| ETipButton.Retry|ETipButton.Cancel),buttonText); // TestCenterMessageBox.Show(111,"fasdf", (ETipButton.Yes| ETipButton.No| ETipButton.Retry|ETipButton.Cancel),buttonText);
TestCenterMessageBox.Show(AlarmConstID.TrayTakeFailAlarm, $"吸嘴次失败报警,请处理后点击确定", (ETipButton.Retry | ETipButton.Skip | ETipButton.Yes | ETipButton.No), buttonText); //TestCenterMessageBox.Show(AlarmConstID.TrayTakeFailAlarm, $"吸嘴次失败报警,请处理后点击确定", (ETipButton.Retry | ETipButton.Skip | ETipButton.Yes | ETipButton.No), buttonText);
//TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, $"请处理后点击确定", (ETipButton.Retry | ETipButton.Skip | ETipButton.Yes | ETipButton.No), buttonText); //TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, $"请处理后点击确定", (ETipButton.Retry | ETipButton.Skip | ETipButton.Yes | ETipButton.No), buttonText);
Task.Run(() => { //Task.Run(() => {
while (true) // while (true)
{ // {
SchedulingMessageBox box1 = TestCenterMessageBox.WaitResult(AlarmConstID.TrayTakeFailAlarm); // SchedulingMessageBox box1 = TestCenterMessageBox.WaitResult(AlarmConstID.TrayTakeFailAlarm);
Msg.ShowInfo(box1.Button.ToString()); // Msg.ShowInfo(box1.Button.ToString());
break; // break;
} // }
}); //});
//Task.Run(() => { //Task.Run(() => {
// while (true) // while (true)
// { // {

Loading…
Cancel
Save