Browse Source

煮面机参数修改

master
pry 1 year ago
parent
commit
e2a02e0667
3 changed files with 325 additions and 270 deletions
  1. +19
    -1
      BPASmartClient.MorkS/Model/MorksPar.cs
  2. +277
    -247
      BPASmartClient.MorkS/View/ParSet.xaml
  3. +29
    -22
      BPASmartClient.MorkS/ViewModel/ParSetViewModel.cs

+ 19
- 1
BPASmartClient.MorkS/Model/MorksPar.cs View File

@@ -16,12 +16,30 @@ namespace BPASmartClient.MorkS.Model
/// <summary>
/// 加汤时间,单位秒
/// </summary>
public float AddSoupTime { get; set; } = 2;
public ushort AddSoupTime { get; set; } = 2;

/// <summary>
/// 倒面条件 煮面口忙碌数量
/// </summary>
public int InvertedNoodles_OpenBusyNum { get; set; } = 5;

/// <summary>
/// 间隔时间设定
/// </summary>
public ushort IntervalTime { get; set; }
/// <summary>
/// 反转抽汤时间设定
/// </summary>
public ushort BackwardSoupSootTime { get; set; }
/// <summary>
/// 反转过后再次出汤时间设定
/// </summary>
public ushort BackwardedOutSoupTime { get; set; }
/// <summary>
/// 未反转抽汤下时间设定
/// </summary>
public ushort UnBackwardSoupSootTime { get; set; }

public ObservableCollection<ParSet> DishLibraryParSets { get; set; } = new ObservableCollection<ParSet>();
}
}

+ 277
- 247
BPASmartClient.MorkS/View/ParSet.xaml View File

@@ -13,7 +13,7 @@
mc:Ignorable="d">

<UserControl.DataContext>
<vm:ParSetViewModel/>
<vm:ParSetViewModel />
</UserControl.DataContext>

<UserControl.Resources>
@@ -78,53 +78,53 @@
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="150" />
<RowDefinition Height="75" />
<RowDefinition Height="75" />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>

<StackPanel Orientation="Horizontal">
<!--煮面口参数设置-->
<!-- 煮面口参数设置 -->
<ItemsControl Grid.Row="0" ItemsSource="{Binding parSets}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding TextBlockContext}" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding Minute}" />
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding Minute}" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="(分)" />
<TextBox
Width="100"
Margin="0,10"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding Second}" />
Width="100"
Margin="0,10"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding Second}" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="(秒)" />

<CheckBox
Height="20"
Margin="10"
VerticalAlignment="Center"
Background="#FF2AB2E7"
Content="{Binding CheckBoxContext}"
FontSize="14"
Foreground="#00c2f4"
IsChecked="{Binding IsShield}"
Template="{StaticResource CbTemplate}" />
Height="20"
Margin="10"
VerticalAlignment="Center"
Background="#FF2AB2E7"
Content="{Binding CheckBoxContext}"
FontSize="14"
Foreground="#00c2f4"
IsChecked="{Binding IsShield}"
Template="{StaticResource CbTemplate}" />

</StackPanel>
</DataTemplate>
@@ -136,10 +136,10 @@
<RowDefinition />
</Grid.RowDefinitions>

<Grid
Grid.Row="0"
Margin="100,10,0,0"
Background="#ff0C255F">
<Grid
Grid.Row="0"
Margin="100,10,0,0"
Background="#ff0C255F">

<Grid.ColumnDefinitions>
<ColumnDefinition />
@@ -148,36 +148,36 @@
</Grid.ColumnDefinitions>

<TextBlock
Grid.Column="0"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="库位序号" />
Grid.Column="0"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="库位序号" />

<TextBlock
Grid.Column="1"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="煮时间(分)" />
Grid.Column="1"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="煮时间(分)" />

<TextBlock
Grid.Column="2"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="煮时间(秒)" />
Grid.Column="2"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="煮时间(秒)" />

<Border
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,1,1" />
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,1,1" />
<Border
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
<Border
Grid.Column="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
Grid.Column="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />


</Grid>
@@ -188,17 +188,17 @@
<DataTemplate>
<Grid Name="gr">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="157"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="157" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>

<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"
Text="{Binding TextBlockContext}" />
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"
Text="{Binding TextBlockContext}" />

<!--<ComboBox
Grid.Column="1"
@@ -212,31 +212,31 @@
SelectedIndex="{Binding LocDishType}" />-->

<Border
Grid.Column="0"
Grid.ColumnSpan="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,1"></Border>
Grid.Column="0"
Grid.ColumnSpan="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,1" />
<Border
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0">
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0">
<TextBox
Grid.Column="1"
FontSize="18"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding Minute}" />
Grid.Column="1"
FontSize="18"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding Minute}" />
</Border>
<Border
Grid.Column="2"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0">
Grid.Column="2"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0">
<TextBox
Grid.Column="2"
FontSize="18"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding Second}" />
Grid.Column="2"
FontSize="18"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding Second}" />
</Border>
</Grid>

