diff --git a/Models/PlcConfiguration.cs b/Models/PlcConfiguration.cs index cca8bf5..a85aff6 100644 --- a/Models/PlcConfiguration.cs +++ b/Models/PlcConfiguration.cs @@ -54,6 +54,8 @@ // 溶出 public ushort DissolutionRpm { get; set; } + public ushort Dissolution1Speed { get; set; } + public ushort Dissolution2Speed { get; set; } public ushort DissolutionPercent { get; set; } public ushort Dissolution1Percent { get; set; } public ushort Dissolution2Percent { get; set; } diff --git a/Services/PlcSimulator.cs b/Services/PlcSimulator.cs index e0a9665..e7b54fc 100644 --- a/Services/PlcSimulator.cs +++ b/Services/PlcSimulator.cs @@ -22,6 +22,8 @@ namespace TabletTester2025.Services 412 => 5.0f + (float)_rand.NextDouble() * 2, // 脆碎度前重 414 => 4.9f + (float)_rand.NextDouble() * 2, // 后重 300 => 37.0f, // 温度 + 340 => 50f, // 溶出速度1(r/min) + 350 => 50f, // 溶出速度2(r/min) 400 => 50 + (float)_rand.NextDouble() * 30, // 转速 402 => 70 + (float)_rand.NextDouble() * 30, // 溶出度% 404 => 70 + (float)_rand.NextDouble() * 30, // 溶出2溶出度% diff --git a/Views/ShowData.xaml b/Views/ShowData.xaml index 4daf42c..be62318 100644 --- a/Views/ShowData.xaml +++ b/Views/ShowData.xaml @@ -125,6 +125,14 @@ + + + + + + + + diff --git a/Views/ShowData.xaml.cs b/Views/ShowData.xaml.cs index 38607a1..0604c76 100644 --- a/Views/ShowData.xaml.cs +++ b/Views/ShowData.xaml.cs @@ -154,6 +154,8 @@ namespace 片剂四用仪.Views new PlcParamMapping("txt_DisintegrationSpeed", AddressOrDefault(plcConfig.DisintegrationSpeed, 330), PlcParamType.Float), new PlcParamMapping("txt_DisintegrationTime", AddressOrDefault(plcConfig.DisintegrationTime, 420), PlcParamType.Int), + new PlcParamMapping("txt_Dissolution1Speed", AddressOrDefault(plcConfig.Dissolution1Speed, 340), PlcParamType.Float), + new PlcParamMapping("txt_Dissolution2Speed", AddressOrDefault(plcConfig.Dissolution2Speed, 350), PlcParamType.Float), new PlcParamMapping("txt_DissolutionTime", AddressOrDefault(plcConfig.Dissolution1Time, 430), PlcParamType.Int), new PlcParamMapping("txt_Dissolution2Time", AddressOrDefault(plcConfig.Dissolution2Time, 440), PlcParamType.Int), new PlcParamMapping("txt_Dissolution1SamplingInterval", AddressOrDefault(plcConfig.Dissolution1SampleInterval, 432), PlcParamType.Float), diff --git a/appsettings.json b/appsettings.json index 0c2ddc8..4fc42b1 100644 --- a/appsettings.json +++ b/appsettings.json @@ -52,6 +52,8 @@ "DisintegrationTime": 420, "DisintegrationCompleteCoils": [ 200, 201, 202, 203, 204, 205 ], "DissolutionRpm": 400, + "Dissolution1Speed": 340, + "Dissolution2Speed": 350, "DissolutionPercent": 402, "Dissolution1Percent": 402, "Dissolution2Percent": 0,