Browse Source

小料站修正手动AGV送托盘要求判定。

master
ZhaoGang 1 year ago
parent
commit
d99b65c587
3 changed files with 9 additions and 11 deletions
  1. +2
    -3
      BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs
  2. +6
    -7
      BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs
  3. +1
    -1
      BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs

+ 2
- 3
BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs View File

@@ -353,10 +353,9 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
/// </summary>
public byte RobotProgramNum { get; set; } = 0;
/// <summary>
/// 手动下发订单。
/// 最近一次下发订单的时间
/// </summary>
[VarComm("Global","手动下发订单")]
public bool ManualIssueRecipe { get; set; }=false;
public DateTime LatestIssueRecipe { get; set; } = new DateTime(2023, 5, 1, 00, 00, 00);
#endregion
}
public enum IssueRecipeCondition


+ 6
- 7
BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs View File

@@ -28,12 +28,12 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
time = GVL_SmallStation.GetInstance.Time;
Test1Command = new RelayCommand(() =>
{
//if (!Delay.GetInstance("CanManualGetTray").Start(GVL_SmallStation.GetInstance.ManualIssueRecipe, 10))
//{
// NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, App.MainWindow, "提示", $"手动下发订单间隔不足10秒,请稍后再点击。");
// return;
//}
if (DateTime.Now.Subtract(GVL_SmallStation.GetInstance.LatestIssueRecipe).TotalSeconds<=10)
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, App.MainWindow, "提示", $"最后一次手动下发订单间隔不足10秒,请稍后再点击。");
return;
}
ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX8.0", PlcVarType = PlcVarType.Bool, Value = true });
//Thread.Sleep(200);
//ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX8.0", PlcVarType = PlcVarType.Bool, Value = false });
@@ -43,7 +43,6 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
VisibilityBtn1 = Visibility.Hidden;
VisibilityBtn2 = Visibility.Visible;
VisibilityBtn3 = Visibility.Hidden;
GVL_SmallStation.GetInstance.ManualIssueRecipe = false;
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,AGV送托盘完成");
});


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs View File

@@ -97,7 +97,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{res.RecipeName}配方下发成功!");
MessageNotify.GetInstance.ShowUserLog($"下发本地模拟配方——{res.RecipeName}");
}
GVL_SmallStation.GetInstance.ManualIssueRecipe = true;
GVL_SmallStation.GetInstance.LatestIssueRecipe=DateTime.Now;
}
}
}


Loading…
Cancel
Save