|
|
|
@ -565,6 +565,7 @@ namespace DyeingComputer.ViewModel |
|
|
|
if (TX_t != TX) { _Link_bool = true; TX_t = TX; } else { _Link_bool = false; TX_t = TX; } //中央连接状态判断
|
|
|
|
if(WORK_RUN !=0) Chart();//写入记录
|
|
|
|
if(!UserButton) TechnologicalProcess_view();//刷新步骤页面
|
|
|
|
FeedingRecords_inf(); |
|
|
|
|
|
|
|
if ((Selet_dtm("1025") > 0) && (Selet_dtd("3021") || Selet_dtd("3022"))) |
|
|
|
{ |
|
|
|
@ -1746,7 +1747,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK1 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK1 = Resources.CallDistribution; |
|
|
|
TANK1_REDYE = SYS_REDYE; |
|
|
|
if(string.IsNullOrEmpty(TANK1_DYELOT)) TANK1_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK1_STEP =Convert.ToInt16(STEP_P3); |
|
|
|
@ -1761,7 +1761,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK2 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK2 = Resources.CallDistribution; |
|
|
|
TANK2_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK2_DYELOT)) TANK2_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK2_STEP = Convert.ToInt16(STEP_P3); |
|
|
|
@ -1776,7 +1775,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK3 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK3 = Resources.CallDistribution; |
|
|
|
TANK3_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK3_DYELOT)) TANK3_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK3_STEP = Convert.ToInt16(STEP_P3); |
|
|
|
@ -2237,7 +2235,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK1 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK1 = Resources.CallDistribution; |
|
|
|
TANK1_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK1_DYELOT)) TANK1_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK1_STEP = Convert.ToInt16(STEP_P3p1); |
|
|
|
@ -2251,7 +2248,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK2 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK2 = Resources.CallDistribution; |
|
|
|
TANK2_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK2_DYELOT)) TANK2_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK2_STEP = Convert.ToInt16(STEP_P3p1); |
|
|
|
@ -2265,7 +2261,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK3 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK3 = Resources.CallDistribution; |
|
|
|
TANK3_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK3_DYELOT)) TANK3_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK3_STEP = Convert.ToInt16(STEP_P3p1); |
|
|
|
@ -2496,7 +2491,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK1 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK1 = Resources.CallDistribution; |
|
|
|
TANK1_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK1_DYELOT)) TANK1_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK1_STEP = Convert.ToInt16(STEP_P3p2); |
|
|
|
@ -2510,7 +2504,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK2 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK2 = Resources.CallDistribution; |
|
|
|
TANK2_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK2_DYELOT)) TANK2_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK2_STEP = Convert.ToInt16(STEP_P3p2); |
|
|
|
@ -2524,7 +2517,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK3 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK3 = Resources.CallDistribution; |
|
|
|
TANK3_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK3_DYELOT)) TANK3_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK3_STEP = Convert.ToInt16(STEP_P3p2); |
|
|
|
@ -2755,7 +2747,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK1 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK1 = Resources.CallDistribution; |
|
|
|
TANK1_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK1_DYELOT)) TANK1_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK1_STEP = Convert.ToInt16(STEP_P3p3); |
|
|
|
@ -2769,7 +2760,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK2 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK2 = Resources.CallDistribution; |
|
|
|
TANK2_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK2_DYELOT)) TANK2_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK2_STEP = Convert.ToInt16(STEP_P3p3); |
|
|
|
@ -2783,7 +2773,6 @@ namespace DyeingComputer.ViewModel |
|
|
|
TANK3 = "High Water Level"; |
|
|
|
return; |
|
|
|
} |
|
|
|
TANK3 = Resources.CallDistribution; |
|
|
|
TANK3_REDYE = SYS_REDYE; |
|
|
|
if (string.IsNullOrEmpty(TANK3_DYELOT)) TANK3_DYELOT = WorkNumder.ToString(); |
|
|
|
TANK3_STEP = Convert.ToInt16(STEP_P3p3); |
|
|
|
@ -2875,6 +2864,36 @@ namespace DyeingComputer.ViewModel |
|
|
|
STEP + "' AND Redye ='" + SYS_REDYE + "'", null);//行更新
|
|
|
|
SQLiteHelpers.Close(); //关闭连接
|
|
|
|
} |
|
|
|
void FeedingRecords_inf() |
|
|
|
{ |
|
|
|
for (int i = 0; Dyelot_dat.Rows.Count > i; i++) |
|
|
|
{ |
|
|
|
if (Dyelot_dat.Rows[i]["State"].ToString() == "201") |
|
|
|
{ |
|
|
|
if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "1")&&(Dyelot_dat.Rows[i]["Step"].ToString() == TANK1_STEP.ToString())) TANK1 = Resources.CallDistribution; |
|
|
|
else if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "2") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK2_STEP.ToString())) TANK2 = Resources.CallDistribution; |
|
|
|
else if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "3") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK3_STEP.ToString())) TANK3 = Resources.CallDistribution; |
|
|
|
} |
|
|
|
else if (Dyelot_dat.Rows[i]["State"].ToString() == "202") |
|
|
|
{ |
|
|
|
if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "1") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK1_STEP.ToString())) TANK1 = Resources.LineUp; |
|
|
|
else if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "2") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK2_STEP.ToString())) TANK2 = Resources.LineUp; |
|
|
|
else if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "3") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK3_STEP.ToString())) TANK3 = Resources.LineUp; |
|
|
|
} |
|
|
|
else if (Dyelot_dat.Rows[i]["State"].ToString() == "301") |
|
|
|
{ |
|
|
|
if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "1") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK1_STEP.ToString())) TANK1 = Resources.Finish; |
|
|
|
else if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "2") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK2_STEP.ToString())) TANK2 = Resources.Finish; |
|
|
|
else if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "3") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK3_STEP.ToString())) TANK3 = Resources.Finish; |
|
|
|
} |
|
|
|
else if (Dyelot_dat.Rows[i]["State"].ToString() == "309") |
|
|
|
{ |
|
|
|
if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "1") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK1_STEP.ToString())) TANK1 = Resources.Abnormal; |
|
|
|
else if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "2") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK2_STEP.ToString())) TANK2 = Resources.Abnormal; |
|
|
|
else if ((Dyelot_dat.Rows[i]["Tank"].ToString() == "3") && (Dyelot_dat.Rows[i]["Step"].ToString() == TANK3_STEP.ToString())) TANK3 = Resources.Abnormal; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static SerialPort port = new SerialPort();//创建串口
|
|
|
|
static ModbusFactory factory = new ModbusFactory(); |
|
|
|
|