等待输送功能

This commit is contained in:
sc committed 2025-08-26 21:08:15 +08:00
commit 6ab8ebb4d9
1 file changed
+77 -6
+77 -6
View File
@@ -1787,14 +1787,36 @@ namespace DyeingComputer.ViewModel
break;//呼叫输送
case "067":
double gram = 0;
if( Dyelot_dat.Rows.Count==0) STEP_finish = true;
if (STEP_P1 == 1)
{
if (errTabler.Rows.Count == 0) Status_Str = Resources.Tank + " 1 :" + Resources.CallPreparation;
DataRow[] rowdat = Dyelot_dat.Select("Step ='" + TANK1_STEP + "'");//行
if (rowdat.First().Field<int>("Amount") != 301)//等待输送
if (rowdat.Length == 0) { STEP_finish = true; } else {
if (rowdat.First().Field<int>("State") <= 202)//等待输送
{
TANK1 = Resources.CallPreparation;
if (rowdat.First().Field<int>("State") == 202) TANK1 = Resources.CallPreparation;
return;
}
else if (rowdat.First().Field<int>("State") == 309)//异常时呼叫人工
{
if (Selet_dtd("2004") || UserCall_OK)
{
ERRinf.ERRinf_d(errTabler, "301");//
UserCall_OK = false;
Alert_yellow = false;
Alert_bell = false;
}
else
{
ERRinf.ERRinf_w(errTabler, Resources.Tank + " 1 :" + Resources.CallPreparation +
"[" + Resources.Abnormal + "]", "301");//写入
Alert_yellow = true;
Alert_bell = true;
return;
}
}
if (SK07 == "1")//需要确认
{
foreach (DataRow row in rowdat)//删除指定信息行
@@ -1812,15 +1834,39 @@ namespace DyeingComputer.ViewModel
}
TANK1 = Resources.Finish;
STEP_finish = true;
}
} //药缸1
else if (STEP_P1 == 2)
{
if (errTabler.Rows.Count == 0) Status_Str = Resources.Tank + " 2 :" + Resources.CallPreparation;
DataRow[] rowdat = Dyelot_dat.Select("Step ='" + TANK2_STEP + "'");//行
if (rowdat.First().Field<int>("Amount") != 301)
if (rowdat.Length == 0) { STEP_finish = true; }
else
{
TANK1 = Resources.CallPreparation;
if (rowdat.First().Field<int>("State") <= 202)
{
if (rowdat.First().Field<int>("State") == 202) TANK2 = Resources.CallPreparation;
return;
}
else if (rowdat.First().Field<int>("State") == 309)//异常时呼叫人工
{
if (Selet_dtd("2004") || UserCall_OK)
{
ERRinf.ERRinf_d(errTabler, "302");//
UserCall_OK = false;
Alert_yellow = false;
Alert_bell = false;
}
else
{
ERRinf.ERRinf_w(errTabler, Resources.Tank + " 2 :" + Resources.CallPreparation +
"[" + Resources.Abnormal + "]", "302");//写入
Alert_yellow = true;
Alert_bell = true;
return;
}
}
if (SK08 == "1")
{
foreach (DataRow row in rowdat)//删除指定信息行
@@ -1838,15 +1884,39 @@ namespace DyeingComputer.ViewModel
}
TANK2 = Resources.Finish;
STEP_finish = true;
}
}//药缸2
else if (STEP_P1 == 3)
{
if (errTabler.Rows.Count == 0) Status_Str = Resources.Tank + " 3 :" + Resources.CallPreparation;
DataRow[] rowdat = Dyelot_dat.Select("Step ='" + TANK3_STEP + "'");//行
if (rowdat.First().Field<int>("Amount") != 301)
if (rowdat.Length == 0) { STEP_finish = true; }
else
{
TANK1 = Resources.CallPreparation;
if (rowdat.First().Field<int>("State") <= 202)
{
if (rowdat.First().Field<int>("State") == 202) TANK3 = Resources.CallPreparation;
return;
}
else if (rowdat.First().Field<int>("State") == 309)//异常时呼叫人工
{
if (Selet_dtd("2004") || UserCall_OK)
{
ERRinf.ERRinf_d(errTabler, "303");//
UserCall_OK = false;
Alert_yellow = false;
Alert_bell = false;
}
else
{
ERRinf.ERRinf_w(errTabler, Resources.Tank + " 3 :" + Resources.CallPreparation +
"[" + Resources.Abnormal + "]", "303");//写入
Alert_yellow = true;
Alert_bell = true;
return;
}
}
if (SK09 == "1")
{
foreach (DataRow row in rowdat)//删除指定信息行
@@ -1864,6 +1934,7 @@ namespace DyeingComputer.ViewModel
}
TANK3 = Resources.Finish;
STEP_finish = true;
}
}//药缸3
break;//等待输送
case "090":