异常显示添加错误信息轮询显示
This commit is contained in:
commit
bf161904a9
5 files changed
+29
-23
No files matched your search
@@ -219,8 +219,6 @@ namespace DyeingComputer.ViewModel
|
||||
execute:ProgramgroupView_run_ );//开始/暂停事件
|
||||
ProgramgroupView_stop = new RelayCommand(
|
||||
execute: ProgramgroupView_stop_);//结束事件
|
||||
|
||||
|
||||
}
|
||||
|
||||
DataTable dt_con = new DataTable();
|
||||
@@ -357,7 +355,6 @@ namespace DyeingComputer.ViewModel
|
||||
WORK_RUN = 2;//
|
||||
SETP_runtime = true;
|
||||
APILog.LOGlog(WorkNumder.ToString(), "UserActions", "WORK_RUN = RUN", WORK_RUN.ToString());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -420,6 +417,7 @@ namespace DyeingComputer.ViewModel
|
||||
if (errTabler.Rows.Count!=0)
|
||||
{
|
||||
Status_Str = ERRinf.ERRinf_r(errTabler);
|
||||
|
||||
Alert_red = true;
|
||||
Alert_bell = true;
|
||||
}
|
||||
@@ -445,11 +443,11 @@ namespace DyeingComputer.ViewModel
|
||||
if (Selet_dtd("2013")) { ERRinf.ERRinf_w(errTabler, Resources.Fault + ":" + Resources.OtherCircuits, "ERR108"); } //其它电器故障
|
||||
else { ERRinf.ERRinf_d(errTabler, "ERR108"); }
|
||||
if (Selet_dtd("2014")) { ERRinf.ERRinf_w(errTabler, Resources.Fault + ":" + Resources.Pump + "-1", "ERR104-1"); } //加料泵
|
||||
else { ERRinf.ERRinf_d(errTabler, "ERR100"); }
|
||||
else { ERRinf.ERRinf_d(errTabler, "ERR104-1"); }
|
||||
if (Selet_dtd("2015")) { ERRinf.ERRinf_w(errTabler, Resources.Fault + ":" + Resources.Pump + "-2", "ERR104-2"); } //加料泵
|
||||
else { ERRinf.ERRinf_d(errTabler, "ERR100"); }
|
||||
else { ERRinf.ERRinf_d(errTabler, "ERR104-2"); }
|
||||
if (Selet_dtd("2016")) { ERRinf.ERRinf_w(errTabler, Resources.Fault + ":" + Resources.Pump + "-3", "ERR104-3"); } //加料泵
|
||||
else { ERRinf.ERRinf_d(errTabler, "ERR100"); }
|
||||
else { ERRinf.ERRinf_d(errTabler, "ERR104-3"); }
|
||||
}
|
||||
|
||||
uint TX_t;
|
||||
@@ -565,7 +563,6 @@ namespace DyeingComputer.ViewModel
|
||||
if (timer5s_ >=10) { timer5s_ = 0; Tick_Event_5S(); }
|
||||
|
||||
if (LINK_OK) IO_data();
|
||||
|
||||
}
|
||||
|
||||
void Chart()
|
||||
@@ -841,7 +838,7 @@ namespace DyeingComputer.ViewModel
|
||||
}
|
||||
else if (THL_mode == 1)//升温
|
||||
{
|
||||
if (STEP_P1 > TEMP_co) TEMP_co = TEMP_co + (STEP_P2 / 600);
|
||||
if (STEP_P1 > TEMP_co) TEMP_co = TEMP_co + (STEP_P2 / 60);
|
||||
TO = pid.PID_iterate(TEMP_co, T, ts);
|
||||
if (TO < 0) TO = 0;
|
||||
if ((TEMP_co < T) || (T - TEMP_co > 3)) TO = 0;
|
||||
@@ -852,24 +849,25 @@ namespace DyeingComputer.ViewModel
|
||||
}
|
||||
else
|
||||
{
|
||||
TIME_M = Convert.ToInt16((STEP_P1 - T) / (STEP_P2 / 10));
|
||||
TIME_M = Convert.ToInt16((STEP_P1 - T) / STEP_P2 );
|
||||
}
|
||||
if (errTabler.Rows.Count == 0)
|
||||
{
|
||||
Status_Str = Resources.Heats + ":" + Resources.Target + Resources.Temperature + string.Format(" {0:###.#}", STEP_P1) + "°C";
|
||||
if ((TEMP_co - T) > 5)
|
||||
{
|
||||
Status_Str = Status_Str + "[" + Resources.Heats + Resources.LnsufficientPower + "]";
|
||||
ERRinf.ERRinf_w(errTabler, Status_Str + "[" + Resources.Heats + Resources.LnsufficientPower + "]", "201-1");//写入
|
||||
}
|
||||
else
|
||||
{
|
||||
ERRinf.ERRinf_d(errTabler, "201-1");//
|
||||
Status_Str = Status_Str + Resources.Expected + string.Format(" {0:D2}", TIME_M) + Resources.Min;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (THL_mode == 2)//降温
|
||||
{
|
||||
if (STEP_P1 < TEMP_co) TEMP_co = TEMP_co - (STEP_P2 / 600);
|
||||
if (STEP_P1 < TEMP_co) TEMP_co = TEMP_co - (STEP_P2 / 60);
|
||||
TO = pid.PID_iterate(TEMP_co, T, ts);
|
||||
if (TO > 0) TO = 0;
|
||||
TO = Math.Abs(TO);
|
||||
@@ -880,17 +878,18 @@ namespace DyeingComputer.ViewModel
|
||||
}
|
||||
else
|
||||
{
|
||||
TIME_M = Convert.ToInt16((T - STEP_P1) / (STEP_P2 / 10));
|
||||
TIME_M = Convert.ToInt16((T - STEP_P1) / STEP_P2 );
|
||||
}
|
||||
if (errTabler.Rows.Count == 0)
|
||||
{
|
||||
Status_Str = Resources.Cooling + ":" + Resources.Target + Resources.Temperature + string.Format(" {0:###.#}", STEP_P1) + "°C";
|
||||
if ((T - TEMP_co) > 5)
|
||||
{
|
||||
Status_Str = Status_Str + "[" + Resources.Cooling + Resources.LnsufficientPower + "]";
|
||||
ERRinf.ERRinf_w(errTabler, Status_Str + "[" + Resources.Cooling + Resources.LnsufficientPower + "]", "201-2");//写入
|
||||
}
|
||||
else
|
||||
{
|
||||
ERRinf.ERRinf_d(errTabler, "201-2");//
|
||||
Status_Str = Status_Str + Resources.Expected + string.Format(" {0:D2}", TIME_M) + Resources.Min;
|
||||
}
|
||||
}
|
||||
@@ -1571,8 +1570,6 @@ namespace DyeingComputer.ViewModel
|
||||
}
|
||||
else if (WORK_RUN == 1)
|
||||
{
|
||||
SETP_runtime = false;
|
||||
STEP_finish = false;
|
||||
Status_Str = Resources.Paused;
|
||||
Updata_dtm("1004", 0);
|
||||
Updata_dtd("3009", false);
|
||||
|
||||
Reference in new issue
Block a user