1、优化有些弹框报警而蜂鸣器没有响的问题。

develop
lhiven 1 month ago
parent 3e53679b00
commit 16d82c5e25

@ -57,19 +57,19 @@ namespace Rs.MotionPlat.Commom
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.LoadY2).Transform(errCode.ToString());
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry,true);
}
}
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.LoadY1).Transform(errCode.ToString());
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
}
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.LoadX).Transform(errCode.ToString());
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
return false;
}
@ -95,7 +95,7 @@ namespace Rs.MotionPlat.Commom
else
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.TakeTrayX).Transform(errCode.ToString());
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
return false;
}
}
@ -121,7 +121,7 @@ namespace Rs.MotionPlat.Commom
else
{
AlarmEntity alarmEntity = AlarmCollection.Get($"{nozzleZName}运动异常报警").Transform(errCode.ToString());
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
return false;
}
}

@ -22,6 +22,7 @@ namespace Rs.MotionPlat.Commom
if (warning)
{
BuzzerManager.Instance.On();
LightManger.Instance.SetStatus(ELightStatus.Red);
}
LogHelper.Debug($"ShowTipDialog({buttons},{content}, {title}, {warning})");
EButtonType ret = EButtonType.None;
@ -30,6 +31,7 @@ namespace Rs.MotionPlat.Commom
if(warning)
{
BuzzerManager.Instance.Off();
LightManger.Instance.SetStatus(ELightStatus.Green);
}
return ret;
}
@ -40,7 +42,7 @@ namespace Rs.MotionPlat.Commom
/// <param name="alarmInfo"></param>
/// <param name="buttons"></param>
/// <returns></returns>
public static EButtonType ShowDialog(AlarmEntity alarmInfo, EButtonType buttons, bool warning = false)
public static EButtonType ShowDialog(AlarmEntity alarmInfo, EButtonType buttons, bool warning )
{
DevLog.EventTracker("ERROR START", alarmInfo.AlarmID, alarmInfo.EventTrackerDesc, alarmInfo.EN);
//if (!GlobalVar.DisableBuzzer)

@ -117,7 +117,7 @@ namespace Rs.MotionPlat.Flow
VacManager.DischargeVacSuction(EVacOperator.Open, true, i);
if (Ops.IsOn($"吸料真空{i}检测"))
{
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Retry);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Retry, true);
}
else
{
@ -133,7 +133,7 @@ namespace Rs.MotionPlat.Flow
{
if (Ops.IsOff("料盘搬运气缸原位"))
{
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.), EButtonType.Retry);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.), EButtonType.Retry, true);
}
else
{
@ -146,7 +146,7 @@ namespace Rs.MotionPlat.Flow
Ops.Off("料盘真空关");
if (Ops.IsOn("料盘真空"))
{
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.), EButtonType.Retry);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.), EButtonType.Retry, true);
}
else
{
@ -168,12 +168,12 @@ namespace Rs.MotionPlat.Flow
{
if (Ops.IsOn($"满料{i}对射光电"))
{
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Ok);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Ok, true);
//打开料仓jia'ci
Ops.Off($"料仓夹磁气缸{i}夹");
Ops.On($"料仓夹磁气缸{i}开");
Thread.Sleep(200);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Ok);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Ok, true);
}
else
{
@ -185,12 +185,12 @@ namespace Rs.MotionPlat.Flow
{
if (Ops.IsOff($"抽屉拉伸气缸{i}原位"))
{
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Ok);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Ok, true);
//打开料仓jia'ci
Ops.Off($"料仓夹磁气缸{i}夹");
Ops.On($"料仓夹磁气缸{i}开");
Thread.Sleep(200);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Ok);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Ok, true);
}
else
{
@ -211,7 +211,7 @@ namespace Rs.MotionPlat.Flow
}
else if(stopwatch.ElapsedMilliseconds>5000)
{
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Retry);
Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.).Transform(i), EButtonType.Retry, true);
stopwatch.Restart();
}
}

@ -398,7 +398,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
$"nozzle2 offsetx:{calibResult[1].CheckOffsetX.ToString("0.000")},offsety:{calibResult[1].CheckOffsetY.ToString("0.000")}\r\n" +
$"nozzle3 offsetx:{calibResult[2].CheckOffsetX.ToString("0.000")},offsety:{calibResult[2].CheckOffsetY.ToString("0.000")}\r\n" +
$"nozzle4 offsetx:{calibResult[3].CheckOffsetX.ToString("0.000")},offsety:{calibResult[3].CheckOffsetY.ToString("0.000")}";
Msgbox.ShowTipDialog(EButtonType.Ok, msg);
Msgbox.ShowTipDialog(EButtonType.Ok, msg,"tip",true);
run = false;
}
else
@ -428,7 +428,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
$"Nozzle1 offsetx:{calibResult[0].OffsetX.ToString("0.000")},offsety:{calibResult[0].OffsetY.ToString("0.000")}\r\n" +
$"Nozzle2 offsetx:{calibResult[1].OffsetX.ToString("0.000")},offsety:{calibResult[1].OffsetY.ToString("0.000")}\r\n," +
$"Nozzle3 offsetx:{calibResult[2].OffsetX.ToString("0.000")},offsety:{calibResult[2].OffsetY.ToString("0.000")}\r\n" +
$"Nozzle4 offsetx:{calibResult[3].OffsetX.ToString("0.000")},offsety:{calibResult[3].OffsetY.ToString("0.000")}");
$"Nozzle4 offsetx:{calibResult[3].OffsetX.ToString("0.000")},offsety:{calibResult[3].OffsetY.ToString("0.000")}","",false);
if(btn== EButtonType.Ok)
{
SysConfigParam.Update("Nozzle1ToCameraCenterOffsetX", $"{GlobalVar.Nozzle1ToCameraCenterOffsetX - calibResult[0].OffsetX}");
@ -546,7 +546,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
$"nozzle2 offsetx:{calibResult[1].CheckOffsetX.ToString("0.000")},offsety:{calibResult[1].CheckOffsetY.ToString("0.000")}\r\n" +
$"nozzle3 offsetx:{calibResult[2].CheckOffsetX.ToString("0.000")},offsety:{calibResult[2].CheckOffsetY.ToString("0.000")}\r\n" +
$"nozzle4 offsetx:{calibResult[3].CheckOffsetX.ToString("0.000")},offsety:{calibResult[3].CheckOffsetY.ToString("0.000")}";
Msgbox.ShowTipDialog(EButtonType.Ok, msg);
Msgbox.ShowTipDialog(EButtonType.Ok, msg,"", true);
run = false;
}
else

