@@ -100,6 +100,12 @@ namespace BPASmartClient.Academy | |||
Json<LocaMaterial>.Save(); | |||
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.LogSave(); | |||
TaskManage.GetInstance.Dispose(); | |||
if (Simens_PLC.GetInstance.IsConnected) | |||
{ | |||
Simens_PLC.GetInstance.id = ""; | |||
Simens_PLC.GetInstance.siemens.Write<bool>("DB1.DBX1002.0", false); | |||
Simens_PLC.GetInstance.siemens.Write<bool>("DB1.DBX1002.1", false); | |||
} | |||
App.Current.Shutdown(); | |||
Environment.Exit(0); | |||
//Process.GetCurrentProcess().Kill(); | |||
@@ -65,5 +65,11 @@ namespace BPASmartClient.Academy.Model | |||
private float _weightWok; | |||
public int TempVent { get { return _tempVent; } set { _tempVent = value; OnPropertyChanged(); } } | |||
private int _tempVent; | |||
public float PressureWok { get { return _pressureWok; } set { _pressureWok = value; OnPropertyChanged(); } } | |||
private float _pressureWok; | |||
public float PressureWeek { get { return _pressureWeek; } set { _pressureWeek = value; OnPropertyChanged(); } } | |||
private float _pressureWeek; | |||
public float OpenValue { get { return _openValue; } set { _openValue = value; OnPropertyChanged(); } } | |||
private float _openValue; | |||
} | |||
} |
@@ -234,6 +234,18 @@ namespace BPASmartClient.Academy.Model | |||
{ | |||
deviceCtrl.TempVent = o.Content; | |||
}); | |||
siemens.Read<float>("DB1.DBD2034").OnSuccess((o) => | |||
{ | |||
deviceCtrl.PressureWok = o.Content; | |||
}); | |||
siemens.Read<float>("DB1.DBD2038").OnSuccess((o) => | |||
{ | |||
deviceCtrl.PressureWeek = o.Content; | |||
}); | |||
siemens.Read<float>("DB1.DBD2014").OnSuccess((o) => | |||
{ | |||
deviceCtrl.OpenValue = o.Content; | |||
}); | |||
PipeDetect(); | |||
Thread.Sleep(100); | |||
} | |||
@@ -330,7 +330,7 @@ | |||
<oxy:PlotView | |||
x:Name="chartView" | |||
Margin="5" | |||
Background="Transparent" | |||
Background="White" | |||
Foreground="Black" | |||
PanCursor="Hand" /> | |||
<Button | |||
@@ -92,6 +92,20 @@ | |||
</Style> | |||
</UserControl.Resources> | |||
<Grid> | |||
<Grid | |||
Height="50" | |||
HorizontalAlignment="Right" | |||
VerticalAlignment="Top"> | |||
<Border | |||
Margin="0,0,100,0" | |||
HorizontalAlignment="Center"> | |||
<Button | |||
Margin="20,5" | |||
Command="{Binding DataRecordCommand}" | |||
Content="选择设备类型" | |||
Style="{StaticResource ButtonStyle}" /> | |||
</Border> | |||
</Grid> | |||
<Grid | |||
x:Name="ooo" | |||
HorizontalAlignment="Stretch" | |||
@@ -1637,11 +1651,6 @@ | |||
VerticalAlignment="Center" | |||
FontSize="20" | |||
Text="{Binding Name}" /> | |||
<Button | |||
Margin="10,0,10,0" | |||
Command="{Binding DataRecordCommand}" | |||
Content="选择设备类型" | |||
Style="{StaticResource ButtonStyle}" /> | |||
</StackPanel> | |||
<CheckBox | |||
x:Name="start_check" | |||
@@ -91,6 +91,18 @@ | |||
</Style> | |||
</UserControl.Resources> | |||
<Grid> | |||
<Grid | |||
Height="50" | |||
HorizontalAlignment="Right" | |||
VerticalAlignment="Top"> | |||
<Border Margin="0,0,100,0" HorizontalAlignment="Center"> | |||
<Button | |||
Margin="20,5" | |||
Command="{Binding DataRecordCommand}" | |||
Content="选择设备类型" | |||
Style="{StaticResource ButtonStyle}" /> | |||
</Border> | |||
</Grid> | |||
<Grid | |||
x:Name="ooo" | |||
HorizontalAlignment="Stretch" | |||
@@ -834,10 +846,10 @@ | |||
Height="120" | |||
Margin="0,4,0,0" /> | |||
<bpa:HandValve | |||
OpenEnable="{Binding DeviceStatus.VX114}" | |||
Width="48" | |||
Height="65" | |||
Margin="0,-24,-14,0" | |||
OpenEnable="{Binding DeviceStatus.VX114}" | |||
RenderTransformOrigin="0.5,0.5"> | |||
<bpa:HandValve.RenderTransform> | |||
<TransformGroup> | |||
@@ -916,11 +928,38 @@ | |||
Text="反应釜" /> | |||
<TextBlock | |||
Canvas.Left="203" | |||
Canvas.Top="260" | |||
Canvas.Top="250" | |||
Width="60" | |||
Foreground="Red" | |||
Text="{Binding DeviceStatus.TempWok, StringFormat='{}{0}℃'}" | |||
TextAlignment="Center" /> | |||
<TextBlock | |||
Canvas.Left="203" | |||
Canvas.Top="270" | |||
Width="60" | |||
Foreground="Red" | |||
Text="{Binding DeviceStatus.PressureWok, StringFormat='{}{0:f2}mpa'}" | |||
TextAlignment="Center" /> | |||
<StackPanel | |||
Canvas.Left="-10" | |||
Canvas.Top="169" | |||
Orientation="Horizontal"> | |||
<TextBlock Foreground="White" Text="蒸汽压力:" /> | |||
<TextBlock | |||
Margin="10,0,0,0" | |||
Foreground="Red" | |||
Text="{Binding DeviceStatus.PressureWeek, StringFormat='{}{0:f2}mpa'}" /> | |||
</StackPanel> | |||
<StackPanel | |||
Canvas.Left="-20" | |||
Canvas.Top="199" | |||
Orientation="Horizontal"> | |||
<TextBlock Foreground="White" Text="比例阀开度:" /> | |||
<TextBlock | |||
Margin="10,0,0,0" | |||
Foreground="Red" | |||
Text="{Binding DeviceStatus.OpenValue, StringFormat='{}{0:f2}%'}" /> | |||
</StackPanel> | |||
<TextBlock | |||
Canvas.Left="569" | |||
Canvas.Top="88" | |||
@@ -1671,11 +1710,7 @@ | |||
VerticalAlignment="Center" | |||
FontSize="20" | |||
Text="{Binding Name}" /> | |||
<Button | |||
Margin="10,0,10,0" | |||
Command="{Binding DataRecordCommand}" | |||
Content="选择设备类型" | |||
Style="{StaticResource ButtonStyle}" /> | |||
</StackPanel> | |||
<CheckBox | |||
x:Name="start_check" | |||
@@ -171,7 +171,7 @@ | |||
<!--#region 表格内容--> | |||
<ScrollViewer | |||
Grid.Row="1" | |||
PanningMode="VerticalOnly" IsManipulationEnabled="True" | |||
HorizontalScrollBarVisibility="Hidden" | |||
VerticalScrollBarVisibility="Hidden"> | |||
<ItemsControl ItemsSource="{Binding RecipeCharts}"> | |||
@@ -332,11 +332,12 @@ | |||
<!--#endregion--> | |||
<!--#region 曲线--> | |||
<oxy:PlotView | |||
IsManipulationEnabled="True" | |||
x:Name="chartView" | |||
Grid.Column="1" | |||
Margin="5" | |||
Background="White" | |||
Foreground="White" | |||
Foreground="Black" | |||
PanCursor="Hand" /> | |||
<!--#endregion--> | |||