@@ -29,7 +29,7 @@ namespace BPASmartClient.Academy._50L | |||
[Add("DB1.DBX1001.1")] | |||
反应釜泄压阀, | |||
[Add("DB1.DBX1001.2")] | |||
排热空气阀, | |||
抽真空阀, | |||
[Add("DB1.DBX1001.3")] | |||
热气排空阀, | |||
[Add("DB1.DBX1001.4")] | |||
@@ -51,7 +51,7 @@ namespace BPASmartClient.Academy | |||
DataInit(); | |||
MenuInit(); | |||
MainView mv = new MainView(); | |||
string typeName = Json<DevicePar>.Data.ProjectTypeName == ProjectType.HKYF20240714.ToString() ? "10L" : "50L"; | |||
string typeName = Json<DevicePar>.Data.ProjectTypeName == ProjectType.HKYF20240916.ToString() ? "50L" : "10L"; | |||
mv.TitleName = $"{typeName} 反应釜焖制系统 V1.0.1"; | |||
//#if !DEBUG | |||
// LoginView lv = new LoginView(); | |||
@@ -74,22 +74,30 @@ namespace BPASmartClient.Academy.View | |||
{ | |||
case "反应釜升温": | |||
tempName = "反应釜升温"; | |||
materialTemp.Visibility = Visibility.Collapsed; | |||
wokTemp.Visibility = Visibility.Visible; | |||
wokCooling.Visibility = Visibility.Collapsed; | |||
caliTemp.Visibility = Visibility.Collapsed; | |||
break; | |||
case "配料罐升温": | |||
tempName = "配料罐升温"; | |||
wokTemp.Visibility = Visibility.Visible; | |||
materialTemp.Visibility = Visibility.Visible; | |||
wokTemp.Visibility = Visibility.Collapsed; | |||
wokCooling.Visibility = Visibility.Collapsed; | |||
caliTemp.Visibility = Visibility.Collapsed; | |||
break; | |||
case "反应釜降温": | |||
tempName = "反应釜降温"; | |||
wokTemp.Visibility = Visibility.Visible; | |||
materialTemp.Visibility = Visibility.Collapsed; | |||
wokTemp.Visibility = Visibility.Collapsed; | |||
wokCooling.Visibility = Visibility.Visible; | |||
caliTemp.Visibility = Visibility.Collapsed; | |||
break; | |||
case "温度校准": | |||
tempName = "温度校准"; | |||
materialTemp.Visibility = Visibility.Collapsed; | |||
wokTemp.Visibility = Visibility.Collapsed; | |||
wokCooling.Visibility = Visibility.Collapsed; | |||
caliTemp.Visibility = Visibility.Visible; | |||
break; | |||
default: | |||
@@ -169,7 +177,7 @@ namespace BPASmartClient.Academy.View | |||
{ | |||
case "反应釜升温": | |||
int tempValue; | |||
suc = int.TryParse(temp_1.Text.ToString(), out tempValue); | |||
suc = int.TryParse(temp_2.Text.ToString(), out tempValue); | |||
if (suc) | |||
{ | |||
Simens_PLC.GetInstance.siemens.Write<bool>("DB1.DBX1001.7", true); | |||
@@ -203,7 +211,7 @@ namespace BPASmartClient.Academy.View | |||
} | |||
break; | |||
case "反应釜降温": | |||
suc = int.TryParse(temp_1.Text.ToString(), out tempValue); | |||
suc = int.TryParse(temp_3.Text.ToString(), out tempValue); | |||
//int time; | |||
//suc = int.TryParse(time_1.Text.ToString(), out time); | |||
if (suc) | |||
@@ -1138,13 +1138,13 @@ | |||
Canvas.Left="785" Canvas.Top="20" Orientation="Vertical"> | |||
<RadioButton | |||
Width="70" Height="20" Margin="0,0,0,2" BorderThickness="0" | |||
Click="new_Click" Content="加压出料:开" FontSize="8" Foreground="White" | |||
Click="new_Click" Content="二次闪蒸:开" FontSize="8" Foreground="White" | |||
GroupName="t4" | |||
Style="{StaticResource radiobutton}" | |||
Tag="3" /> | |||
<RadioButton | |||
Width="70" Height="20" BorderThickness="0" Click="new_Click" | |||
Content="加压出料:关" FontSize="8" Foreground="White" GroupName="t4" | |||
Content="二次闪蒸:关" FontSize="8" Foreground="White" GroupName="t4" | |||
IsChecked="True" | |||
Style="{StaticResource radiobutton}" | |||
Tag="3" /> | |||
@@ -1224,7 +1224,7 @@ | |||
Grid.Row="2" Margin="20,0,30,10" BorderBrush="#ff2AB2E7" BorderThickness="2"> | |||
<UniformGrid Rows="2"> | |||
<Grid> | |||
<WrapPanel x:Name="wokTemp" Margin="0,15,0,0"> | |||
<WrapPanel x:Name="materialTemp" Margin="0,15,0,0"> | |||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal"> | |||
<TextBlock | |||
Margin="40,0,20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" | |||
@@ -1238,11 +1238,54 @@ | |||
<RadioButton | |||
Width="100" Height="30" HorizontalAlignment="Right" VerticalAlignment="Center" | |||
BorderThickness="0" Click="TempSet_CLick" Content="启动" Foreground="White" | |||
GroupName="tempctrl" | |||
Style="{StaticResource radiobutton}" /> | |||
<RadioButton | |||
Width="100" Height="30" Margin="40,0,0,0" BorderThickness="0" | |||
Click="TempCLose_CLick" Content="停止" Foreground="White" GroupName="tempctrl" | |||
Click="TempCLose_CLick" Content="停止" Foreground="White" | |||
IsChecked="True" | |||
Style="{StaticResource radiobutton}" /> | |||
</StackPanel> | |||
</WrapPanel> | |||
<WrapPanel x:Name="wokTemp" Margin="0,15,0,0" Visibility="Collapsed"> | |||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal"> | |||
<TextBlock | |||
Margin="40,0,20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" | |||
Foreground="White" Text="设置温度:" /> | |||
<TextBox | |||
x:Name="temp_2" Width="120" HorizontalAlignment="Center" VerticalAlignment="Center" | |||
Text="0" /> | |||
<TextBlock | |||
Margin="20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" | |||
Foreground="White" Text="℃" /> | |||
<RadioButton | |||
Width="100" Height="30" HorizontalAlignment="Right" VerticalAlignment="Center" | |||
BorderThickness="0" Click="TempSet_CLick" Content="启动" Foreground="White" | |||
Style="{StaticResource radiobutton}" /> | |||
<RadioButton | |||
Width="100" Height="30" Margin="40,0,0,0" BorderThickness="0" | |||
Click="TempCLose_CLick" Content="停止" Foreground="White" | |||
IsChecked="True" | |||
Style="{StaticResource radiobutton}" /> | |||
</StackPanel> | |||
</WrapPanel> | |||
<WrapPanel x:Name="wokCooling" Margin="0,15,0,0" Visibility="Collapsed"> | |||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal"> | |||
<TextBlock | |||
Margin="40,0,20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" | |||
Foreground="White" Text="设置温度:" /> | |||
<TextBox | |||
x:Name="temp_3" Width="120" HorizontalAlignment="Center" VerticalAlignment="Center" | |||
Text="0" /> | |||
<TextBlock | |||
Margin="20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" | |||
Foreground="White" Text="℃" /> | |||
<RadioButton | |||
Width="100" Height="30" HorizontalAlignment="Right" VerticalAlignment="Center" | |||
BorderThickness="0" Click="TempSet_CLick" Content="启动" Foreground="White" | |||
Style="{StaticResource radiobutton}" /> | |||
<RadioButton | |||
Width="100" Height="30" Margin="40,0,0,0" BorderThickness="0" | |||
Click="TempCLose_CLick" Content="停止" Foreground="White" | |||
IsChecked="True" | |||
Style="{StaticResource radiobutton}" /> | |||
</StackPanel> | |||
@@ -62,22 +62,30 @@ namespace BPASmartClient.Academy.View | |||
{ | |||
case "反应釜升温": | |||
tempName = "反应釜升温"; | |||
materialTemp.Visibility = Visibility.Collapsed; | |||
wokTemp.Visibility = Visibility.Visible; | |||
wokCooling.Visibility = Visibility.Collapsed; | |||
caliTemp.Visibility = Visibility.Collapsed; | |||
break; | |||
case "配料罐升温": | |||
tempName = "配料罐升温"; | |||
wokTemp.Visibility = Visibility.Visible; | |||
materialTemp.Visibility = Visibility.Visible; | |||
wokTemp.Visibility = Visibility.Collapsed; | |||
wokCooling.Visibility = Visibility.Collapsed; | |||
caliTemp.Visibility = Visibility.Collapsed; | |||
break; | |||
case "反应釜降温": | |||
tempName = "反应釜降温"; | |||
wokTemp.Visibility = Visibility.Visible; | |||
materialTemp.Visibility = Visibility.Collapsed; | |||
wokTemp.Visibility = Visibility.Collapsed; | |||
wokCooling.Visibility = Visibility.Visible; | |||
caliTemp.Visibility = Visibility.Collapsed; | |||
break; | |||
case "温度校准": | |||
tempName = "温度校准"; | |||
materialTemp.Visibility = Visibility.Collapsed; | |||
wokTemp.Visibility = Visibility.Collapsed; | |||
wokCooling.Visibility = Visibility.Collapsed; | |||
caliTemp.Visibility = Visibility.Visible; | |||
break; | |||
default: | |||
@@ -165,7 +173,7 @@ namespace BPASmartClient.Academy.View | |||
{ | |||
case "反应釜升温": | |||
int tempValue; | |||
suc = int.TryParse(temp_1.Text.ToString(), out tempValue); | |||
suc = int.TryParse(temp_2.Text.ToString(), out tempValue); | |||
if (suc) | |||
{ | |||
Simens_PLC.GetInstance.siemens.Write<bool>("DB1.DBX1001.7", true); | |||
@@ -199,7 +207,7 @@ namespace BPASmartClient.Academy.View | |||
} | |||
break; | |||
case "反应釜降温": | |||
suc = int.TryParse(temp_1.Text.ToString(), out tempValue); | |||
suc = int.TryParse(temp_3.Text.ToString(), out tempValue); | |||
//int time; | |||
//suc = int.TryParse(time_1.Text.ToString(), out time); | |||
if (suc) | |||
@@ -510,14 +510,14 @@ | |||
Panel.ZIndex="99" Orientation="Vertical"> | |||
<RadioButton | |||
Width="70" Height="20" Margin="0,0,0,2" BorderThickness="0" | |||
Click="open_Click" Content="排热空气阀:开" FontSize="8" Foreground="White" | |||
Click="open_Click" Content="抽真空阀:开" FontSize="8" Foreground="White" | |||
Style="{StaticResource radiobutton}" | |||
Tag="排热空气阀" /> | |||
Tag="抽真空阀" /> | |||
<RadioButton | |||
Width="70" Height="20" BorderThickness="0" Click="close_Click" | |||
Content="排热空气阀:关" FontSize="8" Foreground="White" IsChecked="True" | |||
Content="抽真空阀:关" FontSize="8" Foreground="White" IsChecked="True" | |||
Style="{StaticResource radiobutton}" | |||
Tag="排热空气阀" /> | |||
Tag="抽真空阀" /> | |||
</StackPanel> | |||
<StackPanel | |||
Canvas.Left="660.3" Canvas.Top="149" HorizontalAlignment="Left" VerticalAlignment="Top" | |||
@@ -818,7 +818,7 @@ | |||
Canvas.Left="618" Canvas.Top="192" Canvas.Right="312.8" HorizontalAlignment="Left" | |||
VerticalAlignment="Top" FontSize="12" Foreground="White" Text="热气排空阀" | |||
TextAlignment="Center" /> | |||
<!--#region 排热空气阀--> | |||
<!--#region 抽真空阀--> | |||
<bpa:PipeLineTL | |||
Canvas.Left="730" Canvas.Top="290.5" Canvas.Right="260" Width="10" | |||
Height="10" HorizontalAlignment="Center" VerticalAlignment="Top" Fill="#E31A1A" | |||
@@ -826,7 +826,7 @@ | |||
<bpa:PipeLineH | |||
Canvas.Left="600.3" Canvas.Top="295.5" Canvas.Right="269.7" Width="130" | |||
Height="5" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="2" | |||
Direction="{Binding DeviceStatus.ReactOutHotGasValve, ConverterParameter=1, Converter={StaticResource deviceConvert}}" | |||
Direction="{Binding DeviceStatus.ReactOutHotGasValve, ConverterParameter=5, Converter={StaticResource deviceConvert}}" | |||
Fill="{Binding DeviceStatus.ReactOutHotGasValve, ConverterParameter=2, Converter={StaticResource deviceConvert}}" | |||
LineWidth="1" /> | |||
<bpa:PipeLineTR | |||
@@ -838,7 +838,7 @@ | |||
<bpa:PipeLineV | |||
Canvas.Left="590.8" Canvas.Top="230.7" Canvas.Right="404.2" Width="5" | |||
Height="60" HorizontalAlignment="Center" VerticalAlignment="Top" d:Direction="2" | |||
Direction="{Binding DeviceStatus.ReactOutHotGasValve, ConverterParameter=1, Converter={StaticResource deviceConvert}}" | |||
Direction="{Binding DeviceStatus.ReactOutHotGasValve, ConverterParameter=5, Converter={StaticResource deviceConvert}}" | |||
Fill="{Binding DeviceStatus.ReactOutHotGasValve, ConverterParameter=2, Converter={StaticResource deviceConvert}}" | |||
LineWidth="1" /> | |||
<bpa:HandValve | |||
@@ -848,7 +848,7 @@ | |||
OpenEnable="{Binding DeviceStatus.ReactOutHotGasValve}" /> | |||
<TextBlock | |||
Canvas.Left="613" Canvas.Top="272" Canvas.Right="384.8" HorizontalAlignment="Left" | |||
VerticalAlignment="Top" FontSize="12" Foreground="White" Text="排热空气阀" | |||
VerticalAlignment="Top" FontSize="12" Foreground="White" Text="抽真空阀" | |||
TextAlignment="Center" /> | |||
<!--#region 反应釜排水阀--> | |||
<bpa:PipeLineV | |||