@@ -191,6 +191,12 @@ namespace BPASmartClient.Academy._50L | |||
/// </summary> | |||
public float BrineTankWeight { get { return _brineTankWeight; } set { _brineTankWeight = value; OnPropertyChanged(); } } | |||
private float _brineTankWeight; | |||
/// <summary> | |||
/// 反应釜压力 VD2046 | |||
/// </summary> | |||
public float ReactPressure { get { return _reactPressure; } set { _reactPressure = value; OnPropertyChanged(); } } | |||
private float _reactPressure; | |||
#endregion | |||
} | |||
} |
@@ -25,7 +25,9 @@ namespace BPASmartClient.Academy._50L | |||
[Add("DB1.DBD1036")] | |||
蒸汽比例阀开度, | |||
[Add("DB1.DBD1040")] | |||
反应釜蒸汽压力上限 | |||
反应釜蒸汽压力上限, | |||
[Add("DB1.DBD1044")] | |||
反应釜压力上限 | |||
} | |||
} |
@@ -24,7 +24,7 @@ namespace BPASmartClient.Academy._50L | |||
{ | |||
Task.Factory.StartNew(() => | |||
{ | |||
CommHelper.CreateSiemens(CpuType.S71500, Json<DevicePar>.Data.IpAddress).OnSuccess(s => | |||
CommHelper.CreateSiemens(CpuType.S7200Smart, Json<DevicePar>.Data.IpAddress).OnSuccess(s => | |||
{ | |||
comm = s.Content; | |||
WriteHeartBeat(); | |||
@@ -82,7 +82,7 @@ namespace BPASmartClient.Academy._50L | |||
}); | |||
comm.Read<float[]>("DB1.DBD2006", 10).OnSuccess(s => | |||
comm.Read<float[]>("DB1.DBD2006", 11).OnSuccess(s => | |||
{ | |||
//Data[FeedbackData.反应釜温度] = s.Content[0]; | |||
//Data[FeedbackData.反应釜蒸汽压力] = s.Content[1]; | |||
@@ -103,6 +103,7 @@ namespace BPASmartClient.Academy._50L | |||
DeviceStatus.ReactEncoderValue = s.Content[7]; | |||
DeviceStatus.SteamProportValveRealOpening = s.Content[8]; | |||
DeviceStatus.BrineTankWeight = s.Content[9]; | |||
DeviceStatus.ReactPressure = s.Content[10]; | |||
SamplingData sampling = new SamplingData() | |||
@@ -116,7 +117,8 @@ namespace BPASmartClient.Academy._50L | |||
WeighingWaterTankWeight = s.Content[6], | |||
ReactEncoderValue = s.Content[7], | |||
ProportionalValveOpening = s.Content[8], | |||
BrineTankWeight = s.Content[9] | |||
BrineTankWeight = s.Content[9], | |||
ReactPressure = s.Content[10] | |||
}; | |||
if (Delay.GetInstance("趋势数据").Start(_isReadSuccess, 2)) | |||
{ | |||
@@ -59,7 +59,10 @@ namespace BPASmartClient.Academy._50L | |||
/// 卤水配制罐重量 | |||
/// </summary> | |||
public float BrineTankWeight { get; set; } | |||
/// <summary> | |||
/// 反应釜压力 | |||
/// </summary> | |||
public float ReactPressure { get; set; } | |||
public SamplingData() | |||
{ | |||
@@ -81,7 +84,7 @@ namespace BPASmartClient.Academy._50L | |||
/// <param name="pid">产品id</param> | |||
/// <param name="reactEncoderValue">反应釜编码器实际值</param> | |||
/// <param name="brineTankWeight">卤水罐重量</param> | |||
public SamplingData(float t, float sp, float sfr, float cwt, float cwh, float npfr, float wwtw, float pvo, string pid, float reactEncoderValue, float brineTankWeight) | |||
public SamplingData(float t, float sp, float sfr, float cwt, float cwh, float npfr, float wwtw, float pvo, string pid, float reactEncoderValue, float brineTankWeight, float reactPressure) | |||
{ | |||
Createtime = DateTime.Now; | |||
Temperature = t; | |||
@@ -96,6 +99,7 @@ namespace BPASmartClient.Academy._50L | |||
BrineTankWeight = brineTankWeight; | |||
ProductNumberId = pid; | |||
Id = Guid.NewGuid().ToString(); | |||
ReactPressure = reactPressure; | |||
} | |||
/// <summary> | |||
@@ -61,6 +61,7 @@ namespace BPASmartClient.Academy._50L | |||
DataView(DataFeedBacks.ReactEncoderValue, new DataValue() { DateTime = time, Value = sampling.ReactEncoderValue }); | |||
DataView(DataFeedBacks.ProportionalValveOpening, new DataValue() { DateTime = time, Value = sampling.ProportionalValveOpening }); | |||
DataView(DataFeedBacks.BrineTankWeight, new DataValue() { DateTime = time, Value = sampling.BrineTankWeight }); | |||
DataView(DataFeedBacks.ReactPressure, new DataValue() { DateTime = time, Value = sampling.ReactPressure }); | |||
} | |||
private void DataView<T>(ChartValues<T> values, T value) | |||
{ | |||
@@ -167,20 +167,20 @@ namespace BPASmartClient.Academy | |||
AssemblyName = "BPASmartClient.Academy", | |||
ToggleWindowPath = num==0 ? "View.DeviceMotionView" :num==1? "View.ReactionKettle50LView": "View.DeviceMotion_2View" | |||
}); | |||
DeviceMonitor.Add(new SubMenumodel() | |||
{ | |||
SubMenuName = "设备控制模板1", | |||
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 }, | |||
AssemblyName = "BPASmartClient.Academy", | |||
ToggleWindowPath = "View.DeviceMotionView" | |||
}); | |||
DeviceMonitor.Add(new SubMenumodel() | |||
{ | |||
SubMenuName = "设备控制模板2", | |||
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 }, | |||
AssemblyName = "BPASmartClient.Academy", | |||
ToggleWindowPath = "View.DeviceMotion_2View" | |||
}); | |||
//DeviceMonitor.Add(new SubMenumodel() | |||
//{ | |||
// SubMenuName = "设备控制模板1", | |||
// SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 }, | |||
// AssemblyName = "BPASmartClient.Academy", | |||
// ToggleWindowPath = "View.DeviceMotionView" | |||
//}); | |||
//DeviceMonitor.Add(new SubMenumodel() | |||
//{ | |||
// SubMenuName = "设备控制模板2", | |||
// SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 }, | |||
// AssemblyName = "BPASmartClient.Academy", | |||
// ToggleWindowPath = "View.DeviceMotion_2View" | |||
//}); | |||
DeviceMonitor.Add(new SubMenumodel() | |||
{ | |||
SubMenuName = "数据曲线", | |||
@@ -9,4 +9,5 @@ | |||
<SolidColorBrush x:Key="反应釜编码器值">#7FFF00</SolidColorBrush> | |||
<SolidColorBrush x:Key="比例阀实际开度">#ff00ff</SolidColorBrush> | |||
<SolidColorBrush x:Key="卤水配制罐重量">#0000ff</SolidColorBrush> | |||
<SolidColorBrush x:Key="反应釜压力">#A26189</SolidColorBrush> | |||
</ResourceDictionary> |
@@ -132,5 +132,10 @@ namespace BPASmartClient.Academy.Model | |||
/// 卤水配制罐重量 | |||
/// </summary> | |||
public ChartValues<DataValue> BrineTankWeight { get; set; } = new ChartValues<DataValue>(); | |||
/// <summary> | |||
/// 反应釜压力 | |||
/// </summary> | |||
public ChartValues<DataValue> ReactPressure { get; set; } = new ChartValues<DataValue>(); | |||
} | |||
} |
@@ -72,8 +72,13 @@ | |||
<lvc:LineSeries | |||
Fill="Transparent" LineSmoothness="1" | |||
PointGeometry="{x:Null}" | |||
Stroke="#F44F15" StrokeThickness="2" | |||
Stroke="#07F80C" StrokeThickness="2" | |||
Values="{Binding DataFeedback.SteamPressure}" /> | |||
<lvc:LineSeries | |||
Fill="Transparent" LineSmoothness="1" | |||
PointGeometry="{x:Null}" | |||
Stroke="#FFFFFF" StrokeThickness="2" | |||
Values="{Binding DataFeedback.ReactPressure}" /> | |||
<!--<lvc:LineSeries | |||
Fill="Transparent" | |||
LineSmoothness="1" | |||
@@ -110,6 +115,9 @@ | |||
<Rectangle | |||
Width="20" Height="2" Margin="10,0,0,2" Fill="#F44F15" /> | |||
<TextBlock Foreground="White" Text="反应釜蒸汽压力" /> | |||
<Rectangle | |||
Width="20" Height="2" Margin="10,0,0,2" Fill="#FFFFFF" /> | |||
<TextBlock Foreground="White" Text="反应釜压力" /> | |||
</StackPanel> | |||
</StackPanel> | |||
@@ -79,18 +79,23 @@ namespace BPASmartClient.Academy.View | |||
plotModel = new PlotModel() { Title = "反应釜蒸汽压力曲线" }; | |||
chartGrid.Visibility = Visibility.Visible; | |||
OxyPlot.Series.LineSeries line = new OxyPlot.Series.LineSeries() { LineStyle = LineStyle.Solid, Title = "反应釜蒸汽压力", MarkerFill = OxyColor.FromRgb(110, 79, 79), MarkerSize = 2, LineLegendPosition = OxyPlot.Series.LineLegendPosition.End }; | |||
List<DataPoint> pressure = new List<DataPoint>(); | |||
OxyPlot.Series.LineSeries line2 = new OxyPlot.Series.LineSeries() { LineStyle = LineStyle.Solid, Title = "反应釜压力", MarkerFill = OxyColor.FromRgb(110, 79, 79), MarkerSize = 2, LineLegendPosition = OxyPlot.Series.LineLegendPosition.End }; | |||
List<DataPoint> steamPressure = new List<DataPoint>(); | |||
List<DataPoint> reactPressure = new List<DataPoint>(); | |||
SqliteOperate.GetInstance.QueryableById(PlcControl.GetInstance.id).ForEach(t => | |||
{ | |||
pressure.Add(new DataPoint(DateTimeAxis.ToDouble(t.Createtime), t.SteamPressure)); | |||
steamPressure.Add(new DataPoint(DateTimeAxis.ToDouble(t.Createtime), t.SteamPressure)); | |||
reactPressure.Add(new DataPoint(DateTimeAxis.ToDouble(t.Createtime), t.ReactPressure)); | |||
}); | |||
line.Points.AddRange(pressure); | |||
line.Points.AddRange(steamPressure); | |||
line2.Points.AddRange(reactPressure); | |||
if (!(plotModel.Axes.Count > 0)) | |||
{ | |||
plotModel.Axes.Add(new DateTimeAxis() { Position = OxyPlot.Axes.AxisPosition.Bottom, Title = "时间/s", StringFormat = "hh:mm:ss", Minimum = min, Maximum = max, MaximumRange = maxrange }); | |||
plotModel.Axes.Add(new LinearAxis() { Key = "y1", Title = "压力/Mpa", Position = OxyPlot.Axes.AxisPosition.Left, LabelFormatter = value => value.ToString("f2"), IsZoomEnabled = false }); | |||
} | |||
plotModel.Series.Add(line); | |||
plotModel.Series.Add(line2); | |||
plotModel.InvalidatePlot(true);//重新加载曲线 | |||
chartView.Model = plotModel; | |||
} | |||
@@ -308,6 +308,12 @@ | |||
Foreground="{StaticResource 卤水配制罐重量}" | |||
IsChecked="{Binding VisStatus[9]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
<CheckBox | |||
Command="{Binding CheckedCommand}" | |||
CommandParameter="10" Content="反应釜压力" FontSize="14" | |||
Foreground="{StaticResource 反应釜压力}" | |||
IsChecked="{Binding VisStatus[10]}" | |||
IsEnabled="{Binding IsEnable}" /> | |||
</UniformGrid> | |||
<oxy:PlotView | |||
@@ -245,7 +245,8 @@ | |||
<TextBlock | |||
x:Name="state" Grid.RowSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" | |||
Panel.ZIndex="299" d:Visibility="Collapsed" FontSize="100" FontWeight="Black" | |||
Foreground="Red" Text="设 备 未 连 接" Visibility="{Binding PLCIsConnected,Converter={StaticResource BoolToVisibilityReverseConverter}}" /> | |||
Foreground="Red" Text="设 备 未 连 接" | |||
Visibility="{Binding PLCIsConnected, Converter={StaticResource BoolToVisibilityReverseConverter}}" /> | |||
<!--#endregion--> | |||
<!--#region 切换设备类型--> | |||
<Grid | |||
@@ -261,7 +262,8 @@ | |||
<!--#endregion--> | |||
<Grid | |||
x:Name="ooo" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" d:Opacity="1.0" | |||
IsHitTestVisible="{Binding PLCIsConnected}" Opacity="{Binding PLCIsConnected,Converter={StaticResource BoolToDoubleConverter}}"> | |||
IsHitTestVisible="{Binding PLCIsConnected}" | |||
Opacity="{Binding PLCIsConnected, Converter={StaticResource BoolToDoubleConverter}}"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="50" /> | |||
<RowDefinition Height="*" /> | |||
@@ -305,10 +307,10 @@ | |||
Direction="{Binding DeviceStatus.ReactInColdValve, ConverterParameter=1, Converter={StaticResource deviceConvert}}" | |||
Fill="{Binding DeviceStatus.ReactInColdValve, ConverterParameter=2, Converter={StaticResource deviceConvert}}" | |||
LineWidth="1" Speed="2" /> | |||
<bpa:PipeLineH Fill="#E31A1A" | |||
<bpa:PipeLineH | |||
Canvas.Left="52" Canvas.Top="22" Canvas.Right="260.7" Width="310" | |||
Height="5" HorizontalAlignment="Left" VerticalAlignment="Center" d:Direction="1" | |||
LineWidth="1" Speed="25" /> | |||
Fill="#E31A1A" LineWidth="1" Speed="25" /> | |||
<bpa:PipeLineH | |||
Canvas.Left="371" Canvas.Top="22" Canvas.Right="260.7" Width="61" | |||
Height="5" HorizontalAlignment="Left" VerticalAlignment="Center" d:Direction="1" | |||
@@ -337,10 +339,10 @@ | |||
Fill="{Binding DeviceStatus.ColdWaterTankVacuumValve, ConverterParameter=2, Converter={StaticResource deviceConvert}}" | |||
LineWidth="1" /> | |||
<!--#region 开关控制按钮--> | |||
<bpa:PipeLineH Fill="#E31A1A" | |||
<bpa:PipeLineH | |||
Canvas.Left="115" Canvas.Top="456" Canvas.Right="257.5" Width="95" | |||
Height="5" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="1" | |||
LineWidth="1" Speed="10" /> | |||
Fill="#E31A1A" LineWidth="1" Speed="10" /> | |||
<!--#region 开关控制按钮--> | |||
<bpa:PipeLineBR | |||
Canvas.Left="216" Canvas.Top="438" Canvas.Right="272.3" Width="11" | |||
@@ -699,14 +701,14 @@ | |||
Text="{Binding DeviceStatus.ReactTemp, StringFormat=温度:\{0:F2\}℃}" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="795" Canvas.Top="279" Width="110" HorizontalAlignment="Center" | |||
Canvas.Left="768" Canvas.Top="30" Width="123" HorizontalAlignment="Left" | |||
VerticalAlignment="Top" d:Text="蒸汽压力:0.62MPa" Foreground="Red" | |||
Text="{Binding DeviceStatus.ReactSteamPressure, StringFormat=蒸汽压力:\{0:F2\}MPa}" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="795" Canvas.Top="293" Width="91" HorizontalAlignment="Left" | |||
VerticalAlignment="Center" d:Text="蒸汽流量:30.02" Foreground="Red" | |||
Text="{Binding DeviceStatus.ReactSteamFlow, StringFormat=蒸汽流量:\{0:F2\}}" | |||
Canvas.Left="768" Canvas.Top="50" Width="123" HorizontalAlignment="Left" | |||
VerticalAlignment="Top" d:Text="蒸汽流量:30.02m³/H" Foreground="Red" | |||
Text="{Binding DeviceStatus.ReactSteamFlow, StringFormat=蒸汽流量:\{0:F2\}m³/H}" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="332" Canvas.Top="135" Width="135" HorizontalAlignment="Left" | |||
@@ -714,14 +716,14 @@ | |||
Text="{Binding DeviceStatus.ColdWaterTankTemp, StringFormat=冷凝水罐温度:\{0:F2\}℃}" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="332" Canvas.Top="150" Width="119" HorizontalAlignment="Left" | |||
VerticalAlignment="Center" d:Text="冷凝水罐湿度:30.20" Foreground="Red" | |||
Text="{Binding DeviceStatus.ColdWaterTankHumidity, StringFormat=冷凝水罐湿度:\{0:F2\}}" | |||
Canvas.Left="334" Canvas.Top="150" Width="145" HorizontalAlignment="Left" | |||
VerticalAlignment="Center" d:Text="冷凝水罐湿度:30.20%RH" Foreground="Red" | |||
Text="{Binding DeviceStatus.ColdWaterTankHumidity, StringFormat=冷凝水罐湿度:\{0:F2\}%RH}" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="64" Canvas.Top="138" Width="98" HorizontalAlignment="Left" | |||
VerticalAlignment="Center" d:Text="负压流量:30.02" Foreground="Red" | |||
Text="{Binding DeviceStatus.VacuumFlow, StringFormat=负压流量:\{0:F2\}}" | |||
VerticalAlignment="Center" d:Text="流量:30.02m³/H" Foreground="Red" | |||
Text="{Binding DeviceStatus.VacuumFlow, StringFormat=流量:\{0:F2\}m³/H}" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="216" Canvas.Top="274" Width="107" Height="18" | |||
@@ -743,7 +745,11 @@ | |||
VerticalAlignment="Top" d:Text="重量:30.23Kg" Foreground="Red" | |||
Text="{Binding DeviceStatus.BrineTankWeight, StringFormat=重量:\{0:F2\}Kg}" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="799" Canvas.Top="281" Width="110" HorizontalAlignment="Center" | |||
VerticalAlignment="Top" d:Text="压力:0.53MPa" Foreground="Red" | |||
Text="{Binding DeviceStatus.ReactPressure, StringFormat=压力:\{0:F2\}MPa}" | |||
TextAlignment="Center" /> | |||
<!--#region 冷却水出水阀--> | |||
<bpa:PipeLineV | |||
@@ -901,8 +907,8 @@ | |||
<!--#region 进清水阀、进卤水阀、压缩空气进气阀进连接处--> | |||
<bpa:PipeLineV | |||
Canvas.Left="751.7" Canvas.Top="224.571" Canvas.Right="243.3" Width="5" | |||
Height="160" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="2" Direction="2" | |||
Fill="#E31A1A" LineWidth="1" /> | |||
Height="160" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="2" | |||
Direction="2" Fill="#E31A1A" LineWidth="1" /> | |||
<bpa:PipeLineTL | |||
Canvas.Left="741.7" Canvas.Top="384.3" Canvas.Right="238.3" Width="20" | |||
Height="10" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="2" | |||
@@ -989,16 +995,18 @@ | |||
Direction="{Binding DeviceStatus.ReactInColdValve, ConverterParameter=1, Converter={StaticResource deviceConvert}}" | |||
Fill="{Binding DeviceStatus.ReactInColdValve, ConverterParameter=2, Converter={StaticResource deviceConvert}}" | |||
LineWidth="10" Speed="1.5" /> | |||
<bpa:PipeLineBL Fill="#E31A1A" | |||
<bpa:PipeLineBL | |||
Canvas.Left="184.502" Canvas.Top="51.3" Width="10" Height="10" | |||
HorizontalAlignment="Center" VerticalAlignment="Top" LineWidth="10" Speed="2" /> | |||
HorizontalAlignment="Center" VerticalAlignment="Top" Fill="#E31A1A" LineWidth="10" | |||
Speed="2" /> | |||
<bpa:PipeLineH | |||
Canvas.Left="31" Canvas.Top="51" Canvas.Right="260.7" Width="642" Direction="2" | |||
Canvas.Left="31" Canvas.Top="51" Canvas.Right="260.7" Width="642" | |||
Height="5" HorizontalAlignment="Left" VerticalAlignment="Center" d:Direction="2" | |||
Fill="#E31A1A" LineWidth="1" Speed="2" /> | |||
<bpa:PipeLineV Fill="#E31A1A" | |||
Direction="2" Fill="#E31A1A" LineWidth="1" Speed="2" /> | |||
<bpa:PipeLineV | |||
Canvas.Left="189.5" Canvas.Top="61" Width="5" Height="107" | |||
HorizontalAlignment="Left" VerticalAlignment="Center" d:Direction="1" LineWidth="1" /> | |||
HorizontalAlignment="Left" VerticalAlignment="Center" d:Direction="1" Fill="#E31A1A" | |||
LineWidth="1" /> | |||
<bpa:PipeLineH | |||
Canvas.Left="199.1" Canvas.Top="203.154" Width="33.5" Height="5" | |||
HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="1" | |||
@@ -1049,7 +1057,7 @@ | |||
VerticalAlignment="Top" FontSize="12" Foreground="White" Text="空压机
启动反馈" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="38" Canvas.Top="136.5" HorizontalAlignment="Center" VerticalAlignment="Top" | |||
Canvas.Left="38" Canvas.Top="138" HorizontalAlignment="Center" VerticalAlignment="Top" | |||
Foreground="White" Text="风机" /> | |||
<bpa:HandValve | |||
Canvas.Left="121.876" Canvas.Top="61.412" Canvas.Right="343.4" Width="16" | |||
@@ -1090,15 +1098,15 @@ | |||
<bpa:PipeLineV | |||
Canvas.Left="321" Canvas.Top="109" Canvas.Right="404.2" Width="5" | |||
Height="238" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="1" | |||
LineWidth="1" Fill="#E31A1A"/> | |||
Fill="#E31A1A" LineWidth="1" /> | |||
<bpa:PipeLineBL | |||
Canvas.Left="315.8" Canvas.Top="100.069" Canvas.Right="404.2" Width="10" | |||
Height="10" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="1" | |||
LineWidth="10" Speed="1.5" Fill="#E31A1A"/> | |||
<bpa:PipeLineTL Fill="#E31A1A" | |||
Fill="#E31A1A" LineWidth="10" Speed="1.5" /> | |||
<bpa:PipeLineTL | |||
Canvas.Left="311" Canvas.Top="347" Canvas.Right="238.3" Width="20" | |||
Height="10" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="1" | |||
LineWidth="10" Speed="1.5" /> | |||
Fill="#E31A1A" LineWidth="10" Speed="1.5" /> | |||
<TextBlock | |||
Canvas.Left="815" Canvas.Top="120" Canvas.Right="312.8" HorizontalAlignment="Left" | |||
VerticalAlignment="Top" FontSize="12" Foreground="White" Text="反应釜泄压阀" | |||
@@ -1179,7 +1187,7 @@ | |||
GroupName="heat" | |||
Style="{StaticResource RectangleRadioButtonStyle}" /> | |||
<RadioButton | |||
x:Name="steamParamsSet" Width="150" Height="40" Content="蒸汽参数" | |||
x:Name="steamParamsSet" Width="150" Height="40" Content="蒸汽及压力参数" | |||
GroupName="heat" | |||
Style="{StaticResource RectangleRadioButtonStyle}" /> | |||
</StackPanel> | |||
@@ -1327,7 +1335,7 @@ | |||
</StackPanel> | |||
</WrapPanel> | |||
<!--#endregion--> | |||
<!--#region 蒸汽参数写入界面--> | |||
<!--#region 蒸汽及压力参数写入界面--> | |||
<WrapPanel | |||
Margin="0,15,0,0" d:Visibility="Visible" | |||
Visibility="{Binding ElementName=steamParamsSet, Path=IsChecked, Converter={StaticResource BoolToVisibilityConvert}}"> | |||
@@ -1347,6 +1355,12 @@ | |||
<TextBox | |||
x:Name="reactorSteamPressureLimitValue" Width="120" HorizontalAlignment="Center" | |||
VerticalAlignment="Center" Text="0" /> | |||
<TextBlock | |||
Margin="40,0,20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" | |||
Foreground="White" Text="反应釜压力上限:" /> | |||
<TextBox | |||
x:Name="reactorPressureLimitValue" Width="120" HorizontalAlignment="Center" | |||
VerticalAlignment="Center" Text="0" /> | |||
<TextBlock | |||
Margin="20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" | |||
Foreground="White" Text="MPa,限值:-0.1至0.6" /> | |||
@@ -229,7 +229,7 @@ namespace BPASmartClient.Academy.View | |||
} | |||
else | |||
{ | |||
Notify(EnumPromptType.Error, "校准失败", "设备未连接"); | |||
Notify(EnumPromptType.Error, "写入失败", "设备未连接"); | |||
} | |||
} | |||
@@ -257,10 +257,11 @@ namespace BPASmartClient.Academy.View | |||
{ | |||
SetParamValue(steamValveApertureValve.Text, FloatAddEnum.蒸汽比例阀开度, 0, 100); | |||
SetParamValue(reactorSteamPressureLimitValue.Text, FloatAddEnum.反应釜蒸汽压力上限, -0.1F, 0.6F); | |||
SetParamValue(reactorPressureLimitValue.Text, FloatAddEnum.反应釜压力上限, 0F, 1F); | |||
} | |||
else | |||
{ | |||
Notify(EnumPromptType.Error, "校准失败", "设备未连接"); | |||
Notify(EnumPromptType.Error, "写入失败", "设备未连接"); | |||
} | |||
} | |||
} | |||
@@ -71,7 +71,7 @@ namespace BPASmartClient.Academy.ViewModel | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜编码器值"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("比例阀实际开度"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("卤水配制罐重量"))); | |||
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜压力"))); | |||
SqliteOperate.GetInstance.QueryableById(Id).ForEach(item => | |||
{ | |||
double x = DateTimeAxis.ToDouble(item.Createtime); | |||
@@ -85,7 +85,8 @@ namespace BPASmartClient.Academy.ViewModel | |||
OxyDataModels[7].dataPoints.Add(new DataPoint(x, item.ReactEncoderValue)); | |||
OxyDataModels[8].dataPoints.Add(new DataPoint(x, item.ProportionalValveOpening)); | |||
OxyDataModels[9].dataPoints.Add(new DataPoint(x, item.BrineTankWeight)); | |||
OxyDataModels[10].dataPoints.Add(new DataPoint(x, item.ReactPressure)); | |||
}); | |||
OxyDataModels.ForEach(item => { item.AddRange(); }); | |||
if (!(OxyModel.Axes.Count > 0)) | |||
@@ -100,7 +101,7 @@ namespace BPASmartClient.Academy.ViewModel | |||
OxyModel.Axes.Add(new LinearAxis() | |||
{ | |||
Key = "y1", | |||
Title = "温度/℃\r\n压力/MPa\r\n流量/m³\r\n重量/Kg\r\n开度/%", | |||
Title = "温度/℃\r\n压力/MPa\r\n流量/m³\r\n重量/Kg\r\n开度/%\r\n开度/%RH", | |||
Position = OxyPlot.Axes.AxisPosition.Left, | |||
LabelFormatter = value => value.ToString(), | |||
AxislineColor = OxyColor.Parse("#9C9C9C"), | |||
@@ -161,7 +162,7 @@ namespace BPASmartClient.Academy.ViewModel | |||
public bool[] VisStatus { get { return _mVisStatus; } set { _mVisStatus = value; OnPropertyChanged(); } } | |||
private bool[] _mVisStatus = new bool[10]; | |||
private bool[] _mVisStatus = new bool[11]; | |||
public bool IsEnable | |||
{ | |||