sc 1 year ago
parent
commit
82156b3c46
  1. 9
      Properties/Resources.Designer.cs
  2. 3
      Properties/Resources.en-US.resx
  3. 3
      Properties/Resources.resx
  4. 3
      Properties/Resources.zh-CN.resx
  5. 12
      Properties/Resources.zh-TW.resx
  6. 52
      ViewModel/MainWindowViewModel.cs

9
Properties/Resources.Designer.cs

@ -528,6 +528,15 @@ namespace DyeingComputer.Properties {
}
}
/// <summary>
/// 查找类似 LnsufficientPower 的本地化字符串。
/// </summary>
public static string LnsufficientPower {
get {
return ResourceManager.GetString("LnsufficientPower", resourceCulture);
}
}
/// <summary>
/// 查找类似 Low-water level 的本地化字符串。
/// </summary>

3
Properties/Resources.en-US.resx

@ -471,4 +471,7 @@
<data name="GuidingWheel" xml:space="preserve">
<value>Guiding Wheel</value>
</data>
<data name="LnsufficientPower" xml:space="preserve">
<value>Lnsufficient Power</value>
</data>
</root>

3
Properties/Resources.resx

@ -471,4 +471,7 @@
<data name="GuidingWheel" xml:space="preserve">
<value>GuidingWheel</value>
</data>
<data name="LnsufficientPower" xml:space="preserve">
<value>LnsufficientPower</value>
</data>
</root>

3
Properties/Resources.zh-CN.resx

@ -471,4 +471,7 @@
<data name="GuidingWheel" xml:space="preserve">
<value>导布轮</value>
</data>
<data name="LnsufficientPower" xml:space="preserve">
<value>功率不足</value>
</data>
</root>

12
Properties/Resources.zh-TW.resx

@ -462,4 +462,16 @@
<data name="ClothWheel" xml:space="preserve">
<value>布輪</value>
</data>
<data name="Cycletime" xml:space="preserve">
<value>行布週期</value>
</data>
<data name="DifferentialPressure" xml:space="preserve">
<value>內/外壓力差</value>
</data>
<data name="GuidingWheel" xml:space="preserve">
<value>導布輪</value>
</data>
<data name="LnsufficientPower" xml:space="preserve">
<value>功率不足</value>
</data>
</root>

52
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)
{

Loading…
Cancel
Save