From 57e3bc70cd99752fe278baec0fc1d6a141d124f1 Mon Sep 17 00:00:00 2001
From: pengliangyang <1406009520@qq.com>
Date: Wed, 9 Nov 2022 15:20:55 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BPASmartClient.JXJFoodBigStation/App.xaml.cs | 1 -
.../Model/DeviceCurrentStatus.cs | 7 +-
.../Model/GVL_BigStation.cs | 31 +-
.../Model/HK_PLC/DB_Read.cs | 17 +
.../Model/HK_PLC/DataComm.cs | 41 --
.../Model/HK_PLC/HKDeviceStatus.cs | 2 +-
.../Model/ProcessControl.cs | 54 +--
.../Model/RawMaterial/RecipeData.cs | 2 -
.../Model/Siemens/DL_DataColl_DB.cs | 63 ++-
.../Model/Siemens/DL_Start_DB.cs | 23 +-
.../Model/Siemens/SiemensCommAddress.cs | 375 +--------------
.../Model/Siemens/SiemensDeviceStatus.cs | 33 +-
.../Model/TestData.cs | 110 +----
.../View/RecipeSendDownView.xaml | 8 -
.../View/SiemensRecipeSendDownView.xaml | 445 +++---------------
.../View/SiemensRecipeSendDownView.xaml.cs | 25 -
.../ViewModel/DeviceManageViewModel.cs | 2 +-
.../ViewModel/HardwareStatusViewModel.cs | 17 +-
.../ViewModel/RecipeSendDownViewModel.cs | 15 +-
.../SiemensRecipeSendDownViewModel.cs | 32 +-
.../Model/ProcessControl.cs | 2 +-
.../Model/Siemens/SiemensDeviceStatus.cs | 6 +-
BPASmartClient.MorkTSingle/Control_MORKJC.cs | 28 +-
BPASmartClient.MorkTSingle/GVL_MORKJC.cs | 4 +
BPASmartClient.S7Net/SiemensHelper.cs | 17 +-
BPASmartClient/App.config | 8 +-
DosingSystem/App.config | 6 +
DosingSystem/App.xaml.cs | 6 -
.../BPASmartClient.DosingSystem.csproj | 7 +-
DosingSystem/Model/DeviceInquire.cs | 9 +-
DosingSystem/Model/StockStatusModel.cs | 4 +
DosingSystem/Model/par/BasePar.cs | 2 +-
DosingSystem/Model/par/DevicePar.cs | 1 -
DosingSystem/Service/SiemensDevice.cs | 19 +-
DosingSystem/View/NewRecipeView.xaml.cs | 2 +-
.../ViewModel/ChangeDeviceNameViewModel.cs | 1 -
.../ViewModel/ConveyerBeltManualViewModel.cs | 1 -
DosingSystem/ViewModel/NewRecipeViewModel.cs | 7 +-
.../ViewModel/RecipeControlViewModel.cs | 292 ++++++++++--
.../ViewModel/RecipeSettingsViewModel.cs | 13 +-
.../ViewModel/StockControViewModel.cs | 1 -
DosingSystem/tsconfig1.json | 13 +
42 files changed, 639 insertions(+), 1113 deletions(-)
delete mode 100644 BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DataComm.cs
create mode 100644 DosingSystem/App.config
create mode 100644 DosingSystem/tsconfig1.json
diff --git a/BPASmartClient.JXJFoodBigStation/App.xaml.cs b/BPASmartClient.JXJFoodBigStation/App.xaml.cs
index 385985dc..6c30552b 100644
--- a/BPASmartClient.JXJFoodBigStation/App.xaml.cs
+++ b/BPASmartClient.JXJFoodBigStation/App.xaml.cs
@@ -29,7 +29,6 @@ namespace BPASmartClient.JXJFoodBigStation
DataInit();
ProcessControl.GetInstance.Init();
MainView mv = new MainView();
- //mv.Show();
LoginView lv = new LoginView();
var res = lv.ShowDialog();
if (res != null && res == true)
diff --git a/BPASmartClient.JXJFoodBigStation/Model/DeviceCurrentStatus.cs b/BPASmartClient.JXJFoodBigStation/Model/DeviceCurrentStatus.cs
index 1b1be6ac..1a79f8d4 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/DeviceCurrentStatus.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/DeviceCurrentStatus.cs
@@ -13,7 +13,9 @@ namespace BPASmartClient.JXJFoodBigStation.Model
public double Weight { get { return _mWeight; } set { _mWeight = value; OnPropertyChanged(); } }
private double _mWeight;
-
+ ///
+ /// 运行状态
+ ///
public bool RunStatus { get { return _mRunStatus; } set { _mRunStatus = value; OnPropertyChanged(); } }
private bool _mRunStatus;
@@ -21,6 +23,9 @@ namespace BPASmartClient.JXJFoodBigStation.Model
public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } }
private string _mDeviceName;
+ ///
+ /// 设备编号
+ ///
public int DeviceNum { get { return _mDeviceNum; } set { _mDeviceNum = value; OnPropertyChanged(); } }
private int _mDeviceNum;
diff --git a/BPASmartClient.JXJFoodBigStation/Model/GVL_BigStation.cs b/BPASmartClient.JXJFoodBigStation/Model/GVL_BigStation.cs
index 6b1edda7..902b256c 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/GVL_BigStation.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/GVL_BigStation.cs
@@ -16,37 +16,30 @@ namespace BPASmartClient.JXJFoodBigStation.Model
///
public static bool HeartBeatFromPlc { get; set; }
///
- /// 往输送带下发配方完成
- ///
- public bool IssueRecipeFinish { get; set; } = false;
- ///
- /// 当前料仓的位置
- ///
- public int StockInIsWork { get; set; } = 0;
- ///
- /// 单个配方执行完成标志
+ /// 配方下发状态 =0:配方未下发 ,1:配方下发给plc ,2:plc成功接收配方
///
- public bool RecipeFinish { get; set; } = false;
+ public static int Recipe1DosingStatus { get; set; }
///
- /// 记录AGV进站送货的指令顺序
+ /// 配方下发状态 =0:配方未下发 ,1:配方下发给plc ,2:plc成功接收配方
///
- public int AgvDeliveryPosition { get; set; }
+ public static int Recipe2DosingStatus { get; set; }
///
- /// 记录AGV进站取货的指令顺序
+ /// 配方下发状态 =0:配方未下发 ,1:配方下发给plc ,2:plc成功接收配方
///
- public int AgvPickUpPosition { get; set; }
-
+ public static int Recipe3DosingStatus { get; set; }
///
/// 配方下发状态 =0:配方未下发 ,1:配方下发给plc ,2:plc成功接收配方
///
- public static int Recipe1DosingStatus { get; set; }
- public static int Recipe2DosingStatus { get; set; }
- public static int Recipe3DosingStatus { get; set; }
public static int Recipe4DosingStatus { get; set; }
-
///
/// 是否处于手动下发配方
///
public static bool IsUseLocalRecipe { get; set; } = false;
+ ///
+ /// 订单请求
+ ///
+ public static bool Order_Request { get; set; } = false;
+
+ public const int StockBinNum = 12;
}
}
diff --git a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DB_Read.cs b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DB_Read.cs
index 57c738b1..a0138be2 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DB_Read.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DB_Read.cs
@@ -8,20 +8,37 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
{
public class DB_Read
{
+ ///
+ /// plc心跳上报
+ ///
public bool HeartBeat { get; set; }
+ ///
+ /// 配方1允许下发配方
+ ///
public bool IsAllowIssueRecipe1 { get; set; }
public bool IsAllowIssueRecipe2 { get; set; }
public bool IsAllowIssueRecipe3 { get; set; }
public bool IsAllowIssueRecipe4 { get; set; }
+
+ ///
+ /// 配方1 接收配方完成
+ ///
public bool ReceiveFinishRecipe1 { get; set; }
public bool ReceiveFinishRecipe2 { get; set; }
public bool ReceiveFinishRecipe3 { get; set; }
public bool ReceiveFinishRecipe4 { get; set; }
+ ///
+ /// 配方1 配料完成
+ ///
public bool Recipe1DosingFinish { get; set; }
public bool Recipe2DosingFinish { get; set; }
public bool Recipe3DosingFinish { get; set; }
public bool Recipe4DosingFinish { get; set; }
+
+ ///
+ /// 配方1 托盘编号
+ ///
public short Recipe1TrayCode { get; set; }
public short Recipe2TrayCode { get; set; }
public short Recipe3TrayCode { get; set; }
diff --git a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DataComm.cs b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DataComm.cs
deleted file mode 100644
index df85bc0c..00000000
--- a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/DataComm.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using BPASmartClient.Helper;
-using BPASmartClient.Modbus;
-using System;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
-{
- public class DataComm
- {
- public volatile static DataComm Instance;
- public static DataComm GetInstance => Instance ?? (new DataComm());
- public DataComm() { }
- ///
- /// 是否允许配料
- ///
- public bool IsAllowDosing { get { return _mIsAllowDosing; } set { _mIsAllowDosing = value; } }
- private bool _mIsAllowDosing;
-
- public bool DosingFinishToPLC { get { return _mDosingFinishToPLC; } set { _mDosingFinishToPLC = value; } }
- private bool _mDosingFinishToPLC;
-
- private int _mStockBinLocationToPLC;
- public int StockBinLocationToPLC { get { return _mStockBinLocationToPLC; } set { _mStockBinLocationToPLC = value; } }
-
- public bool StatusSignToBPA { get { return _mStatusSignToBPA; } set { _mStatusSignToBPA = value; } }
- private bool _mStatusSignToBPA;
-
- private int _mStockBinLocationToBPA;
- public int StockBinLocationToBPA { get { return _mStockBinLocationToBPA; } set { _mStockBinLocationToBPA = value; } }
-
- private int _mBarrelNumToPLC;
- public int BarrelNumToPLC { get { return _mBarrelNumToPLC; } set { _mBarrelNumToPLC = value; } }
-
- /*public ConcurrentDictionary DeviceLists = new ConcurrentDictionary();*/
- }
-
-}
diff --git a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
index 38cd6123..c056e608 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
@@ -52,7 +52,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
PlcWrite.TrayCode = Convert.ToInt16(recipe.TrayCode);
for (int barrel = 1; barrel < 6; barrel++)
{
- if (barrel != 3)
+ if (barrel != 3)//桶的编号不为3 只为1,2,4,5号桶
{
for (int loc = 1; loc < 15; loc++)
{
diff --git a/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs b/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
index 58d0629c..d312f5e9 100644
--- a/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
+++ b/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
@@ -20,12 +20,9 @@ namespace BPASmartClient.JXJFoodBigStation.Model
private volatile static ProcessControl _Instance;
public static ProcessControl GetInstance => _Instance ?? (_Instance = new ProcessControl());
private ProcessControl() { }
-
-
public SiemensDeviceStatus SiemensDevice = new SiemensDeviceStatus();
public HKDeviceStatus HKDevice = new HKDeviceStatus();
DL_Finish_DB FinishData = new DL_Finish_DB();
-
///
/// 配方数据
///
@@ -45,24 +42,21 @@ namespace BPASmartClient.JXJFoodBigStation.Model
public ConcurrentQueue RecipeQueue2 = new ConcurrentQueue();
public ConcurrentQueue RecipeQueue3 = new ConcurrentQueue();
public ConcurrentQueue RecipeQueue4 = new ConcurrentQueue();
- ///
- /// 接收原料数据
- ///
- public RecipeRawMaterial RawMaterial;
public void Init()
{
+ testData();
ActionManage.GetInstance.CancelRegister("SiemensSendRecipe");
ActionManage.GetInstance.Register(new Action