diff --git a/Rs.DeweyTester/Commom/DevLog.cs b/Rs.DeweyTester/Commom/DevLog.cs
new file mode 100644
index 0000000..978d6eb
--- /dev/null
+++ b/Rs.DeweyTester/Commom/DevLog.cs
@@ -0,0 +1,76 @@
+using NPOI.OpenXmlFormats.Dml.Chart;
+using Rs.Framework;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Rs.MotionPlat.Commom
+{
+ public static class DevLog
+ {
+ private static string fileDir = "D:\\Summary";
+ public static void EventTracker(string keyword,int errorcode,string errormsg,string message)
+ {
+ string filename = $"{fileDir}\\{DateTime.Now.ToString("yyyyMMdd")}\\EventTracker_{DateTime.Now.ToString("yyyyMMdd")}.csv";
+ string csvTitle = "VERSION,SITEID,PROJECTID,MACHINEID,DATE,TIME,LOT NAME,LOGIN MODE,KEYWORD,ERROR CODE,ERROR MESSAGE,MESSAGE\r\n";
+ if(!Directory.Exists(Path.GetDirectoryName(filename)))
+ {
+ Directory.CreateDirectory(Path.GetDirectoryName(filename));
+ }
+ if(!File.Exists(filename))
+ {
+ File.AppendAllText(filename, csvTitle);
+ }
+ string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ string content = $"{v},{GlobalVar.SiteID},{GlobalVar.ProjectID},{GlobalVar.MachineID},{DateTime.Now.ToString("yyyy-MM-dd")},{DateTime.Now.ToString("HH:mm:ss")},{GlobalVar.LotName.Replace("\r\n","")},OP,{keyword},{errorcode},{errormsg},{message}\r\n";
+ File.AppendAllText(filename, content);
+ }
+
+ public static void Breakdown()
+ {
+ string filename = "";
+ string csvTitle = "Machine,Tester Category,Tester_Sequence_Item Detail,TimeStamp,Time(ms)";
+ if (!File.Exists(filename))
+ {
+ File.AppendAllText(filename, csvTitle);
+ }
+ else
+ {
+
+ }
+ }
+
+ public static void UnitTracker()
+ {
+ string filename = "";
+ string csvTitle = "SiteID,ProjectID,MachineID,Date,Time,LotName,LoginMode,Serial Number,Socker ID,Test Result,Trial,Socket Usage";
+ if (!File.Exists(filename))
+ {
+ File.AppendAllText(filename, csvTitle);
+ }
+ else
+ {
+
+ }
+ }
+
+ public static void Summary(string csvTitle,string content)
+ {
+ string filename = $"{fileDir}\\{DateTime.Now.ToString("yyyyMMdd")}\\Summary_{DateTime.Now.ToString("yyyyMMdd")}.csv";
+ if (!Directory.Exists(Path.GetDirectoryName(filename)))
+ {
+ Directory.CreateDirectory(Path.GetDirectoryName(filename));
+ }
+ if (!File.Exists(filename))
+ {
+ File.AppendAllText(filename, csvTitle);
+ }
+ string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ File.AppendAllText(filename, content);
+ }
+ }
+}
diff --git a/Rs.DeweyTester/Commom/Msgbox.cs b/Rs.DeweyTester/Commom/Msgbox.cs
index bbf8c8c..37e816d 100644
--- a/Rs.DeweyTester/Commom/Msgbox.cs
+++ b/Rs.DeweyTester/Commom/Msgbox.cs
@@ -17,7 +17,7 @@ namespace Rs.MotionPlat.Commom
///
/// 显示模态弹框
///
- public static EButtonType ShowDialog(EButtonType buttons,string content,string title="",bool warning=false)
+ public static EButtonType ShowTipDialog(EButtonType buttons,string content,string title="",bool warning=false)
{
if (warning)
{
@@ -40,13 +40,17 @@ namespace Rs.MotionPlat.Commom
///
///
///
- public static EButtonType ShowDialog(AlarmEntity alarmInfo, EButtonType buttons)
+ public static EButtonType ShowDialog(AlarmEntity alarmInfo, EButtonType buttons, bool warning = false)
{
+ DevLog.EventTracker("ERROR START", alarmInfo.AlarmID, alarmInfo.EN, "WORK");
//if (!GlobalVar.DisableBuzzer)
//{
// Ops.On("蜂鸣器");
//}
- BuzzerManager.Instance.On();
+ if(warning)
+ {
+ BuzzerManager.Instance.On();
+ }
LightManger.Instance.SetStatus(ELightStatus.Red);
string logInfo = $"{alarmInfo.CN}";
LogHelper.Debug(logInfo);
@@ -69,7 +73,11 @@ namespace Rs.MotionPlat.Commom
//{
// LightManger.Instance.SetStatus(ELightStatus.Green);
//}
- BuzzerManager.Instance.Off();
+ DevLog.EventTracker("ERROR END", alarmInfo.AlarmID, alarmInfo.EN, "WORK");
+ if (warning)
+ {
+ BuzzerManager.Instance.Off();
+ }
}
return ret;
}
diff --git a/Rs.DeweyTester/Commom/PositionHelper.cs b/Rs.DeweyTester/Commom/PositionHelper.cs
index 40ab858..ecd95e1 100644
--- a/Rs.DeweyTester/Commom/PositionHelper.cs
+++ b/Rs.DeweyTester/Commom/PositionHelper.cs
@@ -126,7 +126,7 @@ namespace Rs.MotionPlat.Commom
string axisname = ((TextBox)control).Tag.ToString();
double gotoPos = double.Parse(((TextBox)control).Text);
//DialogResult dr = Msg.ShowQuestion($"Are you sure to move {axisname} to postion at: {gotoPos}");
- EButtonType btnType = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, $"Are you sure to move {axisname} to postion at: {gotoPos}");
+ EButtonType btnType = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, $"Are you sure to move {axisname} to postion at: {gotoPos}");
//if (dr == DialogResult.OK)
if(btnType== EButtonType.Ok)
{
@@ -134,7 +134,7 @@ namespace Rs.MotionPlat.Commom
if (errCode > Motion.ErrorCode.Ok)
{
//Msg.ShowError($"axis {axisname} move fail {errCode}");
- Msgbox.ShowDialog(EButtonType.Ok, $"axis {axisname} move fail {errCode}","move",true);
+ Msgbox.ShowTipDialog(EButtonType.Ok, $"axis {axisname} move fail {errCode}","move",true);
}
}
}
diff --git a/Rs.DeweyTester/Commom/VacManager.cs b/Rs.DeweyTester/Commom/VacManager.cs
index ab6e9cb..d870611 100644
--- a/Rs.DeweyTester/Commom/VacManager.cs
+++ b/Rs.DeweyTester/Commom/VacManager.cs
@@ -91,11 +91,11 @@ namespace Rs.MotionPlat.Commom
{
if (eOperator == EVacOperator.Open)
{
- Ops.On($"{index}号吸嘴真空破电磁阀");
+ Ops.On($"吸料真空{index}破");
}
else
{
- Ops.Off($"{index}号吸嘴真空破电磁阀");
+ Ops.Off($"吸料真空{index}破");
}
}
diff --git a/Rs.DeweyTester/Entitys/TestFixtureManager.cs b/Rs.DeweyTester/Entitys/TestFixtureManager.cs
index e3a6fdc..e25d42e 100644
--- a/Rs.DeweyTester/Entitys/TestFixtureManager.cs
+++ b/Rs.DeweyTester/Entitys/TestFixtureManager.cs
@@ -473,7 +473,7 @@ namespace Rs.MotionPlat.Entitys
{
for(int i=0;i {
string errInfo = $"tc{Index} test,code:{items[1]},desc:{items[2]}";
MessageQueue.Instance.Warn(errInfo);
- Msgbox.ShowDialog(EButtonType.Ok, errInfo,"testfixture error",true);
+ Msgbox.ShowTipDialog(EButtonType.Ok, errInfo,"testfixture error",true);
});
}
}
diff --git a/Rs.DeweyTester/Flow/AlarmConstID.cs b/Rs.DeweyTester/Flow/AlarmConstID.cs
index 6d28909..3c0d94a 100644
--- a/Rs.DeweyTester/Flow/AlarmConstID.cs
+++ b/Rs.DeweyTester/Flow/AlarmConstID.cs
@@ -210,7 +210,29 @@ namespace Rs.MotionPlat.Flow
///
public const int 治具放料拍照失败 = 1042;
-
+ ///
+ /// 侧相机测试失败报警
+ ///
+ public const int 侧相机测试失败报警 = 1043;
+ ///
+ /// 标定失败
+ ///
+ public const int 标定失败 = 1044;
+
+ ///
+ /// 取料定位失败报警
+ ///
+ public const int 取料定位失败报警 = 1045;
+
+ ///
+ /// 治具取料失败真空报警
+ ///
+ public const int 治具取料失败真空报警 = 1046;
+
+ ///
+ /// 一拍十六拍照失败报警
+ ///
+ public const int 一拍十六拍照失败报警 = 1047;
}
}
diff --git a/Rs.DeweyTester/Flow/HomeFlow.cs b/Rs.DeweyTester/Flow/HomeFlow.cs
index 9be856b..aaec29d 100644
--- a/Rs.DeweyTester/Flow/HomeFlow.cs
+++ b/Rs.DeweyTester/Flow/HomeFlow.cs
@@ -58,6 +58,7 @@ namespace Rs.MotionPlat.Flow
public void StartGoHome()
{
+ DevLog.EventTracker("INIT START", 0, "", "HOME");
step = EHomeFlowStep.回原环境检测;
homeStep = 0;
m_bHomed = false;
@@ -91,24 +92,7 @@ namespace Rs.MotionPlat.Flow
// }
// break;
case EHomeFlowStep.回原环境检测:
- if (GlobalVar.CheckVisionSwOpened)
- {
- while (true)
- {
- string vname = "KImage";
- Process[] progresses = Process.GetProcesses();
- if (progresses.Where(p => p.ProcessName == vname).Count() == 0)
- {
- Msgbox.ShowDialog(EButtonType.Retry, "Vision software hasn't open,please open vision software!");
- }
- else
- {
- break;
- }
- }
-
- }
- //MessageQueue.Instance.Insert("气缸复位");
+
for (int i = 1; i < 5; i++)
{
Ops.Off($"吸料真空{i}破");
@@ -124,22 +108,19 @@ namespace Rs.MotionPlat.Flow
MessageQueue.Instance.Insert($"关闭抽屉拉伸气缸{i}");
}
//吸嘴有无产品检测
- if (true)
+ for (int i = 1; i <= 4; i++)
{
- for (int i = 1; i <= 4; i++)
+ while (true)
{
- while (true)
+ VacManager.DischargeVacSuction(EVacOperator.Open, true, i);
+ if (Ops.IsOn($"吸料真空{i}检测"))
{
- VacManager.DischargeVacSuction(EVacOperator.Open, true, i);
- if (Ops.IsOn($"吸料真空{i}检测"))
- {
- Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.吸嘴有料), EButtonType.Retry);
- }
- else
- {
- VacManager.DischargeVacSuction(EVacOperator.Close, true, i);
- break;
- }
+ Msgbox.ShowDialog(AlarmCollection.Get(AlarmConstID.吸嘴有料).Transform(i), EButtonType.Retry);
+ }
+ else
+ {
+ VacManager.DischargeVacSuction(EVacOperator.Close, true, i);
+ break;
}
}
}
@@ -354,6 +335,7 @@ namespace Rs.MotionPlat.Flow
}
}
});
+ DevLog.EventTracker("INIT END", 0, "", "HOME");
}
private string CheckCanHome()
diff --git a/Rs.DeweyTester/Flow/NormalFlow/CalibrationFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/CalibrationFlow.cs
index f3a8c24..a593c11 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/CalibrationFlow.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/CalibrationFlow.cs
@@ -3,6 +3,7 @@ using Rs.Controls;
using Rs.Framework;
using Rs.Motion;
using Rs.MotionPlat.Commom;
+using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Flow.Common;
using Rs.MotionPlat.Vision;
using System;
@@ -362,7 +363,9 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else
{
- Msgbox.ShowDialog(EButtonType.Retry, "Calib fail,please select retry");
+ AlarmEntity alarmEntity = AlarmCollection.Get(AlarmConstID.标定失败);
+ Msgbox.ShowDialog(alarmEntity,EButtonType.Retry,true);
+ //Msgbox.ShowDialog(EButtonType.Retry, "Calib fail,please select retry");
}
break;
case ECalibrationFlowStep.等待视觉处理结果:
@@ -388,7 +391,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.ShowDialog(EButtonType.Ok, msg);
+ Msgbox.ShowTipDialog(EButtonType.Ok, msg);
run = false;
}
else
@@ -414,7 +417,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
//GlobalVar.Nozzle2ToNozzle1CenterOffsetX -= (calibResult[2].OffsetX - calibResult[1].OffsetX);
//GlobalVar.Nozzle2ToNozzle1CenterOffsetY2 -= calibResult[2].OffsetY - calibResult[1].OffsetY;
- EButtonType btn = Msgbox.ShowDialog( EButtonType.Ok| EButtonType.Cancel, $"calib finished,click ok start check calib result,click cancel end calib,\r\n" +
+ EButtonType btn = Msgbox.ShowTipDialog( EButtonType.Ok| EButtonType.Cancel, $"calib finished,click ok start check calib result,click cancel end calib,\r\n" +
$"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" +
@@ -524,7 +527,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else
{
- Msgbox.ShowDialog(EButtonType.Retry, "Calib fail,please select retry", "tip", true);
+ Msgbox.ShowTipDialog(EButtonType.Retry, "Calib fail,please select retry", "tip", true);
}
break;
case ECalibrationCheckFlowStep.等待视觉处理结果:
@@ -536,7 +539,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.ShowDialog(EButtonType.Ok, msg);
+ Msgbox.ShowTipDialog(EButtonType.Ok, msg);
run = false;
}
else
diff --git a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
index 9a96118..db77a85 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
@@ -152,10 +152,10 @@ namespace Rs.MotionPlat.Flow
// GlobalTray.NgTray.ChangeStatus(ESlotStatus.NotHave);
//}
//EButtonType button = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "请确认 LOT 信息 信息正确 选择OK 信息错误退出重写 选择Cancel");
- EButtonType button =Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "请确认 LOT信息\r\n信息正确 选择OK\r\n信息错误退出重写 选择Cancel");
+ EButtonType button =Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, "请确认 LOT信息\r\n信息正确 选择OK\r\n信息错误退出重写 选择Cancel");
if(button== EButtonType.Ok)
{
- button = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "是否清除之前数据?\r\n清除点击OK\r\n不清楚点击Cancel");
+ button = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, "是否清除之前数据?\r\n清除点击OK\r\n不清楚点击Cancel");
if(button== EButtonType.Ok)
{
TestFixtureManager.Instance.GetTestFixture(1).ClearData();
@@ -253,7 +253,7 @@ namespace Rs.MotionPlat.Flow
//if(Stock2Flow.Instance.GetCurrentLayer()==1)
if(StockManager.GetCurrentLayer(2)==1)
{
- EButtonType btn = Msgbox.ShowDialog( EButtonType.Retry| EButtonType.EndInput,"请更换料盘","tip",true);
+ EButtonType btn = Msgbox.ShowTipDialog( EButtonType.Retry| EButtonType.EndInput,"请更换料盘","tip",true);
if(btn== EButtonType.Retry)
{
//先把轴移动到安全位
@@ -374,7 +374,7 @@ namespace Rs.MotionPlat.Flow
}
else
{
- Msgbox.ShowDialog(EButtonType.Ok, "Retest料盘已放满,请更换料盘,更换完成后点击确定","tip",true);
+ Msgbox.ShowTipDialog(EButtonType.Ok, "Retest料盘已放满,请更换料盘,更换完成后点击确定","tip",true);
GlobalTray.RetestTray.ChangeStatus(ESlotStatus.NotHave);
ThreePointLocationFlow.Instance.Location(ETrayType.ReTest);
//放料
@@ -388,7 +388,9 @@ namespace Rs.MotionPlat.Flow
else if (fixtureret.Result == EOneGrabSixteenResult.Slant)
{
//报警弹框
- EButtonType buttonSelect = Msgbox.ShowDialog(EButtonType.Skip | EButtonType.Retry | EButtonType.EndInput, $"穴位{ret.SlotIndex}定位失败,请把产品手动取走后点击跳过","tip",true);
+ alarmEntity = AlarmCollection.Get(AlarmConstID.取料定位失败报警);
+ EButtonType buttonSelect = Msgbox.ShowDialog(alarmEntity, EButtonType.Skip | EButtonType.Retry | EButtonType.EndInput, true);
+ //EButtonType buttonSelect = Msgbox.ShowDialog(EButtonType.Skip | EButtonType.Retry | EButtonType.EndInput, $"穴位{ret.SlotIndex}定位失败,请把产品手动取走后点击跳过","tip",true);
if (buttonSelect == EButtonType.Skip)
{
exit = true;
@@ -585,7 +587,7 @@ namespace Rs.MotionPlat.Flow
else
{
//提示更换料盘
- Msgbox.ShowDialog(EButtonType.Ok, "NG料盘已满,请更换料盘,更换完成后点击确定","tip",true);
+ Msgbox.ShowTipDialog(EButtonType.Ok, "NG料盘已满,请更换料盘,更换完成后点击确定","tip",true);
ThreePointLocationFlow.Instance.Location(ETrayType.Ng);
GlobalTray.NgTray.ChangeStatus(ESlotStatus.NotHave);
}
diff --git a/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs
index 4e76329..788787c 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs
@@ -557,7 +557,7 @@ namespace Rs.MotionPlat.Flow
else
{
//取料失败报警
- Msgbox.ShowDialog(EButtonType.Retry, "治具取料失败报警", "error", true);
+ Msgbox.ShowTipDialog(EButtonType.Retry, "治具取料失败报警", "error", true);
}
break;
case EGrrFlowStep.到治具拍照位:
diff --git a/Rs.DeweyTester/Flow/NormalFlow/Stock1Flow.cs b/Rs.DeweyTester/Flow/NormalFlow/Stock1Flow.cs
index 2390e72..34a4cbb 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/Stock1Flow.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/Stock1Flow.cs
@@ -80,7 +80,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
case EPrepareTray1FlowStep.料盘判断:
if(HasTray() && GetCurrentLayer()>0)
{
- Msgbox.ShowDialog(EButtonType.Retry, "Ok料仓处有料盘,请点击重试后取走料盘", "error", true);
+ Msgbox.ShowTipDialog(EButtonType.Retry, "Ok料仓处有料盘,请点击重试后取走料盘", "error", true);
OutStock();
InStock();
prepareTrayStep = EPrepareTray1FlowStep.上升一层;
diff --git a/Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs b/Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs
index d76990e..cc20887 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/Stock2Flow.cs
@@ -106,7 +106,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
{
logInfo = GetClassName() + $"当前层:{GetCurrentLayer()}未检测到料盘";
MessageQueue.Instance.Insert(logInfo);
- Msgbox.ShowDialog(EButtonType.Retry, "Input料仓处料盘少于2盘,选择重试后弹出料仓", "error", true);
+ Msgbox.ShowTipDialog(EButtonType.Retry, "Input料仓处料盘少于2盘,选择重试后弹出料仓", "error", true);
OutStock();
InStock();
prepareTrayStep = EPrepareTray2FlowStep.上升一层;
diff --git a/Rs.DeweyTester/Flow/NormalFlow/Stock3Flow.cs b/Rs.DeweyTester/Flow/NormalFlow/Stock3Flow.cs
index a98f67a..48ce4a8 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/Stock3Flow.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/Stock3Flow.cs
@@ -90,7 +90,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else
{
- Msgbox.ShowDialog(EButtonType.Retry, "Input料仓处料盘少于2盘,选择重试后弹出料仓","error",true);
+ Msgbox.ShowTipDialog(EButtonType.Retry, "Input料仓处料盘少于2盘,选择重试后弹出料仓","error",true);
OutStock();
InStock();
prepareTrayStep = EPrepareTray3FlowStep.上升一层;
diff --git a/Rs.DeweyTester/Flow/NormalFlow/StockFlowBase.cs b/Rs.DeweyTester/Flow/NormalFlow/StockFlowBase.cs
index 2b94df5..2b33f57 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/StockFlowBase.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/StockFlowBase.cs
@@ -109,7 +109,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else if (stopwatch.ElapsedMilliseconds > 5000)
{
- Msgbox.ShowDialog(EButtonType.Retry, "抽屉锁原位异常,请处理后点击重试","error",true);
+ Msgbox.ShowTipDialog(EButtonType.Retry, "抽屉锁原位异常,请处理后点击重试","error",true);
}
break;
case EOutStockFlowStep.到出仓位:
@@ -209,7 +209,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
}
else if (stopwatch.ElapsedMilliseconds > 5000)
{
- Msgbox.ShowDialog(EButtonType.Retry, "抽屉锁原位异常,请处理后点击重试","error",true);
+ Msgbox.ShowTipDialog(EButtonType.Retry, "抽屉锁原位异常,请处理后点击重试","error",true);
}
break;
case EInStockFlowStep.等待进仓信号:
diff --git a/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs b/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs
index f9981e9..51d4880 100644
--- a/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs
+++ b/Rs.DeweyTester/Flow/SubFlow/FixtureTakeFlow.cs
@@ -54,7 +54,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
return flowStep.ToString();
}
-
+ AlarmEntity alarmEntity = new AlarmEntity();
public void Take(int fixtureIndex,int nozzleIndex=-1,bool btest=false)
{
if (finished)
@@ -228,7 +228,9 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
- Msgbox.ShowDialog(EButtonType.Recheck, $"吸嘴{curNozzle.NozzleIndex}从治具{curFixture.Index}取料时真空检测异常,请处理","vac error",true);
+ alarmEntity = AlarmCollection.Get(AlarmConstID.治具取料失败真空报警).Transform(curNozzle.NozzleIndex, curFixture.Index);
+ Msgbox.ShowDialog(alarmEntity, EButtonType.Recheck, true);
+ //Msgbox.ShowTipDialog(EButtonType.Recheck, $"吸嘴{curNozzle.NozzleIndex}从治具{curFixture.Index}取料时真空检测异常,请处理","vac error",true);
}
break;
diff --git a/Rs.DeweyTester/Flow/SubFlow/ProductLocationFlow.cs b/Rs.DeweyTester/Flow/SubFlow/ProductLocationFlow.cs
index bd5ee81..a5dba81 100644
--- a/Rs.DeweyTester/Flow/SubFlow/ProductLocationFlow.cs
+++ b/Rs.DeweyTester/Flow/SubFlow/ProductLocationFlow.cs
@@ -43,6 +43,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
}
+ AlarmEntity alarmEntity = new AlarmEntity();
public void Grab(ETrayType trayType, int slotIndex)
{
if (finished)
@@ -159,7 +160,9 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
- Msgbox.ShowDialog(EButtonType.Retry, "一拍十六拍照失败,请处理后点击重试","grab fail",true);
+ alarmEntity = AlarmCollection.Get(AlarmConstID.一拍十六拍照失败报警);
+ Msgbox.ShowDialog(alarmEntity, EButtonType.Retry, true);
+ //Msgbox.ShowTipDialog(EButtonType.Retry, "一拍十六拍照失败,请处理后点击重试","grab fail",true);
flowStep = EProductLocationFlowStep.到料仓拍照起始位;
}
break;
diff --git a/Rs.DeweyTester/Flow/SubFlow/StockGrabFlow.cs b/Rs.DeweyTester/Flow/SubFlow/StockGrabFlow.cs
index bdac4be..4dee701 100644
--- a/Rs.DeweyTester/Flow/SubFlow/StockGrabFlow.cs
+++ b/Rs.DeweyTester/Flow/SubFlow/StockGrabFlow.cs
@@ -1,6 +1,7 @@
using Rs.Controls;
using Rs.Framework;
using Rs.MotionPlat.Commom;
+using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Vision;
using System;
using System.Collections.Generic;
@@ -41,6 +42,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
private TargetPosition targetPosition = new TargetPosition();
private string logInfo = string.Empty;
VisionResult vr = new VisionResult();
+ AlarmEntity alarmEntity = new AlarmEntity();
public void Grab(ETrayType trayType)
{
@@ -108,7 +110,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
if (noHasProduct.Count > 0)
{
- EButtonType btn = Msgbox.ShowDialog(EButtonType.Retry | EButtonType.Skip, "料盘未放满,请处理", "tray info", true);
+ EButtonType btn = Msgbox.ShowTipDialog(EButtonType.Retry | EButtonType.Skip, "料盘未放满,请处理", "tray info", true);
if (btn == EButtonType.Retry)
{
flowStep = EStockGrabFlowStep.通知上料仓拍照;
diff --git a/Rs.DeweyTester/FormMain.cs b/Rs.DeweyTester/FormMain.cs
index 5f377d4..b7fea79 100644
--- a/Rs.DeweyTester/FormMain.cs
+++ b/Rs.DeweyTester/FormMain.cs
@@ -635,7 +635,7 @@ namespace Rs.MotionPlat
private void btnClearData_Click(object sender, EventArgs e)
{
- EButtonType btn = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "Are you sure to clear data?");
+ EButtonType btn = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, "Are you sure to clear data?");
if(btn== EButtonType.Ok)
{
TestFixtureManager.Instance.GetTestFixture(1).ClearData();
diff --git a/Rs.DeweyTester/Home.cs b/Rs.DeweyTester/Home.cs
index d8913a0..99fbc12 100644
--- a/Rs.DeweyTester/Home.cs
+++ b/Rs.DeweyTester/Home.cs
@@ -272,6 +272,24 @@ namespace Rs.MotionPlat
private void Home2_Load(object sender, EventArgs e)
{
+ if (GlobalVar.CheckVisionSwOpened)
+ {
+ while (true)
+ {
+ string vname = "KImage";
+ Process[] progresses = Process.GetProcesses();
+ if (progresses.Where(p => p.ProcessName == vname).Count() == 0)
+ {
+ Msgbox.ShowTipDialog(EButtonType.Retry, "Vision software hasn't open,please open vision software!");
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ }
+
string language = Properties.Settings.Default.DefaultLanguage;
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(language);
LanguageHelper.LoadLanguage(this, typeof(Home));
@@ -488,7 +506,7 @@ namespace Rs.MotionPlat
public override bool WindowsClose()
{
//DialogResult dr = MessageBox.Show("Are you sure to exit?", "tip", MessageBoxButtons.OKCancel);
- EButtonType btnType = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, "Are you sure to exit?");
+ EButtonType btnType = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, "Are you sure to exit?");
//if (dr == DialogResult.OK)
if(btnType== EButtonType.Ok)
{
diff --git a/Rs.DeweyTester/Program.cs b/Rs.DeweyTester/Program.cs
index 512a4d9..617144b 100644
--- a/Rs.DeweyTester/Program.cs
+++ b/Rs.DeweyTester/Program.cs
@@ -27,9 +27,6 @@ namespace Rs.MotionPlat
static void Main()
{
- Regex reg = new Regex("C\\d,0");
-
- bool b = reg.IsMatch("M2,0");
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new FormIO2());
diff --git a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs
index fcaa1b1..b1c0383 100644
--- a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs
+++ b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs
@@ -153,7 +153,7 @@ namespace Rs.MotionPlat.Recipe
rowEffect = db.ExecuteNonQuery(sql);
if(rowEffect>0)
{
- Msgbox.ShowDialog(EButtonType.Ok, $"{rowEffect} data updated!");
+ Msgbox.ShowTipDialog(EButtonType.Ok, $"{rowEffect} data updated!");
}
}
BindPoints();
diff --git a/Rs.DeweyTester/Rs.DeweyTester.csproj b/Rs.DeweyTester/Rs.DeweyTester.csproj
index 5b6b618..7c073be 100644
--- a/Rs.DeweyTester/Rs.DeweyTester.csproj
+++ b/Rs.DeweyTester/Rs.DeweyTester.csproj
@@ -125,6 +125,7 @@
+
diff --git a/Rs.DeweyTester/SysConfig/FixtureConfig.cs b/Rs.DeweyTester/SysConfig/FixtureConfig.cs
index 439ebb8..60d50b1 100644
--- a/Rs.DeweyTester/SysConfig/FixtureConfig.cs
+++ b/Rs.DeweyTester/SysConfig/FixtureConfig.cs
@@ -31,7 +31,7 @@ namespace Rs.MotionPlat.SysConfig
if (int.TryParse(btn.Text, out int nozzleIndex))
{
targetPosition = NozzleManager.GetNozzleToFixturePos(fixtureIndex, nozzleIndex);
- EButtonType btnType = Msgbox.ShowDialog(EButtonType.Ok | EButtonType.Cancel, $"Are you sure to move loadx:{targetPosition.X},loady1:{targetPosition.Y1},loady2:{targetPosition.Y2}");
+ EButtonType btnType = Msgbox.ShowTipDialog(EButtonType.Ok | EButtonType.Cancel, $"Are you sure to move loadx:{targetPosition.X},loady1:{targetPosition.Y1},loady2:{targetPosition.Y2}");
GroupAxisMove.XY1Y2MovePos(targetPosition, GlobalVar.WholeSpeed);
}
}
diff --git a/Rs.DeweyTester/SysConfig/SelectProductFrm.cs b/Rs.DeweyTester/SysConfig/SelectProductFrm.cs
index 671b516..acb0814 100644
--- a/Rs.DeweyTester/SysConfig/SelectProductFrm.cs
+++ b/Rs.DeweyTester/SysConfig/SelectProductFrm.cs
@@ -92,7 +92,7 @@ namespace Rs.MotionPlat.SysConfig
}
else if (fixtureret.Result == EOneGrabSixteenResult.LocationOkScanBarcodeFail)
{
- EButtonType buttonSelect = Msgbox.ShowDialog(EButtonType.Retry | EButtonType.Skip, $"穴位{i + 1}扫码失败","scan fail",true);
+ EButtonType buttonSelect = Msgbox.ShowTipDialog(EButtonType.Retry | EButtonType.Skip, $"穴位{i + 1}扫码失败","scan fail",true);
if (buttonSelect == EButtonType.Skip)
{
logInfo = $"{i + 1},NG\r\n";
@@ -106,7 +106,7 @@ namespace Rs.MotionPlat.SysConfig
}
else if (fixtureret.Result == EOneGrabSixteenResult.Slant)
{
- EButtonType buttonSelect = Msgbox.ShowDialog(EButtonType.Retry | EButtonType.EndInput | EButtonType.Skip, $"穴位{i + 1}定位失败","location fail",true);
+ EButtonType buttonSelect = Msgbox.ShowTipDialog(EButtonType.Retry | EButtonType.EndInput | EButtonType.Skip, $"穴位{i + 1}定位失败","location fail",true);
if (buttonSelect == EButtonType.EndInput)
{
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
diff --git a/Rs.DeweyTester/TestFrm.cs b/Rs.DeweyTester/TestFrm.cs
index d219e65..67c1270 100644
--- a/Rs.DeweyTester/TestFrm.cs
+++ b/Rs.DeweyTester/TestFrm.cs
@@ -62,7 +62,7 @@ namespace Rs.MotionPlat
private void button16_Click(object sender, EventArgs e)
{
- Msgbox.ShowDialog(EButtonType.Retry, "fasd");
+ Msgbox.ShowTipDialog(EButtonType.Retry, "fasd");
}
private void button17_Click(object sender, EventArgs e)
diff --git a/Rs.DeweyTester/UserForm.cs b/Rs.DeweyTester/UserForm.cs
index 549a4c4..9429014 100644
--- a/Rs.DeweyTester/UserForm.cs
+++ b/Rs.DeweyTester/UserForm.cs
@@ -46,7 +46,7 @@ namespace Rs.MotionPlat
}
else
{
- Msgbox.ShowDialog( EButtonType.Ok, "userpwd error,please input again");
+ Msgbox.ShowTipDialog( EButtonType.Ok, "userpwd error,please input again");
txtPassword.Text = "";
}
}
@@ -61,7 +61,7 @@ namespace Rs.MotionPlat
}
else
{
- Msgbox.ShowDialog(EButtonType.Ok, "userpwd error,please input again");
+ Msgbox.ShowTipDialog(EButtonType.Ok, "userpwd error,please input again");
txtPassword.Text = "";
}
}
@@ -76,7 +76,7 @@ namespace Rs.MotionPlat
}
else
{
- Msgbox.ShowDialog(EButtonType.Ok, "userpwd error,please input again");
+ Msgbox.ShowTipDialog(EButtonType.Ok, "userpwd error,please input again");
txtPassword.Text = "";
}
}