@@ -252,183 +252,202 @@
</Grid>
</Grid>
</StackPanel>
<!--加汤设置-->
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBlock
Margin="40,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="加汤时间:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding AddSoup}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
<TextBlock
Margin="40,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="清洗加汤管道时间:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding DelayTime}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
<Button
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding CommandStart}"
Content="启动"
Foreground="Aqua"
Style="{StaticResource ButtonStyle}" />
<TextBlock
Margin="40,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="倒面条件,煮面口使用数量:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding OpenUseNumber}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(个)" />
</StackPanel>
<!--抽汤时间设定-->
<WrapPanel Grid.Row="2" Orientation="Horizontal">
<!--间隔时间设定-->
<StackPanel Orientation="Horizontal">

<!-- 加汤设置 -->

<!-- 抽汤时间设定 -->
<StackPanel Grid.Row="2" HorizontalAlignment="Left">
<!--<StackPanel
Margin="0,5"
HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="间隔时间设定:" />
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="加汤时间:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding IntervalTime}" />
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding AddSoup}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
</StackPanel>-->

<StackPanel
Margin="0,5"
HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="清洗加汤管道时间:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding DelayTime, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
</StackPanel>
<!--反转抽汤时间设定-->
<StackPanel Orientation="Horizontal">

<StackPanel
Margin="0,5"
HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="反转抽汤时间设定:" />
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="倒面条件,煮面口使用数量:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding BackwardSoupSootTime}" />
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding OpenUseNumber, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(个)" />
</StackPanel>
<!--翻转后再次出汤时间设定-->
<StackPanel Orientation="Horizontal">

<!-- 间隔时间设定 -->
<StackPanel
Margin="0,5"
HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="翻转后再次出汤时间设定:" />
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="反转间隔时间设定:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding BackwardedOutSoupTime}" />
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding IntervalTime, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
</StackPanel>
<!--未反转抽汤情况下时间设定-->
<StackPanel Orientation="Horizontal">
<!-- 反转抽汤时间设定 -->
<StackPanel
Margin="0,5"
HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="反转抽汤情况下时间设定:" />
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="反转抽汤时间设定:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding UnBackwardSoupSootTime}" />
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding BackwardSoupSootTime, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
</StackPanel>
<!-- 反转后再次出汤时间设定 -->
<StackPanel
Margin="0,5"
HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="反转后再次出汤时间设定:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding BackwardedOutSoupTime, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
</StackPanel>
<!-- 未反转抽汤情况下时间设定 -->
<StackPanel
Margin="0,5"
HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="未反转抽汤情况下时间设定:" />
<TextBox
Width="100"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="Transparent"
BorderBrush="#FF23CACA"
CaretBrush="Aqua"
FontFamily="楷体"
FontSize="21"
Foreground="#ff34f7f7"
Text="{Binding UnBackwardSoupSootTime, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
Margin="10,0,0,0"
FontSize="21"
Style="{StaticResource TextBlockStyle}"
Text="(秒)" />
</StackPanel>
</WrapPanel>
<!--抽汤调试按钮-->
</StackPanel>
<!-- 抽汤调试按钮 -->
<StackPanel Grid.Row="3" Orientation="Horizontal">
<Button
Width="100"
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -437,6 +456,7 @@
Foreground="Aqua"
Style="{StaticResource ButtonStyle}" />
<Button
Width="100"
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -445,6 +465,7 @@
Foreground="Aqua"
Style="{StaticResource ButtonStyle}" />
<Button
Width="100"
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -452,6 +473,15 @@
Content="抽汤停止"
Foreground="Aqua"
Style="{StaticResource ButtonStyle}" />
<Button
Width="100"
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding CommandStart}"
Content="清洗启动"
Foreground="Aqua"
Style="{StaticResource ButtonStyle}" />
</StackPanel>
</Grid>



+ 29
- 22
BPASmartClient.MorkS/ViewModel/ParSetViewModel.cs View File