@ -162,13 +162,13 @@ namespace Rs.MotionPlat.Flow
if(enableList!=null && enableList.Count>0)
{
LogHelper.Debug($"启用治具:{string.Join(",",enableList.Select(f=>f.Index))}");
EButtonType button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, $"请确认LotName是否正确\r\nCheck whether LotName is correct?");
EButtonType button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, $"请确认LotName是否正确\r\nCheck whether LotName is correct?","tip",false);
if (button == EButtonType.Ok)
{
button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, $"请确认MTCP版本并且是否已经被LOT END\r\nPlease confirm the MTCP version and whether it has been LOT END?");
button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, $"请确认MTCP版本并且是否已经被LOT END\r\nPlease confirm the MTCP version and whether it has been LOT END?","tip", false);
if (button == EButtonType.Ok)
{
button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, $"请确认是否已选择正确的T0文件\r\nCheck whether the correct T0 file is selected?");
button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, $"请确认是否已选择正确的T0文件\r\nCheck whether the correct T0 file is selected?","tip", false);
if (button == EButtonType.Ok)
{
CreateCheckFixtureQueue(6);
@ -186,7 +186,7 @@ namespace Rs.MotionPlat.Flow
}
}
button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, "Are you sure you want to clear the data ?\r\n clear click OK\r\n not clear click Cancel");
button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, "Are you sure you want to clear the data ?\r\n clear click OK\r\n not clear click Cancel","tip", false);
if (button == EButtonType.Ok)
{
logInfo = GetClassName() + "选择了OK";
@ -242,7 +242,7 @@ namespace Rs.MotionPlat.Flow
}
else
{
Msgbox.ShowTipDialog(EButtonType.Ok, $"请先启用治具再启动\r\nEnable TC first please");
Msgbox.ShowTipDialog(EButtonType.Ok, $"请先启用治具再启动\r\nEnable TC first please","tip",true);
}
}

@ -284,7 +284,7 @@ namespace Rs.MotionPlat.Flow
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
}
else if (vProductResult != null && vProductResult.Result == EOneGrabSixteenResult.LocationOkScanBarcodeFail)
@ -303,19 +303,19 @@ namespace Rs.MotionPlat.Flow
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
}
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
}
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
break;

@ -234,7 +234,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
else if (stopwatch.ElapsedMilliseconds > 10000)
{
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.).Transform(StockIndex);
Msgbox.ShowDialog(alarmEntity, EButtonType.Recheck);
Msgbox.ShowDialog(alarmEntity, EButtonType.Recheck, true);
inStockStep = EInStockFlowStep.;
}
@ -376,7 +376,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
AlarmEntity alarmEntity = AlarmCollection.Get($"料仓{StockIndex}夹磁气缸原位异常");
if(alarmEntity != null )
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
StockModule.ClampTrayCylinder(EIoOperate.Open, StockIndex, GetClassName());
stopwatch.Restart();
}
@ -410,7 +410,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
AlarmEntity alarmEntity = AlarmCollection.Get($"料仓{StockIndex}夹磁气缸动位异常");
if(alarmEntity != null )
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
StockModule.ClampTrayCylinder(EIoOperate.Close, StockIndex, GetClassName());
stopwatch.Restart();
}

@ -190,7 +190,7 @@ namespace Rs.MotionPlat.Flow
else
{
alarmEntity = AlarmCollection.Get(AlarmConstID.).Transform(fromTray);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
break;
case ETakeTrayFlowStep.:
@ -212,7 +212,7 @@ namespace Rs.MotionPlat.Flow
alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog (alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog (alarmEntity, EButtonType.Retry, true);
step = ETakeTrayFlowStep.;
}
else
@ -262,7 +262,7 @@ namespace Rs.MotionPlat.Flow
if (alarmEntity != null)
{
MessageQueue.Instance.Warn(GetClassName() + alarmEntity.CN);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
else
{
@ -290,7 +290,7 @@ namespace Rs.MotionPlat.Flow
alarmEntity = AlarmCollection.Get(AlarmConstID.).Transform(fromTray.ToString());
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
step = ETakeTrayFlowStep.;
}
else

@ -148,7 +148,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
alarmEntity = AlarmCollection.Get(AlarmConstID.);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
}
}

@ -268,7 +268,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.).Transform(curNozzle.NozzleIndex);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
else
{

@ -307,7 +307,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.).Transform(curNozzle.NozzleIndex);
if (alarmEntity != null)
{
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
}
else
{

@ -641,7 +641,7 @@ namespace Rs.MotionPlat.Commom
else
{
AlarmEntity alarmEntity = AlarmCollection.Get($"NozzleZ{nozzle.NozzleIndex}运动异常报警");
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
return false;
}
}

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

Loading…
Cancel
Save