From 32037eada588419215661a6df573b9eac2be696b Mon Sep 17 00:00:00 2001
From: pengliangyang <1406009520@qq.com>
Date: Sat, 6 May 2023 17:13:50 +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
---
.../Model/GVL_SmallStation.cs | 14 +-
.../Model/Par/ConnectParMode.cs | 3 +
.../Model/ProcessControl.cs | 130 ++++++++++++++----
.../Model/WindSend/WindSendDeviceStatus.cs | 6 +
.../Model/WindSend/WindSendRawMaterial.cs | 13 ++
.../Model/WindSend/WindSend_Read.cs | 37 ++++-
.../Model/WindSend/WindSend_Write.cs | 20 ++-
.../View/ManualFlowView.xaml | 20 ++-
.../View/RecipeInfosView.xaml | 16 +++
.../View/SystemParView.xaml | 10 ++
.../ViewModel/ManualFlowViewModel.cs | 14 +-
.../ViewModel/NewLocalRecipeViewModel.cs | 8 +-
.../ViewModel/RecipeInfosViewModel.cs | 4 +
.../ViewModel/SystemParViewModel.cs | 8 +-
14 files changed, 260 insertions(+), 43 deletions(-)
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs b/BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs
index dba1e0b7..47d8ffe4 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs
@@ -1,6 +1,7 @@
using BPASmartClient.JXJFoodSmallStation.Model.GVL;
using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC;
using BPASmartClient.JXJFoodSmallStation.Model.Siemens;
+using BPASmartClient.JXJFoodSmallStation.Model.WindSend;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -18,6 +19,11 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
private GVL_SmallStation() { }
public PlcReadAddressDB3 plcReadDataDB3 { get; set; } = new PlcReadAddressDB3();
+
+
+ public WindSend_Write WindSendDB95 { get; set; } = new WindSend_Write();
+
+ public WindSend_Read WindSendDB94 { get; set; } = new WindSend_Read();
///
/// 配料站料仓数目
///
@@ -161,11 +167,17 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
///
public bool HeartBeatToPlc { get; set; } = false;
- [VarComm("Global", "来自plc的心跳")]
+ [VarComm("Global", "屏蔽小料站料仓不足15个报警")]
public bool DisEnableStockAlarm { get; set; } = false;
+ [VarComm("Global", "配方制作完成数量")]
+ ///
+ /// 配方制作完成数量
+ ///
+ public int RecipeDosingCompleNum { get; set; } = 0;
+
[VarComm("Global", "来自plc的心跳")]
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/Par/ConnectParMode.cs b/BPASmartClient.JXJFoodSmallStation/Model/Par/ConnectParMode.cs
index a9d552d9..4c57d660 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/Par/ConnectParMode.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/Par/ConnectParMode.cs
@@ -15,6 +15,9 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.Par
private bool _mWindSendConnect;
public bool HKPlcConnect { get { return _mHKPlcConnect; } set { _mHKPlcConnect = value; OnPropertyChanged(); } }
private bool _mHKPlcConnect;
+ public bool ShieldStockbinAlarm { get { return _mShieldStockbinAlarm; } set { _mShieldStockbinAlarm = value; OnPropertyChanged(); } }
+ private bool _mShieldStockbinAlarm;
+
public short AxisLoadSpeed { get { return _mAxisLoadSpeed; } set { _mAxisLoadSpeed = value; OnPropertyChanged(); } }
private short _mAxisLoadSpeed;
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs b/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
index b3bfa792..0d6f4442 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
@@ -85,6 +85,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
//Json.Data.Recipes = TestData.GetInstance.Recipes;//添加测试数据
ThreadManage.GetInstance().StartLong(new Action(() =>
{
+ GVL_SmallStation.GetInstance.DisEnableStockAlarm = Json.Data.deviceConnectPar.ShieldStockbinAlarm;
if (HKDevice.IsConnected)
{
GVL_SmallStation.GetInstance.HeartBeatToPlc = !GVL_SmallStation.GetInstance.HeartBeatToPlc;
@@ -195,6 +196,59 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
}
}
+ if (WindSendDevice.IsConnected)
+ {
+ foreach (PropertyInfo item in typeof(WindSend_Write).GetProperties())
+ {
+ int index = Array.FindIndex(CommData.ToArray(), p => p.Name == item.Name);
+ if (index >= 0)
+ {
+ if (item.PropertyType.IsArray)
+ {
+ CommData.ElementAt(index).Value = "";
+ Array array = (Array)item.GetValue(GVL_SmallStation.GetInstance.plcReadDataDB3, null);
+ foreach (var values in array)
+ {
+ string data = values.ToString();
+ if (data.ToLower() == "false")
+ data = "0";
+ if (data.ToLower() == "true")
+ data = "1";
+ CommData.ElementAt(index).Value = CommData.ElementAt(index).Value + data + ",";
+ }
+ }
+ else
+ {
+ CommData.ElementAt(index).Value = GVL_SmallStation.GetInstance.WindSendDB95.GetType().GetProperty(item.Name).GetValue(GVL_SmallStation.GetInstance.WindSendDB95, null).ToString();
+ }
+ }
+ }
+ foreach (PropertyInfo item in typeof(WindSend_Read).GetProperties())
+ {
+ int index = Array.FindIndex(CommData.ToArray(), p => p.Name == item.Name);
+ if (index >= 0)
+ {
+ if (item.PropertyType.IsArray)
+ {
+ CommData.ElementAt(index).Value = "";
+ Array array = (Array)item.GetValue(GVL_SmallStation.GetInstance.plcReadDataDB3, null);
+ foreach (var values in array)
+ {
+ string data = values.ToString();
+ if (data.ToLower() == "false")
+ data = "0";
+ if (data.ToLower() == "true")
+ data = "1";
+ CommData.ElementAt(index).Value = CommData.ElementAt(index).Value + data + ",";
+ }
+ }
+ else
+ {
+ CommData.ElementAt(index).Value = GVL_SmallStation.GetInstance.WindSendDB94.GetType().GetProperty(item.Name).GetValue(GVL_SmallStation.GetInstance.WindSendDB94, null).ToString();
+ }
+ }
+ }
+ }
foreach (PropertyInfo item in typeof(GVL_SmallStation).GetProperties())
{
int index = Array.FindIndex(ProcessVar.ToArray(), p => p.Name == item.Name);
@@ -701,60 +755,42 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
{
if (GVL_SmallStation.GetInstance.WindSendDosingStatus == 1)
{
- WindSendReset();
- WindSendData.TargetRecipeCode = code;
- WindSendData.IsAllowDosing = true;
+ WindSend_Write WindSendData111 = new WindSend_Write();
+ WindSendDevice.Siemens_PLC_S7.WriteClass(WindSendData111, 95);
+ Thread.Sleep(200);
+ WindSendData111.TargetRecipeCode = code;
+ WindSendData111.IsAllowDosing = true;
foreach (var item in RemoteRecipes.ElementAt(index).WindSend)
{
if (item.RawMaterialName == Json.Data.windSendRawMaterial.ElementAt(0).RawMaterialName || item.Location == 1)
{
- WindSendData.RawMaterial1_SetWeight = item.RawMaterialWeight;
+ WindSendData111.RawMaterial1_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
- else
- {
- WindSendData.RawMaterial1_SetWeight = 0;
- }
if (item.RawMaterialName == Json.Data.windSendRawMaterial.ElementAt(1).RawMaterialName || item.Location == 2)
{
- WindSendData.RawMaterial2_SetWeight = item.RawMaterialWeight;
+ WindSendData111.RawMaterial2_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
- else
- {
- WindSendData.RawMaterial2_SetWeight = 0;
- }
if (item.RawMaterialName == Json.Data.windSendRawMaterial.ElementAt(2).RawMaterialName || item.Location == 3)
{
- WindSendData.RawMaterial3_SetWeight = item.RawMaterialWeight;
+ WindSendData111.RawMaterial3_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
- else
- {
- WindSendData.RawMaterial3_SetWeight = 0;
- }
if (item.RawMaterialName == Json.Data.windSendRawMaterial.ElementAt(3).RawMaterialName || item.Location == 4)
{
- WindSendData.RawMaterial4_SetWeight = item.RawMaterialWeight;
+ WindSendData111.RawMaterial4_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
- else
- {
- WindSendData.RawMaterial4_SetWeight = 0;
- }
if (item.RawMaterialName == Json.Data.windSendRawMaterial.ElementAt(4).RawMaterialName || item.Location == 5)
{
- WindSendData.RawMaterial5_SetWeight = item.RawMaterialWeight;
+ WindSendData111.RawMaterial5_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
- else
- {
- WindSendData.RawMaterial5_SetWeight = 0;
- }
}
GVL_SmallStation.GetInstance.WindSendDosing = true;
GVL_SmallStation.GetInstance.WindSendDosingStatus = 2;
- WindSendDevice.Siemens_PLC_S7.WriteClass(WindSendData, 95);
+ WindSendDevice.Siemens_PLC_S7.WriteClass(WindSendData111, 95);
}
}
else
@@ -891,6 +927,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
bool DosingComple = HKDevice.HK_PLC_S7.Read("DB3.DBX6." + recipeNum);
if ((RTrig.GetInstance("配方配料完成").Start(DosingComple)) || (GVL_SmallStation.GetInstance.StockBinDosingIssue[recipeNum] > 0 && DosingComple))
{
+ GVL_SmallStation.GetInstance.RecipeDosingCompleNum = GVL_SmallStation.GetInstance.RecipeDosingCompleNum + 1;
GVL_SmallStation.GetInstance.StockBinDosingIssue[recipeNum] = 0;
if (GVL_SmallStation.GetInstance.RecipeStockBinDosing[recipeNum] > 0)
{
@@ -1008,6 +1045,40 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
}
+ foreach (PropertyInfo item in typeof(WindSend_Read).GetProperties())
+ {
+ if (Attribute.IsDefined(item, typeof(VarCommAttribute)))
+ {
+ string type = item.PropertyType.ToString();
+ CommData.Add(new PlcInfos()
+ {
+ Count = CommData.Count + 1,
+ Name = item.Name,
+ Address = item.GetCustomAttribute().Address,
+ Type = type.Substring(type.IndexOf(".") + 1),
+ Describe = item.GetCustomAttribute().Describe,
+ Value = item.GetValue(GVL_SmallStation.GetInstance.WindSendDB94).ToString(),
+ });
+ }
+ }
+
+ foreach (PropertyInfo item in typeof(WindSend_Write).GetProperties())
+ {
+ if (Attribute.IsDefined(item, typeof(VarCommAttribute)))
+ {
+ string type = item.PropertyType.ToString();
+ CommData.Add(new PlcInfos()
+ {
+ Count = CommData.Count + 1,
+ Name = item.Name,
+ Address = item.GetCustomAttribute().Address,
+ Type = type.Substring(type.IndexOf(".") + 1),
+ Describe = item.GetCustomAttribute().Describe,
+ Value = item.GetValue(GVL_SmallStation.GetInstance.WindSendDB95).ToString(),
+ });
+ }
+ }
+
foreach (PropertyInfo item in typeof(GVL_SmallStation).GetProperties())
{
if (Attribute.IsDefined(item, typeof(VarCommAttribute)))
@@ -1518,6 +1589,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD4", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD8", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD12", weight);
+ WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD16", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBX38.1", false);
}
public void RawMaterialNameWithCode()
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
index 7ea4b6ac..c209bf98 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
@@ -24,9 +24,15 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
{
if (IsConnected)
{
+ var res0 = this.Siemens_PLC_S7.ReadClass(95);
+ if (res0 != null && res0 is WindSend_Write WriteData)
+ {
+ GVL_SmallStation.GetInstance.WindSendDB95 = WriteData;
+ }
var res1 = this.Siemens_PLC_S7.ReadClass(94);
if (res1 != null && res1 is WindSend_Read readData)
{
+ GVL_SmallStation.GetInstance.WindSendDB94 = readData;
GVL_SmallStation.GetInstance.WindSendAllowAGVPutGet = readData.HoodLiftInPlace;
Siemens_PLC_S7.Write("DB95.DBX38.2", GVL_SmallStation.GetInstance.Station1HaveTray);//工站1有托盘
switch (GVL_SmallStation.GetInstance.WindSendDosingStatus)
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendRawMaterial.cs b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendRawMaterial.cs
index 7d48cee8..2b9f1a54 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendRawMaterial.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendRawMaterial.cs
@@ -30,5 +30,18 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
///
public float DosingCompleWeight { get { return _mDosingCompleWeight; } set { _mDosingCompleWeight = value; OnPropertyChanged(); } }
private float _mDosingCompleWeight;
+
+
+ ///
+ /// 原料对应的桶号
+ ///
+ public short RawMaterialBarrelNum { get { return _mRawMaterialBarrelNum; } set { _mRawMaterialBarrelNum = value; OnPropertyChanged(); } }
+ private short _mRawMaterialBarrelNum;
+ ///
+ /// 原料类型
+ ///
+
+ public string RawMaterialType { get { return _mRawMaterialType; } set { _mRawMaterialType = value; OnPropertyChanged(); } }
+ private string _mRawMaterialType;
}
}
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Read.cs b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Read.cs
index 222a2f6c..64d134d7 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Read.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Read.cs
@@ -1,4 +1,5 @@
-using BPASmartClient.S7Net;
+using BPASmartClient.JXJFoodSmallStation.Model.GVL;
+using BPASmartClient.S7Net;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,74 +8,106 @@ using System.Threading.Tasks;
namespace BPASmartClient.JXJFoodSmallStation.Model.WindSend
{
- internal class WindSend_Read
+ public class WindSend_Read
{
+ [VarComm("DB94.DBX0.0", "吸风罩提升到位")]
///
/// 吸风罩提升到位
///
public bool HoodLiftInPlace { get; set; }
+
+ [VarComm("DB94.DBX0.1", "配方接收完成")]
///
/// 配方接收完成
///
public bool RecipeReceiveFinish { get; set; }
+
+ [VarComm("DB94.DBX0.2", "制作完成信号")]
///
/// 制作完成信号
///
public bool CurrentCompleteSign { get; set; }
+
+ [VarComm("DB94.DBX0.3", "允许下发信号")]
///
/// 允许下发信号
///
public bool IsAllowIssue { get; set; }
+
+ [VarComm("DB94.DBX0.4", "排料完成信号")]
///
/// 排料完成信号
///
public bool DisChargeComple { get; set; }
+
+ [VarComm("DB94.DBW2", "当前配方编码")]
///
/// 当前配方编码
///
[Siemens(16)]
public string CurrentRecipeCode { get; set; } = "";
+
+ [VarComm("DB94.DBW20", "系统状态")]
///
/// 系统状态
///
public short SystemRunStatus { get; set; }
+
+ [VarComm("DB94.DBD22", "原料1下料完成重量")]
///
/// 原料1下料完成重量
///
public float RawMaterial1_FinishWeight { get; set; }
+
+ [VarComm("DB94.DBD26", "原料2下料完成重量")]
///
/// 原料2下料完成重量
///
public float RawMaterial2_FinishWeight { get; set; }
+
+ [VarComm("DB94.DBD30", "原料3下料完成重量")]
///
/// 原料3下料完成重量
///
public float RawMaterial3_FinishWeight { get; set; }
+
+ [VarComm("DB94.DBD34", "原料4下料完成重量")]
///
/// 原料4下料完成重量
///
public float RawMaterial4_FinishWeight { get; set; }
+
+ [VarComm("DB94.DBD38", "原料5下料完成重量")]
///
/// 原料5下料完成重量
///
public float RawMaterial5_FinishWeight { get; set; }
+ [VarComm("DB94.DBD42", "原料1料仓重量")]
///
/// 原料1料仓重量
///
public float RawMaterial1_StockBinWeight { get; set; }
+
+ [VarComm("DB94.DBD46", "原料2料仓重量")]
///
/// 原料2料仓重量
///
public float RawMaterial2_StockBinWeight { get; set; }
+
+ [VarComm("DB94.DBD50", "原料3料仓重量")]
///
/// 原料3料仓重量
///
public float RawMaterial3_StockBinWeight { get; set; }
+
+ [VarComm("DB94.DBD54", "原料4料仓重量")]
///
/// 原料4料仓重量
///
public float RawMaterial4_StockBinWeight { get; set; }
+
+ [VarComm("DB94.DBD58", "原料5料仓重量")]
///
/// 原料5料仓重量
///
diff --git a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Write.cs b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Write.cs
index fd619b57..bf7edf6d 100644
--- a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Write.cs
+++ b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Write.cs
@@ -1,4 +1,5 @@
-using BPASmartClient.S7Net;
+using BPASmartClient.JXJFoodSmallStation.Model.GVL;
+using BPASmartClient.S7Net;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,39 +10,56 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.WindSend
{
public class WindSend_Write
{
+ [VarComm("DB95.DBD0", "原料1设定重量")]
///
/// 原料1设定重量
///
public float RawMaterial1_SetWeight { get; set; }
+
+ [VarComm("DB95.DBD4", "原料2设定重量")]
///
/// 原料2设定重量
///
public float RawMaterial2_SetWeight { get; set; }
+
+ [VarComm("DB95.DBD8", "原料3设定重量")]
///
/// 原料3设定重量
///
public float RawMaterial3_SetWeight { get; set; }
+
+ [VarComm("DB95.DBD12", "原料4设定重量")]
///
/// 原料4设定重量
///
public float RawMaterial4_SetWeight { get; set; }
+
+ [VarComm("DB95.DBD16", "原料5设定重量")]
///
/// 原料5设定重量
///
public float RawMaterial5_SetWeight { get; set; }
+
+ [VarComm("DB95.DBW20", "目标配方编码")]
///
/// 目标配方编码
///
[Siemens(16)]
public string TargetRecipeCode { get; set; } = "";
+
+ [VarComm("DB95.DBX38.0", "允许配料")]
///
/// 允许配料
///
public bool IsAllowDosing { get; set; }
+
+ [VarComm("DB95.DBX38.1", "配方制作完成接收")]
///
/// 配方制作完成接收
///
public bool RecipeCompleRec { get; set; }
+
+ [VarComm("DB95.DBX38.2", "工位1有信号")]
///
/// 工位1有信号
///
diff --git a/BPASmartClient.JXJFoodSmallStation/View/ManualFlowView.xaml b/BPASmartClient.JXJFoodSmallStation/View/ManualFlowView.xaml
index 4b6e9284..9fcc8066 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/ManualFlowView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/ManualFlowView.xaml
@@ -66,7 +66,7 @@
VerticalAlignment="Center"
FontSize="25"
Foreground="#FF2AB2E7" />
-
+ Style="{StaticResource ImageButtonStyle}" />-->
+
+
+
+
diff --git a/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml b/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml
index f7602989..5dfcccfe 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml
@@ -145,6 +145,7 @@
+
原料重量
+
+ 原料类型
+
@@ -185,6 +193,7 @@
+
+
diff --git a/BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml b/BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml
index 79c43cc1..69d081ed 100644
--- a/BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml
+++ b/BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml
@@ -184,6 +184,16 @@
Foreground="Aqua"
IsChecked="{Binding HKPlcConnect}" />
+
+
+
- {
- GVL_SmallStation.GetInstance.WindSendAllowAGVPutGet = true;
- MessageNotify.GetInstance.ShowUserLog("手动点击按钮,粉料仓提升到位");
- });
+ //Test5Command = new RelayCommand(() =>
+ //{
+ // GVL_SmallStation.GetInstance.WindSendAllowAGVPutGet = true;
+ // MessageNotify.GetInstance.ShowUserLog("手动点击按钮,粉料仓提升到位");
+ //});
Test6Command = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("AGVPutTrayFinish");
@@ -149,6 +149,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
});
ThreadManage.GetInstance().StartLong(new Action(() =>
{
+ RecipeDosingCompleNum = GVL_SmallStation.GetInstance.RecipeDosingCompleNum;
Recipe1DosingComplete = GVL_SmallStation.GetInstance.RecipeStockBinDosing[0].ToBinString();
Recipe2DosingComplete = GVL_SmallStation.GetInstance.RecipeStockBinDosing[1].ToBinString();
Recipe3DosingComplete = GVL_SmallStation.GetInstance.RecipeStockBinDosing[2].ToBinString();
@@ -326,6 +327,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
public static int StockbinDosingCompleNum { get { return _StockbinDosingCompleNum; } set { _StockbinDosingCompleNum = value; OnStaticPropertyChanged(); } }
+ private static int _RecipeDosingCompleNum { get; set; }
+ public static int RecipeDosingCompleNum { get { return _RecipeDosingCompleNum; } set { _RecipeDosingCompleNum = value; OnStaticPropertyChanged(); } }
+
public static Visibility VisibilityBtn1 { get { return _VisibilityBtn1; } set { _VisibilityBtn1 = value; OnStaticPropertyChanged(); } }
private static Visibility _VisibilityBtn1 = Visibility.Visible;
public static Visibility VisibilityBtn2 { get { return _VisibilityBtn2; } set { _VisibilityBtn2 = value; OnStaticPropertyChanged(); } }
diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs
index bdd401c9..a1a8e8e6 100644
--- a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs
+++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs
@@ -35,11 +35,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
AllRawMaterial.Add(new RemoteRecipeRawMaterial()
{
- RawMaterialType = "粉料",
+ RawMaterialType = item1.RawMaterialType,
RawMaterialName = item1.RawMaterialName,
RawMaterialWeight = item1.RawMaterialWeight,
RawMaterialLocation = item1.Location,
- RawMaterialBarrelNum = 3,
+ RawMaterialBarrelNum = item1.RawMaterialBarrelNum,
});
}
}
@@ -156,6 +156,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
RawMaterialName = item.RawMaterialName,
RawMaterialWeight = item.RawMaterialWeight,
Location = item.RawMaterialLocation,
+ RawMaterialType =item.RawMaterialType,
+ RawMaterialBarrelNum=item.RawMaterialBarrelNum,
});
}
}
@@ -188,6 +190,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
RawMaterialName = item.RawMaterialName,
RawMaterialWeight = item.RawMaterialWeight,
Location = item.RawMaterialLocation,
+ RawMaterialType = item.RawMaterialType,
+ RawMaterialBarrelNum = item.RawMaterialBarrelNum,
});
}
}
diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs
index a8e798a9..94751f12 100644
--- a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs
+++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs
@@ -29,6 +29,10 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
RawMaterialsInfo.Add(item);
}
+ foreach (var item1 in rm.WindSend)
+ {
+ RawMaterialsInfo.Add(new RemoteRecipeRawMaterial() { RawMaterialName= item1.RawMaterialName, RawMaterialLocation= item1.Location,RawMaterialBarrelNum= item1.RawMaterialBarrelNum,RawMaterialWeight= item1.RawMaterialWeight,RawMaterialType=item1.RawMaterialType});
+ }
}
}), "RecipeInfo");
diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs
index 530031de..5cc76574 100644
--- a/BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs
+++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs
@@ -24,6 +24,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
SiemensConnect = Json.Data.deviceConnectPar.SiemensConnect;
WindSendConnect = Json.Data.deviceConnectPar.WindSendConnect;
HKPlcConnect = Json.Data.deviceConnectPar.HKPlcConnect;
+ ShieldStockbinAlarm = Json.Data.deviceConnectPar.ShieldStockbinAlarm;
+
AxisLoadSpeed = Json.Data.deviceConnectPar.AxisLoadSpeed;
AxisMidSpeed = Json.Data.deviceConnectPar.AxisMidSpeed;
AxisUnLoadSpeed = Json.Data.deviceConnectPar.AxisUnLoadSpeed;
@@ -35,6 +37,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
Json.Data.deviceConnectPar.SiemensConnect = SiemensConnect;
Json.Data.deviceConnectPar.WindSendConnect = WindSendConnect;
Json.Data.deviceConnectPar.HKPlcConnect = HKPlcConnect;
+ Json.Data.deviceConnectPar.ShieldStockbinAlarm = ShieldStockbinAlarm;
+
Json.Data.deviceConnectPar.AxisLoadSpeed = AxisLoadSpeed;
Json.Data.deviceConnectPar.AxisMidSpeed = AxisMidSpeed;
Json.Data.deviceConnectPar.AxisUnLoadSpeed = AxisUnLoadSpeed;
@@ -69,7 +73,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
private bool _mWindSendConnect;
public bool HKPlcConnect { get { return _mHKPlcConnect; } set { _mHKPlcConnect = value; OnPropertyChanged(); } }
private bool _mHKPlcConnect;
-
+ public bool ShieldStockbinAlarm { get { return _mShieldStockbinAlarm; } set { _mShieldStockbinAlarm = value; OnPropertyChanged(); } }
+ private bool _mShieldStockbinAlarm;
+
public short AxisLoadSpeed { get { return _mAxisLoadSpeed; } set { _mAxisLoadSpeed = value; OnPropertyChanged(); } }
private short _mAxisLoadSpeed;
public short AxisMidSpeed { get { return _mAxisMidSpeed; } set { _mAxisMidSpeed = value; OnPropertyChanged(); } }