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((res) => { ObservableCollection RawMaterials = new ObservableCollection(); @@ -87,7 +71,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model RawMaterialBarrelNum = recipe.Material[i].Material_BarrelNum, RawMaterialWeight = recipe.Material[i].Material_Weight, RawMaterialLocation = (int)RawMaterialsNamePos[recipe.Material[i].Material_Name] - }); + }); } else { @@ -99,7 +83,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model RecipeName = recipe.RecipeName, RecipeCode = recipe.RecipeCode, RawMaterial = RawMaterials, - TrayCode = recipe.TrayCode + //TrayCode = recipe.Order_No, }); } } @@ -108,7 +92,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model string Siemens_PLC_IP = ConfigurationManager.AppSettings["Siemens_IP"]; try { - HKDevice.HK_PLC_S7.Connect(S7.Net.CpuType.S71500, HK_PLC_IP); + //HKDevice.HK_PLC_S7.Connect(S7.Net.CpuType.S71500, HK_PLC_IP); //SiemensDevice.Siemens_PLC_S7.Connect(S7.Net.CpuType.S71500, Siemens_PLC_IP); if (HKDevice.IsConnected) { @@ -138,136 +122,16 @@ namespace BPASmartClient.JXJFoodBigStation.Model item.RawMaterialLocation = Convert.ToInt32(item.RawMaterialName); } } - + MessageNotify.GetInstance.ShowAlarmLog("海科plc连接失败"); } }), "ManualSendRecipe", true); RecipeQueue1.Clear(); - - - //Json.Data.Recipes = TestData.GetInstance.Recipes;//添加测试数据 ThreadManage.GetInstance().StartLong(new Action(() => { - //ReadPLCDeviceInfo(); ReceviceData(); RecipeInfoToHKPLC(); Thread.Sleep(10); }), "流程处理", true); - ThreadManage.GetInstance().StartLong(new Action(() => - { - if (HKDevice.IsConnected && SiemensDevice.IsConnected) - { - AgvGetInOut(); - } - Thread.Sleep(10); - }), "AGV进站送取货", true); - ThreadManage.GetInstance().StartLong(new Action(() => - { - ReadSiemensCommData(); - ReadHKPLCCommData(); - Thread.Sleep(10); - }), "读取西门子和海科PLC的数据", true); - } - /// - /// AGV送货 - /// - /// - private void AGV_Delivery(int bitNum) - { - if ((ReadSiemens("M4002." + bitNum) is bool) && BigStation.AgvDeliveryPosition == 0) - { - BigStation.AgvDeliveryPosition = 1; - WriteHKPLC("M4002." + bitNum, true); - WriteSiemens("M4002." + bitNum, false); - } - else if (ReadHK("M5002." + bitNum) is bool && BigStation.AgvDeliveryPosition == 1) - { - BigStation.AgvDeliveryPosition = 2; - WriteSiemens("M5002." + bitNum, true); - WriteHKPLC("M5002." + bitNum, false); - } - else if (ReadSiemens("M4004." + bitNum) is bool && BigStation.AgvDeliveryPosition == 2) - { - BigStation.AgvDeliveryPosition = 3; - WriteHKPLC("M4004." + bitNum, true); - WriteSiemens("M4004." + bitNum, false); - } - else if (ReadHK("M5004." + bitNum) is bool && BigStation.AgvDeliveryPosition == 3) - { - BigStation.AgvDeliveryPosition = 4; - WriteSiemens("M5004." + bitNum, true); - WriteHKPLC("M5004." + bitNum, false); - } - else if (ReadSiemens("M4005." + bitNum) is bool && BigStation.AgvDeliveryPosition == 4) - { - BigStation.AgvDeliveryPosition = 5; - WriteHKPLC("M4005." + bitNum, true); - WriteSiemens("M4005." + bitNum, false); - } - else if (ReadHK("M5005." + bitNum) is bool && BigStation.AgvDeliveryPosition == 5) - { - WriteSiemens("M5005." + bitNum, true); - WriteHKPLC("M5005." + bitNum, false); - } - } - /// - /// AGV取货 - /// - /// - private void AGV_Pick(int bitNum) - { - if (ReadSiemens("M4003" + bitNum) is bool && BigStation.AgvPickUpPosition == 0) - { - BigStation.AgvPickUpPosition = 1; - WriteHKPLC("M4003." + bitNum, true); - WriteSiemens("M4003." + bitNum, false); - } - if (ReadHK("M5003" + bitNum) is bool && BigStation.AgvPickUpPosition == 1) - { - BigStation.AgvPickUpPosition = 2; - WriteSiemens("M5003" + bitNum, true); - WriteHKPLC("M5003" + bitNum, false); - } - if (ReadSiemens("M4006." + bitNum) is bool && BigStation.AgvPickUpPosition == 2) - { - BigStation.AgvPickUpPosition = 3; - WriteHKPLC("M4006." + bitNum, true); - WriteSiemens("M4006." + bitNum, false); - } - if (ReadHK("M5006." + bitNum) is bool && BigStation.AgvPickUpPosition == 3) - { - WriteSiemens("M5006." + bitNum, true); - WriteHKPLC("M5006." + bitNum, false); - } - } - /// - /// AGV进站送货 - /// - private void AgvGetInOut() - { - //获取工位上是否有小车 - SiemensDevice.Siemens_PLC_S7.Write(SiemensCommAddress.StationIsExistCar, (bool) - HKDevice.HK_PLC_S7.Read("M4007.0")); - //检测AGV到站信号 - if (AGVToWorkStationQueue.Count > 0) - { - int index = Array.FindIndex(RemoteRecipes.ToArray(), p => p.RecipeCode == AGVToWorkStationQueue.ElementAt(0)); - int TrayLocation = RemoteRecipes.ElementAt(index).TrayCode;//根据配方编号,找到托盘的ID 托盘ID1-6 - string RecipeCode = (string)RemoteRecipes.ElementAt(index).RecipeCode; - if (TrayLocation > 0 && TrayLocation < 7) - { - AGV_Delivery(TrayLocation - 1); - if (BigStation.AgvDeliveryPosition == 5) - { - BigStation.AgvDeliveryPosition = 0; - } - AGV_Pick(TrayLocation - 1); - if (BigStation.AgvPickUpPosition == 3) - { - BigStation.AgvPickUpPosition = 0; - AGVToWorkStationQueue.TryDequeue(out RecipeCode); - } - } - } } private void ReceviceData() { @@ -318,6 +182,10 @@ namespace BPASmartClient.JXJFoodBigStation.Model RecipeQueue4.Clear(); RecipeQueue5.Clear(); BigStation.Recipe1DosingStatus = 0; + BigStation.Recipe2DosingStatus = 0; + BigStation.Recipe3DosingStatus = 0; + BigStation.Recipe4DosingStatus = 0; + BigStation.Recipe5DosingStatus = 0; } } private void RecipeInfoToHKPLC() @@ -333,23 +201,20 @@ namespace BPASmartClient.JXJFoodBigStation.Model { HKDevice.StockBinPar(RemoteRecipes.ElementAt(index)); HKDevice.PlcWrite.Recipe1IssuedFinish = true; - //HKDevice.HK_PLC_S7.Write("DB98.DBX0.1", false);//复位允许下发配方1信号 BigStation.Recipe1DosingStatus = 1; - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}下发完成"); + MessageNotify.GetInstance.ShowRunLog($"配方编号:{code},托盘编号:{trayCode},下发完成"); } if (HKDevice.PlcRead.ReceiveFinishRecipe1 && BigStation.Recipe1DosingStatus == 1) { BigStation.Recipe1DosingStatus = 2; HKDevice.PlcWrite.Recipe1IssuedFinish = false; - HKDevice.PlcWrite.RecipeCode = 0; - HKDevice.PlcWrite.TrayCode = 0; - WeightReset(); - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}配方配料"); + StockBinParReset(); + MessageNotify.GetInstance.ShowRunLog($"配方编号:{code},托盘编号:{trayCode},PLC接收配方完成"); } if (BigStation.Recipe1DosingStatus == 2 && HKDevice.PlcRead.Recipe1DosingFinish) { BigStation.Recipe1DosingStatus = 3; - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}配料完成"); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}配料完成"); if (HKDevice.PlcRead.Recipe1TrayCode == 1) { foreach (var item in RemoteRecipes.ElementAt(index).RawMaterial) @@ -425,7 +290,6 @@ namespace BPASmartClient.JXJFoodBigStation.Model { SiemensDevice.Siemens_PLC_S7.WriteClass(FinishData, 3); } - //HKDevice.HK_PLC_S7.Write("DB98.DBX1.1",false); RecipeQueue1.TryDequeue(out code); IssuedComplete.Add(RemoteRecipes.ElementAt(index));//将该配方添加到下 if (!BigStation.IsAllowManual) @@ -453,21 +317,19 @@ namespace BPASmartClient.JXJFoodBigStation.Model HKDevice.StockBinPar(RemoteRecipes.ElementAt(index)); HKDevice.PlcWrite.Recipe2IssuedFinish = true; BigStation.Recipe2DosingStatus = 1; - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}下发完成"); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}下发完成"); } if (HKDevice.PlcRead.ReceiveFinishRecipe2 && BigStation.Recipe2DosingStatus == 1) { BigStation.Recipe2DosingStatus = 2; HKDevice.PlcWrite.Recipe2IssuedFinish = false; - HKDevice.PlcWrite.RecipeCode = 0; - HKDevice.PlcWrite.TrayCode = 0; - WeightReset(); - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}配方配料"); + StockBinParReset(); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}配方配料"); } if (BigStation.Recipe2DosingStatus == 2 && HKDevice.PlcRead.Recipe2DosingFinish) { BigStation.Recipe2DosingStatus = 3; - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}配料完成"); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}配料完成"); if (HKDevice.PlcRead.Recipe2TrayCode > 0) { foreach (var item in RemoteRecipes.ElementAt(index).RawMaterial) @@ -529,7 +391,6 @@ namespace BPASmartClient.JXJFoodBigStation.Model item.Laying_Off_Weight = HKDevice.PlcRead.StockBin14ActualWeight; } } - FinishData.Order_No = RemoteRecipes.ElementAt(index).RecipeCode; FinishData.Product_Code = RemoteRecipes.ElementAt(index).RecipeName; for (int i = 0; i < RemoteRecipes.ElementAt(index).RawMaterial.Count; i++) @@ -539,11 +400,11 @@ namespace BPASmartClient.JXJFoodBigStation.Model FinishData.Material[i].Material_BarrelNum = (short)RemoteRecipes.ElementAt(index).RawMaterial.ElementAt(i).RawMaterialBarrelNum; FinishData.Material[i].Material_Laying_Off_Weight = RemoteRecipes.ElementAt(index).RawMaterial.ElementAt(i).Laying_Off_Weight; } - } if (SiemensDevice.IsConnected) { SiemensDevice.Siemens_PLC_S7.WriteClass(FinishData, 3); + MessageNotify.GetInstance.ShowRunLog($"配方配料完成,将信号反馈给西门子"); } RecipeQueue2.TryDequeue(out code); IssuedComplete.Add(RemoteRecipes.ElementAt(index));//将该配方添加到下 @@ -556,7 +417,6 @@ namespace BPASmartClient.JXJFoodBigStation.Model Json.Data.Recipes.RemoveAt(index);//制作完成,移除当前配方 } BigStation.Recipe2DosingStatus = 0; - } } } @@ -572,20 +432,18 @@ namespace BPASmartClient.JXJFoodBigStation.Model HKDevice.StockBinPar(RemoteRecipes.ElementAt(index)); HKDevice.PlcWrite.Recipe3IssuedFinish = true; BigStation.Recipe3DosingStatus = 1; - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}下发完成"); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}下发完成"); } if (HKDevice.PlcRead.ReceiveFinishRecipe3 && BigStation.Recipe3DosingStatus == 1) { BigStation.Recipe3DosingStatus = 2; - HKDevice.PlcWrite.RecipeCode = 0; - HKDevice.PlcWrite.TrayCode = 0; - WeightReset(); - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}配方配料"); + StockBinParReset(); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}配方配料"); } if (HKDevice.PlcRead.Recipe3DosingFinish && BigStation.Recipe3DosingStatus == 2) { BigStation.Recipe3DosingStatus = 3; - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}配料完成"); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}配料完成"); if (HKDevice.PlcRead.Recipe3TrayCode > 0) { foreach (var item in RemoteRecipes.ElementAt(index).RawMaterial) @@ -691,21 +549,19 @@ namespace BPASmartClient.JXJFoodBigStation.Model HKDevice.StockBinPar(RemoteRecipes.ElementAt(index)); HKDevice.PlcWrite.Recipe4IssuedFinish = true; BigStation.Recipe4DosingStatus = 1; - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}下发完成"); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}下发完成"); } if (HKDevice.PlcRead.ReceiveFinishRecipe4 && BigStation.Recipe4DosingStatus == 1) { BigStation.Recipe4DosingStatus = 2; HKDevice.PlcWrite.Recipe4IssuedFinish = false; - HKDevice.PlcWrite.RecipeCode = 0; - HKDevice.PlcWrite.TrayCode = 0; - WeightReset(); - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}配方配料"); + StockBinParReset(); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}配方配料"); } if (BigStation.Recipe4DosingStatus == 2 && HKDevice.PlcRead.Recipe4DosingFinish) { BigStation.Recipe4DosingStatus = 3; - MessageLog.GetInstance.ShowRunLog($"配方状态:{code}配料完成"); + MessageNotify.GetInstance.ShowRunLog($"配方状态:{code}配料完成"); if (HKDevice.PlcRead.Recipe4TrayCode > 0) { foreach (var item in RemoteRecipes.ElementAt(index).RawMaterial) @@ -799,128 +655,15 @@ namespace BPASmartClient.JXJFoodBigStation.Model } } } - public ConcurrentDictionary ReadHKPLCData = new ConcurrentDictionary(); - public ConcurrentDictionary ReadSiemensData = new ConcurrentDictionary(); - - - private void ReadSiemensCommData() - { - if (SiemensDevice.IsConnected) - { - GetSiemensStatus("", new Action((obj) => - { - if (obj is bool[] bools && bools.Length > 0) - { - - } - })); - } - } - private void ReadHKPLCCommData() - { - if (HKDevice.IsConnected) - { - GetHKStatus("", new Action((obj) => - { - if (obj is bool[] bools && bools.Length > 0) - { - - } - })); - } - } - private void GetHKStatus(string key, Action action) - { - if (ReadHKPLCData.ContainsKey(key)) - { - if (ReadHKPLCData[key] != null) - { - action?.Invoke(ReadHKPLCData[key]); - } - } - } - private void GetSiemensStatus(string key, Action action) - { - - if (ReadSiemensData.ContainsKey(key)) - { - if (ReadSiemensData[key] != null) - { - action?.Invoke(ReadSiemensData[key]); - } - } - } - private void WriteSiemens(string Address, object Value) - { - if (SiemensDevice.IsConnected) - { - SiemensDevice.Siemens_PLC_S7.Write(Address, Value); - } - } - private void WriteHKPLC(string Address, object Value) - { - HKDevice.HK_PLC_S7.Write(Address, Value); - } - private object ReadSiemens(string Address) - { - if (SiemensDevice.IsConnected) - { - return SiemensDevice.Siemens_PLC_S7.Read(Address); - } - else - { - return null; - } - } - private bool[] ReadBoolsSiemens(int address, int count) - { - if (SiemensDevice.IsConnected) - { - return SiemensDevice.Siemens_PLC_S7.ReadBools(address, count); - } - else - { - return null; - } - } - private object ReadHK(string Address) - { - if (HKDevice.IsConnected) - { - return HKDevice.HK_PLC_S7.Read(Address); - } - else - { - return null; - } - } - private bool[] ReadBoolsHK(int address, int count) - { - if (HKDevice.IsConnected) - { - return HKDevice.HK_PLC_S7.ReadBools(address, count); - } - else - { - return null; - } - } /// - /// 获取料仓的原料名称和原料位置 + /// 下发配方的数据复位 /// - private void ReadPLCDeviceInfo() - { - /*for (int i = 0; i < 12; i++) - { - string RawMaterialName = HKDevice.HK_PLC_S7.Read(""); - short RawMaterialLocation = HKDevice.HK_PLC_S7.Read(""); - if (RawMaterialsNamePos.ContainsKey(RawMaterialName)) - RawMaterialsNamePos.Add(RawMaterialName, RawMaterialLocation); - }*/ - - } - private void WeightReset() + private void StockBinParReset() { + + HKDevice.PlcWrite.RecipeCode = 0; + HKDevice.PlcWrite.TrayCode = 0; + HKDevice.PlcWrite.Bareel1Bin1SetWeight = 0; HKDevice.PlcWrite.Bareel1Bin2SetWeight = 0; HKDevice.PlcWrite.Bareel1Bin3SetWeight = 0; @@ -982,5 +725,82 @@ namespace BPASmartClient.JXJFoodBigStation.Model HKDevice.PlcWrite.Bareel5Bin13SetWeight = 0; HKDevice.PlcWrite.Bareel5Bin14SetWeight = 0; } + private void testData() + { + RawMaterialsNamePos.Clear(); + if (!HKDevice.IsConnected) + { + HKDevice.StockBinName.RawMaterialName1 = "1"; + HKDevice.StockBinName.RawMaterialName2 = "2"; + HKDevice.StockBinName.RawMaterialName3 = "3"; + HKDevice.StockBinName.RawMaterialName4 = "4"; + HKDevice.StockBinName.RawMaterialName5 = "5"; + HKDevice.StockBinName.RawMaterialName6 = "6"; + HKDevice.StockBinName.RawMaterialName7 = "7"; + HKDevice.StockBinName.RawMaterialName8 = "8"; + HKDevice.StockBinName.RawMaterialName9 = "9"; + HKDevice.StockBinName.RawMaterialName10 = "10"; + HKDevice.StockBinName.RawMaterialName11 = "11"; + HKDevice.StockBinName.RawMaterialName12 = "12"; + HKDevice.StockBinName.RawMaterialName13 = "13"; + HKDevice.StockBinName.RawMaterialName14 = "14"; + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName1)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName1, 1); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName2)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName2, 2); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName3)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName3, 3); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName4)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName4, 4); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName5)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName5, 5); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName6)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName6, 6); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName7)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName7, 7); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName8)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName8, 8); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName9)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName9, 9); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName10)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName10, 10); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName11)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName11, 11); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName12)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName12, 12); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName13)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName13, 13); + } + if (!RawMaterialsNamePos.ContainsKey(HKDevice.StockBinName.RawMaterialName14)) + { + RawMaterialsNamePos.Add(HKDevice.StockBinName.RawMaterialName14, 14); + } + } } } diff --git a/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_DataColl_DB.cs b/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_DataColl_DB.cs new file mode 100644 index 00000000..f7279b1a --- /dev/null +++ b/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_DataColl_DB.cs @@ -0,0 +1,39 @@ +using BPASmartClient.S7Net; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.JXJFoodBigStation.Model.Siemens +{ + public class DL_DataColl_DB + { + [Siemens(16)] + public string RecipeCode { get; set; } + [Siemens(16)] + public string RecipeName { get; set; } + public bool var1 { get; set; } + public bool var2 { get; set; } + + public bool var3 { get; set; } + + public bool var4 { get; set; } + + public bool var5 { get; set; } + + public bool var6 { get; set; } + + public bool var7 { get; set; } + + public bool var8 { get; set; } + + public bool var9 { get; set; } + public short Mode { get; set; } + + public bool[] Alarm { get; set; } = new bool[24]; + public int Reserved1 { get; set; } + public int Reserved2 { get; set; } + + } +} diff --git a/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Finish_DB.cs b/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Finish_DB.cs index 4394ac10..80e91369 100644 --- a/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Finish_DB.cs +++ b/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Finish_DB.cs @@ -1,4 +1,5 @@ -using System; +using BPASmartClient.S7Net; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,32 +9,42 @@ namespace BPASmartClient.JXJFoodBigStation.Model.Siemens { internal class DL_Finish_DB { + + /// + /// 配料完成信号确认 + /// + public bool Ask_For_Finish_PLC { get; set; } + + public short[] StandbyFinish { get; set; } = new short[4]; + [Siemens(16)] /// /// 生产工单编码 /// - public string Order_No; + public string Order_No{get; set; } + [Siemens(16)] /// /// 产品名称 /// - public string Product_Code; + public string Product_Code { get; set; } + public short job_No { get; set; } /// /// 原料信息 /// - public UDT1[] Material = new UDT1[20]; + public UDT1[] Material { get; set; } = new UDT1[20]; + public short ProcessTime { get; set; } /// /// 配料完成信号 /// - public bool Ask_For_Finish; - /// - /// 配料完成信号确认 - /// - public bool Ask_For_Finish_PLC; + public bool Ask_For_Finish { get; set; } + + public short[] StandbyFinish1 { get; set; } = new short[4]; } public class UDT1 { - public string Material_Name; - public float Material_Laying_Off_Weight; - public short Material_BarrelNum; + [Siemens(6)] + public string Material_Name { get; set; } + public float Material_Laying_Off_Weight { get; set; } + public short Material_BarrelNum { get; set; } } } diff --git a/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Start_DB.cs b/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Start_DB.cs index 13066a70..a4a5c592 100644 --- a/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Start_DB.cs +++ b/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Start_DB.cs @@ -1,4 +1,5 @@ -using System; +using BPASmartClient.S7Net; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,44 +9,46 @@ namespace BPASmartClient.JXJFoodBigStation.Model.Siemens { internal class DL_Start_DB { + [Siemens(16)] /// /// 配方编码 /// - public string RecipeCode; + public string RecipeCode { get; set; } + [Siemens(16)] /// /// 配发名称 /// - public string RecipeName; + public string RecipeName { get; set; } + public short Order_No { get; set; } + public short Pallet_No { get; set; } /// /// 物料信息 /// - public UDT[] Material = new UDT[20]; - /// - /// 托盘编号 - /// - public int TrayCode; + public UDT[] Material { get; set; } = new UDT[20]; + public bool Order_Type { get; set; } + public bool Order_Request_Ack { get; set; } + + public short[] Standby { get; set; } = new short[4]; /// /// 配方发送请求 /// - public bool Ask_For_Send_Bit; - /// - /// 上位机确认配方接收完成 - /// - public bool Ack_Ask_For_Send_Bit; + public bool Ask_For_Send_Bit { get; set; } + public short[] Standby1 { get; set; } = new short[4]; } public class UDT { + [Siemens(6)] /// /// 原料名称 /// - public string Material_Name; + public string Material_Name { get; set; } /// /// 原料重量 /// - public float Material_Weight; + public float Material_Weight { get; set; } /// /// 原料桶号 /// - public short Material_BarrelNum; + public short Material_BarrelNum { get; set; } } } diff --git a/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Status_DB.cs b/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Status_DB.cs index 88126d64..efcaf0d1 100644 --- a/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Status_DB.cs +++ b/BPASmartClient.JXJFoodBigStation/Model/Siemens/DL_Status_DB.cs @@ -1,4 +1,5 @@ -using System; +using BPASmartClient.S7Net; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,53 +9,36 @@ namespace BPASmartClient.JXJFoodBigStation.Model.Siemens { internal class DL_Status_DB { - /// - /// 生产工单 - /// - public string RecipeCode; /// /// 配料开始 /// - public bool Dosing_Start; + public bool Dosing_Start { get; set; } /// /// 配料开始确认 /// - public bool Dosing_Confirm; - /// - /// 托盘占位情况 - /// - public bool[] Pallet_Position_Occ = new bool[16]; - /// - /// 工位允许放货架 - /// - public bool[] Allow_AGV_Put = new bool[16]; - /// - /// 工位允许取货架 - /// - public bool[] Allow_AGV_Get = new bool[16]; - /// - /// AGV请求放货架 - /// - public bool[] AGV_Request_Put = new bool[16]; - /// - /// AGV请求取货架 - /// - public bool[] AGV_Request_Get = new bool[16]; - /// - /// AGV放托盘完成 - /// - public bool[] AGV_Put_Done = new bool[16]; - /// - /// 托盘号 - /// - public short[] Pan_No = new short[16]; - /// - /// 配料时间 - /// - public int DosingTime; + public bool Dosing_Confirm { get; set; } + public bool Dosing_Cancel { get; set; } + public bool Dosing_Cancel2 { get; set; } + + public bool Dosing_Cancel3 { get; set; } + + public short a { get; set; } + public short[] Standby { get; set; } = new short[3]; + [Siemens(16)] /// - /// 备用 + /// 生产工单 /// - public byte Reserve; + public string RecipeCode { get; set; } + public bool Dosing_Cancel4 { get; set; } + + public bool Dosing_Cancel5 { get; set; } + + public bool Dosing_Cancel6 { get; set; } + + public bool Dosing_Cancel7 { get; set; } + + public short Dosing_Cancel8 { get; set; } + + public short[] Standby2 { get; set; } = new short[4]; } } diff --git a/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs b/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs index a3361db3..d4969c2e 100644 --- a/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs +++ b/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs @@ -21,21 +21,22 @@ namespace BPASmartClient.JXJFoodBigStation.Model.Siemens { ThreadManage.GetInstance().StartLong(new Action(() => { - var res = this.Siemens_PLC_S7.ReadClass(1); - var res1 = this.Siemens_PLC_S7.ReadClass(2); - var res2 = this.Siemens_PLC_S7.ReadClass(3); - if (res != null && RTrig.GetInstance("RecipeTrig").Start(res.Ask_For_Send_Bit)) + var res = this.Siemens_PLC_S7.ReadClass(2301); + var res1 = this.Siemens_PLC_S7.ReadClass(2331); + var res2 = this.Siemens_PLC_S7.ReadClass(2361); + var res3 = this.Siemens_PLC_S7.ReadClass(2391); + /*if (res != null && RTrig.GetInstance("RecipeTrig").Start(res.Ask_For_Send_Bit)) { ActionManage.GetInstance.Send("SiemensSendRecipe", res); res.Ask_For_Send_Bit = false;//接受配方信号复位 - res.Ack_Ask_For_Send_Bit = true;//配方接受完成 + //res.Ack_Ask_For_Send_Bit = true;//配方接受完成 this.Siemens_PLC_S7.WriteClass(res, 1); } - if (res1 != null && RTrig.GetInstance("Allow_AGV_Put[0]").Start(res1.Allow_AGV_Put[0])) + if (res1 != null && RTrig.GetInstance("Allow_AGV_Put[0]").Start(res1.)) { ActionManage.GetInstance.Send("AGVToStation1Sign", res1); - res1.Allow_AGV_Put[0] = false; + //res1.Allow_AGV_Put[0] = false; this.Siemens_PLC_S7.WriteClass(res1, 2); } if (res1 != null && RTrig.GetInstance("Allow_AGV_Put[1]").Start(res1.Allow_AGV_Put[1])) @@ -68,7 +69,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.Siemens res1.Allow_AGV_Put[5] = false; this.Siemens_PLC_S7.WriteClass(res1, 2); } - +*/ if (res2 != null && res2.Ask_For_Finish_PLC) { ActionManage.GetInstance.Send("配料完成信号确认完成"); diff --git a/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs b/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs index e145bf5b..4404997f 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs @@ -80,7 +80,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model } else { - MessageNotify.GetInstance.AlarmLog("配方名称与本地不符合"); + //MessageNotify.GetInstance.AlarmLog("配方名称与本地不符合"); } } Json.Data.Recipes.Add(new RemoteRecipeData() @@ -112,7 +112,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model try { //HKDevice.HK_PLC_S7.Connect(S7.Net.CpuType.S71200, HK_PLC_IP); - SiemensDevice.Siemens_PLC_S7.Connect(S7.Net.CpuType.S71500, Siemens_PLC_IP); + //SiemensDevice.Siemens_PLC_S7.Connect(S7.Net.CpuType.S71500, Siemens_PLC_IP); //WindSendDevice.Siemens_PLC_S7.Connect(S7.Net.CpuType.S71200,WindSend_PLC_IP); if (HKDevice.IsConnected) { @@ -272,7 +272,6 @@ namespace BPASmartClient.JXJFoodSmallStation.Model break; default: break; - } } else if (o.ToString().Contains("阻挡气缸")) @@ -327,7 +326,6 @@ namespace BPASmartClient.JXJFoodSmallStation.Model break; default: break; - } } else if (o.ToString().Contains("进料桶顶升气缸")) diff --git a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs index 107f2920..031c17eb 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs @@ -24,6 +24,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.Siemens var res = this.Siemens_PLC_S7.ReadClass(2201); var res1 = this.Siemens_PLC_S7.ReadClass(2231); var res2 = this.Siemens_PLC_S7.ReadClass(2261); + var res4 = this.Siemens_PLC_S7.ReadClass(2291); if (res != null && res.Order_Request_ACK == false && GVL_SmallStation.GetInstance.IsAllowSiemensSendRecipe) { res.Order_Request_ACK = true; diff --git a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_DataColl_DB.cs b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_DataColl_DB.cs new file mode 100644 index 00000000..dabd8bde --- /dev/null +++ b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_DataColl_DB.cs @@ -0,0 +1,39 @@ +using BPASmartClient.S7Net; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.JXJFoodSmallStation.Model.Siemens +{ + internal class XL_DataColl_DB + { + [Siemens(16)] + public string RecipeCode { get; set; } + [Siemens(16)] + public string RecipeName { get; set; } + public bool var1 { get; set; } + public bool var2 { get; set; } + + public bool var3 { get; set; } + + public bool var4 { get; set; } + + public bool var5 { get; set; } + + public bool var6 { get; set; } + + public bool var7 { get; set; } + + public bool var8 { get; set; } + + public bool var9 { get; set; } + public short Mode { get; set; } + + public bool[] Alarm { get; set; } = new bool[24]; + public int Reserved1 { get; set; } + public int Reserved2 { get; set; } + + } +} diff --git a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Finish_DB.cs b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Finish_DB.cs index 0e977bde..7fe9e791 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Finish_DB.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Finish_DB.cs @@ -9,33 +9,37 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.Siemens { internal class XL_Finish_DB { - [Siemens(6)] + + /// + /// 配料完成信号确认 + /// + public bool Ask_For_Finish_PLC { get; set; } + public short[] StandbyFinish { get; set; }=new short[4]; + + [Siemens(16)] /// /// 生产工单编码 /// /// 产品名称 /// public string Product_Code { get; set; } public short Job_No { get; set; } - public UDT2[] Powder = new UDT2[10]; + public UDT2[] Powder { get; set; } = new UDT2[10]; /// /// 原料信息 /// - public UDT1[] Material = new UDT1[20]; + public UDT1[] Material { get; set; } = new UDT1[20]; public short DosingTime { get; set; } /// /// 配料完成信号 /// public bool Ask_For_Finish { get; set; } - /// - /// 配料完成信号确认 - /// - public bool Ask_For_Finish_PLC { get; set; } + public short[] StandbyFinish2 { get; set; } = new short[4]; } public class UDT1 { diff --git a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Start_DB.cs b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Start_DB.cs index 5109c0cf..cd7e7ad2 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Start_DB.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Start_DB.cs @@ -23,19 +23,19 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.Siemens public short StockCode { get; set; } public short TrayCode { get; set; } - public UDT2Start[] Powder = new UDT2Start[10]; + public UDT2Start[] Powder { get; set; } = new UDT2Start[10]; /// /// 物料信息 /// - public UDTStart[] Material = new UDTStart[20]; + public UDTStart[] Material { get; set; } = new UDTStart[20]; /// /// plc确认配方接收完成 /// public bool Order_Request_ACK { get; set; } - public short[] Standby = new short[4]; + public short[] Standby { get; set; } = new short[4]; public bool Order_Request { get; set; } - public short[] Standby1 = new short[4]; + public short[] Standby1 { get; set; } = new short[4]; } public class UDTStart diff --git a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Status_DB.cs b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Status_DB.cs index 8e454427..85ec6ebd 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Status_DB.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/XL_Status_DB.cs @@ -7,8 +7,16 @@ using System.Threading.Tasks; namespace BPASmartClient.JXJFoodSmallStation.Model.Siemens { - internal class XL_Status_DB + public class XL_Status_DB { + public bool Dosing_Confirm { get; set; } + public bool Agv1 { get; set; } + public bool Agv2 { get; set; } + public bool Agv3 { get; set; } + public bool Agv4 { get; set; } + public short AgvPos { get; set; } + public short[] Standby { get; set; } = new short[3]; + [Siemens(16)] /// /// 生产工单 @@ -18,23 +26,14 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.Siemens /// 配料开始 /// public bool Dosing_Start { get; set; } - /// - /// 配料开始确认 - /// - public bool Dosing_Confirm; - public bool Agv1 { get; set; } - public bool Agv2 { get; set; } - public bool Agv3 { get; set; } - public bool Agv4 { get; set; } - public short AgvPos { get; set; } - - public UDTStatus[] Powder = new UDTStatus[10]; - - public bool Agv5{ get; set; } + public bool Agv5 { get; set; } public bool Agv6 { get; set; } public bool Agv7 { get; set; } - public int Agv8 { get; set; } + + public UDTStatus[] Powder { get; set; } = new UDTStatus[10]; + public short AgvUse { get; set; } + public short[] StandbyStatus { get; set; } = new short[4]; } public class UDTStatus {