This commit is contained in:
xyy
2026-05-09 10:30:14 +08:00
parent c3e842febd
commit f8f1711239
12 changed files with 76 additions and 29 deletions

View File

@@ -113,12 +113,6 @@ namespace ShanghaiEnvironmentalTechnology
// 实时读取定时器1个定时器管理5个参数
private System.Timers.Timer _paramReadTimer;
// 下位机寄存器地址根据实际PLC地址修改
//private readonly ushort _handmovementAddr = 0x0300; // 手动速度
//private readonly ushort _moistureAddr = 0x0301; // 潮气量系数
//private readonly ushort _outFlowAddr = 0x0302; // 呼气流量系数
//private readonly ushort _inFlowAddr = 0x0303; // 吸气流量系数
//private readonly ushort _pressAddr = 0x0304; // 压力系数
#endregion
@@ -133,11 +127,25 @@ namespace ShanghaiEnvironmentalTechnology
{
if (isTestRunning)
{
btn1.IsEnabled = false;
btn2.IsEnabled = false;
btn3.IsEnabled = false;
btn4.IsEnabled = false;
btn5.IsEnabled = false;
ResetBtn.Content = _lang == "en-US" ? "Reset Success" : "复位成功";
ResetBtn.Foreground = Brushes.LightGreen;
}
else
{
btn1.IsEnabled = true;
btn2.IsEnabled = true;
btn3.IsEnabled = true;
btn4.IsEnabled = true;
btn5.IsEnabled = true;
ResetBtn.Content = _lang == "en-US" ? "Reset" : "复位";
ResetBtn.Foreground = Brushes.White;
}
@@ -604,7 +612,7 @@ namespace ShanghaiEnvironmentalTechnology
}
finally
{
}
}
@@ -617,7 +625,7 @@ namespace ShanghaiEnvironmentalTechnology
{
if (!IsModbusConnected())
{
// ShowError("Modbus TCP 未连接");
// ShowError("Modbus TCP 未连接");
return;
}
try