From cef3957d9d8fe5f221eca6a33d342da819a6584f Mon Sep 17 00:00:00 2001
From: pengliangyang <1406009520@qq.com>
Date: Mon, 24 Oct 2022 14:39:44 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=89=E9=A6=99=E5=B1=85=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BPASmartClient.JXJFoodBigStation/App.config | 2 +-
.../Model/HK_PLC/DB_Write.cs | 3 +-
.../Model/HK_PLC/HKDeviceStatus.cs | 12 +-
.../HK_PLC/{Test1.cs => StockBinName.cs} | 2 +-
.../Model/ProcessControl.cs | 396 +++++-------------
.../Model/Siemens/DL_DataColl_DB.cs | 39 ++
.../Model/Siemens/DL_Finish_DB.cs | 35 +-
.../Model/Siemens/DL_Start_DB.cs | 35 +-
.../Model/Siemens/DL_Status_DB.cs | 66 ++-
.../Model/Siemens/SiemensDeviceStatus.cs | 17 +-
.../Model/ProcessControl.cs | 6 +-
.../Model/Siemens/SiemensDeviceStatus.cs | 1 +
.../Model/Siemens/XL_DataColl_DB.cs | 39 ++
.../Model/Siemens/XL_Finish_DB.cs | 20 +-
.../Model/Siemens/XL_Start_DB.cs | 8 +-
.../Model/Siemens/XL_Status_DB.cs | 29 +-
16 files changed, 306 insertions(+), 404 deletions(-)
rename BPASmartClient.JXJFoodBigStation/Model/HK_PLC/{Test1.cs => StockBinName.cs} (97%)
create mode 100644 BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_DataColl_DB.cs
create mode 100644 BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_DataColl_DB.cs
diff --git a/BPASmartClient.JXJFoodBigStation/App.config b/BPASmartClient.JXJFoodBigStation/App.config
index e5c7f162..3559a687 100644
--- a/BPASmartClient.JXJFoodBigStation/App.config
+++ b/BPASmartClient.JXJFoodBigStation/App.config
@@ -2,6 +2,6 @@
-
+
\ No newline at end of file
diff --git a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DB_Write.cs b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DB_Write.cs
index f03a21f0..4edb4386 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DB_Write.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DB_Write.cs
@@ -79,7 +79,6 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
public float Bareel1Bin13SetWeight { get; set; }
public float Bareel1Bin14SetWeight { get; set; }
-
public float Bareel2Bin1SetWeight { get; set; }
public float Bareel2Bin2SetWeight { get; set; }
public float Bareel2Bin3SetWeight { get; set; }
@@ -94,7 +93,6 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
public float Bareel2Bin12SetWeight { get; set; }
public float Bareel2Bin13SetWeight { get; set; }
public float Bareel2Bin14SetWeight { get; set; }
-
public float Bareel4Bin1SetWeight { get; set; }
public float Bareel4Bin2SetWeight { get; set; }
@@ -110,6 +108,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
public float Bareel4Bin12SetWeight { get; set; }
public float Bareel4Bin13SetWeight { get; set; }
public float Bareel4Bin14SetWeight { get; set; }
+
public float Bareel5Bin1SetWeight { get; set; }
public float Bareel5Bin2SetWeight { get; set; }
public float Bareel5Bin3SetWeight { get; set; }
diff --git a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
index 102503c9..38cd6123 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
@@ -17,7 +17,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
public bool IsConnected => HK_PLC_S7.IsConnected;
public DB_Write PlcWrite = new DB_Write();
public DB_Read PlcRead = new DB_Read();
-
+ public StockBinName StockBinName = new StockBinName();
public void Init()
{
if (IsConnected)
@@ -26,11 +26,15 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
{
HK_PLC_S7.WriteClass(PlcWrite, 99);
var res1 = HK_PLC_S7.ReadClass(98);
- var res2 = HK_PLC_S7.ReadClass(97);
+ var res2 = HK_PLC_S7.ReadClass(97);
if (res1 != null && res1 is DB_Read data1)
{
PlcRead = data1;
}
+ if (res2 != null && res2 is StockBinName data2)
+ {
+ StockBinName = data2;
+ }
Thread.Sleep(10);
}),"信号收发处理");
}
@@ -264,7 +268,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
}
else
{
- MessageLog.GetInstance.ShowRunLog($"桶号:{barrel},位置:{loc},重量:{recipe.RawMaterial.ElementAt(index).RawMaterialWeight}");
+ MessageNotify.GetInstance.ShowRunLog($"配方编号:{recipe.RecipeCode},托盘编号:{recipe.TrayCode},桶号:{barrel},位置:{loc},重量:{recipe.RawMaterial.ElementAt(index).RawMaterialWeight}");
switch (barrel)
{
case 1:
@@ -470,7 +474,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
default:
break;
}
- }
+ }
}
}
}
diff --git a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/Test1.cs b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/StockBinName.cs
similarity index 97%
rename from BPASmartClient.JXJFoodBigStation/Model/HK_PLC/Test1.cs
rename to BPASmartClient.JXJFoodBigStation/Model/HK_PLC/StockBinName.cs
index 0a9f0d6c..69529513 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/Test1.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/StockBinName.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
{
- internal class Test1
+ public class StockBinName
{
[Siemens(6)]
public string RawMaterialName1 { get; set; }
diff --git a/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs b/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
index ee3e1e4e..27d7ae01 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
@@ -48,27 +48,11 @@ namespace BPASmartClient.JXJFoodBigStation.Model
public ConcurrentQueue RecipeQueue4 = new ConcurrentQueue();
public ConcurrentQueue RecipeQueue5 = new ConcurrentQueue();
///
- /// AGV到达工站队列
- ///
- public ConcurrentQueue AGVToWorkStationQueue = new ConcurrentQueue();
- ///
/// 接收原料数据
///
public RecipeRawMaterial RawMaterial;
public void Init()
{
- RawMaterialsNamePos.Add("1", 1);
- RawMaterialsNamePos.Add("2", 2);
- RawMaterialsNamePos.Add("3", 3);
- RawMaterialsNamePos.Add("4", 4);
- RawMaterialsNamePos.Add("5", 5);
- RawMaterialsNamePos.Add("6", 6);
- RawMaterialsNamePos.Add("7", 7);
- RawMaterialsNamePos.Add("8", 8);
- RawMaterialsNamePos.Add("9", 9);
- RawMaterialsNamePos.Add("10", 10);
- RawMaterialsNamePos.Add("11", 11);
- RawMaterialsNamePos.Add("12", 12);
ActionManage.GetInstance.Register(new Action