1 把提示弹框和报警弹框分开

2 增加SUMMARY和EventTracker
master
lhiven 1 year ago
parent ace1f5ec61
commit 1a6257aa85

@ -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);
}
}
}

@ -17,7 +17,7 @@ namespace Rs.MotionPlat.Commom
/// <summary>
/// 显示模态弹框
/// </summary>
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
/// <param name="alarmInfo"></param>
/// <param name="buttons"></param>
/// <returns></returns>
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;
}

@ -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);
}
}
}

@ -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}破");
}
}

@ -473,7 +473,7 @@ namespace Rs.MotionPlat.Entitys
{
for(int i=0;i<len;i++)
{
if (bytes[i] !=36)
if (bytes[i] != (byte)'$')
{
data.Add(bytes[i]);
}
@ -561,7 +561,7 @@ namespace Rs.MotionPlat.Entitys
break;
case "3":
//侧相机测试失败
EButtonType sideCameraSelect = Msgbox.ShowDialog(EButtonType.Retry | EButtonType.Cancel, "请检查DUT是否放好如果已放好继续测试选择Retry终止测试选择Cancel");
EButtonType sideCameraSelect = Msgbox.ShowTipDialog(EButtonType.Retry | EButtonType.Cancel, "请检查DUT是否放好如果已放好继续测试选择Retry终止测试选择Cancel");
if(sideCameraSelect== EButtonType.Retry)
{
string msg = "ContinueTest#1$";
@ -607,16 +607,17 @@ namespace Rs.MotionPlat.Entitys
}
string summaryPath = $"D:\\Summary\\{DateTime.Now.ToString("yyyyMMdd")}\\summary.csv";
if (!Directory.Exists(Path.GetDirectoryName(summaryPath)))
{
Directory.CreateDirectory(Path.GetDirectoryName(summaryPath));
}
if (!File.Exists(summaryPath))
{
File.AppendAllText(summaryPath, CsvTitle);
}
File.AppendAllText(summaryPath, items[3]);
//string summaryPath = $"D:\\Summary\\{DateTime.Now.ToString("yyyyMMdd")}\\summary.csv";
//if (!Directory.Exists(Path.GetDirectoryName(summaryPath)))
//{
// Directory.CreateDirectory(Path.GetDirectoryName(summaryPath));
//}
//if (!File.Exists(summaryPath))
//{
// File.AppendAllText(summaryPath, CsvTitle);
//}
//File.AppendAllText(summaryPath, items[3]);
DevLog.Summary(CsvTitle, items[3]);
this.EndTestTime = DateTime.Now;
this.LastCT = (EndTestTime - StartTestTime).TotalSeconds;
TotalCount++;
@ -638,7 +639,7 @@ namespace Rs.MotionPlat.Entitys
Task.Run(() => {
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);
});
}
}

@ -210,7 +210,29 @@ namespace Rs.MotionPlat.Flow
/// </summary>
public const int = 1042;
/// <summary>
/// 侧相机测试失败报警
/// </summary>
public const int = 1043;
/// <summary>
/// 标定失败
/// </summary>
public const int = 1044;
/// <summary>
/// 取料定位失败报警
/// </summary>
public const int = 1045;
/// <summary>
/// 治具取料失败真空报警
/// </summary>
public const int = 1046;
/// <summary>
/// 一拍十六拍照失败报警
/// </summary>
public const int = 1047;
}
}

@ -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()

@ -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 resultclick cancel end calib\r\n" +
EButtonType btn = Msgbox.ShowTipDialog( EButtonType.Ok| EButtonType.Cancel, $"calib finished,click ok start check calib resultclick 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

@ -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);
}

@ -557,7 +557,7 @@ namespace Rs.MotionPlat.Flow
else
{
//取料失败报警
Msgbox.ShowDialog(EButtonType.Retry, "治具取料失败报警", "error", true);
Msgbox.ShowTipDialog(EButtonType.Retry, "治具取料失败报警", "error", true);
}
break;
case EGrrFlowStep.:

@ -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.;

@ -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.;

@ -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.;

@ -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.:

@ -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;

@ -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;

@ -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.;

@ -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();

@ -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)
{

@ -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());

@ -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();

@ -125,6 +125,7 @@
<Compile Include="Commom\AxisAlias.cs" />
<Compile Include="Commom\AxisPosPrint.cs" />
<Compile Include="Commom\BuzzerManager.cs" />
<Compile Include="Commom\DevLog.cs" />
<Compile Include="Commom\Enums.cs" />
<Compile Include="Commom\FixtureManager.cs" />
<Compile Include="Commom\GlobalTray.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);
}
}

@ -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();

@ -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)

@ -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 = "";
}
}

Loading…
Cancel
Save