From cd4ec1fde51cccfad3e3bc7be67ee37c6d10029c Mon Sep 17 00:00:00 2001 From: wangsr Date: Tue, 19 Dec 2023 12:42:31 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E8=87=AA=E5=8A=A8=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD=E4=BF=9D=E8=AF=81=E6=89=80?= =?UTF-8?q?=E6=9C=89=E7=89=A9=E6=96=99=E9=83=BD=E4=B8=8D=E7=9B=B8=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutoControl/PlcAutoWriteHelper.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/PlcAutoWriteHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/PlcAutoWriteHelper.cs index 7fb6dfb..1cf3c5a 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/PlcAutoWriteHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/PlcAutoWriteHelper.cs @@ -9,6 +9,7 @@ using Mesnac.Controls.Default; using Mesnac.Core.Service; using System; using System.Collections.Generic; +using System.Linq; using System.Windows.Forms; using static Mesnac.Action.ChemicalWeighing.AutoControl.AutoLogHelper; @@ -66,6 +67,12 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl } } + if(b1 == b2) + { + MessageBox.Show("两种物料不可相同!"); + return; + } + if(GelSpeed > 50) { MessageBox.Show("速度不能大于五十!"); @@ -362,6 +369,13 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl return; } + var a = recipes.Where(x => x.Bin != -1).GroupBy(x => x.Bin).All(x => x.Count() == 1); + if (!a) + { + MessageBox.Show("两种物料不可相同!"); + return; + } + short dryWaitTime = Convert.ToInt16(TextE.DryWaitTime.MCValue.ToString()); short dryOutDelayTime = Convert.ToInt16(TextE.DryOutDelayTime.MCValue.ToString()); float drySpeed1 = Convert.ToSingle(TextE.DrySpeed1.MCValue.ToString());