From 4d16bdf1820cb62984064599516a7536a869c21a Mon Sep 17 00:00:00 2001
From: yaowen liu <1539177313@qq.com>
Date: Tue, 10 Oct 2023 16:18:20 +0800
Subject: [PATCH] recipe
---
DosingSystem/Model/DeviceAddress.cs | 4 +
DosingSystem/Model/DeviceInquire.cs | 3 +
DosingSystem/Model/RawMaterialDeviceStatus.cs | 4 +
DosingSystem/Model/par/DeviceParModel.cs | 7 +-
.../ViewModel/RecipeControlViewModel.cs | 409 +++++++++---------
5 files changed, 223 insertions(+), 204 deletions(-)
diff --git a/DosingSystem/Model/DeviceAddress.cs b/DosingSystem/Model/DeviceAddress.cs
index d768e92e..62a07130 100644
--- a/DosingSystem/Model/DeviceAddress.cs
+++ b/DosingSystem/Model/DeviceAddress.cs
@@ -123,6 +123,10 @@ namespace BPASmartClient.DosingSystem
/// 桶到位检测
///
public static string PailArrive { get; set; } = "LW61";
+ ///
+ /// 设备执行配方计数
+ ///
+ public static string DoRecipeCount { get; set; } = "LW64";
}
diff --git a/DosingSystem/Model/DeviceInquire.cs b/DosingSystem/Model/DeviceInquire.cs
index c28f1d1b..cadb6ff7 100644
--- a/DosingSystem/Model/DeviceInquire.cs
+++ b/DosingSystem/Model/DeviceInquire.cs
@@ -423,6 +423,9 @@ namespace BPASmartClient.DosingSystem
//配料最大桶数
var max = this.modbusTcp.Read(DeviceAddress.MaxPail.ToAdd(), 1, BPA.Helper.DataFormat.CDAB);
if (max.IsSuccess) deviceStatus.MaxPassPail = max.Content;
+ //执行配方数
+ var doCount = this.modbusTcp.Read(DeviceAddress.DoRecipeCount.ToAdd(), 1, BPA.Helper.DataFormat.CDAB);
+ if (doCount.IsSuccess) deviceStatus.DoRecipeCount = doCount.Content;
//this.DeviceName = modbusTcp.Read(DeviceAddress.DeviceName.ToAdd(), 20).Content.Trim().Replace(" ", "");
//deviceStatus.RunStatus = (ushort)this.modbusTcp.Read(DeviceAddress.RunStatus.ToAdd()).Content; //获取设备运行状态
//deviceStatus.WeightFeedback = (float)this.modbusTcp.Read(DeviceAddress.WeightFeedback.ToAdd()).Content;//获取设备料仓剩余重量
diff --git a/DosingSystem/Model/RawMaterialDeviceStatus.cs b/DosingSystem/Model/RawMaterialDeviceStatus.cs
index 0dab1d01..4fa7450a 100644
--- a/DosingSystem/Model/RawMaterialDeviceStatus.cs
+++ b/DosingSystem/Model/RawMaterialDeviceStatus.cs
@@ -110,5 +110,9 @@ namespace BPASmartClient.DosingSystem
/// 到位检测 为1有桶。0无桶
///
public uint PailArrive { get; set; }
+ ///
+ /// 设备执行配方数量
+ ///
+ public uint DoRecipeCount { get;set; }
}
}
diff --git a/DosingSystem/Model/par/DeviceParModel.cs b/DosingSystem/Model/par/DeviceParModel.cs
index c2097445..b12a5b63 100644
--- a/DosingSystem/Model/par/DeviceParModel.cs
+++ b/DosingSystem/Model/par/DeviceParModel.cs
@@ -64,7 +64,10 @@ namespace BPASmartClient.DosingSystem
[Newtonsoft.Json.JsonIgnore]
public bool IsRedundant { get { return _mIsRedundant; } set { _mIsRedundant = value; OnPropertyChanged(); } }
private bool _mIsRedundant;
-
-
+ ///
+ /// 2023.10.10添加字段
+ ///
+ public ushort SendSp { get { return _sendSp; } set { _sendSp = value; OnPropertyChanged(); } }
+ private ushort _sendSp;
}
}
diff --git a/DosingSystem/ViewModel/RecipeControlViewModel.cs b/DosingSystem/ViewModel/RecipeControlViewModel.cs
index 694cfe89..80201a8d 100644
--- a/DosingSystem/ViewModel/RecipeControlViewModel.cs
+++ b/DosingSystem/ViewModel/RecipeControlViewModel.cs
@@ -27,9 +27,9 @@ namespace BPASmartClient.DosingSystem.ViewModel
//StartCommand = new BPARelayCommand