diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index c5b468e..930a8b4 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -528,6 +528,15 @@ namespace DyeingComputer.Properties {
}
}
+ ///
+ /// 查找类似 LnsufficientPower 的本地化字符串。
+ ///
+ public static string LnsufficientPower {
+ get {
+ return ResourceManager.GetString("LnsufficientPower", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Low-water level 的本地化字符串。
///
diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx
index 8ab4f37..4c3a7e1 100644
--- a/Properties/Resources.en-US.resx
+++ b/Properties/Resources.en-US.resx
@@ -471,4 +471,7 @@
Guiding Wheel
+
+ Lnsufficient Power
+
\ No newline at end of file
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index 57ba726..7b9fb51 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -471,4 +471,7 @@
GuidingWheel
+
+ LnsufficientPower
+
\ No newline at end of file
diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx
index b12b13d..be12260 100644
--- a/Properties/Resources.zh-CN.resx
+++ b/Properties/Resources.zh-CN.resx
@@ -471,4 +471,7 @@
导布轮
+
+ 功率不足
+
\ No newline at end of file
diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx
index 41d91f3..a95eacc 100644
--- a/Properties/Resources.zh-TW.resx
+++ b/Properties/Resources.zh-TW.resx
@@ -462,4 +462,16 @@
布輪
+
+ 行布週期
+
+
+ 內/外壓力差
+
+
+ 導布輪
+
+
+ 功率不足
+
\ No newline at end of file
diff --git a/ViewModel/MainWindowViewModel.cs b/ViewModel/MainWindowViewModel.cs
index 95cfebb..d584388 100644
--- a/ViewModel/MainWindowViewModel.cs
+++ b/ViewModel/MainWindowViewModel.cs
@@ -238,8 +238,8 @@ namespace DyeingComputer.ViewModel
}
void DisTimer_500MS(object sender, EventArgs e)//Tick_Event周期执行事件100MS
{
- Modbus_link();
- IO_data();
+ if (LINK_OK) Modbus_link();
+ if (LINK_OK) IO_data();
if (!string.IsNullOrEmpty(Name_err.ToString()) && (!ERR_JOG)) //有故障信息,无故障保持
{
ERR_JOG = true;
@@ -449,7 +449,7 @@ namespace DyeingComputer.ViewModel
}
else if (THL_mode == 1)//升温
{
- TEMP_co = TEMP_co + (STEP_P2 / 600);
+ if (STEP_P1 > TEMP_co) TEMP_co = TEMP_co + (STEP_P2 / 600);
TO = pid.PID_iterate(TEMP_co, T, ts);
if (TO < 0) TO = 0;
if (STEP_P1 < T)
@@ -461,11 +461,22 @@ namespace DyeingComputer.ViewModel
{
TIME_M = Convert.ToInt16((STEP_P1 - T) / (STEP_P2 / 10));
}
- if (string.IsNullOrEmpty(Name_err.ToString())) Status_Str = Resources.Heats + ":" + Resources.Target + Resources.Temperature + string.Format(" {0:###.#}", STEP_P1) + "°C" + Resources.Expected + string.Format(" {0:D2}", TIME_M) + Resources.Min;
+ if (string.IsNullOrEmpty(Name_err.ToString()))
+ {
+ 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 + "]";
+ }
+ else
+ {
+ Status_Str = Status_Str + Resources.Expected + string.Format(" {0:D2}", TIME_M) + Resources.Min;
+ }
+ }
}
else if (THL_mode == 2)//降温
{
- TEMP_co = TEMP_co - (STEP_P2 / 600);
+ if (STEP_P1 < TEMP_co) TEMP_co = TEMP_co - (STEP_P2 / 600);
TO = pid.PID_iterate(TEMP_co, T, ts);
if (TO > 0) TO = 0;
TO = Math.Abs(TO);
@@ -478,7 +489,18 @@ namespace DyeingComputer.ViewModel
{
TIME_M = Convert.ToInt16((T - STEP_P1) / (STEP_P2 / 10));
}
- if (string.IsNullOrEmpty(Name_err.ToString())) Status_Str = Resources.Cooling + ":" + Resources.Target + Resources.Temperature + string.Format(" {0:###.#}", STEP_P1) + "°C" + Resources.Expected + string.Format(" {0:D2}", TIME_M) + Resources.Min;
+ if (string.IsNullOrEmpty(Name_err.ToString()))
+ {
+ 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 + "]";
+ }
+ else
+ {
+ Status_Str = Status_Str + Resources.Expected + string.Format(" {0:D2}", TIME_M) + Resources.Min;
+ }
+ }
}
updata_dtm("1004", TO);
updata_dtm("1005", TEMP_co);
@@ -903,16 +925,16 @@ namespace DyeingComputer.ViewModel
private bool LINK_OK = false;
private int LINK_RUN = 0;
private int LINK_ERR = 0;
- bool[] DQ = new bool[128];
- ushort DQ_L = 128;
- bool[] DO = new bool[128];
- ushort DO_L = 128;
+ bool[] DQ = new bool[63];
+ ushort DQ_L = 63;
+ bool[] DO = new bool[63];
+ ushort DO_L = 63;
//int[] MW = new int[128];
// ushort MW_L = 128;
- ushort[] DW = new ushort[100];
- ushort DW_L = 100;
- ushort[] RW = new ushort[100];
- ushort RW_L = 100;
+ ushort[] DW = new ushort[63];
+ ushort DW_L = 63;
+ ushort[] RW = new ushort[63];
+ ushort RW_L = 63;
readonly byte slaveId = 1;
private async void Modbus_link()
{
@@ -942,7 +964,7 @@ namespace DyeingComputer.ViewModel
Sys_log = Resources.Target + Resources.Temperature + " : " + string.Format(" {0:###.#}", TEMP_tar) + "°C";//显示目标温度
Sys_log = Sys_log + " | " + Resources.MasterCylinder + Resources.Temperature + " : " + string.Format(" {0:###.#}", Convert.ToDouble(Selet_dtm("1010"))) + "°C";//显示实际温度
Sys_log = Sys_log + "\n" + Resources.Compute + Resources.Temperature + " : " + string.Format(" {0:###.#}", Convert.ToDouble(Selet_dtm("1005"))) + "°C";//显示计算温度
- Sys_log = Sys_log + " | " + Resources.ProportionalValves + " : " + string.Format("{0:###.#}", Convert.ToDouble(Selet_dtm("1004"))) + "%";//显示比例
+ Sys_log = Sys_log + " | " + Resources.ProportionalValves + " : " + string.Format("{0:###.#}", Convert.ToDouble(Selet_dtm("1004"))/10) + "%";//显示比例
int IO1015 = Convert.ToInt16(Selet_dtm("1015"));
if (IO1015 < MT39)
{