@@ -19,7 +19,7 @@ namespace BPASmartClient.MorkS.ViewModel
public ParSetViewModel()
{
SaveInfoCommand = new RelayCommand(SaveSettingData);
SoupSootForwardCommand=new RelayCommand(SoupSootForward);
SoupSootForwardCommand = new RelayCommand(SoupSootForward);
SoupSootBackwardCommand = new RelayCommand(SoupSootBackward);
SoupSootStopCommand = new RelayCommand(SoupSootStop);

@@ -27,7 +27,7 @@ namespace BPASmartClient.MorkS.ViewModel
ActionManage.GetInstance.Register(SaveSettingData, "初始化设定煮面时间");


CommandStart = new RelayCommand(async ()=>
CommandStart = new RelayCommand(async () =>
{
ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M0.6", Value = true });
await Task.Delay((int)DelayTime * 1000);
@@ -58,34 +58,31 @@ namespace BPASmartClient.MorkS.ViewModel
public RelayCommand SoupSootForwardCommand { get; set; }
public RelayCommand SoupSootBackwardCommand { get; set; }
public RelayCommand SoupSootStopCommand { get; set; }

#region 时间设定
/// <summary>
/// 间隔时间设定
/// </summary>
public float IntervalTime { get { return _IntervalTime; } set { _IntervalTime = value; OnPropertyChanged(); } }
private float _IntervalTime;
public ushort IntervalTime { get { return Json<MorksPar>.Data.IntervalTime; } set { Json<MorksPar>.Data.IntervalTime = value; OnPropertyChanged(); } }
/// <summary>
/// 反转抽汤时间设定
/// </summary>
public float BackwardSoupSootTime { get { return _BackwardSoupSootTime; } set { _BackwardSoupSootTime = value; OnPropertyChanged(); } }
private float _BackwardSoupSootTime;
public ushort BackwardSoupSootTime { get { return Json<MorksPar>.Data.BackwardSoupSootTime; } set { Json<MorksPar>.Data.BackwardSoupSootTime = value; OnPropertyChanged(); } }
/// <summary>
/// 反转过后再次出汤时间设定
/// </summary>
public float BackwardedOutSoupTime { get { return _BackwardedOutSoupTime; } set { _BackwardedOutSoupTime = value; OnPropertyChanged(); } }
private float _BackwardedOutSoupTime;
public ushort BackwardedOutSoupTime { get { return Json<MorksPar>.Data.BackwardedOutSoupTime; } set { Json<MorksPar>.Data.BackwardedOutSoupTime = value; OnPropertyChanged(); } }
/// <summary>
/// 未反转抽汤下时间设定
/// </summary>
public float UnBackwardSoupSootTime { get { return _UnBackwardSoupSootTime; } set { _UnBackwardSoupSootTime = value; OnPropertyChanged(); } }
private float _UnBackwardSoupSootTime;
public ushort UnBackwardSoupSootTime { get { return Json<MorksPar>.Data.UnBackwardSoupSootTime; } set { Json<MorksPar>.Data.UnBackwardSoupSootTime = value; OnPropertyChanged(); } }
//public RelayCommand VoicePlayTest { get; set; }


/// <summary>
/// 加汤时间设置
/// </summary>
public float AddSoup { get { return Json<MorksPar>.Data.AddSoupTime; } set { Json<MorksPar>.Data.AddSoupTime = value; OnPropertyChanged(); } }
//public ushort AddSoup { get { return Json<MorksPar>.Data.AddSoupTime; } set { Json<MorksPar>.Data.AddSoupTime = value; OnPropertyChanged(); } }
#endregion


@@ -114,33 +111,43 @@ namespace BPASmartClient.MorkS.ViewModel
bools.Add(Json<MorksPar>.Data.parSets[i].IsShield);
ActionManage.GetInstance.Send("WriteVW", new WritePar() { Address = $"VW{116 + (i * 6)}", Value = values.ToArray() });
}
ushort times = Convert.ToUInt16(Json<MorksPar>.Data.AddSoupTime * 10);
ActionManage.GetInstance.Send("WriteVW", new WritePar() { Address = "VW2282", Value = times });
//ushort times = Convert.ToUInt16(Json<MorksPar>.Data.AddSoupTime * 10);
//ActionManage.GetInstance.Send("WriteVW", new WritePar() { Address = "VW2282", Value = times });

ActionManage.GetInstance.Send("WriteVW", new WritePar() { Address = "VW2282", Value = (ushort)(UnBackwardSoupSootTime * 10) });
ActionManage.GetInstance.Send("WriteVW", new WritePar() { Address = "VW2284", Value = (ushort)(IntervalTime * 10) });
ActionManage.GetInstance.Send("WriteVW", new WritePar() { Address = "VW2286", Value = (ushort)(BackwardSoupSootTime * 10) });
ActionManage.GetInstance.Send("WriteVW", new WritePar() { Address = "VW2288", Value = (ushort)(BackwardedOutSoupTime * 10) });

ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M260.0", Value = bools.ToArray() });
Json<MorksPar>.Save();

WriteTimeSet(IntervalTime);
WriteTimeSet(BackwardSoupSootTime);
WriteTimeSet(BackwardedOutSoupTime);
WriteTimeSet(UnBackwardSoupSootTime);
//WriteTimeSet(IntervalTime);
//WriteTimeSet(BackwardSoupSootTime);
//WriteTimeSet(BackwardedOutSoupTime);
//WriteTimeSet(UnBackwardSoupSootTime);
}

private void WriteTimeSet(float TimePar) {
private void WriteTimeSet(float TimePar)
{
ushort paras = Convert.ToUInt16(TimePar * 10);
ActionManage.GetInstance.Send("WriteVW", new WritePar() { Address = "VW2282", Value = paras });
}
private async void SoupSootForward() {

private async void SoupSootForward()
{
ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M1.0", Value = true });
await Task.Delay((int)DelayTime * 1000);
ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M1.0", Value = false });
}
private async void SoupSootBackward() {
private async void SoupSootBackward()
{
ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M1.1", Value = true });
await Task.Delay((int)DelayTime * 1000);
ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M1.1", Value = false });
}
private async void SoupSootStop() {
private async void SoupSootStop()
{
ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M1.2", Value = true });
await Task.Delay((int)DelayTime * 1000);
ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M1.2", Value = false });


Loading…
Cancel
Save