Explorar el Código

1, 传动带移动添加延迟时间设置功能。2. 味魔方下发参数和开始配料添加间隔。

master
Nah hace 11 meses
padre
commit
e4555c3001
Se han modificado 4 ficheros con 22 adiciones y 1 borrados
  1. +4
    -0
      BPA.SingleDevice/Business/ProcessControl.cs
  2. +5
    -0
      BPA.SingleDevice/Json/ConnectConfig.cs
  3. +8
    -1
      BPA.SingleDevice/View/DebugView.xaml
  4. +5
    -0
      BPA.SingleDevice/ViewModel/DebugViewModel.cs

+ 4
- 0
BPA.SingleDevice/Business/ProcessControl.cs Ver fichero

@@ -191,6 +191,7 @@ namespace BPA.SingleDevice.Business
break;

case BatchStep.StartBatch:
Task.Delay(500).Wait();
if (Batchers[stationNum].StartBatching())
{
recipe.BatchStatus[stationNum] = BatchStep.WaitBatchComplete;
@@ -204,6 +205,7 @@ namespace BPA.SingleDevice.Business
break;

case BatchStep.WaitBatchComplete:
Task.Delay(500).Wait();
if (completeTrig)
{
logService.LogRunInfo($"配方【{recipe.Name}】工位【{stationNum}】的配料完成。");
@@ -234,6 +236,8 @@ namespace BPA.SingleDevice.Business
switch (global.MoveConveyerStep)
{
case MoveConveyerStep.WaitMove:
var delayTime = Json<ConnectConfig>.Data.MoveDelay;
Task.Delay(TimeSpan.FromSeconds(delayTime)).Wait();
Conveyer.InitalMoveParam();
Task.Delay(500).Wait();
if (Conveyer.MoveOnce())


+ 5
- 0
BPA.SingleDevice/Json/ConnectConfig.cs Ver fichero

@@ -11,6 +11,11 @@

/// <summary>移动长度</summary>
public uint MoveLength { get; set; } = 2000;

/// <summary>
/// 传送带移动延迟(配料完成后延迟一定时间再移动)
/// </summary>
public uint MoveDelay { get; set; } = 3;
}

/// <summary>配料机设置</summary>


+ 8
- 1
BPA.SingleDevice/View/DebugView.xaml Ver fichero

@@ -7,7 +7,7 @@
xmlns:local="clr-namespace:BPA.SingleDevice.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:BPA.SingleDevice.ViewModel"
d:DesignHeight="450"
d:DesignHeight="950"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid>
@@ -116,6 +116,13 @@
Text="移动长度:" />
<TextBox Width="200" Text="{Binding MoveLength}" />
</StackPanel>
<StackPanel Margin="5" Orientation="Horizontal">
<TextBlock
FontSize="40"
Foreground="White"
Text="移动延时:" />
<TextBox Width="200" Text="{Binding MoveDelay}" />
</StackPanel>
</StackPanel>
</Border>
</Grid>

+ 5
- 0
BPA.SingleDevice/ViewModel/DebugViewModel.cs Ver fichero

@@ -54,6 +54,7 @@ namespace BPA.SingleDevice.ViewModel
{
Json<ConnectConfig>.Data.MoveLength = MoveLength;
Json<ConnectConfig>.Data.MoveSpeed = MoveSpeed;
Json<ConnectConfig>.Data.MoveDelay = MoveDelay;
Json<ConnectConfig>.Save();
logService.LogUserInfo("写入流水线参数并保存到文件。");
Message.SuccessGlobal("写入流水线参数并保存到文件成功。");
@@ -102,6 +103,10 @@ namespace BPA.SingleDevice.ViewModel

/// <summary>移动一次的距离。</summary>
public uint MoveLength { get; set; } = Json<ConnectConfig>.Data.MoveLength;
/// <summary>
/// 传送带移动延迟(配料完成后延迟一定时间再移动)
/// </summary>
public uint MoveDelay { get; set; } = Json<ConnectConfig>.Data.MoveDelay;

/// <summary>开机自启</summary>
public bool AutoStart


Cargando…
Cancelar
Guardar