Procházet zdrojové kódy

..

HK研究所反应釜三屏显示
ZhaoGang před 3 týdny
rodič
revize
9d2c9e23aa
3 změnil soubory, kde provedl 22 přidání a 107 odebrání
  1. +1
    -1
      BPASmartClient.Academy/50L/PlcControl.cs
  2. +10
    -101
      BPASmartClient.Academy/View/ReactionKettle50LView.xaml
  3. +11
    -5
      BPASmartClient.Academy/View/ReactionKettle50LView.xaml.cs

+ 1
- 1
BPASmartClient.Academy/50L/PlcControl.cs Zobrazit soubor

@@ -273,7 +273,7 @@ namespace BPASmartClient.Academy._50L
}
}

public OperateResult Write(FloatAddEnum add, float value)
public OperateResult Write<T>(FloatAddEnum add, T value)
{
if (floatAdds.ContainsKey(add))
{


+ 10
- 101
BPASmartClient.Academy/View/ReactionKettle50LView.xaml Zobrazit soubor

@@ -409,20 +409,6 @@
Style="{StaticResource radiobutton}"
Tag="卤水泵" />
</StackPanel>
<StackPanel
Canvas.Left="772" Canvas.Top="331" HorizontalAlignment="Center" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical" Visibility="Collapsed">
<RadioButton
Width="70" Height="20" Margin="0,0,0,2" BorderThickness="0"
Click="open_Click" Content="反应釜回原点:开" FontSize="8" Foreground="White"
Style="{StaticResource radiobutton}"
Tag="反应釜回原点" />
<RadioButton
Width="70" Height="20" BorderThickness="0" Click="close_Click"
Content="反应釜回原点:关" FontSize="8" Foreground="White" IsChecked="True"
Style="{StaticResource radiobutton}"
Tag="反应釜回原点" />
</StackPanel>
<StackPanel
Canvas.Left="813" Canvas.Top="385" HorizontalAlignment="Center" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical">
@@ -437,35 +423,6 @@
Style="{StaticResource radiobutton}"
Tag="反应釜反转" />
</StackPanel>
<StackPanel
Canvas.Left="875" Canvas.Top="382" HorizontalAlignment="Center" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical" Visibility="Collapsed">
<RadioButton
Width="70" Height="20" Margin="0,0,0,2" BorderThickness="0"
Click="open_Click" Content="反应釜去倒料位:开" FontSize="8" Foreground="White"
Style="{StaticResource radiobutton}"
Tag="反应釜去倒料位" />
<RadioButton
Width="70" Height="20" BorderThickness="0" Click="close_Click"
Content="反应釜去倒料位:关" FontSize="8" Foreground="White" IsChecked="True"
Style="{StaticResource radiobutton}"
Tag="反应釜去倒料位" />
</StackPanel>
<StackPanel
Canvas.Left="772" Canvas.Top="382" HorizontalAlignment="Left" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical" Visibility="Collapsed">
<RadioButton
Width="70" Height="20" Margin="0,0,0,2" BorderThickness="0"
Click="open_Click" Content="反应釜去加料位:开" FontSize="8" Foreground="White"
Style="{StaticResource radiobutton}"
Tag="去加料位" />
<RadioButton
Width="70" Height="20" BorderThickness="0" Click="close_Click"
Content="反应釜去加料位:关" FontSize="8" Foreground="White" IsChecked="True"
Style="{StaticResource radiobutton}"
Tag="去加料位" />
</StackPanel>

<StackPanel
Canvas.Left="921" Canvas.Top="327" HorizontalAlignment="Center" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical">
@@ -480,48 +437,6 @@
Style="{StaticResource radiobutton}"
Tag="反应釜旋转电机点动" />
</StackPanel>
<StackPanel
Canvas.Left="800" Canvas.Top="440.853" HorizontalAlignment="Left" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical" Visibility="Collapsed">
<RadioButton
Width="70" Height="20" Margin="0,0,0,2" BorderThickness="0"
Click="open_Click" Content="反应釜升温:开" FontSize="8" Foreground="White"
Style="{StaticResource radiobutton}"
Tag="反应釜升温" />
<RadioButton
Width="70" Height="20" BorderThickness="0" Click="close_Click"
Content="反应釜升温:关" FontSize="8" Foreground="White" IsChecked="True"
Style="{StaticResource radiobutton}"
Tag="反应釜升温" />
</StackPanel>
<StackPanel
Canvas.Left="886.095" Canvas.Top="440.953" HorizontalAlignment="Left" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical" Visibility="Collapsed">
<RadioButton
Width="70" Height="20" Margin="0,0,0,2" BorderThickness="0"
Click="open_Click" Content="反应釜降温:开" FontSize="8" Foreground="White"
Style="{StaticResource radiobutton}"
Tag="反应釜降温" />
<RadioButton
Width="70" Height="20" BorderThickness="0" Click="close_Click"
Content="反应釜降温:关" FontSize="8" Foreground="White" IsChecked="True"
Style="{StaticResource radiobutton}"
Tag="反应釜降温" />
</StackPanel>
<StackPanel
Canvas.Left="886.095" Canvas.Top="389.9" HorizontalAlignment="Left" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical" Visibility="Collapsed">
<RadioButton
Width="70" Height="20" BorderThickness="0" Click="open_Click"
Content="冷凝水罐降温:开" FontSize="8" Foreground="White"
Style="{StaticResource radiobutton}"
Tag="冷凝水罐降温" />
<RadioButton
Width="70" Height="20" BorderThickness="0" Click="close_Click"
Content="冷凝水罐降温:关" FontSize="8" Foreground="White" IsChecked="True"
Style="{StaticResource radiobutton}"
Tag="冷凝水罐降温" />
</StackPanel>
<StackPanel
Canvas.Left="800" Canvas.Top="141" HorizontalAlignment="Center" VerticalAlignment="Top"
Panel.ZIndex="99" Orientation="Vertical">
@@ -1525,22 +1440,6 @@
Foreground="{Binding DeviceStatus.IsSetReactInBrineWaterValve, Converter={StaticResource BoolToColorConverter}}"
Text="⬛" TextAlignment="Center" />

<TextBlock
Canvas.Left="844" Canvas.Top="392" Canvas.Right="384.8" Height="20"
HorizontalAlignment="Left" VerticalAlignment="Top" d:Foreground="Red" FontSize="16"
Foreground="{Binding DeviceStatus.IsSetGoAddPosition, Converter={StaticResource BoolToColorConverter}}"
Text="⬛" TextAlignment="Center" Visibility="Collapsed" />

<TextBlock
Canvas.Left="950" Canvas.Top="392" Canvas.Right="384.8" Height="20"
HorizontalAlignment="Left" VerticalAlignment="Top" d:Foreground="Red" FontSize="16"
Foreground="{Binding DeviceStatus.IsSetReactOut, Converter={StaticResource BoolToColorConverter}}"
Text="⬛" TextAlignment="Center" Visibility="Collapsed" />
<TextBlock
Canvas.Left="844" Canvas.Top="343" Canvas.Right="384.8" Height="20"
HorizontalAlignment="Center" VerticalAlignment="Top" d:Foreground="Red" FontSize="16"
Foreground="{Binding DeviceStatus.IsSetReactHomeBit, Converter={StaticResource BoolToColorConverter}}"
Text="⬛" TextAlignment="Center" Visibility="Collapsed" />
<TextBlock
Canvas.Left="887" Canvas.Top="395" Canvas.Right="384.8" Height="20"
HorizontalAlignment="Center" VerticalAlignment="Top" d:Foreground="Red" FontSize="16"
@@ -1658,6 +1557,16 @@
<TextBlock
Margin="20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="℃" />

<TextBlock
Margin="40,0,20,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="反应釜保温时间:" />
<TextBox
x:Name="reactorInsulationTime" 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"


+ 11
- 5
BPASmartClient.Academy/View/ReactionKettle50LView.xaml.cs Zobrazit soubor

@@ -108,24 +108,30 @@ namespace BPASmartClient.Academy.View
switch (tag)
{
case "反应釜升温":
if (float.TryParse(reactorHeatUpTemp.Text,out float reactorHeatTemp) && reactorHeatTemp <= 200f && reactorHeatTemp >= 0f)
if (float.TryParse(reactorHeatUpTemp.Text, out float reactorHeatTemp) && reactorHeatTemp <= 200f && reactorHeatTemp >= 0f)
{
PlcControl.GetInstance.Write(FloatAddEnum.反应釜设定升温温度, MathF.Round(reactorHeatTemp, 2)).OnSuccess((s) =>
if (uint.TryParse(reactorInsulationTime.Text, out uint insulationTime) && insulationTime <= 32767)
{
PlcControl.GetInstance.Write(FloatAddEnum.反应釜设定升温温度, MathF.Round(reactorHeatTemp, 2)).OnSuccess((s) =>
{
PlcControl.GetInstance.Write(BoolAddEnum.反应釜升温, true).OnSuccess((s2) =>
{
Notify(EnumPromptType.Success, $"写入成功", $"成功:写入反应釜升温:{reactorHeatTemp}");
}).OnFailure((s) => {
}).OnFailure((s) =>
{
Notify(EnumPromptType.Error, "写入失败", $"{s.Message}。");
});
}).OnFailure((s) => {
}).OnFailure((s) =>
{
Notify(EnumPromptType.Error, "写入失败", $"{s.Message}。");
});
});
}
}
else
{
Notify(EnumPromptType.Error, "写入失败", $"输入的温度不是一个有效的数字,范围0-200℃。");
}

break;
case "反应釜降温":
if (float.TryParse(reactorCoolDownTemp.Text, out float reactorCoolTemp) && reactorCoolTemp<=200f && reactorCoolTemp>=0f)


Načítá se…
Zrušit
Uložit