25111502 调整进度条显示;添加单产品测试总时长显示;添加密码;MES接口待改
This commit is contained in:
@@ -1340,6 +1340,18 @@ namespace SLC1_N
|
||||
return CH1yiqiParam_P;
|
||||
}
|
||||
|
||||
// 记录开始时间
|
||||
private DateTime CH1start_time;
|
||||
private DateTime CH2start_time;
|
||||
private DateTime CH3start_time;
|
||||
private DateTime CH4start_time;
|
||||
|
||||
// 是否刷新启动时间标志位
|
||||
private bool bool_CH1start_time = false;
|
||||
private bool bool_CH2start_time = false;
|
||||
private bool bool_CH3start_time = false;
|
||||
private bool bool_CH4start_time = false;
|
||||
|
||||
// 通道1状态机
|
||||
public void CH1machine()
|
||||
{
|
||||
@@ -1361,6 +1373,8 @@ namespace SLC1_N
|
||||
CH1testCount = 0; // 重置测试次数
|
||||
CH1TestRecord.Reset();
|
||||
|
||||
bool_CH1start_time = false;
|
||||
|
||||
// 模式切回正压
|
||||
//CH1NowMode = "正压";
|
||||
//LL28CH1client.writeRegisters(1006, GetYiqiParam(1, "P").GetArray());
|
||||
@@ -1375,8 +1389,16 @@ namespace SLC1_N
|
||||
}
|
||||
break;
|
||||
|
||||
case (int)yiqi.prepare:
|
||||
case (int)yiqi.prepare:
|
||||
{
|
||||
if (bool_CH1start_time == false)
|
||||
{
|
||||
bool_CH1start_time = true;
|
||||
|
||||
CH1start_time = DateTime.Now;
|
||||
SetLabelText(lb_CH1testTime, $"");
|
||||
}
|
||||
|
||||
// 准备超时处理
|
||||
if (!prepareOutTime_Dictionary.ContainsKey(1))
|
||||
{
|
||||
@@ -1658,9 +1680,13 @@ namespace SLC1_N
|
||||
1, result, tb_CH1Code.Text, "");
|
||||
|
||||
// 测试完成并且正负压都完成则视为结束
|
||||
if (testfinish && PorNfinish)
|
||||
if (testfinish && PorNfinish)
|
||||
{
|
||||
if(result)
|
||||
bool_CH1start_time = false;
|
||||
int time = (DateTime.Now - CH1start_time).Seconds;
|
||||
SetLabelText(lb_CH1testTime, $"{time} s");
|
||||
|
||||
if (result)
|
||||
{
|
||||
m_production.AddOK();
|
||||
}
|
||||
@@ -1738,6 +1764,8 @@ namespace SLC1_N
|
||||
CH2testCount = 0; // 重置测试次数
|
||||
CH2TestRecord.Reset();
|
||||
|
||||
bool_CH2start_time = false;
|
||||
|
||||
// 模式切回正压
|
||||
//CH2NowMode = "正压";
|
||||
//LL28CH2client.writeRegisters(1006, GetYiqiParam(2, "P").GetArray());
|
||||
@@ -1753,6 +1781,14 @@ namespace SLC1_N
|
||||
|
||||
case (int)yiqi.prepare:
|
||||
{
|
||||
if (bool_CH2start_time == false)
|
||||
{
|
||||
bool_CH2start_time = true;
|
||||
|
||||
CH2start_time = DateTime.Now;
|
||||
SetLabelText(lb_CH2testTime, $"");
|
||||
}
|
||||
|
||||
// 准备超时处理
|
||||
if (!prepareOutTime_Dictionary.ContainsKey(2))
|
||||
{
|
||||
@@ -2036,6 +2072,10 @@ namespace SLC1_N
|
||||
// 测试完成并且正负压都完成则视为结束
|
||||
if (testfinish && PorNfinish)
|
||||
{
|
||||
bool_CH2start_time = false;
|
||||
int time = (DateTime.Now - CH2start_time).Seconds;
|
||||
SetLabelText(lb_CH2testTime, $"{time} s");
|
||||
|
||||
if (result)
|
||||
{
|
||||
m_production.AddOK();
|
||||
@@ -2114,6 +2154,8 @@ namespace SLC1_N
|
||||
CH3testCount = 0; // 重置测试次数
|
||||
CH2TestRecord.Reset();
|
||||
|
||||
bool_CH3start_time = false;
|
||||
|
||||
// 模式切回正压
|
||||
//CH3NowMode = "正压";
|
||||
//LL28CH3client.writeRegisters(1006, GetYiqiParam(3, "P").GetArray());
|
||||
@@ -2129,6 +2171,14 @@ namespace SLC1_N
|
||||
|
||||
case (int)yiqi.prepare:
|
||||
{
|
||||
if (bool_CH3start_time == false)
|
||||
{
|
||||
bool_CH3start_time = true;
|
||||
|
||||
CH3start_time = DateTime.Now;
|
||||
SetLabelText(lb_CH3testTime, $"");
|
||||
}
|
||||
|
||||
// 准备超时处理
|
||||
if (!prepareOutTime_Dictionary.ContainsKey(3))
|
||||
{
|
||||
@@ -2413,6 +2463,10 @@ namespace SLC1_N
|
||||
// 测试完成并且正负压都完成则视为结束
|
||||
if (testfinish && PorNfinish)
|
||||
{
|
||||
bool_CH3start_time = false;
|
||||
int time = (DateTime.Now - CH3start_time).Seconds;
|
||||
SetLabelText(lb_CH3testTime, $"{time} s");
|
||||
|
||||
if (result)
|
||||
{
|
||||
m_production.AddOK();
|
||||
@@ -2491,6 +2545,8 @@ namespace SLC1_N
|
||||
CH4testCount = 0; // 重置测试次数
|
||||
CH4TestRecord.Reset();
|
||||
|
||||
bool_CH4start_time = false;
|
||||
|
||||
// 模式切回正压
|
||||
//CH4NowMode = "正压";
|
||||
//LL28CH4client.writeRegisters(1006, GetYiqiParam(4, "P").GetArray());
|
||||
@@ -2506,6 +2562,14 @@ namespace SLC1_N
|
||||
|
||||
case (int)yiqi.prepare:
|
||||
{
|
||||
if (bool_CH4start_time == false)
|
||||
{
|
||||
bool_CH4start_time = true;
|
||||
|
||||
CH4start_time = DateTime.Now;
|
||||
SetLabelText(lb_CH4testTime, $"");
|
||||
}
|
||||
|
||||
// 准备超时处理
|
||||
if (!prepareOutTime_Dictionary.ContainsKey(4))
|
||||
{
|
||||
@@ -2792,6 +2856,10 @@ namespace SLC1_N
|
||||
// 测试完成并且正负压都完成则视为结束
|
||||
if (testfinish && PorNfinish)
|
||||
{
|
||||
bool_CH4start_time = false;
|
||||
int time = (DateTime.Now - CH4start_time).Seconds;
|
||||
SetLabelText(lb_CH4testTime, $"{time} s");
|
||||
|
||||
if (result)
|
||||
{
|
||||
m_production.AddOK();
|
||||
|
||||
Reference in New Issue
Block a user