优化治具状态显示

master
lhiven 12 months ago
parent aef796b378
commit bbfff4b338

@ -35,14 +35,7 @@ namespace Rs.MotionPlat.Commom
InitDb();
SysConfigParam.Init();
int errNum = 0;
Task.Run(() => {
TestFixtureManager.Instance.StartLister();
Thread.Sleep(500);
if (GlobalVar.IsSimTest)
{
SimulateTesterManager.Instance.Init();
}
});
//Task.Run(() => {
if (!GlobalVar.VirtualAxis)
{
@ -95,7 +88,13 @@ namespace Rs.MotionPlat.Commom
DischargeFlow.Instance.Init();
GrrFlow.Instance.Init();
SysConfigParam.Update("EnableVirtuleBarCode", "False");
Task.Run(() => {
TestFixtureManager.Instance.StartLister();
if (GlobalVar.IsSimTest)
{
SimulateTesterManager.Instance.Init();
}
});
}
static void InitDb()

@ -123,29 +123,54 @@ namespace Rs.MotionPlat
lblSN.Text = tf.Product.SN;
}
}
if(tf.Product!=null)
else
{
if(!string.IsNullOrEmpty(tf.Product.Result) && lblResult.Text!=tf.Product.Result)
lblSN.Text = "";
}
if(lblResult.Text!=tf.Result)
{
if(tf.Product.Result=="PASS")
if(tf.Result=="PASS")
{
lblResult.BackColor = Color.Green;
}
else
else if(tf.Result=="NG")
{
lblResult.BackColor = Color.Red;
}
lblResult.Text = tf.Product.Result;
}
if(string.IsNullOrEmpty(tf.Result))
{
lblResult.BackColor = Color.FromArgb(11, 16, 36);
lblResult.Text = "";
}
else
{
if(!string.IsNullOrEmpty(lblResult.Text))
{
lblResult.Text = "";
lblResult.BackColor = Color.FromArgb(11, 16, 36);
lblResult.Text = tf.Result;
}
}
//if(tf.Product!=null)
//{
// if(!string.IsNullOrEmpty(tf.Product.Result) && lblResult.Text!=tf.Product.Result)
// {
// if(tf.Product.Result=="PASS")
// {
// lblResult.BackColor = Color.Green;
// }
// else
// {
// lblResult.BackColor = Color.Red;
// }
// lblResult.Text = tf.Product.Result;
// }
//}
//else
//{
// if(!string.IsNullOrEmpty(lblResult.Text))
// {
// lblResult.Text = "";
// lblResult.BackColor = Color.FromArgb(11, 16, 36);
// }
//}
//if (tf.Status== ETestFixtureStatus.Testing)
//{
// if (tf.Product!=null && lblSN.Text != tf.Product.SN)

@ -536,7 +536,7 @@ namespace Rs.MotionPlat.Entitys
break;
case "1":
//就绪状态,如果有产品就查询测试结果
if(Status == ETestFixtureStatus.Testing)
if(Status == ETestFixtureStatus.Testing ||(Status== ETestFixtureStatus.IDLE && Product!=null &&String.IsNullOrEmpty(Result)))
{
Send("Result$");
if (CheckPrintLog())
@ -592,16 +592,16 @@ 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]);
this.EndTestTime = DateTime.Now;
this.LastCT = (EndTestTime - StartTestTime).TotalSeconds;
TotalCount++;
@ -621,7 +621,7 @@ namespace Rs.MotionPlat.Entitys
{
Status = ETestFixtureStatus.Warning;
Task.Run(() => {
string errInfo = $"code:{items[1]},desc:{items[2]}";
string errInfo = $"tc{Index} test,code:{items[1]},desc:{items[2]}";
MessageQueue.Instance.Warn(errInfo);
Msgbox.ShowDialog(EButtonType.Ok, errInfo);
});
@ -869,7 +869,7 @@ namespace Rs.MotionPlat.Entitys
{
string content=Encoding.ASCII.GetString(registData.ToArray());
MessageQueue.Instance.Insert($">>> ip:{ep.Address.ToString()},port:{ep.Port.ToString()},{content}");
//MessageQueue.Instance.Insert($">>> ip:{ep.Address.ToString()},port:{ep.Port.ToString()},{content}");
string[] items = content.TrimEnd(new char[] { '$' }).Split('#');
string reg = "Register#1$";
int sendLen = clientSocket.Send(Encoding.ASCII.GetBytes(reg));

@ -511,7 +511,7 @@ namespace Rs.MotionPlat.Flow
logInfo = $"{GetClassName()}取料完成真空检测OK吸嘴 {curTakeNozzle.NozzleIndex} 从治具 {curFixture.Index} 把产品SN {curFixture.Product.SN} 取出";
MessageQueue.Instance.Insert(logInfo);
curTakeNozzle.Product = curFixture.Product;
curFixture.Product = null;
curFixture.Clear();//.Product = null;
GlobalTray.NozzleTray.ChangeStatus(curTakeNozzle.NozzleIndex, ESlotStatus.Have);
if(GlobalVar.TestMode=="GRR")
{

@ -109,6 +109,7 @@ namespace Rs.MotionPlat.SysConfig
EButtonType buttonSelect = Msgbox.ShowDialog(EButtonType.Retry | EButtonType.EndInput | EButtonType.Skip, $"穴位{i + 1}定位失败");
if (buttonSelect == EButtonType.EndInput)
{
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
exit = true;
return;
}

Loading…
Cancel
Save